加入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;
|
||||
|
||||
@@ -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>
|
||||
@@ -192,7 +195,7 @@
|
||||
<script>
|
||||
import { listSparePart, getSparePart, delSparePart, addSparePart, updateSparePart } from "@/api/mes/eqp/sparePart";
|
||||
import { listEquipmentManagement } from "@/api/mes/eqp/equipmentManagement";
|
||||
import { listSparePartsChange, changeStock } from "@/api/mes/eqp/sparePartsChange";
|
||||
import { changeStock } from "@/api/mes/eqp/sparePartsChange";
|
||||
import partChange from '../components/pages/partChange.vue';
|
||||
|
||||
export default {
|
||||
@@ -272,6 +275,9 @@ export default {
|
||||
this.changeForm = {
|
||||
changeType: '增加',
|
||||
partId: row.partId,
|
||||
inUnitPrice: undefined,
|
||||
changeQuantity: undefined,
|
||||
reason: undefined
|
||||
}
|
||||
},
|
||||
handleReduce(row) {
|
||||
@@ -279,14 +285,21 @@ export default {
|
||||
this.changeForm = {
|
||||
changeType: '减少',
|
||||
partId: row.partId,
|
||||
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 => {
|
||||
changeStock(this.changeForm).then(() => {
|
||||
this.buttonLoading = false;
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.getList();
|
||||
@@ -360,7 +373,7 @@ export default {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.partId != null) {
|
||||
updateSparePart(this.form).then(response => {
|
||||
updateSparePart(this.form).then(() => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@@ -368,7 +381,7 @@ export default {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addSparePart(this.form).then(response => {
|
||||
addSparePart(this.form).then(() => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
Reference in New Issue
Block a user