|
|
@ -19,10 +19,11 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="10"> |
|
|
<el-col :span="10"> |
|
|
<el-form-item :label="labels.currentRollQty" class="form-item-enhanced"> |
|
|
<el-form-item :label="labels.currentRollQty" class="form-item-enhanced"> |
|
|
<el-input |
|
|
|
|
|
v-model="pageData.rollQty" |
|
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="pageData.rollQty" |
|
|
class="qty-input" |
|
|
class="qty-input" |
|
|
type="number" |
|
|
type="number" |
|
|
|
|
|
readonly |
|
|
@blur="checkValidQty" |
|
|
@blur="checkValidQty" |
|
|
@input="calculateTotalQty" |
|
|
@input="calculateTotalQty" |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
@ -57,8 +58,8 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="10"> |
|
|
<el-col :span="10"> |
|
|
<el-form-item :label="labels.newRollQty" class="form-item-enhanced"> |
|
|
<el-form-item :label="labels.newRollQty" class="form-item-enhanced"> |
|
|
<el-input |
|
|
|
|
|
v-model="pageData.newRollQty" |
|
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="pageData.newRollQty" |
|
|
readonly |
|
|
readonly |
|
|
:placeholder="newRollQtyPlaceholder" |
|
|
:placeholder="newRollQtyPlaceholder" |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
@ -271,7 +272,7 @@ export default { |
|
|
/*扫描新卷卷号获取数量*/ |
|
|
/*扫描新卷卷号获取数量*/ |
|
|
scanNewRoll() { |
|
|
scanNewRoll() { |
|
|
const newRollNo = this.pageData.newRollNo; |
|
|
const newRollNo = this.pageData.newRollNo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!newRollNo || newRollNo.trim() === '') { |
|
|
if (!newRollNo || newRollNo.trim() === '') { |
|
|
this.$message.warning('请输入新卷卷号!'); |
|
|
this.$message.warning('请输入新卷卷号!'); |
|
|
return; |
|
|
return; |
|
|
@ -316,21 +317,21 @@ export default { |
|
|
/*检验当前卷数量的有效性*/ |
|
|
/*检验当前卷数量的有效性*/ |
|
|
checkValidQty() { |
|
|
checkValidQty() { |
|
|
let rollQty = parseFloat(this.pageData.rollQty); |
|
|
let rollQty = parseFloat(this.pageData.rollQty); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理无效值 |
|
|
// 处理无效值 |
|
|
if (isNaN(rollQty) || rollQty < 0) { |
|
|
if (isNaN(rollQty) || rollQty < 0) { |
|
|
this.pageData.rollQty = this.originalRollQty; |
|
|
this.pageData.rollQty = this.originalRollQty; |
|
|
this.$message.warning('当前卷数量无效,已重置为原始数量!'); |
|
|
this.$message.warning('当前卷数量无效,已重置为原始数量!'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 校验不能超过原始数量 |
|
|
// 校验不能超过原始数量 |
|
|
if (rollQty > this.originalRollQty) { |
|
|
if (rollQty > this.originalRollQty) { |
|
|
this.$message.warning(`当前卷数量不能超过原始数量 ${this.originalRollQty}!`); |
|
|
this.$message.warning(`当前卷数量不能超过原始数量 ${this.originalRollQty}!`); |
|
|
this.pageData.rollQty = this.originalRollQty; |
|
|
this.pageData.rollQty = this.originalRollQty; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.pageData.rollQty = rollQty; |
|
|
this.pageData.rollQty = rollQty; |
|
|
this.calculateTotalQty(); |
|
|
this.calculateTotalQty(); |
|
|
}, |
|
|
}, |
|
|
@ -455,7 +456,7 @@ export default { |
|
|
this.$message.error(data.msg); |
|
|
this.$message.error(data.msg); |
|
|
} else { |
|
|
} else { |
|
|
this.$message.success(data.msg); |
|
|
this.$message.success(data.msg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 打印标签 - 使用新的打印方式 |
|
|
// 打印标签 - 使用新的打印方式 |
|
|
if (data.printData) { |
|
|
if (data.printData) { |
|
|
// 存储过程返回了打印参数 |
|
|
// 存储过程返回了打印参数 |
|
|
@ -471,7 +472,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//延时一秒关闭 |
|
|
//延时一秒关闭 |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.closeDialog(); |
|
|
this.closeDialog(); |
|
|
|