加入change变化金额问题
This commit is contained in:
@@ -173,6 +173,9 @@
|
||||
<el-form-item label="变动数量">
|
||||
<el-input-number v-model="changeForm.changeQuantity" :min="0" :step="1" placeholder="请输入变动数量" size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库单价" v-if="changeForm.changeType === '增加'">
|
||||
<el-input-number v-model="changeForm.inUnitPrice" :min="0" :step="0.01" :precision="6" placeholder="请输入入库单价" size="mini"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="变动原因">
|
||||
<el-input type="textarea" v-model="changeForm.reason" placeholder="请输入变动原因" size="mini"/>
|
||||
</el-form-item>
|
||||
@@ -271,6 +274,9 @@ export default {
|
||||
this.changeForm = {
|
||||
changeType: '增加',
|
||||
auxiliaryId: row.auxiliaryId,
|
||||
inUnitPrice: undefined,
|
||||
changeQuantity: undefined,
|
||||
reason: undefined
|
||||
}
|
||||
},
|
||||
handleReduce(row) {
|
||||
@@ -278,12 +284,19 @@ export default {
|
||||
this.changeForm = {
|
||||
changeType: '减少',
|
||||
auxiliaryId: row.auxiliaryId,
|
||||
inUnitPrice: undefined,
|
||||
changeQuantity: undefined,
|
||||
reason: undefined
|
||||
}
|
||||
},
|
||||
changeCancel() {
|
||||
this.changeOpen = false;
|
||||
},
|
||||
changeSubmitForm() {
|
||||
if (this.changeForm.changeType === '增加' && (this.changeForm.inUnitPrice == null || this.changeForm.inUnitPrice === '')) {
|
||||
this.$modal.msgWarning('入库单价不能为空,建议按当前台账单价补齐后再提交');
|
||||
return;
|
||||
}
|
||||
this.buttonLoading = true;
|
||||
changeStock(this.changeForm).then(response => {
|
||||
this.buttonLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user