|
|
@@ -280,7 +280,8 @@
|
|
|
|
|
|
<headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
|
|
|
|
|
|
- <inventoryTable ref="inventoryTable" :is-show-supplier-mark="true" :isContractId='!!form.contractId'></inventoryTable>
|
|
|
+ <inventoryTable ref="inventoryTable" :is-show-supplier-mark="true"
|
|
|
+ :isContractId='!!form.contractId'></inventoryTable>
|
|
|
<el-row style="margin-top: 20px">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
@@ -351,7 +352,7 @@ import dictMixins from '@/mixins/dictMixins';
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import personSelect from '@/components/CommomSelect/person-select.vue';
|
|
|
import parentList from '@/views/saleManage/contact/components/parentList.vue';
|
|
|
-import {getDetail} from '@/api/contractManage/contractBook';
|
|
|
+import {enterprisePage, getDetail} from '@/api/contractManage/contractBook';
|
|
|
|
|
|
import {
|
|
|
// getpurchaseorderDetail,
|
|
|
@@ -430,6 +431,7 @@ export default {
|
|
|
activeName: 'base',
|
|
|
formDef,
|
|
|
form: copyObj(formDef),
|
|
|
+ enterprisePage: [],
|
|
|
tableBankData: [],
|
|
|
tableLinkData: [],
|
|
|
// 组织机构树形结构数据
|
|
|
@@ -504,12 +506,15 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
allcountAmount() {
|
|
|
- this.form.payAmount = this.$store.state.order.allcountAmount
|
|
|
+ if (!this.form.contractId) {
|
|
|
+ this.form.payAmount = this.$store.state.order.allcountAmount
|
|
|
+ }
|
|
|
return this.$store.state.order.allcountAmount;
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getGroupAll();
|
|
|
+ this.getEnterprisePage()
|
|
|
},
|
|
|
methods: {
|
|
|
// 选择负责人部门
|
|
|
@@ -720,7 +725,7 @@ export default {
|
|
|
});
|
|
|
this.getDetailData(obj.id);
|
|
|
//采购询价表
|
|
|
- this.getPurchaseinquiry(obj.sourceId);
|
|
|
+ obj.sourceId && this.getPurchaseinquiry(obj.sourceId);
|
|
|
this.$store.commit('order/setContractId', obj.id);
|
|
|
},
|
|
|
|
|
|
@@ -787,13 +792,31 @@ export default {
|
|
|
this.title = type === 'add' ? '新增' : '修改';
|
|
|
this.row = row;
|
|
|
this.visible = true;
|
|
|
+ if (this.enterprisePage.length == 0) {
|
|
|
+ await this.getEnterprisePage();
|
|
|
+ }
|
|
|
if (type == 'add') {
|
|
|
this.isUpdate = false;
|
|
|
+ if (this.enterprisePage.length > 0) {
|
|
|
+ this.form.partaName = this.enterprisePage[0].name;
|
|
|
+ this.form.partaUnifiedSocialCreditCode = this.enterprisePage[0].unifiedSocialCreditCode;
|
|
|
+ this.form.partaFax = this.enterprisePage[0].fax;
|
|
|
+ this.form.partaAddress = this.enterprisePage[0].address;
|
|
|
+ }
|
|
|
} else {
|
|
|
this.isUpdate = true;
|
|
|
this.getpurchaseorderDetail(row.id);
|
|
|
}
|
|
|
},
|
|
|
+ getEnterprisePage() {
|
|
|
+ enterprisePage({
|
|
|
+ pageNum: 1,
|
|
|
+ size: 100
|
|
|
+ }).then((res) => {
|
|
|
+ this.enterprisePage = [];
|
|
|
+ this.enterprisePage.push(...res.list);
|
|
|
+ });
|
|
|
+ },
|
|
|
//从合同页面新增订单
|
|
|
contractOpen(row) {
|
|
|
this.title = '新增'
|