|
@@ -38,7 +38,6 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="来源类型" prop="relationType">
|
|
<el-form-item label="来源类型" prop="relationType">
|
|
|
-
|
|
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="form.relationType"
|
|
v-model="form.relationType"
|
|
|
filterable
|
|
filterable
|
|
@@ -53,17 +52,23 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- prop="remark"
|
|
|
|
|
- label="是否首工序"
|
|
|
|
|
- v-if="['3', '4', '5', '6', '7'].includes(form.sourceType)"
|
|
|
|
|
|
|
+ prop="outsourceScene"
|
|
|
|
|
+ label="委外场景"
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ orderSourceType.includes(form.sourceType) && form.outsourceScene
|
|
|
|
|
+ "
|
|
|
>
|
|
>
|
|
|
- <el-radio-group v-model="form.isFirstProcess">
|
|
|
|
|
- <el-radio v-for="item in processList" :label="item.value">{{
|
|
|
|
|
- item.label
|
|
|
|
|
- }}</el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
|
|
+ <el-select v-model="form.outsourceScene" disabled style="width: 100%">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ v-for="item in outsourceSceneList"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
v-if="form.relationType == 1"
|
|
v-if="form.relationType == 1"
|
|
|
label="采购需求单"
|
|
label="采购需求单"
|
|
@@ -80,7 +85,6 @@
|
|
|
label="采购计划单"
|
|
label="采购计划单"
|
|
|
prop="relationName"
|
|
prop="relationName"
|
|
|
>
|
|
>
|
|
|
-
|
|
|
|
|
<el-input
|
|
<el-input
|
|
|
@click.native="handPurchasePlan"
|
|
@click.native="handPurchasePlan"
|
|
|
v-model="form.relationName"
|
|
v-model="form.relationName"
|
|
@@ -130,7 +134,6 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
-
|
|
|
|
|
<el-form-item label="项目名称" prop="projectName">
|
|
<el-form-item label="项目名称" prop="projectName">
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
@@ -147,7 +150,6 @@
|
|
|
>
|
|
>
|
|
|
</DictSelection>
|
|
</DictSelection>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
|
|
|
|
<el-form-item label="需求人" prop="requireUserId">
|
|
<el-form-item label="需求人" prop="requireUserId">
|
|
|
<personSelect
|
|
<personSelect
|
|
@@ -318,7 +320,7 @@
|
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
|
label="带料清单"
|
|
label="带料清单"
|
|
|
name="2"
|
|
name="2"
|
|
|
- v-if="['3', '4', '5', '6', '7'].includes(form.sourceType)"
|
|
|
|
|
|
|
+ v-if="orderSourceType.includes(form.sourceType)"
|
|
|
>
|
|
>
|
|
|
<inventoryTable
|
|
<inventoryTable
|
|
|
ref="rawDetailListRef"
|
|
ref="rawDetailListRef"
|
|
@@ -334,7 +336,7 @@
|
|
|
<el-tab-pane
|
|
<el-tab-pane
|
|
|
label="产出清单"
|
|
label="产出清单"
|
|
|
name="3"
|
|
name="3"
|
|
|
- v-if="['3', '4', '5', '6', '7'].includes(form.sourceType)"
|
|
|
|
|
|
|
+ v-if="orderSourceType.includes(form.sourceType)"
|
|
|
>
|
|
>
|
|
|
<inventoryTable
|
|
<inventoryTable
|
|
|
ref="outputDetailListRef"
|
|
ref="outputDetailListRef"
|
|
@@ -454,7 +456,11 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { emailReg, telReg } from 'ele-admin';
|
|
import { emailReg, telReg } from 'ele-admin';
|
|
|
- import { acceptUnpackoptions } from '@/enum/dict';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ acceptUnpackoptions,
|
|
|
|
|
+ orderSourceType,
|
|
|
|
|
+ outsourceSceneList
|
|
|
|
|
+ } from '@/enum/dict';
|
|
|
import inventoryTable from './inventoryTable.vue';
|
|
import inventoryTable from './inventoryTable.vue';
|
|
|
import planTableList from './planTableList.vue';
|
|
import planTableList from './planTableList.vue';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
@@ -470,7 +476,6 @@
|
|
|
import supplierGoodsListDialog from '@/views/purchasingManage/purchaseOrder/components/supplierGoodsListDialog.vue';
|
|
import supplierGoodsListDialog from '@/views/purchasingManage/purchaseOrder/components/supplierGoodsListDialog.vue';
|
|
|
import {
|
|
import {
|
|
|
addInformation,
|
|
addInformation,
|
|
|
- getInquiry2Order,
|
|
|
|
|
getProductsBySource,
|
|
getProductsBySource,
|
|
|
getPurchaseinquiryAPI,
|
|
getPurchaseinquiryAPI,
|
|
|
getpurchaseorderDetail,
|
|
getpurchaseorderDetail,
|
|
@@ -561,6 +566,8 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
|
|
+ orderSourceType,
|
|
|
|
|
+ outsourceSceneList,
|
|
|
processList: [
|
|
processList: [
|
|
|
{
|
|
{
|
|
|
label: '是',
|
|
label: '是',
|
|
@@ -865,12 +872,12 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
async putTableValue({ productList, rawDetailList, outputDetailList }) {
|
|
async putTableValue({ productList, rawDetailList, outputDetailList }) {
|
|
|
- let totalPrice=0;
|
|
|
|
|
- productList.forEach(item=>{
|
|
|
|
|
- totalPrice+=item.totalPrice
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ let totalPrice = 0;
|
|
|
|
|
+ productList.forEach((item) => {
|
|
|
|
|
+ totalPrice += item.totalPrice;
|
|
|
|
|
+ });
|
|
|
this.$store.commit('order/setAllcountAmount', totalPrice);
|
|
this.$store.commit('order/setAllcountAmount', totalPrice);
|
|
|
- this.$set(this.form,'totalPrice',totalPrice)
|
|
|
|
|
|
|
+ this.$set(this.form, 'totalPrice', totalPrice);
|
|
|
|
|
|
|
|
this.$refs.inventoryTable &&
|
|
this.$refs.inventoryTable &&
|
|
|
this.$refs.inventoryTable.putTableValue(productList);
|
|
this.$refs.inventoryTable.putTableValue(productList);
|
|
@@ -1061,14 +1068,13 @@
|
|
|
return this.$message.error('请先选择名称');
|
|
return this.$message.error('请先选择名称');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- sourceTypeChange(){
|
|
|
|
|
- this.valueChange()
|
|
|
|
|
-
|
|
|
|
|
|
|
+ sourceTypeChange() {
|
|
|
|
|
+ this.valueChange();
|
|
|
},
|
|
},
|
|
|
handleChangeRelationType(val) {
|
|
handleChangeRelationType(val) {
|
|
|
- this.valueChange()
|
|
|
|
|
|
|
+ this.valueChange();
|
|
|
},
|
|
},
|
|
|
- valueChange(){
|
|
|
|
|
|
|
+ valueChange() {
|
|
|
this.form.purchasePlanId = '';
|
|
this.form.purchasePlanId = '';
|
|
|
this.form.purchasePlanNo = '';
|
|
this.form.purchasePlanNo = '';
|
|
|
this.form.purchasePlanName = '';
|
|
this.form.purchasePlanName = '';
|
|
@@ -1078,8 +1084,8 @@
|
|
|
this.form.relationName = '';
|
|
this.form.relationName = '';
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inventoryTable &&
|
|
this.$refs.inventoryTable &&
|
|
|
- this.$refs.inventoryTable.putTableValue([]);
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$refs.inventoryTable.putTableValue([]);
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
//选择下拉框
|
|
//选择下拉框
|
|
|
onchangeLink(selectedOptions) {
|
|
onchangeLink(selectedOptions) {
|
|
@@ -1137,7 +1143,6 @@
|
|
|
// this.form.productList=productList
|
|
// this.form.productList=productList
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
-
|
|
|
|
|
let firstLink =
|
|
let firstLink =
|
|
|
this.linkNameOptions.find((item) => item.ifChief == 1) || {};
|
|
this.linkNameOptions.find((item) => item.ifChief == 1) || {};
|
|
|
this.form = Object.assign({}, this.form, {
|
|
this.form = Object.assign({}, this.form, {
|
|
@@ -1196,7 +1201,7 @@
|
|
|
let item = {
|
|
let item = {
|
|
|
id: this.form.contractId
|
|
id: this.form.contractId
|
|
|
};
|
|
};
|
|
|
- this.$refs.selectContractRef.open(item,this.form.relationType);
|
|
|
|
|
|
|
+ this.$refs.selectContractRef.open(item, this.form.relationType);
|
|
|
},
|
|
},
|
|
|
//清除合同
|
|
//清除合同
|
|
|
clearContrcat() {
|
|
clearContrcat() {
|
|
@@ -1282,11 +1287,11 @@
|
|
|
if (type == 'add') {
|
|
if (type == 'add') {
|
|
|
this.isUpdate = false;
|
|
this.isUpdate = false;
|
|
|
if (this.enterprisePage.length > 0) {
|
|
if (this.enterprisePage.length > 0) {
|
|
|
- this.form.partaName = this.enterprisePage[0].name;
|
|
|
|
|
|
|
+ this.form.partaName = this.enterprisePage[0]?.name;
|
|
|
this.form.partaUnifiedSocialCreditCode =
|
|
this.form.partaUnifiedSocialCreditCode =
|
|
|
- this.enterprisePage[0].unifiedSocialCreditCode;
|
|
|
|
|
- this.form.partaFax = this.enterprisePage[0].fax;
|
|
|
|
|
- this.form.partaAddress = this.enterprisePage[0].address;
|
|
|
|
|
|
|
+ this.enterprisePage[0]?.unifiedSocialCreditCode;
|
|
|
|
|
+ this.form.partaFax = this.enterprisePage[0]?.fax;
|
|
|
|
|
+ this.form.partaAddress = this.enterprisePage[0]?.address;
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
this.isUpdate = true;
|
|
this.isUpdate = true;
|