|
@@ -37,7 +37,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col> -->
|
|
</el-col> -->
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="入库时间22">
|
|
|
|
|
|
|
+ <el-form-item label="入库时间">
|
|
|
<el-date-picker v-model="formData.storageTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
<el-date-picker v-model="formData.storageTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="选择日期时间">
|
|
placeholder="选择日期时间">
|
|
|
</el-date-picker></el-form-item></el-col>
|
|
</el-date-picker></el-form-item></el-col>
|
|
@@ -567,6 +567,7 @@ export default {
|
|
|
formData: {
|
|
formData: {
|
|
|
bizType: '',
|
|
bizType: '',
|
|
|
storageTime: '',
|
|
storageTime: '',
|
|
|
|
|
+ qualityControl: '',
|
|
|
extInfo: {
|
|
extInfo: {
|
|
|
assetType: []
|
|
assetType: []
|
|
|
}
|
|
}
|
|
@@ -698,7 +699,7 @@ export default {
|
|
|
|
|
|
|
|
//获取仓库
|
|
//获取仓库
|
|
|
const res = await warehouseDefinition.list({
|
|
const res = await warehouseDefinition.list({
|
|
|
- inventoryType: this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // inventoryType: this.form.categoryLevelTopId
|
|
|
});
|
|
});
|
|
|
// 只有一个仓库自动显示出来
|
|
// 只有一个仓库自动显示出来
|
|
|
if (res.length == 1) {
|
|
if (res.length == 1) {
|
|
@@ -792,18 +793,7 @@ export default {
|
|
|
console.log(this.sourceBizNo, 'sourceBizNo')
|
|
console.log(this.sourceBizNo, 'sourceBizNo')
|
|
|
this.formData.type = 1;
|
|
this.formData.type = 1;
|
|
|
this.formData.bizType = this.bizType;
|
|
this.formData.bizType = this.bizType;
|
|
|
- if (
|
|
|
|
|
- this.form != null &&
|
|
|
|
|
- Object.keys(this.form).length > 0 &&
|
|
|
|
|
- this.form.categoryLevelTopId != ''
|
|
|
|
|
- ) {
|
|
|
|
|
- this.formData.extInfo.assetType = Array.from(
|
|
|
|
|
- new Set(this.form?.categoryLevelTopId?.split(','))
|
|
|
|
|
- );
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.warning('未获取到物品类型!');
|
|
|
|
|
- }
|
|
|
|
|
- console.log(this.formData.extInfo.assetType, '类型')
|
|
|
|
|
|
|
+
|
|
|
if (this.sourceBizNo != null || this.sourceBizNo != '') {
|
|
if (this.sourceBizNo != null || this.sourceBizNo != '') {
|
|
|
// this.formData.sourceBizNo = this.sourceBizNo;
|
|
// this.formData.sourceBizNo = this.sourceBizNo;
|
|
|
this.$set(this.formData, 'sourceBizNo', this.sourceBizNo);
|
|
this.$set(this.formData, 'sourceBizNo', this.sourceBizNo);
|
|
@@ -830,6 +820,9 @@ export default {
|
|
|
this.$message.warning('未获取到物品信息!');
|
|
this.$message.warning('未获取到物品信息!');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ this.formData.extInfo.assetType = res.map((item) => item.categoryLevelPathIdParent)
|
|
|
|
|
+
|
|
|
|
|
+ console.log(this.formData.extInfo.assetType, '类型类型')
|
|
|
// 获取批次号
|
|
// 获取批次号
|
|
|
const batchNo = await getCode('lot_number_code');
|
|
const batchNo = await getCode('lot_number_code');
|
|
|
// 获取供应商
|
|
// 获取供应商
|
|
@@ -927,7 +920,7 @@ export default {
|
|
|
warehouseId, // 仓库id
|
|
warehouseId, // 仓库id
|
|
|
warehouseName, // 仓库名称
|
|
warehouseName, // 仓库名称
|
|
|
warehouseIds,
|
|
warehouseIds,
|
|
|
- warehouseNames
|
|
|
|
|
|
|
+ warehouseNames,
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -939,6 +932,18 @@ export default {
|
|
|
|
|
|
|
|
console.log('this.detailList-----------------', this.detailList)
|
|
console.log('this.detailList-----------------', this.detailList)
|
|
|
if (this.detailList?.length > 0) {
|
|
if (this.detailList?.length > 0) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.form != null &&
|
|
|
|
|
+ Object.keys(this.form).length > 0 &&
|
|
|
|
|
+ this.form.categoryLevelTopId != ''
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.formData.extInfo.assetType = Array.from(
|
|
|
|
|
+ new Set(this.form?.categoryLevelTopId?.split(','))
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.warning('未获取到物品类型!');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 包装列表 this.detailList
|
|
// 包装列表 this.detailList
|
|
|
// 获取主数据物品详情
|
|
// 获取主数据物品详情
|
|
|
// let { category } = await getDetails(this.form.categoryId);
|
|
// let { category } = await getDetails(this.form.categoryId);
|
|
@@ -1564,6 +1569,7 @@ export default {
|
|
|
obj.extInfo.deptName = this.formData.extInfo.deptName;
|
|
obj.extInfo.deptName = this.formData.extInfo.deptName;
|
|
|
obj.extInfo.supplierName = this.form.supplierName;
|
|
obj.extInfo.supplierName = this.form.supplierName;
|
|
|
obj.extInfo.deliveryPhone = this.formData.extInfo.deliveryPhone;
|
|
obj.extInfo.deliveryPhone = this.formData.extInfo.deliveryPhone;
|
|
|
|
|
+ obj.qualityControl = this.form.isQmsCheck;//是否质检
|
|
|
|
|
|
|
|
// 处理仓库id
|
|
// 处理仓库id
|
|
|
let warehouseId = [];
|
|
let warehouseId = [];
|
|
@@ -2310,7 +2316,7 @@ export default {
|
|
|
idx,
|
|
idx,
|
|
|
row.warehouseId,
|
|
row.warehouseId,
|
|
|
row.warehouseName + '',
|
|
row.warehouseName + '',
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
let pNum = row.packingQuantity;
|
|
let pNum = row.packingQuantity;
|
|
@@ -2321,7 +2327,7 @@ export default {
|
|
|
idx,
|
|
idx,
|
|
|
row.warehouseId,
|
|
row.warehouseId,
|
|
|
row.warehouseName + '',
|
|
row.warehouseName + '',
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -2345,7 +2351,7 @@ export default {
|
|
|
idx,
|
|
idx,
|
|
|
row.warehouseId,
|
|
row.warehouseId,
|
|
|
row.warehouseName + '',
|
|
row.warehouseName + '',
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
console.log(measureBoolen, 'measureBoolen');
|
|
console.log(measureBoolen, 'measureBoolen');
|
|
@@ -2369,7 +2375,7 @@ export default {
|
|
|
idx,
|
|
idx,
|
|
|
row.warehouseId,
|
|
row.warehouseId,
|
|
|
row.warehouseName + '',
|
|
row.warehouseName + '',
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
if (row.measureUnit == row.packingUnit) {
|
|
if (row.measureUnit == row.packingUnit) {
|
|
@@ -2381,7 +2387,7 @@ export default {
|
|
|
idx,
|
|
idx,
|
|
|
row.warehouseId,
|
|
row.warehouseId,
|
|
|
row.warehouseName + '',
|
|
row.warehouseName + '',
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
let num = Math.ceil(
|
|
let num = Math.ceil(
|
|
@@ -2394,7 +2400,7 @@ export default {
|
|
|
idx,
|
|
idx,
|
|
|
row.warehouseId,
|
|
row.warehouseId,
|
|
|
row.warehouseName + '',
|
|
row.warehouseName + '',
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2450,7 +2456,7 @@ export default {
|
|
|
null,
|
|
null,
|
|
|
null,
|
|
null,
|
|
|
null,
|
|
null,
|
|
|
- this.form.categoryLevelTopId
|
|
|
|
|
|
|
+ // this.form.categoryLevelTopId
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -2510,6 +2516,8 @@ export default {
|
|
|
// 生成包装
|
|
// 生成包装
|
|
|
generateWrappers(row, productIndex, packingCodeList) {
|
|
generateWrappers(row, productIndex, packingCodeList) {
|
|
|
console.log(packingCodeList, 'packingCodeList', row.measureType)
|
|
console.log(packingCodeList, 'packingCodeList', row.measureType)
|
|
|
|
|
+ if (!row.measureType) return this.$message.warning('请到主数据维计量类型!')
|
|
|
|
|
+
|
|
|
// 判断是否拆包,如果是不拆包,计量单位=包装单位,则不生成包装层数据
|
|
// 判断是否拆包,如果是不拆包,计量单位=包装单位,则不生成包装层数据
|
|
|
if (row.measureType != 1) {
|
|
if (row.measureType != 1) {
|
|
|
// 计量单位=包装单位,则不生成包装层数据
|
|
// 计量单位=包装单位,则不生成包装层数据
|