|
|
@@ -59,7 +59,7 @@
|
|
|
<el-form-item
|
|
|
prop="remark"
|
|
|
label="是否首工序"
|
|
|
- v-if="['3', '4', '5', '6','7'].includes(form.sourceType)"
|
|
|
+ v-if="['3', '4', '5', '6', '7'].includes(form.sourceType)"
|
|
|
>
|
|
|
<el-radio-group v-model="form.isFirstProcess">
|
|
|
<el-radio v-for="item in processList" :label="item.value">{{
|
|
|
@@ -74,7 +74,7 @@
|
|
|
>
|
|
|
outsourceType
|
|
|
</el-form-item> -->
|
|
|
-
|
|
|
+
|
|
|
<el-form-item
|
|
|
v-if="form.relationType == 1"
|
|
|
label="采购需求单"
|
|
|
@@ -367,7 +367,7 @@
|
|
|
<el-tab-pane
|
|
|
label="带料清单"
|
|
|
name="2"
|
|
|
- v-if="['3', '4', '5', '6','7'].includes(form.sourceType)"
|
|
|
+ v-if="['3', '4', '5', '6', '7'].includes(form.sourceType)"
|
|
|
>
|
|
|
<inventoryTable
|
|
|
ref="rawDetailListRef"
|
|
|
@@ -383,7 +383,7 @@
|
|
|
<el-tab-pane
|
|
|
label="产出清单"
|
|
|
name="3"
|
|
|
- v-if="['3', '4', '5', '6','7'].includes(form.sourceType)"
|
|
|
+ v-if="['3', '4', '5', '6', '7'].includes(form.sourceType)"
|
|
|
>
|
|
|
<inventoryTable
|
|
|
ref="outputDetailListRef"
|
|
|
@@ -536,7 +536,6 @@
|
|
|
import { getInventoryTotalAPI } from '@/api/wms';
|
|
|
import modalTitle from '@/BIZComponents/modalTitle.vue';
|
|
|
import { contactDetail } from '@/api/saleManage/contact';
|
|
|
-
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
|
@@ -828,8 +827,12 @@
|
|
|
this.$set(this.form, 'relationCode', data.planCode);
|
|
|
const res = await getplanDetail(data.id);
|
|
|
this.$set(this.form, 'isFirstProcess', res.isFirstProcess);
|
|
|
+ if (res.detailList.lenght > 1) {
|
|
|
+ this.$refs.planTableListRef.open(res);
|
|
|
+ } else {
|
|
|
+ this.putTableValue(res);
|
|
|
+ }
|
|
|
|
|
|
- this.$refs.planTableListRef.open(res);
|
|
|
// let form = {
|
|
|
// contractVO: {
|
|
|
// ...this.form
|
|
|
@@ -863,8 +866,14 @@
|
|
|
this.$set(this.form, 'relationCode', data.inquiryCode);
|
|
|
const res = await getpurchaseinquiry(data.id);
|
|
|
this.$set(this.form, 'isFirstProcess', res.isFirstProcess);
|
|
|
-
|
|
|
- this.$refs.planTableListRef.open(res);
|
|
|
+ res['rawDetailList'] = res.rawList;
|
|
|
+ res['outputDetailList'] = res.outputList;
|
|
|
+ if (res.detailList.lenght > 1) {
|
|
|
+ this.$refs.planTableListRef.open(res);
|
|
|
+ } else {
|
|
|
+ this.putTableValue(res);
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
async putTableValue({ detailList, rawDetailList, outputDetailList }) {
|
|
|
@@ -905,6 +914,7 @@
|
|
|
});
|
|
|
this.setProductInfo();
|
|
|
});
|
|
|
+ await this.changeParent({id:info.partbId})
|
|
|
}
|
|
|
|
|
|
const codeList = [
|
|
|
@@ -962,19 +972,7 @@
|
|
|
this.form.payAmount = val;
|
|
|
//this.form.payAmount = undefined
|
|
|
},
|
|
|
- //选择供应商
|
|
|
- changeSupplier(obj) {
|
|
|
- this.form = Object.assign({}, this.form, {
|
|
|
- partbId: obj.id,
|
|
|
- partbName: obj.name,
|
|
|
- partbAddress: obj.addressName + obj.address,
|
|
|
- partbLinkId: '',
|
|
|
- partbLinkName: '',
|
|
|
- partbEmail: '',
|
|
|
- partbTel: ''
|
|
|
- });
|
|
|
- this.getLinkInfo(obj.id);
|
|
|
- },
|
|
|
+
|
|
|
//选择合同获取合同的详情
|
|
|
async getDetailData(id) {
|
|
|
this.loading = true;
|
|
|
@@ -1050,10 +1048,17 @@
|
|
|
isFirstProcess
|
|
|
});
|
|
|
this.getLinkInfo(partaId);
|
|
|
- this.$refs.planTableListRef.contractOpen(
|
|
|
- data.productList,
|
|
|
- contractVO.contractStartDate
|
|
|
- );
|
|
|
+ if (data.productList > 1) {
|
|
|
+ this.$refs.planTableListRef.contractOpen(
|
|
|
+ data.productList,
|
|
|
+ contractVO.contractStartDate
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.contractSuccess({
|
|
|
+ productList: data.productList,
|
|
|
+ contractStartDate: contractVO.contractStartDate
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
this.$refs.rawDetailListRef &&
|
|
|
this.$refs.rawDetailListRef.putTableValue(contractVO.rawList); //原料
|
|
|
@@ -1149,18 +1154,24 @@
|
|
|
},
|
|
|
//选择供应商回调
|
|
|
async changeParent(obj) {
|
|
|
+ const { base, other } = await contactDetail(obj.id);
|
|
|
+
|
|
|
this.form = Object.assign({}, this.form, {
|
|
|
- partbId: obj.id,
|
|
|
- partbName: obj.name,
|
|
|
- partbAddress: obj.addressName + obj.address,
|
|
|
+ partbId: base.id,
|
|
|
+ partbName: base.name,
|
|
|
+ partbAddress: other.addressName
|
|
|
+ ? other.addressName + other.address
|
|
|
+ : base.addressName + other.address,
|
|
|
partbLinkId: '',
|
|
|
partbLinkName: '',
|
|
|
partbEmail: '',
|
|
|
partbTel: '',
|
|
|
- supplierMark: obj.serialNo
|
|
|
+ supplierMark: base.serialNo,
|
|
|
+ partbUnifiedSocialCreditCode: base.unifiedSocialCreditCode
|
|
|
+
|
|
|
});
|
|
|
await this.getLinkInfo(obj.id);
|
|
|
- // const {productList}= await contactDetail(obj.id);
|
|
|
+
|
|
|
// this.form.productList=productList
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
@@ -1395,7 +1406,7 @@
|
|
|
]);
|
|
|
},
|
|
|
async save(type) {
|
|
|
- let is=false
|
|
|
+ let is = false;
|
|
|
try {
|
|
|
await this.getValidate();
|
|
|
// 表单验证通过,执行保存操作
|