|
@@ -418,6 +418,38 @@ Page({
|
|
|
});
|
|
|
return this.data.detail.status != '新建';
|
|
|
},
|
|
|
+ /* 拷贝订单 */
|
|
|
+ copyItem() {
|
|
|
+ let item = this.data.detail;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否确认复制${item.type}“${item.sonum}”`,
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20230102144502,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid": item.sa_orderid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("复制订单", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `${item.type}复制成功 是否立即前往`,
|
|
|
+ complete: (s) => {
|
|
|
+ if (s.confirm) wx.redirectTo({
|
|
|
+ url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
onUnload() {
|
|
|
let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/index');
|
|
|
let content = page.data.content;
|