diff --git a/cclqms-vue/src/views/modules/qc/IQCBatchPurchaseAdd.vue b/cclqms-vue/src/views/modules/qc/IQCBatchPurchaseAdd.vue
index 67286cb..c69e343 100644
--- a/cclqms-vue/src/views/modules/qc/IQCBatchPurchaseAdd.vue
+++ b/cclqms-vue/src/views/modules/qc/IQCBatchPurchaseAdd.vue
@@ -121,6 +121,15 @@
class="batch-edit-input" />
+
+
+
+
+
+
+
@@ -199,6 +208,7 @@ import {
batchSaveIQCInspection,
getSiteAndBuByUserName,
getSenderList,
+ umSearch,
} from '@/api/qc/qc'
export default {
@@ -219,6 +229,7 @@ export default {
createLoading: false,
tableHeight: 460,
userBuList: [],
+ umList: [],
dataList: [],
selectedRows: [],
searchData: {
@@ -269,6 +280,7 @@ export default {
created() {
this.calcTableHeight()
window.addEventListener('resize', this.calcTableHeight)
+ this.loadUmList()
if (this.parentBuList && this.parentBuList.length) {
this.userBuList = this.parentBuList
this.initDefaultBuSite()
@@ -286,6 +298,20 @@ export default {
window.innerHeight - (this.embedded ? 280 : 320)
)
},
+ loadUmList() {
+ umSearch({ active: 'Y' }).then(({ data }) => {
+ if (data && data.code === 0) {
+ this.umList = data.rows || []
+ }
+ })
+ },
+ getDefaultInspectionUmId(row) {
+ if (row && row.umId) {
+ const matched = this.umList.find((item) => item.umId === row.umId)
+ if (matched) return matched.umId
+ }
+ return this.umList.length > 0 ? this.umList[0].umId : ''
+ },
loadBuList() {
getSiteAndBuByUserName({ userName: this.$store.state.user.name }).then(
({ data }) => {
@@ -379,6 +405,7 @@ export default {
].join('_'),
sendInspectQty: defaultQty,
batchNo: row.batchNo || '',
+ inspectionUmId: row.inspectionUmId || this.getDefaultInspectionUmId(row),
}
})
} else {
@@ -470,6 +497,10 @@ export default {
)
return false
}
+ if (!row.inspectionUmId) {
+ this.$message.warning(this.$t('qc.iqcPage.selectInspectionUnit'))
+ return false
+ }
// 客户允许超检,暂不限制此次送检数量大于本次到货数量
// const arrival = Number(row.currentArrivalQty)
// const sendQty = Number(row.sendInspectQty)
@@ -521,6 +552,7 @@ export default {
lotsize: row.lotsize || row.currentArrivalQty,
umId: row.umId,
umName: row.umName,
+ inspectionUmId: row.inspectionUmId,
rollQty: row.sendInspectQty,
rollCount: row.sendInspectQty,
batchNo: row.batchNo || '',
@@ -611,4 +643,8 @@ export default {
padding-left: 8px !important;
padding-right: 8px !important;
}
+.iqc-batch-purchase >>> .el-select.batch-edit-input .el-input__inner {
+ height: 28px !important;
+ line-height: 28px !important;
+}