|
|
@@ -14,19 +14,21 @@
|
|
|
<!-- 表头工具栏 -->
|
|
|
<template v-slot:toolbar>
|
|
|
<div class="headbox" v-if="!contractId && isShowAdd">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- class="ele-btn-icon"
|
|
|
- @click="handlAdd('', -1)"
|
|
|
- >
|
|
|
- 新增
|
|
|
- </el-button>
|
|
|
- <warehouseAll
|
|
|
- @success="warehouseAllChange"
|
|
|
- :disabled="!selection.length"
|
|
|
- ></warehouseAll>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="handlAdd('', -1)"
|
|
|
+ >
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
+ <warehouseAll
|
|
|
+ @success="warehouseAllChange"
|
|
|
+ :disabled="!selection.length"
|
|
|
+ ></warehouseAll>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-slot:technicalDrawings="{ row, $index }">
|
|
|
@@ -94,6 +96,9 @@
|
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.batchNo'"
|
|
|
+ :rules="[
|
|
|
+ { required: true, message: '请输入批次号', trigger: 'blur' }
|
|
|
+ ]"
|
|
|
>
|
|
|
<el-input v-model="scope.row.batchNo" type="number"></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -169,6 +174,10 @@
|
|
|
<template v-slot:headerWarehouseId="{ column }">
|
|
|
<span class="is-required">{{ column.label }}</span>
|
|
|
</template>
|
|
|
+ <template v-slot:isRequired="{ column }">
|
|
|
+ <span class="is-required">{{ column.label }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="scope">
|
|
|
<el-popconfirm
|
|
|
@@ -204,6 +213,7 @@
|
|
|
import warehouseAll from '@/BIZComponents/warehouseAll.vue';
|
|
|
|
|
|
import tabMixins from '@/mixins/tableColumnsMixin';
|
|
|
+ import { getCode } from '@/api/login/index';
|
|
|
|
|
|
export default {
|
|
|
mixins: [dictMixins, tabMixins],
|
|
|
@@ -239,6 +249,7 @@
|
|
|
defaultForm,
|
|
|
cacheKeyUrl: 'eos-saleManage-entrustedReceive-inventoryTable',
|
|
|
warehouseList: [],
|
|
|
+ selection: [],
|
|
|
form: {
|
|
|
datasource: []
|
|
|
},
|
|
|
@@ -277,6 +288,7 @@
|
|
|
label: '批次号',
|
|
|
slot: 'batchNo',
|
|
|
align: 'center',
|
|
|
+ headerSlot: 'isRequired',
|
|
|
showOverflowTooltip: true,
|
|
|
minWidth: 150
|
|
|
},
|
|
|
@@ -683,7 +695,7 @@
|
|
|
},
|
|
|
//选择产品回调
|
|
|
changeParent(obj, idx) {
|
|
|
- obj.forEach((item, index) => {
|
|
|
+ obj.forEach(async (item, index) => {
|
|
|
let i = idx == -1 ? index : idx;
|
|
|
let row = JSON.parse(JSON.stringify(this.defaultForm));
|
|
|
row.key = this.form.datasource.length + 1;
|
|
|
@@ -703,7 +715,8 @@
|
|
|
this.$set(parasm, 'weightUnit', item.weightUnit);
|
|
|
this.$set(parasm, 'singleWeight', item.netWeight);
|
|
|
this.$set(parasm, 'pricingWay', 1);
|
|
|
- this.$set(parasm, 'goodsLevel', item.level);
|
|
|
+ this.$set(parasm, 'goodsLevel', item.goodsLevel);
|
|
|
+ this.$set(parasm, 'batchNo', await getCode('lot_number_code'));
|
|
|
|
|
|
this.$set(parasm, 'discountSinglePrice', 0);
|
|
|
this.$set(parasm, 'singlePrice', 0);
|