|
|
@@ -12,7 +12,6 @@
|
|
|
:maxable="true"
|
|
|
:resizable="true"
|
|
|
>
|
|
|
-
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
<headerTitle title="基本信息"></headerTitle>
|
|
|
<el-row>
|
|
|
@@ -22,8 +21,7 @@
|
|
|
prop="sourceType"
|
|
|
style="margin-bottom: 22px"
|
|
|
>
|
|
|
-
|
|
|
- <el-select
|
|
|
+ <el-select
|
|
|
v-model="form.sourceType"
|
|
|
placeholder="请选择"
|
|
|
style="width: 100%"
|
|
|
@@ -38,8 +36,6 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
-
|
|
|
-
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -134,12 +130,10 @@
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="files" label="附件">
|
|
|
<fileMain v-model="form.files"></fileMain>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -243,7 +237,7 @@
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
// import fileMain from '@/components/addDoc/index.vue';
|
|
|
import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
- import { orderSourceType,requirementSourceType } from '@/enum/dict';
|
|
|
+ import { orderSourceType, requirementSourceType } from '@/enum/dict';
|
|
|
|
|
|
export default {
|
|
|
props: {
|
|
|
@@ -265,7 +259,7 @@
|
|
|
inventoryTable,
|
|
|
purchaseNeedList,
|
|
|
personSelect,
|
|
|
- staffSelection,
|
|
|
+ staffSelection
|
|
|
},
|
|
|
data() {
|
|
|
let formDef = {
|
|
|
@@ -563,9 +557,12 @@
|
|
|
let res = await isHasGeneratedPlanAPI(row.id);
|
|
|
if (res) this.$message.warning('该需求已经生成过计划,请注意');
|
|
|
await this.getDetailData(row.id);
|
|
|
-
|
|
|
}
|
|
|
- this.$set(this.form,'planName',await getCode('purchase_plan_code_name'))
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ 'planName',
|
|
|
+ await getCode('purchase_plan_code_name')
|
|
|
+ );
|
|
|
} else {
|
|
|
this.isUpdate = true;
|
|
|
await this.init(row.id);
|
|
|
@@ -695,11 +692,27 @@
|
|
|
async submit(res) {
|
|
|
console.log(res);
|
|
|
let data = await getplanDetail(this.form.id || res);
|
|
|
+ let storemanIds = '';
|
|
|
+ if (['3', '4', '5'].includes(row.sourceType)) {
|
|
|
+ let ids = data.detailList.map((item) => item.warehouseId);
|
|
|
+ let warehouseList = await getWarehouseListByIds(ids || []);
|
|
|
+ storemanIds = warehouseList.map((item) => item.ownerId);
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // let params = {
|
|
|
+ // businessId: row.id,
|
|
|
+ // businessKey: ['3', '4', '5'].includes(row.sourceType)
|
|
|
+ // ? 'outsource_purchasePlan_approve'
|
|
|
+ // : 'purchase_plan_approve',
|
|
|
+
|
|
|
this.processSubmitDialogFlag = true;
|
|
|
this.$nextTick(() => {
|
|
|
let params = {
|
|
|
businessId: data.id,
|
|
|
- businessKey: 'purchase_plan_approve',
|
|
|
+ businessKey: ['3', '4', '5'].includes(row.sourceType)
|
|
|
+ ? 'outsource_purchasePlan_approve'
|
|
|
+ : 'purchase_plan_approve',
|
|
|
formCreateUserId: data.createUserId,
|
|
|
variables: {
|
|
|
businessCode: data.planCode,
|