fix: 增加邮政绑定号 限制绑定对象绑定数
This commit is contained in:
parent
76338d91de
commit
a949aeafb2
|
@ -1050,4 +1050,14 @@ export const getApiMode = () => {
|
||||||
return req("get", baseurl + "/reseller/merchant/getApiMode")
|
return req("get", baseurl + "/reseller/merchant/getApiMode")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取邮储商户号
|
||||||
|
export const getYCMerNo = (params) => {
|
||||||
|
return req("get", baseurl + "/plan/getPostbankMerNo", params)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绑定邮储商户号
|
||||||
|
export const bindYCMerNo = (data) => {
|
||||||
|
return req("post", baseurl + "/plan/bindPostbankMerNo", data)
|
||||||
|
}
|
||||||
|
|
||||||
export { req }
|
export { req }
|
||||||
|
|
|
@ -1549,6 +1549,7 @@ export default class accList extends React.Component {
|
||||||
<Input
|
<Input
|
||||||
placeholder="请输入数量"
|
placeholder="请输入数量"
|
||||||
value={rowData.restrict}
|
value={rowData.restrict}
|
||||||
|
maxLength={5}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
this.onBindNum(e, rowData, rowIndex)
|
this.onBindNum(e, rowData, rowIndex)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1421,8 +1421,8 @@ export default class acclist extends React.Component {
|
||||||
return (
|
return (
|
||||||
<Input
|
<Input
|
||||||
placeholder="请输入数量"
|
placeholder="请输入数量"
|
||||||
type="number"
|
|
||||||
width={120}
|
width={120}
|
||||||
|
maxLength={5}
|
||||||
disabled={rowData.recharge_type == 2 || this.props.isSettlement === 1}
|
disabled={rowData.recharge_type == 2 || this.props.isSettlement === 1}
|
||||||
value={this.props.isSettlement === 1 ? 1 : rowData.restrict}
|
value={this.props.isSettlement === 1 ? 1 : rowData.restrict}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
|
@ -1286,6 +1286,7 @@ const UseKeyAddEdit = () => {
|
||||||
disabled={
|
disabled={
|
||||||
rowData.disabled || rowData.recharge_type == 2 || state.isSettlement === 1
|
rowData.disabled || rowData.recharge_type == 2 || state.isSettlement === 1
|
||||||
}
|
}
|
||||||
|
maxLength={5}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
onBindNum(e, rowData, rowIndex)
|
onBindNum(e, rowData, rowIndex)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -764,6 +764,7 @@ export default class accList extends React.Component {
|
||||||
<Input
|
<Input
|
||||||
placeholder="请输入数量"
|
placeholder="请输入数量"
|
||||||
value={rowData.restrict}
|
value={rowData.restrict}
|
||||||
|
maxLength={5}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
this.onBindNum(e, rowData, rowIndex)
|
this.onBindNum(e, rowData, rowIndex)
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -8,7 +8,9 @@ import {
|
||||||
planCancel,
|
planCancel,
|
||||||
planIsSend,
|
planIsSend,
|
||||||
planSend,
|
planSend,
|
||||||
startOrStopPlan
|
startOrStopPlan,
|
||||||
|
getYCMerNo,
|
||||||
|
bindYCMerNo
|
||||||
} from "@/assets/api.js"
|
} from "@/assets/api.js"
|
||||||
import "@/assets/comm.css"
|
import "@/assets/comm.css"
|
||||||
import menu from "@/assets/enum.js"
|
import menu from "@/assets/enum.js"
|
||||||
|
@ -236,7 +238,8 @@ export default class acclist extends React.Component {
|
||||||
usage_total: 0,
|
usage_total: 0,
|
||||||
silent_total: 0,
|
silent_total: 0,
|
||||||
isSend: true,
|
isSend: true,
|
||||||
isCancel: false
|
isCancel: false,
|
||||||
|
mer_no: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clickFn() {
|
clickFn() {
|
||||||
|
@ -480,7 +483,7 @@ export default class acclist extends React.Component {
|
||||||
window.open("#/home/key-list")
|
window.open("#/home/key-list")
|
||||||
}
|
}
|
||||||
|
|
||||||
menuItemClick(key, row) {
|
async menuItemClick(key, row) {
|
||||||
this.setState({ plan_id: row.id })
|
this.setState({ plan_id: row.id })
|
||||||
if (row.status == 6) {
|
if (row.status == 6) {
|
||||||
Notify.clear()
|
Notify.clear()
|
||||||
|
@ -577,6 +580,52 @@ export default class acclist extends React.Component {
|
||||||
if (key == 6) {
|
if (key == 6) {
|
||||||
this.callBack(row)
|
this.callBack(row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (key == 7) {
|
||||||
|
let res = await getYCMerNo({ plan_id: row.id })
|
||||||
|
if (res.code === 200) {
|
||||||
|
let self7 = this
|
||||||
|
self7.setState({ mer_no: res.data.mer_no })
|
||||||
|
Sweetalert.confirm({
|
||||||
|
type: "info",
|
||||||
|
closeBtn: true,
|
||||||
|
title: "邮储商户编号",
|
||||||
|
content: (
|
||||||
|
<Input
|
||||||
|
placeholder="请输邮储商户编号"
|
||||||
|
maxLength={200}
|
||||||
|
onChange={(e) => self7.setState({ mer_no: e.target.value })}
|
||||||
|
defaultValue={self7.state.mer_no}
|
||||||
|
></Input>
|
||||||
|
),
|
||||||
|
onConfirm: (e) => {
|
||||||
|
if (self7.state.mer_no === "") {
|
||||||
|
Notify.error("请输入邮储商户编号")
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
bindYCMerNo({ plan_id: row.id, mer_no: self7.state.mer_no }).then((yzres) => {
|
||||||
|
console.log("yzres =>", yzres)
|
||||||
|
if (yzres.code === 200) {
|
||||||
|
Notify.success("绑定成功")
|
||||||
|
self7.setState({ page: 1, limit: 10 })
|
||||||
|
let data = {
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
}
|
||||||
|
self7.getPlanList(data)
|
||||||
|
e()
|
||||||
|
} else {
|
||||||
|
Notify.error(yzres.message)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onCancel: this.onCancel,
|
||||||
|
className: "questModal",
|
||||||
|
parentComponent: this
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//清空
|
//清空
|
||||||
|
@ -854,6 +903,7 @@ export default class acclist extends React.Component {
|
||||||
日志
|
日志
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem key="3">作废</MenuItem>
|
<MenuItem key="3">作废</MenuItem>
|
||||||
|
<MenuItem key="7">绑定邮储商户编号</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</DropdownContent>
|
</DropdownContent>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
@ -887,6 +937,8 @@ export default class acclist extends React.Component {
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue