Commit ec993848 by chenwq

判断膜卷号是否开启

1 parent 5af91801
......@@ -369,23 +369,25 @@ export default {
item.id = this.detailInfo.id
for (let j = 0; j < item.goodsWarehousingList.length; j++) {
let subItem = item.goodsWarehousingList[j]
// 校验:膜卷号必填
if (!subItem.filmRollList || (subItem.filmRollList && subItem.filmRollList.length == 0)) {
this.$message({
message: item.upgradeGoodsName + '请选择膜卷号',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
// 校验:入库数量和膜卷号数量相等
if (subItem.filmRollList && subItem.filmRollList.length != Math.ceil(subItem.increaseStockNum)) {
this.$message({
message: item.upgradeGoodsName + '的入库数量和膜卷号数量不相等',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
if (this.manageMode) {
// 校验:膜卷号必填
if (!subItem.filmRollList || (subItem.filmRollList && subItem.filmRollList.length == 0)) {
this.$message({
message: item.upgradeGoodsName + '请选择膜卷号',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
// 校验:入库数量和膜卷号数量相等
if (subItem.filmRollList && subItem.filmRollList.length != Math.ceil(subItem.increaseStockNum)) {
this.$message({
message: item.upgradeGoodsName + '的入库数量和膜卷号数量不相等',
type: 'error',
customClass: 'message-Z-zinde'
})
return true
}
}
subItem.increaseStockNum = subItem.increaseStockNum * (item.stockNum / item.purchaseNumber)
}
......
......@@ -101,7 +101,7 @@ export default {
validator: (rule, value, callback, source) => {
let idx = Object.keys(source)[0].split('.')[1]
let target = this.formdata.tableData[idx] || {}
if (!this.goodsTypeList.includes(target.goodsTypeName)) {
if (!this.goodsTypeList.includes(target.goodsTypeName) || !this.manageMode) {
return callback()
}
if (!target.filmRollList) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!