4月26日提交

master
rosehan 2 years ago
parent af2a1feb2a
commit 0d9eaea5af
  1. 20
      sunPages/traceability-product/loss/lossEdit.vue
  2. 8
      sunPages/traceability-product/sales/salesEdit.vue

@ -50,7 +50,7 @@
return {
ProductID: null,
CurrenLossType:0,
CurrenLossType: 0,
LossTypeList: [], //
LossTypePickerList: [], //
@ -106,7 +106,9 @@
async submitForm() {
//
try {
this.formData.lossType = this.LossTypeList[this.CurrenLossType].value
console.log(this.formData)
await this.$refs['formRef'].validate()
const data = this.formData
await LossApi.createLoss(data)
@ -115,11 +117,11 @@
icon: 'success',
duration: 2000,
complete: function() {
uni.setStorageSync( 'canRefresh', 'true');
setTimeout(function() {
uni.navigateBack({
delta: 1
})
uni.setStorageSync('canRefresh', 'true');
setTimeout(function() {
uni.navigateBack({
delta: 1
})
}, 2000);
}
})
@ -147,8 +149,12 @@
handlerInput(event, index) {
this.$nextTick(() => {
const num = parseFloat(event.target.value).toFixed(2)
if (isNaN(num)) {
this.formData.productLoss = undefined
} else {
this.formData.productLoss = num
}
this.$forceUpdate()
this.formData.productLoss = num
})
},
}

@ -223,8 +223,12 @@
handlerInput(event, index) {
this.$nextTick(() => {
const num = parseFloat(event.target.value).toFixed(2)
this.$forceUpdate()
this.formData.salesNumber = num
if (isNaN(num)) {
this.formData.salesNumber = undefined
} else {
this.formData.salesNumber = num
}
this.$forceUpdate()
})
},

Loading…
Cancel
Save