|
@@ -310,7 +310,7 @@
|
|
|
<el-form-item label="ERP账户" prop="erpAccount" v-if="SFDFopen">
|
|
|
<el-select v-model="queryParams.erpAccount" placeholder="ERP账户" clearable size="small">
|
|
|
<el-option
|
|
|
- v-for="dict in erpAccountList"
|
|
|
+ v-for="dict in erpAccountQueryList"
|
|
|
:key="dict"
|
|
|
:label="dict"
|
|
|
:value="dict"
|
|
@@ -738,13 +738,6 @@ export default {
|
|
|
// 监听deptId
|
|
|
'deptId': 'currDeptChange'
|
|
|
},
|
|
|
- // computed: {
|
|
|
- // // 计算选中账户的详细信息
|
|
|
- // selectedAccountInfo() {
|
|
|
- // if (!this.erpAccountForm.selectedAccount) return null;
|
|
|
- // return this.erpAccountList.find(account => account.id === this.erpAccountForm.selectedAccount);
|
|
|
- // }
|
|
|
- // },
|
|
|
data() {
|
|
|
return {
|
|
|
// 新增排序相关数据
|
|
@@ -784,6 +777,7 @@ export default {
|
|
|
submitting: false
|
|
|
},
|
|
|
erpAccountList: [], // ERP账户列表
|
|
|
+ erpAccountQueryList:[], // ERP账户查询条件列表
|
|
|
erpAccountForm: {
|
|
|
selectedAccount: null // 选中的账户ID
|
|
|
},
|
|
@@ -924,7 +918,7 @@ export default {
|
|
|
isFirst:null,
|
|
|
source:null,
|
|
|
companyId:null,
|
|
|
- companyIds:null
|
|
|
+ companyIds:null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
@@ -1008,7 +1002,6 @@ export default {
|
|
|
this.deliveryStatusOptions = response.data;
|
|
|
});
|
|
|
this.getErpAccountList();
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
// 新增排序处理方法
|
|
@@ -1243,32 +1236,33 @@ export default {
|
|
|
// 设置erp账户
|
|
|
showErpAccountSetDialog() {
|
|
|
this.erpAccountDialog.open = true;
|
|
|
- // this.erpAccountDialog.loading = true;
|
|
|
this.erpSettingType = 'set'
|
|
|
- // this.getErpAccountList();
|
|
|
this.calculateOrderSummary();
|
|
|
},
|
|
|
//显示ERP账户选择对话框
|
|
|
showErpAccountDialog() {
|
|
|
this.erpAccountDialog.open = true;
|
|
|
- // this.erpAccountDialog.loading = true;
|
|
|
this.erpSettingType = 'push'
|
|
|
- // this.getErpAccountList();
|
|
|
this.calculateOrderSummary();
|
|
|
},
|
|
|
|
|
|
//获取ERP账户列表
|
|
|
async getErpAccountList() {
|
|
|
- // getErpAccountList() {
|
|
|
try {
|
|
|
const response = await getErpAccount();
|
|
|
- // const response = getErpAccount();
|
|
|
if (response.code === 200) {
|
|
|
- this.erpAccountList = response.data || [];
|
|
|
+ const list = response.data || [];
|
|
|
+ this.erpAccountList = [...list];
|
|
|
+ this.erpAccountQueryList = [...list, '未分拣'];
|
|
|
+ // 设置默认值:第一条真实账户
|
|
|
+ if (list.length && !this.queryParams.erpAccount) {
|
|
|
+ this.$set(this.queryParams, 'erpAccount', list[0]);
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error(response.msg || '获取ERP账户列表失败');
|
|
|
this.erpAccountList = [];
|
|
|
}
|
|
|
+
|
|
|
} catch (error) {
|
|
|
console.error('获取ERP账户列表失败:', error);
|
|
|
this.$message.error('获取ERP账户列表失败');
|