|
|
@@ -440,8 +440,13 @@
|
|
|
<el-button size="mini" @click="updateErpOrder" >同步物流单号信息</el-button>
|
|
|
</div>
|
|
|
<el-form-item label="物流公司" prop="deliverySn" >
|
|
|
- <el-select style="width:220px" v-model="editDyForm.deliverSn" placeholder="请选择" clearable size="small">
|
|
|
- <el-option v-for="item in deliveryOptions" :key="item.key" :label="item.label" :value="item.value" />
|
|
|
+ <el-select style="width:220px" v-model="editDyForm.deliverSn" placeholder="请选择" clearable size="small" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in deliveryOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="物流单号" prop="deliveryId" >
|
|
|
@@ -593,14 +598,7 @@ export default {
|
|
|
deliverName: null,
|
|
|
deliverId: null,
|
|
|
},
|
|
|
- deliveryOptions: [
|
|
|
- {key: "SF", label: "顺丰", value: "SF"},
|
|
|
- {key: "EMS", label: "邮政", value: "EMS"},
|
|
|
- {key: "ZTO", label: "中通", value: "ZTO"},
|
|
|
- {key: "JD", label: "京东", value: "JD"},
|
|
|
- {key: "DBL", label: "德邦", value: "DBL"},
|
|
|
- {key: "YD", label: "韵达", value: "YD"}
|
|
|
- ],
|
|
|
+ deliveryOptions: [],
|
|
|
editForm: {
|
|
|
orderType: null,
|
|
|
status: null,
|
|
|
@@ -661,6 +659,9 @@ export default {
|
|
|
this.getDicts("store_order_create_type").then((response) => {
|
|
|
this.createTypeOptions = response.data;
|
|
|
});
|
|
|
+ this.getDicts("sys_express_company").then((response) => {
|
|
|
+ this.deliveryOptions = response.data || [];
|
|
|
+ });
|
|
|
getTcmScheduleList().then(response => {
|
|
|
this.scheduleOptions = response.data;
|
|
|
});
|
|
|
@@ -669,9 +670,9 @@ export default {
|
|
|
'editDyForm.deliverSn': {
|
|
|
handler(newValue) {
|
|
|
// 找到对应的选项
|
|
|
- const selectedOption = this.deliveryOptions.find(option => option.value === newValue);
|
|
|
+ const selectedOption = this.deliveryOptions.find(option => option.dictValue === newValue);
|
|
|
// 如果找到了,就设置 deliverName;否则清空 deliverName
|
|
|
- this.editDyForm.deliverName = selectedOption ? selectedOption.label : '';
|
|
|
+ this.editDyForm.deliverName = selectedOption ? selectedOption.dictLabel : '';
|
|
|
},
|
|
|
immediate: true // 立即执行一次,处理初始值
|
|
|
}
|
|
|
@@ -798,8 +799,8 @@ export default {
|
|
|
if (valid) {
|
|
|
const payload = { ...this.editDyForm };
|
|
|
if (!payload.deliverName) {
|
|
|
- const selectedOption = this.deliveryOptions.find(option => option.value === payload.deliverSn);
|
|
|
- payload.deliverName = selectedOption ? selectedOption.label : null;
|
|
|
+ const selectedOption = this.deliveryOptions.find(option => option.dictValue === payload.deliverSn);
|
|
|
+ payload.deliverName = selectedOption ? selectedOption.dictLabel : null;
|
|
|
}
|
|
|
updateDeliveryId(payload).then(response => {
|
|
|
if (response.code === 200) {
|