Commit 8b4a6884 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents c391ce99 5cee6c6a
......@@ -537,7 +537,6 @@ export default {
source: [{ required: true, message: this.$t('客户来源不能为空'), trigger: "blur" }],
customerService: [{ required: true, message: this.$t('客户经理不能为空'), trigger: "blur" }],
status: [{ required: true, message: this.$t('客户状态不能为空'), trigger: "blur" }],
founder: [{ required: true, message: this.$t('创建人不能为空'), trigger: "blur" }],
},
......@@ -672,7 +671,10 @@ export default {
if(errors){
return this.$message.error('有两条路线未选择目的地')
}
//我的客户页面跳转直接,完善客户
if(this.isCustomerServiceConfirmed){
form.isCustomerServiceConfirmed = this.isCustomerServiceConfirmed;
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
......@@ -698,10 +700,6 @@ export default {
return;
}
// 添加的提交
//我的客户页面跳转直接
if(this.isCustomerServiceConfirmed){
form.isCustomerServiceConfirmed = this.isCustomerServiceConfirmed;
}
createCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false;
......
......@@ -513,7 +513,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id;
this.$router.push('/customer/perfect/'+id);
this.$router.push({path:'/customer/perfect/'+id,query:{isCustomerServiceConfirmed:true,}});
// getCustomer(id).then(response => {
// this.form = response.data;
// this.open = true;
......
......@@ -248,6 +248,7 @@
<el-input v-else v-model="tableData1[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData1[$index].unit) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData1[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
......@@ -266,7 +267,7 @@
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="$index + '.boxGauge1'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else v-model.number="tableData1[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
<el-input v-else type="number" v-model="tableData1[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -274,7 +275,7 @@
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="$index + '.boxGauge2'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else v-model.number="tableData1[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
<el-input v-else type="number" v-model="tableData1[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -282,7 +283,7 @@
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="$index + '.boxGauge3'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].boxGauge ? tableData1[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else v-model.number="tableData1[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
<el-input v-else type="number" v-model="tableData1[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -293,7 +294,7 @@
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume" :prop="$index + '.volume'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].volume }}</span>
<el-input v-else v-model.number="tableData1[$index].volume" placeholder=""></el-input>
<el-input v-else type="number" v-model="tableData1[$index].volume" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -304,14 +305,11 @@
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight" :prop="$index + '.weight'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].weight }}</span>
<el-input v-else v-model.number="tableData1[$index].weight" placeholder=""></el-input>
<el-input v-else type="number" v-model="tableData1[$index].weight" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="数量" width="130px">
<template v-slot:header>
<span style="color: red">*</span> 数量
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll" :prop="$index + '.quantityAll'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].quantityAll }}</span>
......
......@@ -81,12 +81,12 @@
prop="address"
:label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing($index)">{{$t('修改')}}</el-button>
<template v-else-if="orderItemList[$index] && orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0">
<el-button size="mini" type="text" @click="handleWarehousing($index)">{{$t('追加')}}</el-button>
<el-button v-if="isEdit" size="mini" type="text" @click="handleWarehousing(row)">{{$t('修改')}}</el-button>
<template v-else-if="wareItem(row.orderItemId) && wareItem(row.orderItemId).orderWarehouseInBackItemDoList && wareItem(row.orderItemId).orderWarehouseInBackItemDoList.length > 0">
<el-button size="mini" type="text" @click="handleWarehousing(row)">{{$t('追加')}}</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">{{$t('退仓')}}</el-button>
</template>
<el-button v-else size="mini" type="text" @click="handleWarehousing($index)">{{$t('入仓')}}</el-button>
<el-button v-else size="mini" type="text" @click="handleWarehousing(row)">{{$t('入仓')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -379,8 +379,9 @@ export default {
}
})
},
handleWarehousing(index) {
this.warehousing = {...this.order.orderItemVOList[index], ...this.orderItemList[index]}
handleWarehousing(row) {
let wareItem = this.orderItemList.find(item => item.orderItemId == row.orderItemId) || {}
this.warehousing = {...row, ...wareItem}
this.warehousingVisible = true
},
handleWarehousingReturn(item){
......@@ -426,6 +427,12 @@ export default {
},
computed: {
// 根据orderItemId获取入仓item
wareItem(){
return orderItemId => {
return this.orderItemList.find(item => item.orderItemId == orderItemId)
}
},
// isAdd() {
// return this.$route.path === "/order/warehousing-add"
// },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment