Commit ec993848 by chenwq

判断膜卷号是否开启

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