|
|
@@ -1,16 +1,8 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-form ref="form" :model="form" label-width="120px">
|
|
|
- <headerTitle title="基本信息">
|
|
|
- <!-- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="el-icon-s-grid"
|
|
|
- class="ele-btn-icon"
|
|
|
- @click="exportTable"
|
|
|
- >
|
|
|
- 导出
|
|
|
- </el-button> -->
|
|
|
+ <div class="title"> 采购计划信息</div>
|
|
|
+
|
|
|
</headerTitle>
|
|
|
<el-row>
|
|
|
<el-col :span="12" style="height: 40px">
|
|
|
@@ -85,10 +77,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="files" label="附件:">
|
|
|
<fileMain v-model="form.files" type="view"></fileMain>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
-
|
|
|
-
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<headerTitle title="计划清单" style="margin-top: 15px"></headerTitle>
|
|
|
@@ -101,7 +90,7 @@
|
|
|
:toolkit="[]"
|
|
|
:datasource="form.detailList"
|
|
|
row-key="id"
|
|
|
- height="500px"
|
|
|
+ maxHeight="500px"
|
|
|
>
|
|
|
<template v-slot:totalCount="scope">
|
|
|
<el-input-number
|
|
|
@@ -121,7 +110,7 @@
|
|
|
:underline="false"
|
|
|
@click.native="handleMethod(scope.row)"
|
|
|
>
|
|
|
- 查看分批时间
|
|
|
+ 查看分批时间
|
|
|
</el-link>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -182,6 +171,26 @@
|
|
|
</el-tabs>
|
|
|
</el-form>
|
|
|
<timeDialog ref="timeDialogRef" :view="true"></timeDialog>
|
|
|
+ <div class="title"> 入库单信息</div>
|
|
|
+
|
|
|
+ <div v-if="taskDefinitionKey == 'storeManagerApprove'">
|
|
|
+ <add
|
|
|
+ ref="inoutBoundRef"
|
|
|
+ v-if="form.detailList"
|
|
|
+ :form="form"
|
|
|
+ :sourceBizNo="form.planCode"
|
|
|
+ :saleProductList="form.detailList"
|
|
|
+ :bizType="2"
|
|
|
+ ></add>
|
|
|
+ </div>
|
|
|
+ <div v-if="view && ['3', '4', '5'].includes(form.sourceType)">
|
|
|
+ <detailDialog
|
|
|
+ ref="inoutBoundViewRef"
|
|
|
+ :bizType="2"
|
|
|
+ :businessId="form.planCode"
|
|
|
+ >
|
|
|
+ </detailDialog>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -191,14 +200,17 @@
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { getInventoryTotalAPI } from '@/api/bpm/components/wms';
|
|
|
- // import fileMain from '@/components/addDoc/index.vue';
|
|
|
import timeDialog from '@/components/timeDialog/index.vue';
|
|
|
-
|
|
|
+ import add from '@/views/bpm/stockManagement/storage.vue';
|
|
|
+ import detailDialog from '@/views/bpm/stockManagement/details.vue';
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
- components: {
|
|
|
+ components: {
|
|
|
// fileMain,
|
|
|
- timeDialog },
|
|
|
+ timeDialog,
|
|
|
+ add,
|
|
|
+ detailDialog
|
|
|
+ },
|
|
|
props: {
|
|
|
taskDefinitionKey: {
|
|
|
type: String,
|
|
|
@@ -206,6 +218,9 @@
|
|
|
},
|
|
|
businessId: {
|
|
|
default: ''
|
|
|
+ },
|
|
|
+ isView: {
|
|
|
+ default: ''
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -387,7 +402,7 @@
|
|
|
|
|
|
this.getPlanData(this.businessId);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
downloadFile(file) {
|
|
|
getFile({ objectName: file.storePath }, file.name);
|
|
|
@@ -397,6 +412,7 @@
|
|
|
const data = await getplanDetail(id);
|
|
|
this.loading = false;
|
|
|
if (data) {
|
|
|
+ data.purchaseDate=data.createTime
|
|
|
let codeList = data.detailList.map((item) => item.productCode);
|
|
|
let inventoryTotalList = await getInventoryTotalAPI(codeList);
|
|
|
data.detailList.forEach((item) => {
|
|
|
@@ -421,23 +437,12 @@
|
|
|
this.$refs.contactDetailDialogRef.open(row);
|
|
|
},
|
|
|
async getTableValue() {
|
|
|
- try {
|
|
|
- if (this.form.detailList.some((item) => !!item.totalCount == '')) {
|
|
|
- this.$message.warning('数量不能为空');
|
|
|
- return '';
|
|
|
- }
|
|
|
- // 表单验证通过,执行保存操作
|
|
|
- this.loading = true;
|
|
|
- this.form.detailList = [
|
|
|
- ...this.form.detailList,
|
|
|
- ...this.form.rawDetailList,
|
|
|
- ...this.form.outputDetailList
|
|
|
- ];
|
|
|
- return Object.assign({}, this.form);
|
|
|
- } catch (error) {
|
|
|
- console.log(error);
|
|
|
- // 表单验证未通过,不执行保存操作
|
|
|
- }
|
|
|
+
|
|
|
+ return {
|
|
|
+ returnStorageData:
|
|
|
+ this.$refs.inoutBoundRef &&
|
|
|
+ this.$refs.inoutBoundRef.getReturnStorage()
|
|
|
+ };
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -450,7 +455,12 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .headbox {
|
|
|
+ .title {
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: 800;
|
|
|
+ margin-top: 15px;
|
|
|
+ }
|
|
|
+ .headbox {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|