|
@@ -23,24 +23,25 @@
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
</template>
|
|
</template>
|
|
|
- <template v-slot:toolkit v-if="this.baseForm.qualityMode == 2">
|
|
|
|
|
- <template v-if="baseForm.conditionType == 2">
|
|
|
|
|
|
|
+ <template v-slot:toolkit>
|
|
|
|
|
+ <div v-if="conditionType == 2">
|
|
|
<div style="display: flex;align-items: center;">
|
|
<div style="display: flex;align-items: center;">
|
|
|
- <el-input v-model="formData.number" style="width: 120px;" placeholder="请输入" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="formData.number" style="width: 120px;" placeholder="请输入" size="mini"
|
|
|
|
|
+ @change="handleInputNumber"></el-input>
|
|
|
<DictSelection dictName="计量单位" clearable v-model="formData.sampleUnit" size="mini"
|
|
<DictSelection dictName="计量单位" clearable v-model="formData.sampleUnit" size="mini"
|
|
|
style="width: 120px;margin-left: 12px;" @change="changeSamUnit">
|
|
style="width: 120px;margin-left: 12px;" @change="changeSamUnit">
|
|
|
</DictSelection>
|
|
</DictSelection>
|
|
|
</div>
|
|
</div>
|
|
|
- </template>
|
|
|
|
|
- <template>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
<div style="margin-left: 12px;display: flex;align-items: center;">
|
|
<div style="margin-left: 12px;display: flex;align-items: center;">
|
|
|
<div>数量:</div>
|
|
<div>数量:</div>
|
|
|
<el-input v-model="formData.portion" style="width: 120px;margin:0 12px;" placeholder="请输入" size="mini"
|
|
<el-input v-model="formData.portion" style="width: 120px;margin:0 12px;" placeholder="请输入" size="mini"
|
|
|
- @change="handleInput"></el-input>
|
|
|
|
|
|
|
+ @change="handleInput" :disabled="conditionType == 1"></el-input>
|
|
|
<el-button type="primary" size="mini" @click="handleSampleSubmit"
|
|
<el-button type="primary" size="mini" @click="handleSampleSubmit"
|
|
|
style="margin-right: 12px;">确认</el-button>
|
|
style="margin-right: 12px;">确认</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
@@ -49,7 +50,6 @@
|
|
|
:data="paginatedSampleList" tooltip-effect="dark" :max-height="300" border row-key="id">
|
|
:data="paginatedSampleList" tooltip-effect="dark" :max-height="300" border row-key="id">
|
|
|
<el-table-column label="序号" type="index" width="50" align="center"></el-table-column>
|
|
<el-table-column label="序号" type="index" width="50" align="center"></el-table-column>
|
|
|
<template v-for="column in tableColumns2">
|
|
<template v-for="column in tableColumns2">
|
|
|
- <el-table-column label="样品编码" prop="sampleCode"></el-table-column>
|
|
|
|
|
<el-table-column :label="column.label" :prop="column.prop" :show-overflow-tooltip="true"
|
|
<el-table-column :label="column.label" :prop="column.prop" :show-overflow-tooltip="true"
|
|
|
:width="column.width" :align="column.align"></el-table-column>
|
|
:width="column.width" :align="column.align"></el-table-column>
|
|
|
</template>
|
|
</template>
|
|
@@ -94,7 +94,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <ele-modal :visible.sync="takeAsampleVisible" title="选择取样信息" width="80vw" append-to-body @close="handleCancel"
|
|
|
|
|
|
|
+ <!-- <ele-modal :visible.sync="takeAsampleVisible" title="选择取样信息" width="80vw" append-to-body @close="handleCancel"
|
|
|
:maxable="true">
|
|
:maxable="true">
|
|
|
|
|
|
|
|
<el-table ref="showSampleListTable" :data="selectedList" tooltip-effect="dark" :max-height="300" border
|
|
<el-table ref="showSampleListTable" :data="selectedList" tooltip-effect="dark" :max-height="300" border
|
|
@@ -111,7 +111,7 @@
|
|
|
<el-button type="primary" @click="handleConfirm">确定</el-button>
|
|
<el-button type="primary" @click="handleConfirm">确定</el-button>
|
|
|
<el-button @click="handleCancel">取消</el-button>
|
|
<el-button @click="handleCancel">取消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
- </ele-modal>
|
|
|
|
|
|
|
+ </ele-modal> -->
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -171,7 +171,7 @@ export default {
|
|
|
remark: '',
|
|
remark: '',
|
|
|
accessory: [],
|
|
accessory: [],
|
|
|
|
|
|
|
|
- conditionType: null,
|
|
|
|
|
|
|
+ conditionType: 1,
|
|
|
};
|
|
};
|
|
|
};
|
|
};
|
|
|
return {
|
|
return {
|
|
@@ -180,6 +180,12 @@ export default {
|
|
|
baseForm: { ...defaultForm() },
|
|
baseForm: { ...defaultForm() },
|
|
|
|
|
|
|
|
tableColumns2: [
|
|
tableColumns2: [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '样品编码',
|
|
|
|
|
+ prop: 'sampleCode',
|
|
|
|
|
+ width: '150',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
label: '编码',
|
|
label: '编码',
|
|
|
prop: 'categoryCode',
|
|
prop: 'categoryCode',
|
|
@@ -192,7 +198,7 @@ export default {
|
|
|
width: '150',
|
|
width: '150',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
- { label: '批次号', prop: 'batchNo', align: 'center' },
|
|
|
|
|
|
|
+ { label: '批次号', prop: 'batchNo', align: 'center', width: 120, },
|
|
|
{ label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
{ label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
|
{ label: '包装编码', prop: 'packageNo', align: 'center' },
|
|
{ label: '包装编码', prop: 'packageNo', align: 'center' },
|
|
|
{ label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
{ label: '计量数量', prop: 'measureQuantity', align: 'center' },
|
|
@@ -249,20 +255,27 @@ export default {
|
|
|
portion: null
|
|
portion: null
|
|
|
},
|
|
},
|
|
|
isConsumable: '',
|
|
isConsumable: '',
|
|
|
|
|
+ conditionType: null,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
tableColumns() {
|
|
tableColumns() {
|
|
|
let arr = [
|
|
let arr = [
|
|
|
|
|
|
|
|
- (this.btnType !== 'issued' || this.baseForm.qualityMode === 2)
|
|
|
|
|
- ? {
|
|
|
|
|
- columnKey: 'selection',
|
|
|
|
|
- type: 'selection',
|
|
|
|
|
- width: 45,
|
|
|
|
|
- align: 'center'
|
|
|
|
|
- }
|
|
|
|
|
- : null,
|
|
|
|
|
|
|
+ // (this.btnType !== 'issued' || this.baseForm.qualityMode === 2)
|
|
|
|
|
+ // ? {
|
|
|
|
|
+ // columnKey: 'selection',
|
|
|
|
|
+ // type: 'selection',
|
|
|
|
|
+ // width: 45,
|
|
|
|
|
+ // align: 'center'
|
|
|
|
|
+ // }
|
|
|
|
|
+ // : null,
|
|
|
|
|
+ {
|
|
|
|
|
+ columnKey: 'selection',
|
|
|
|
|
+ type: 'selection',
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
label: '序号',
|
|
@@ -286,7 +299,7 @@ export default {
|
|
|
width: 120,
|
|
width: 120,
|
|
|
showOverflowTooltip: true
|
|
showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
- { label: '批次号', prop: 'batchNo', align: 'center' },
|
|
|
|
|
|
|
+ { label: '批次号', prop: 'batchNo', align: 'center', width: 120, },
|
|
|
{ label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
{ label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
|
{
|
|
{
|
|
|
label: '包装编码', prop: 'packageNo', align: 'center',
|
|
label: '包装编码', prop: 'packageNo', align: 'center',
|
|
@@ -408,17 +421,6 @@ export default {
|
|
|
//操作行点击时查询清单
|
|
//操作行点击时查询清单
|
|
|
// await this.getInventoryList();
|
|
// await this.getInventoryList();
|
|
|
await this.reload({ planId: row.id });
|
|
await this.reload({ planId: row.id });
|
|
|
-
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- if (this.$refs.table12) {
|
|
|
|
|
- this.$refs.table12.doLayout()
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- if (this.baseForm.type == 1) {
|
|
|
|
|
- this.sampleList = this.$refs.table12.getData()
|
|
|
|
|
- } else {
|
|
|
|
|
- this.sampleList = []
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
//操作行点击时查询样品
|
|
//操作行点击时查询样品
|
|
|
await this.getSampleList(row.id);
|
|
await this.getSampleList(row.id);
|
|
@@ -647,7 +649,7 @@ export default {
|
|
|
|
|
|
|
|
this.baseForm.sampleNumber = selection.length;
|
|
this.baseForm.sampleNumber = selection.length;
|
|
|
//如果取小样
|
|
//如果取小样
|
|
|
- if (this.baseForm.conditionType == 2) {
|
|
|
|
|
|
|
+ if (this.conditionType == 2) {
|
|
|
// this.baseForm.sampleMeasureUnit = this.$refs.table12.getData()[0].measureUnit
|
|
// this.baseForm.sampleMeasureUnit = this.$refs.table12.getData()[0].measureUnit
|
|
|
this.formData.sampleUnit = this.$refs.table12.getData()[0].measureUnit
|
|
this.formData.sampleUnit = this.$refs.table12.getData()[0].measureUnit
|
|
|
}
|
|
}
|
|
@@ -716,6 +718,7 @@ export default {
|
|
|
if (this.baseForm.isUnpack == null || this.baseForm.isUnpack == '') {
|
|
if (this.baseForm.isUnpack == null || this.baseForm.isUnpack == '') {
|
|
|
this.baseForm.isUnpack = this.isCheck ? 1 : 2;
|
|
this.baseForm.isUnpack = this.isCheck ? 1 : 2;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.baseForm.conditionType = this.conditionType;
|
|
|
let params = {
|
|
let params = {
|
|
|
...this.baseForm,
|
|
...this.baseForm,
|
|
|
qualityInventoryList: this.$refs.table12.getData(),
|
|
qualityInventoryList: this.$refs.table12.getData(),
|
|
@@ -759,7 +762,7 @@ export default {
|
|
|
if (this.baseForm.isUnpack == null || this.baseForm.isUnpack == '') {
|
|
if (this.baseForm.isUnpack == null || this.baseForm.isUnpack == '') {
|
|
|
this.baseForm.isUnpack = this.isCheck ? 1 : 2;
|
|
this.baseForm.isUnpack = this.isCheck ? 1 : 2;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ this.baseForm.conditionType = this.conditionType;
|
|
|
let params = {
|
|
let params = {
|
|
|
...this.baseForm,
|
|
...this.baseForm,
|
|
|
qualityInventoryList: this.$refs.table12.getData(),
|
|
qualityInventoryList: this.$refs.table12.getData(),
|
|
@@ -789,7 +792,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
handleSampleNumber(val) {
|
|
handleSampleNumber(val) {
|
|
|
console.log(val, 'val')
|
|
console.log(val, 'val')
|
|
|
- this.baseForm.conditionType = val;
|
|
|
|
|
|
|
+ this.conditionType = val;
|
|
|
//清空样品清单列表
|
|
//清空样品清单列表
|
|
|
this.sampleList = []
|
|
this.sampleList = []
|
|
|
//取整样
|
|
//取整样
|
|
@@ -811,6 +814,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ handleInputNumber(val) {
|
|
|
|
|
+ let packingList = this.$refs.table12.getData()
|
|
|
|
|
+ if (packingList.length > 1) {
|
|
|
|
|
+ if (val > packingList.length) {
|
|
|
|
|
+ this.$message.warning('数量不能大于来源清单数量!');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (packingList.length == 1) {
|
|
|
|
|
+ if (val > packingList[0].measureQuantity) {
|
|
|
|
|
+ this.$message.warning('数量不能大于计量数量!');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
handleInput() {
|
|
handleInput() {
|
|
|
if (this.formData.portion == null || this.formData.portion == '' || this.formData.portion == 0) {
|
|
if (this.formData.portion == null || this.formData.portion == '' || this.formData.portion == 0) {
|
|
|
this.$message.warning('生成取样数量不能为空!');
|
|
this.$message.warning('生成取样数量不能为空!');
|
|
@@ -864,13 +883,17 @@ export default {
|
|
|
this.$refs.baseInfoRefs.getsampleMeasureUnit(val)
|
|
this.$refs.baseInfoRefs.getsampleMeasureUnit(val)
|
|
|
},
|
|
},
|
|
|
handleSampleSubmit() {
|
|
handleSampleSubmit() {
|
|
|
-
|
|
|
|
|
|
|
+ this.sampleList = []
|
|
|
if (this.formData.portion == null || this.formData.portion == 0) {
|
|
if (this.formData.portion == null || this.formData.portion == 0) {
|
|
|
this.$message.warning('生成取样数量不能为空!');
|
|
this.$message.warning('生成取样数量不能为空!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.baseForm.sampleMeasureUnit = this.formData.sampleUnit
|
|
this.baseForm.sampleMeasureUnit = this.formData.sampleUnit
|
|
|
- if (this.baseForm.conditionType == 1) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ console.log(this.conditionType, 'conditionType')
|
|
|
|
|
+ console.log(this.selectedList, '.conditionType')
|
|
|
|
|
+
|
|
|
|
|
+ if (this.conditionType == 1) {
|
|
|
this.sampleList = this.selectedList
|
|
this.sampleList = this.selectedList
|
|
|
} else {
|
|
} else {
|
|
|
let measureQ = this.formData.number;
|
|
let measureQ = this.formData.number;
|