|
@@ -381,12 +381,20 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
- async updateOrder (val) {
|
|
|
+ async updateOrder (val,fn) {
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221109093602,
|
|
|
"content": val
|
|
|
})
|
|
|
- this.$emit('onSuccess')
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ fn?fn():''
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type:'error',
|
|
|
+ message:res.data + ':' + res.msg
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
setPickerOptions (val) {
|
|
|
var startDate = val.deliverydate
|
|
@@ -424,33 +432,15 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
inputChange (row,index) {
|
|
|
- console.log(row.defaultprice,Number(row.contractprice))
|
|
|
- if (row.defaultprice < Number(row.contractprice)) {
|
|
|
- this.$message({
|
|
|
- message:'价格不能低于原价!',
|
|
|
- type:'error'
|
|
|
- })
|
|
|
- row.defaultprice = row.contractprice
|
|
|
- this.updateOrder({
|
|
|
- "sa_orderid": this.data.sa_orderid, //订单ID
|
|
|
- "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
|
|
|
- "sa_contractid": this.data.contacts.contactsid, //合同ID
|
|
|
- "type": this.data.type, //订单类型
|
|
|
- "items": this.tableData
|
|
|
- })
|
|
|
- } else {
|
|
|
- // row.defaultprice = row.contractprice
|
|
|
- this.$set(this.tableData,index,row)
|
|
|
- this.updateOrder({
|
|
|
- "sa_orderid": this.data.sa_orderid, //订单ID
|
|
|
- "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
|
|
|
- "sa_contractid": this.data.contacts.contactsid, //合同ID
|
|
|
- "type": this.data.type, //订单类型
|
|
|
- "items": this.tableData
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ this.updateOrder({
|
|
|
+ "sa_orderid": this.data.sa_orderid, //订单ID
|
|
|
+ "sys_enterpriseid": this.data.sys_enterpriseid, //企业ID
|
|
|
+ "sa_contractid": this.data.contacts.contactsid, //合同ID
|
|
|
+ "type": this.data.type, //订单类型
|
|
|
+ "items": this.tableData
|
|
|
+ },()=>{
|
|
|
+ this.$set(this.tableData,index,row)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|