|
@@ -87,12 +87,12 @@
|
|
|
fixed="left"></el-table-column>
|
|
fixed="left"></el-table-column>
|
|
|
<el-table-column label="名称" align="center" width="200" prop="categoryName" :show-overflow-tooltip="true"
|
|
<el-table-column label="名称" align="center" width="200" prop="categoryName" :show-overflow-tooltip="true"
|
|
|
fixed="left"></el-table-column>
|
|
fixed="left"></el-table-column>
|
|
|
|
|
+ <el-table-column label="牌号" align="center" width="100" prop="brandNum"
|
|
|
|
|
+ :show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column label="型号" align="center" width="100" prop="categoryModel"
|
|
<el-table-column label="型号" align="center" width="100" prop="categoryModel"
|
|
|
:show-overflow-tooltip="true"></el-table-column>
|
|
:show-overflow-tooltip="true"></el-table-column>
|
|
|
<el-table-column label="规格" align="center" width="100" prop="specification"
|
|
<el-table-column label="规格" align="center" width="100" prop="specification"
|
|
|
:show-overflow-tooltip="true"></el-table-column>
|
|
:show-overflow-tooltip="true"></el-table-column>
|
|
|
- <el-table-column label="牌号" align="center" width="100" prop="brandNum"
|
|
|
|
|
- :show-overflow-tooltip="true"></el-table-column>
|
|
|
|
|
<el-table-column v-for="(item, index) in newColumns" :label="item.label" :align="item.align"
|
|
<el-table-column v-for="(item, index) in newColumns" :label="item.label" :align="item.align"
|
|
|
:prop="item.prop" :show-overflow-tooltip="item.showOverflowTooltip"></el-table-column>
|
|
:prop="item.prop" :show-overflow-tooltip="item.showOverflowTooltip"></el-table-column>
|
|
|
<el-table-column label="批次号" align="center" width="100" prop="batchNo">
|
|
<el-table-column label="批次号" align="center" width="100" prop="batchNo">
|
|
@@ -238,15 +238,16 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="供应商代号" align="center" prop="supplierCode" width="120"
|
|
|
|
|
|
|
+ <el-table-column v-if="bizType != 2" label="供应商代号" align="center" prop="supplierCode" width="120"
|
|
|
:show-overflow-tooltip="true">
|
|
:show-overflow-tooltip="true">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
- <template v-if="bizType == 2">{{
|
|
|
|
|
- row.supplierMark
|
|
|
|
|
- }}</template>
|
|
|
|
|
- <template v-if="bizType != 2">{{
|
|
|
|
|
- row.supplierCode
|
|
|
|
|
- }}</template>
|
|
|
|
|
|
|
+ {{ row.supplierCode }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column v-else-if="bizType == 2" label="供应商代号" align="center" prop="supplierMark" width="120"
|
|
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
|
|
+ {{ row.supplierMark }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column v-if="bizType == 2" label="产地" align="center" prop="provenance "
|
|
<el-table-column v-if="bizType == 2" label="产地" align="center" prop="provenance "
|
|
@@ -820,11 +821,14 @@ export default {
|
|
|
this.$message.warning('未获取到物品信息!');
|
|
this.$message.warning('未获取到物品信息!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.formData.extInfo.assetType = res.map((item) => item.categoryLevelPathIdParent)
|
|
|
|
|
|
|
+ console.log(res, 'res')
|
|
|
|
|
+ // this.formData.extInfo.assetType = res.map((item) => item.categoryLevelPathIdParent)
|
|
|
|
|
|
|
|
|
|
+ this.formData.extInfo.assetType = Array.from(new Set(res.map((item) => item.categoryLevelPathIdParent)));
|
|
|
console.log(this.formData.extInfo.assetType, '类型类型')
|
|
console.log(this.formData.extInfo.assetType, '类型类型')
|
|
|
|
|
+
|
|
|
// 获取批次号
|
|
// 获取批次号
|
|
|
- const batchNo = await getCode('lot_number_code');
|
|
|
|
|
|
|
+ const batchNo1 = await getCode('lot_number_code');
|
|
|
// 获取供应商
|
|
// 获取供应商
|
|
|
const supplierList = await storageApi.contactQueryByCategoryIdsAPI({
|
|
const supplierList = await storageApi.contactQueryByCategoryIdsAPI({
|
|
|
categoryIds: res.map((item) => item.id)
|
|
categoryIds: res.map((item) => item.id)
|
|
@@ -886,6 +890,15 @@ export default {
|
|
|
warehouseNames.push(filtersItem.warehouseName);
|
|
warehouseNames.push(filtersItem.warehouseName);
|
|
|
}
|
|
}
|
|
|
let totalMoney = filtersItem.totalPrice || 0;
|
|
let totalMoney = filtersItem.totalPrice || 0;
|
|
|
|
|
+ console.log(filtersItem, 'filtersItemfiltersItemfiltersItemfiltersItemfiltersItem')
|
|
|
|
|
+
|
|
|
|
|
+ let batchNo = ''
|
|
|
|
|
+ if (filtersItem.batchNo) {
|
|
|
|
|
+ batchNo = filtersItem.batchNo
|
|
|
|
|
+ } else {
|
|
|
|
|
+ batchNo = batchNo1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
index: this.productList.length + index,
|
|
index: this.productList.length + index,
|
|
|
categoryId: item.id, // 物品id
|
|
categoryId: item.id, // 物品id
|
|
@@ -894,10 +907,12 @@ export default {
|
|
|
categoryModel: item.modelType, // 物品型号
|
|
categoryModel: item.modelType, // 物品型号
|
|
|
specification: item.specification, // 规格
|
|
specification: item.specification, // 规格
|
|
|
brandNum: item.brandNum, // 牌号
|
|
brandNum: item.brandNum, // 牌号
|
|
|
- batchNo: this.saleProductList[index]?.batchNo || batchNo, // 批次号
|
|
|
|
|
|
|
+ batchNo: batchNo, // 批次号
|
|
|
supplierListOptions: supplierList[item.id], // 供应商列表
|
|
supplierListOptions: supplierList[item.id], // 供应商列表
|
|
|
supplierId: this.form.supplierId, // 供应商id
|
|
supplierId: this.form.supplierId, // 供应商id
|
|
|
- supplierCode: this.form.supplierCode, // 供应商代号
|
|
|
|
|
|
|
+ supplierCode: item.supplierCode, // 供应商代号
|
|
|
|
|
+ supplierMark: filtersItem.supplierMark, // 供应商代号
|
|
|
|
|
+
|
|
|
supplierName: this.form.supplierName, // 供应商名称
|
|
supplierName: this.form.supplierName, // 供应商名称
|
|
|
approvalNumber: item.approvalNumber, // 批准文号
|
|
approvalNumber: item.approvalNumber, // 批准文号
|
|
|
packingSpecification: item.packingSpecification, // 包装规格
|
|
packingSpecification: item.packingSpecification, // 包装规格
|
|
@@ -922,6 +937,8 @@ export default {
|
|
|
warehouseName, // 仓库名称
|
|
warehouseName, // 仓库名称
|
|
|
warehouseIds,
|
|
warehouseIds,
|
|
|
warehouseNames,
|
|
warehouseNames,
|
|
|
|
|
+ isComeCheck: filtersItem?.isComeCheck, // 是否拆包
|
|
|
|
|
+
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -1219,9 +1236,11 @@ export default {
|
|
|
this.curDateType = 'productionDate';
|
|
this.curDateType = 'productionDate';
|
|
|
} else if (this.formData.bizType == '2') {
|
|
} else if (this.formData.bizType == '2') {
|
|
|
// 采购入库
|
|
// 采购入库
|
|
|
- purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
|
|
|
|
|
|
|
+ const defaultTime = '00:00:00';
|
|
|
|
|
+ purchaseDate = `${this.form.receiveDate} ${defaultTime}`;
|
|
|
this.curDateType = 'purchaseDate';
|
|
this.curDateType = 'purchaseDate';
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
index: this.isMoreProduct
|
|
index: this.isMoreProduct
|
|
|
? this.productList.find(
|
|
? this.productList.find(
|
|
@@ -2380,7 +2399,7 @@ export default {
|
|
|
// this.form.categoryLevelTopId
|
|
// this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
- if (row.measureUnit == row.packingUnit) {
|
|
|
|
|
|
|
+ if (row.measureType != 1 && row.measureUnit == row.packingUnit) {
|
|
|
let pNum = 0;
|
|
let pNum = 0;
|
|
|
let mNum = row.measureQuantity
|
|
let mNum = row.measureQuantity
|
|
|
this.$refs.wareHouseDailogRef.open(
|
|
this.$refs.wareHouseDailogRef.open(
|
|
@@ -2424,7 +2443,7 @@ export default {
|
|
|
|
|
|
|
|
for (let i = 0; i < row.length; i++) {
|
|
for (let i = 0; i < row.length; i++) {
|
|
|
//测量单位等于包装单位
|
|
//测量单位等于包装单位
|
|
|
- if (row[i].measureUnit === row[i].packingUnit) {
|
|
|
|
|
|
|
+ if (row[i].measureType != 1 && row[i].measureUnit === row[i].packingUnit) {
|
|
|
row[i].packingQuantity2 = 0;
|
|
row[i].packingQuantity2 = 0;
|
|
|
console.log(row[i].packingQuantity2)
|
|
console.log(row[i].packingQuantity2)
|
|
|
} else {
|
|
} else {
|
|
@@ -2538,17 +2557,18 @@ export default {
|
|
|
let obj = this.getNowDate();
|
|
let obj = this.getNowDate();
|
|
|
let productionDate = '';
|
|
let productionDate = '';
|
|
|
let purchaseDate = '';
|
|
let purchaseDate = '';
|
|
|
|
|
+ console.log(this.formData.bizType, 'bizTypebizTypebizTypebizTypebizTypebizTypebizTypebizTypebizTypebizTypebizType')
|
|
|
if (this.formData.bizType == '1') {
|
|
if (this.formData.bizType == '1') {
|
|
|
// 生产入库
|
|
// 生产入库
|
|
|
productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
|
|
productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
|
|
|
this.curDateType = 'productionDate';
|
|
this.curDateType = 'productionDate';
|
|
|
} else if (this.formData.bizType == '2') {
|
|
} else if (this.formData.bizType == '2') {
|
|
|
// 采购入库
|
|
// 采购入库
|
|
|
- purchaseDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
|
|
|
|
|
|
|
+ const defaultTime = '00:00:00';
|
|
|
|
|
+ purchaseDate = `${this.form.receiveDate} ${defaultTime}`;
|
|
|
this.curDateType = 'purchaseDate';
|
|
this.curDateType = 'purchaseDate';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// 判断单位和计量单位是否为不拆物料层规格
|
|
// 判断单位和计量单位是否为不拆物料层规格
|
|
|
let packingBoolen = !!this.getDict('不拆物料层规格', row.packingUnit)
|
|
let packingBoolen = !!this.getDict('不拆物料层规格', row.packingUnit)
|
|
|
.dictValue;
|
|
.dictValue;
|
|
@@ -2636,8 +2656,8 @@ export default {
|
|
|
isUnpack: row.isUnpack, // 是否允许拆包
|
|
isUnpack: row.isUnpack, // 是否允许拆包
|
|
|
productionDate: productionDate, // 生产日期
|
|
productionDate: productionDate, // 生产日期
|
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
|
- result: 1, // 结果(1合格 2不合格)
|
|
|
|
|
- status: 2 // 状态(0=未质检 1待检 2已检)
|
|
|
|
|
|
|
+ result: 1, // 结果(1合格 2不合格)g
|
|
|
|
|
+ status: this.form.isQmsCheck == 1 ? 0 : 2 // 状态(0=未质检 1待检 2已检)
|
|
|
};
|
|
};
|
|
|
let outBoolen = !!this.getDict('不拆物料层规格', item.measureUnit)
|
|
let outBoolen = !!this.getDict('不拆物料层规格', item.measureUnit)
|
|
|
.dictValue;
|
|
.dictValue;
|
|
@@ -2813,7 +2833,7 @@ export default {
|
|
|
productionDate: productionDate, // 生产日期
|
|
productionDate: productionDate, // 生产日期
|
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
purchaseDate: purchaseDate, // 采购时间
|
|
|
result: 1, // 结果(1合格 2不合格)
|
|
result: 1, // 结果(1合格 2不合格)
|
|
|
- status: 2 // 状态(0=未质检 1待检 2已检)
|
|
|
|
|
|
|
+ status: row.isComeCheck == 1 ? 0 : 2 // 状态(0=未质检 1待检 2已检)
|
|
|
};
|
|
};
|
|
|
/**
|
|
/**
|
|
|
* packingUnit: row.isUnpack ? packingBoolen ? filterArr[0].conversionUnit : measureBoolen ? row.packingSpecificationOption[2] ? row.packingSpecificationOption[2].conversionUnit
|
|
* packingUnit: row.isUnpack ? packingBoolen ? filterArr[0].conversionUnit : measureBoolen ? row.packingSpecificationOption[2] ? row.packingSpecificationOption[2].conversionUnit
|
|
@@ -2914,6 +2934,13 @@ export default {
|
|
|
);
|
|
);
|
|
|
this.packingList.splice(packingIndex + 1, 0, ...packingList);
|
|
this.packingList.splice(packingIndex + 1, 0, ...packingList);
|
|
|
}
|
|
}
|
|
|
|
|
+ const lastIndex = this.packingList.length - 1
|
|
|
|
|
+
|
|
|
|
|
+ let remainder = row.measureQuantity % row.packingSpecificationOption[1]?.packageCell
|
|
|
|
|
+ console.log(remainder, 'remainder')
|
|
|
|
|
+ if (remainder > 0) {
|
|
|
|
|
+ this.$set(this.packingList[lastIndex], 'measureQuantity', remainder)
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 单独点击保存并插入对应位置(物料)
|
|
// 单独点击保存并插入对应位置(物料)
|
|
|
// let materialList = packingList
|
|
// let materialList = packingList
|