|
|
@@ -9,11 +9,12 @@
|
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
class="time-form"
|
|
|
+ :selection.sync="selection"
|
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
<div class="headbox">
|
|
|
- <div>
|
|
|
+ <div style="display: flex">
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@@ -32,6 +33,11 @@
|
|
|
>
|
|
|
新增临时产品
|
|
|
</el-button>
|
|
|
+
|
|
|
+ <timeDialogAll
|
|
|
+ @chooseTime="chooseTimeALl"
|
|
|
+ :disabled="!selection.length"
|
|
|
+ ></timeDialogAll>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -368,6 +374,7 @@
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
import headList from '@/BIZComponents/user-select/user-select.vue';
|
|
|
import timeDialog from '@/components/timeDialog/index.vue';
|
|
|
+ import timeDialogAll from '@/components/timeDialog/indexAll.vue';
|
|
|
import { copyObj } from '@/utils/util';
|
|
|
import { getInventoryTotalAPI } from '@/api/wms';
|
|
|
// import fileMain from '@/components/addDoc/index.vue';
|
|
|
@@ -377,7 +384,7 @@
|
|
|
import { levelList } from '@/enum/dict.js';
|
|
|
|
|
|
export default {
|
|
|
- mixins: [dictMixins,tabMixins],
|
|
|
+ mixins: [dictMixins, tabMixins],
|
|
|
components: {
|
|
|
// fileMain,
|
|
|
productList,
|
|
|
@@ -385,7 +392,8 @@
|
|
|
fileUpload,
|
|
|
headList,
|
|
|
timeDialog,
|
|
|
- taskinstanceDialog
|
|
|
+ taskinstanceDialog,
|
|
|
+ timeDialogAll
|
|
|
},
|
|
|
data() {
|
|
|
const defaultForm = {
|
|
|
@@ -396,7 +404,7 @@
|
|
|
};
|
|
|
return {
|
|
|
levelList,
|
|
|
- cacheKeyUrl:'eos-purchaseNeedManage-inventoryTable',
|
|
|
+ cacheKeyUrl: 'eos-purchaseNeedManage-inventoryTable',
|
|
|
numberReg,
|
|
|
defaultForm,
|
|
|
arrivalWayList: [
|
|
|
@@ -406,6 +414,7 @@
|
|
|
form: {
|
|
|
datasource: []
|
|
|
},
|
|
|
+ selection: [],
|
|
|
rules: {},
|
|
|
dictList: {},
|
|
|
taskinstanceDialogFlag: false,
|
|
|
@@ -416,6 +425,14 @@
|
|
|
columnKey: 'index',
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '选择',
|
|
|
+ width: 45,
|
|
|
+ type: 'selection',
|
|
|
+ columnKey: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'productCategoryName',
|
|
|
@@ -619,7 +636,10 @@
|
|
|
//修改回显
|
|
|
async putTableValue(data) {
|
|
|
if (data && data?.length) {
|
|
|
- this.form.datasource = data;
|
|
|
+ this.form.datasource = data.map((item, index) => {
|
|
|
+ item.key = index + 1;
|
|
|
+ return item;
|
|
|
+ });
|
|
|
//获取仓库库存
|
|
|
let codeList = this.form.datasource
|
|
|
.filter((item) => item.productCode)
|
|
|
@@ -655,6 +675,28 @@
|
|
|
copyObj(arrivalBatch)
|
|
|
);
|
|
|
},
|
|
|
+ chooseTimeALl(data) {
|
|
|
+ console.log(data, 'data');
|
|
|
+ let keyS = this.selection.map((item) => item.key - 1);
|
|
|
+ keyS.forEach((key) => {
|
|
|
+ this.$set(this.form.datasource[key], 'arrivalWay', data.deliveryMethod);
|
|
|
+
|
|
|
+ if (data.deliveryMethod == 1) {
|
|
|
+ this.$set(
|
|
|
+ this.form.datasource[key],
|
|
|
+ 'expectReceiveDate',
|
|
|
+ data.requireDeliveryTime
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$set(
|
|
|
+ this.form.datasource[key],
|
|
|
+ 'arrivalBatch',
|
|
|
+ copyObj(data.arrivalBatch)
|
|
|
+ );
|
|
|
+ this.$set(this.form.datasource[key],'totalCount',data.arrivalBatch.map(item=>item.arriveCount).reduce((a,b)=>a+b,0))
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
//cbom新增
|
|
|
handCBom(row, index) {
|
|
|
this.$refs.cBomRef.open(this.form.datasource, index);
|