|
@@ -7,24 +7,34 @@
|
|
|
max-height="500px"
|
|
max-height="500px"
|
|
|
@columns-change="handleColumnChange"
|
|
@columns-change="handleColumnChange"
|
|
|
:cache-key="cacheKeyUrl"
|
|
:cache-key="cacheKeyUrl"
|
|
|
|
|
+ :selection.sync="selection"
|
|
|
:datasource="form.datasource"
|
|
:datasource="form.datasource"
|
|
|
class="time-form"
|
|
class="time-form"
|
|
|
>
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
<template v-slot:toolbar>
|
|
|
- <div class="headbox">
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-button
|
|
|
|
|
- size="small"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-plus"
|
|
|
|
|
- class="ele-btn-icon"
|
|
|
|
|
- @click="handParent('', -1)"
|
|
|
|
|
- >
|
|
|
|
|
- 新增
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ @click="handParent('', -1)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 新增
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <warehouseAll
|
|
|
|
|
+ @success="warehouseAllChange"
|
|
|
|
|
+ :disabled="!selection.length"
|
|
|
|
|
+ ></warehouseAll>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ style="margin-left: 5px"
|
|
|
|
|
+ @click="handleTaskinstance"
|
|
|
|
|
+ :disabled="!selection.length"
|
|
|
|
|
+ >批量设置工序
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:productName="{ row, $index }">
|
|
<template v-slot:productName="{ row, $index }">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -344,16 +354,23 @@
|
|
|
column.label
|
|
column.label
|
|
|
}}</span>
|
|
}}</span>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-slot:headerWarehouseId="{ column }" >
|
|
|
|
|
- <span :class="{ 'is-required': ['3','4','5'].includes(sourceType) }">{{
|
|
|
|
|
- column.label
|
|
|
|
|
- }}</span>
|
|
|
|
|
|
|
+ <template v-slot:headerWarehouseId="{ column }">
|
|
|
|
|
+ <span
|
|
|
|
|
+ :class="{ 'is-required': ['3', '4', '5'].includes(sourceType) }"
|
|
|
|
|
+ >{{ column.label }}</span
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:warehouseId="scope">
|
|
<template v-slot:warehouseId="scope">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.warehouseId'"
|
|
:prop="'datasource.' + scope.$index + '.warehouseId'"
|
|
|
- :rules="[{ required:['3','4','5'].includes(sourceType)? true:false, message: '请选择仓库', trigger: 'blur' }]"
|
|
|
|
|
|
|
+ :rules="[
|
|
|
|
|
+ {
|
|
|
|
|
+ required: ['3', '4', '5'].includes(sourceType) ? true : false,
|
|
|
|
|
+ message: '请选择仓库',
|
|
|
|
|
+ trigger: 'blur'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]"
|
|
|
>
|
|
>
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="scope.row.warehouseId"
|
|
v-model="scope.row.warehouseId"
|
|
@@ -423,6 +440,7 @@
|
|
|
import { lbjtList } from '@/enum/dict.js';
|
|
import { lbjtList } from '@/enum/dict.js';
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
import { getWarehouseList } from '@/api/saleManage/saleorder';
|
|
import { getWarehouseList } from '@/api/saleManage/saleorder';
|
|
|
|
|
+ import warehouseAll from '@/BIZComponents/warehouseAll.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins, tabMixins],
|
|
mixins: [dictMixins, tabMixins],
|
|
@@ -437,7 +455,7 @@
|
|
|
},
|
|
},
|
|
|
sourceType: {
|
|
sourceType: {
|
|
|
default: ''
|
|
default: ''
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
|
taskinstanceDialog,
|
|
taskinstanceDialog,
|
|
@@ -446,7 +464,8 @@
|
|
|
productList,
|
|
productList,
|
|
|
fileUpload,
|
|
fileUpload,
|
|
|
headList,
|
|
headList,
|
|
|
- timeDialog
|
|
|
|
|
|
|
+ timeDialog,
|
|
|
|
|
+ warehouseAll
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
isNeedInquiry() {
|
|
isNeedInquiry() {
|
|
@@ -467,6 +486,14 @@
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '选择',
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ type: 'selection',
|
|
|
|
|
+ columnKey: 'selection',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ fixed: 'left'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
width: 150,
|
|
width: 150,
|
|
|
prop: 'productCategoryName',
|
|
prop: 'productCategoryName',
|
|
@@ -696,6 +723,7 @@
|
|
|
curIndex: null,
|
|
curIndex: null,
|
|
|
numberReg,
|
|
numberReg,
|
|
|
defaultForm,
|
|
defaultForm,
|
|
|
|
|
+ selection: [],
|
|
|
arrivalWayList: [
|
|
arrivalWayList: [
|
|
|
{ label: '一次性到货', value: 1 },
|
|
{ label: '一次性到货', value: 1 },
|
|
|
{ label: '分批到货', value: 2 }
|
|
{ label: '分批到货', value: 2 }
|
|
@@ -706,7 +734,7 @@
|
|
|
taskinstanceDialogFlag: false,
|
|
taskinstanceDialogFlag: false,
|
|
|
rules: {},
|
|
rules: {},
|
|
|
dictList: {},
|
|
dictList: {},
|
|
|
- warehouseList:[]
|
|
|
|
|
|
|
+ warehouseList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -784,13 +812,26 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
saveTaskInstance(row = {}) {
|
|
saveTaskInstance(row = {}) {
|
|
|
- this.$set(this.form.datasource[row.index], 'taskId', row.id);
|
|
|
|
|
- this.$set(this.form.datasource[row.index], 'taskName', row.name);
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.form.datasource[row.index],
|
|
|
|
|
- 'routingId',
|
|
|
|
|
- row.produceRoutingId
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ if (row.index >= 0) {
|
|
|
|
|
+ this.$set(this.form.datasource[row.index], 'taskId', row.id);
|
|
|
|
|
+ this.$set(this.form.datasource[row.index], 'taskName', row.name);
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.form.datasource[row.index],
|
|
|
|
|
+ 'routingId',
|
|
|
|
|
+ row.produceRoutingId
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ let keyS = this.selection.map((item) => item.key - 1);
|
|
|
|
|
+ keyS.forEach((key) => {
|
|
|
|
|
+ this.$set(this.form.datasource[key], 'taskId', row.id);
|
|
|
|
|
+ this.$set(this.form.datasource[key], 'taskName', row.name);
|
|
|
|
|
+ this.$set(
|
|
|
|
|
+ this.form.datasource[key],
|
|
|
|
|
+ 'routingId',
|
|
|
|
|
+ row.produceRoutingId
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
//获取供应商信息
|
|
//获取供应商信息
|
|
|
handleGetSup(e, row, index) {
|
|
handleGetSup(e, row, index) {
|
|
@@ -895,6 +936,14 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ warehouseAllChange(data) {
|
|
|
|
|
+ let keyS = this.selection.map((item) => item.key - 1);
|
|
|
|
|
+ keyS.forEach((key) => {
|
|
|
|
|
+ this.$set(this.form.datasource[key], 'warehouseName', data.name);
|
|
|
|
|
+ this.$set(this.form.datasource[key], 'warehouseCode', data.code);
|
|
|
|
|
+ this.$set(this.form.datasource[key], 'warehouseId', data.id);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
//选择产品回调
|
|
//选择产品回调
|
|
|
changeParent(obj, idx) {
|
|
changeParent(obj, idx) {
|
|
|
obj.forEach((item, index) => {
|
|
obj.forEach((item, index) => {
|