From 91d9db1ee1b1ccb0ee92f68333c3f1f3bd52b72a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Mon, 14 Feb 2022 10:38:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.计划任务更新审批重复提交 2.兑换码日期区间问题 --- src/assets/api.js | 4 ++-- src/pages/exchangecode/edit/edit.js | 5 ++--- src/pages/plan/add/edit.js | 10 ++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/assets/api.js b/src/assets/api.js index b48d986c..94a1abf6 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -1,6 +1,6 @@ import {Notify} from "zent" // export const baseurl = 'https://marketapi.1688sup.com' -window.baseurl = 'https://marketapi.1688sup.com'; +window.baseurl = 'http://pre.marketapi.1688sup.com'; const Version = "v1.1.0" let baseurl=""; if (process.env.NODE_ENV == "test"||process.env.NODE_ENV == "development") { // 测试环境 @@ -8,7 +8,7 @@ if (process.env.NODE_ENV == "test"||process.env.NODE_ENV == "development") { // window.baseurl = 'http://192.168.6.75'; } if (process.env.NODE_ENV == "production") { // 生成环境 - baseurl = "https://marketapi.1688sup.com" + baseurl = "http://pre.marketapi.1688sup.com" } // export let HOST = host; // export let API_URL = api_url; diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index 5f4f2cfd..cf3c0298 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -93,7 +93,7 @@ export default class exchangedit extends React.Component{ issued:req.quantity, stock:req.stock, describe:req.describe, - date_time:[req.begin_time,req.end_time], + date_time:[req.begin_time,req.plan.end_time], range:req.update_product } @@ -197,13 +197,12 @@ export default class exchangedit extends React.Component{ else{ getCodesDetail(code_batch_id).then(res=>{ handelResponse(res,(req,msg)=>{ - let codeInfo={ code_name:req.title, issued:req.quantity, stock:req.stock, describe:req.describe, - date_time:[req.begin_time,req.end_time], + date_time:[req.begin_time,req.plan.end_time], range:req.code_batch_stock } //获取分销商 diff --git a/src/pages/plan/add/edit.js b/src/pages/plan/add/edit.js index e8c28ff5..71bdc966 100644 --- a/src/pages/plan/add/edit.js +++ b/src/pages/plan/add/edit.js @@ -47,6 +47,7 @@ export default class add extends React.Component{ isload:false, is_Edit:false, whiteStyle:false, + btn_loading:false, } } @@ -360,6 +361,12 @@ export default class add extends React.Component{ } onConfirm(e){ + if(this.state.btn_loading == true) + { + return + } + this.setState({btn_loading : true}) + let plan_id = sessionStorage.getItem("plan_id") let plan_status = sessionStorage.getItem("plan_status"); this.setState({audit_visible:false}) @@ -369,6 +376,9 @@ export default class add extends React.Component{ if(approval_id > 0) { getApprovalsStatus(approval_id).then((res)=>{ + setTimeout(()=>{ + this.setState({btn_loading : false}) + },500) handelResponse(res,(req,msg)=>{ if(req.status == 0) {