|
|
@@ -145,29 +145,29 @@ Component({
|
|
|
},
|
|
|
onBlur(e) {
|
|
|
const {
|
|
|
- item
|
|
|
+ item,
|
|
|
+ name
|
|
|
} = e.currentTarget.dataset, {
|
|
|
value
|
|
|
} = e.detail;
|
|
|
- if (value != item.reason) {
|
|
|
- item.reason = value
|
|
|
- _Http.basic({
|
|
|
- "id": "20230206161803",
|
|
|
- "version": 1,
|
|
|
- "content": {
|
|
|
- sa_serviceorderid: item.sa_serviceorderid,
|
|
|
- "iteminfos": [item]
|
|
|
- },
|
|
|
- }).then(res => {
|
|
|
- if (res.code != '1') return wx.showToast({
|
|
|
- title: res.msg,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- [`list[${this.data.list.findIndex(v=>v.sa_serviceorderitemsid==item.sa_serviceorderitemsid)}]`]: item
|
|
|
- })
|
|
|
+ if (item[name] == value) return;
|
|
|
+ item[name] = value
|
|
|
+ _Http.basic({
|
|
|
+ "id": "20230206161803",
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ sa_serviceorderid: item.sa_serviceorderid,
|
|
|
+ "iteminfos": [item]
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code != '1') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
})
|
|
|
- }
|
|
|
+ this.setData({
|
|
|
+ [`list[${this.data.list.findIndex(v=>v.sa_serviceorderitemsid==item.sa_serviceorderitemsid)}]`]: item
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
deleteItem(e) {
|
|
|
const {
|