diff --git a/src/assets/api.js b/src/assets/api.js index 4266049a..06d367e3 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -1,7 +1,7 @@ import {Notify} from "zent" // export const baseurl = 'https://marketapi.1688sup.com' window.baseurl = 'https://marketapi.1688sup.com'; -const Version = "v1.0.3" +const Version = "v1.0.4" let baseurl; if (process.env.NODE_ENV == "test"||process.env.NODE_ENV == "development") { // 测试环境 baseurl = "http://192.168.6.75" @@ -303,7 +303,7 @@ export const addPlanStep = (id, params) => { let str = id ? "/"+id :"" if(str) { - return req('put', baseurl + "/plan/step" + str, params) + return req('put',baseurl + "/plan/step" + str, params) } return req('post', baseurl + "/plan/step" + str, params) } @@ -460,6 +460,17 @@ export const getCodeProduct = (batch_id,id) => { } +//获取商品库存明细 +export const getIsRequireApproval = (id,data) => { + return req('post', baseurl + "/codes/"+id+"/is_require_approval",data) +} + + + + + + + // //蓝色兄弟映射商品 export const getProductInfoSelect = (params) => { return req('get', baseurl + "/product/market/products",params) @@ -842,6 +853,47 @@ export const getkeyDetailList= (id,data) => { } +//提交审核 +export const approvals= (id,data) => { + return req('post', baseurl + "/plan/"+id+"/approvals",data) +} + + +export const getApprovalsInfo= (id,data) => { + return req('get', baseurl + "/approvals/"+id+"/market_approval_data",data) +} + + +export const terminateApprovals= (id,data) => { + return req('put', baseurl + "/approvals/"+id+"/terminate",data) +} + + +export const getApprovalsStatus= (id,data) => { + return req('get', baseurl + "/approvals/"+id+"/status") +} + +//作废 +export const keyBatchCancel= (data) => { + return req('put', baseurl + "/key/batch_cancel",data) +} + +//作废 +export const keyCancel= (data) => { + return req('put', baseurl + "/key/cancel",data) +} +//标记使用 +export const keyBatchUsage= (data) => { + return req('put', baseurl + "/key/batch_usage",data) +} +//标记使用 +export const keyUsage= (data) => { + return req('put', baseurl + "/key/usage",data) +} +//获取日志 +export const getKeyLog= (data) => { + return req('get', baseurl + "/key/log/list",data) +} diff --git a/src/pages/home/home.js b/src/pages/home/home.js index fc73fa70..4e6a79b5 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -52,7 +52,7 @@ import keylist from "../plan/key/list" import keyorderlist from "../plan/keyorder/keyorder" import keyedit from "../plan/key/edit.js" import keydetail from "../plan/key/detail/list.js" - +import keylog from "../plan/key/detail/log.js" import accountlist from '../system/account/list/list'; @@ -424,6 +424,7 @@ export default class App extends Component { + diff --git a/src/pages/plan/key/list.less b/src/pages/plan/key/list.less new file mode 100644 index 00000000..dd7735b8 --- /dev/null +++ b/src/pages/plan/key/list.less @@ -0,0 +1,18 @@ +#exchangecodelist{ + width: 98%; + margin: 0 auto; + .codetable{ + padding: 24px; + } + .code-table{ + border-top: 1px solid #e0e0e0; + padding-bottom: 24px; + } + .grid-link{ + color: #2B66F2; + cursor: pointer; + } + .linkmore.disabled ,.grid-link.disabled{ + color: rgb(216, 219, 221); + } +} \ No newline at end of file diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 0665c4ed..c8a2a360 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -22,12 +22,12 @@ export default class acclist extends React.Component{ dataCount:0, page:1, limit:10, - tabList:[{title:"营销计划列表"}], - distdata:[], - filterList:[{id:0,label:"状态", prop:"status", menuList:[{id:999,name:"全部"},{id:0,name:"创建中"},{id:2,name:"审核中"},{id:3,name:"待生效"},{id:4,name:"进行中"},{id:5,name:"暂停中"},{id:6,name:"已完结"}]}, + tabList:[{title:"营销计划列表"}], + distdata:[], + filterList:[{id:0,label:"状态", prop:"status", menuList:[{id:999,name:"全部"},{id:0,name:"创建中"},{id:2,name:"审核中"},{id:3,name:"待生效"},{id:4,name:"进行中"},{id:5,name:"暂停中"},{id:6,name:"已完结"},{id:7,name:"未通过"}]}, ], tableHeight:500, - menuList:[{id:0,name:"状态",check:false}], + menuList:[{id:0,name:"状态",check:false}], phone_list:[], email_list:[], phone:"", @@ -96,37 +96,9 @@ export default class acclist extends React.Component{ planSend(plan_id,data).then((res)=>{ handelResponse(res,(req,msg)=>{ - - // if(this.state.isSend == false) - // { - // let data = { - // "operation": 1 - // } - - - // startOrStopPlan(plan_id,data).then((res)=>{ - // handelResponse(res,(req,msg)=>{ - // console.log(77777777777) - // let data = { - // page:this.state.page, - // limit:this.state.limit - // } - // this.getPlanList(data); - // this.setState({isSend:true}) - - // },(err)=>{ - // console.log(88888888888) - // Notify.error(err) - // }) - // }) - - - // } this.setState({audit_visible:false}) Notify.success("发送成功") },(err)=>{ - - Notify.error(err) }) }) @@ -134,9 +106,6 @@ export default class acclist extends React.Component{ } componentDidMount(e){ - - - let data = { page:1, limit:10 @@ -148,11 +117,9 @@ export default class acclist extends React.Component{ } getPlanList(data){ - let queryParams = _.omitBy(data, (value) => { return _.isNaN(value) || _.isNil(value) }) - getPlanList(queryParams).then((res)=>{ handelResponse(res,(req,msg)=>{ this.setState({distdata:req.data}) @@ -203,8 +170,6 @@ export default class acclist extends React.Component{ "operation": status ? 1 : 2 } - - if(row.status == 3) { @@ -431,7 +396,7 @@ export default class acclist extends React.Component{ {path:'/home/key-list',name:'编辑:'+row.title} ]}] sessionStorage.setItem('breakchangenav',JSON.stringify(editarr)); - if(row.status == 2 || row.status == 6) + if( row.status == 6) { Notify.clear(); Notify.error("不可编辑") @@ -439,6 +404,7 @@ export default class acclist extends React.Component{ } sessionStorage.setItem("plan_id",row.id) sessionStorage.setItem("plan_status",row.status) + sessionStorage.setItem("approval_id",row.approval_id) let link = window.location.href.replace(window.location.hash,"#/home/plan-edit"); window.open(link, "_blank") @@ -649,9 +615,7 @@ export default class acclist extends React.Component{ } if(com == "opearo") { - - - + let str = {this.onEdit(e,rowData)} } >编辑 @@ -727,7 +691,7 @@ export default class acclist extends React.Component{ } - + console.log("菜单",str) return str }