|
|
@@ -153,15 +153,14 @@
|
|
|
save() {
|
|
|
this.$refs['editForm'].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
+ this.editForm.guidPrice = parseFloat(this.editForm.guidPrice).toFixed(2)
|
|
|
+ this.editForm.distPrice = parseFloat(this.editForm.distPrice).toFixed(2)
|
|
|
+ this.editForm.agentPrice = parseFloat(this.editForm.agentPrice).toFixed(2)
|
|
|
+ this.editForm.marketPrice = parseFloat(this.editForm.marketPrice).toFixed(2)
|
|
|
if (this.editForm.id) {
|
|
|
- this.editForm.guidPrice = parseFloat(this.editForm.guidPrice).toFixed(2)
|
|
|
- this.editForm.distPrice = parseFloat(this.editForm.distPrice).toFixed(2)
|
|
|
- this.editForm.agentPrice = parseFloat(this.editForm.agentPrice).toFixed(2)
|
|
|
- this.editForm.marketPrice = parseFloat(this.editForm.marketPrice).toFixed(2)
|
|
|
const { msg } = await productApi.doEdit(this.editForm)
|
|
|
this.$baseMessage(msg, 'success', 'vab-hey-message-success')
|
|
|
} else {
|
|
|
- this.editForm.guidPrice = parseFloat(this.editForm.guidPrice).toFixed(2)
|
|
|
const { msg } = await productApi.doAdd(this.editForm)
|
|
|
this.$baseMessage(msg, 'success', 'vab-hey-message-success')
|
|
|
}
|