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