|
@@ -65,6 +65,35 @@ Component({
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ /* 统一交期 */
|
|
|
|
+ dateChange(e) {
|
|
|
|
+ let that = this;
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: `是否确定将当前产品列表交期统一设置为:${e.detail.value}`,
|
|
|
|
+ complete: (res) => {
|
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
|
+ "id": 20230104143802,
|
|
|
|
+ "content": {
|
|
|
|
+ "sa_orderid": that.data.sa_orderid,
|
|
|
|
+ "needdate": e.detail.value
|
|
|
|
+ }
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log('统一设置交期', res)
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: res.msg == '成功' ? '设置成功' : res.msg,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ if (res.msg == '成功') that.setData({
|
|
|
|
+ list: that.data.list.map(v => {
|
|
|
|
+ v.needdate = e.detail.value;
|
|
|
|
+ return v
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
/* 修改 */
|
|
/* 修改 */
|
|
changeProduct({
|
|
changeProduct({
|
|
detail
|
|
detail
|
|
@@ -181,10 +210,10 @@ Component({
|
|
}).then(s => {
|
|
}).then(s => {
|
|
console.log('新增产品', s)
|
|
console.log('新增产品', s)
|
|
wx.showToast({
|
|
wx.showToast({
|
|
- title: res.msg == '成功' ? '添加成功' : res.msg,
|
|
|
|
|
|
+ title: s.msg == '成功' ? '添加成功' : s.msg,
|
|
icon: "none"
|
|
icon: "none"
|
|
});
|
|
});
|
|
- if (res.msg == '成功') setTimeout(() => {
|
|
|
|
|
|
+ if (s.msg == '成功') setTimeout(() => {
|
|
that.getList(that.data.sa_orderid, true);
|
|
that.getList(that.data.sa_orderid, true);
|
|
wx.navigateBack();
|
|
wx.navigateBack();
|
|
}, 300)
|
|
}, 300)
|