keys列表搜索与核销通知

This commit is contained in:
zhangguoping 2024-11-05 16:26:03 +08:00
parent fa60d5b4be
commit 63473c6893
4 changed files with 51 additions and 6 deletions

View File

@ -743,6 +743,11 @@ export const resetKey = (data) => {
return req("put", baseurl + "/key/reset", data)
}
// key码核销通知
export const noticeKey = (data) => {
return req("post", baseurl + "/key/merchantUsageNotify", data)
}
//提交审核
export const approvals = (id, data) => {
return req("post", baseurl + "/plan/" + id + "/approvals", data)

View File

@ -26,7 +26,8 @@ function init() {
plan: "",
state: { key: 0, text: "全部" },
key: "",
key_batch_id: ""
key_batch_id: "",
out_biz_no: ''
}
}
@ -121,7 +122,8 @@ export default forwardRef(({ onQuery, query, resetChange }, myRef) => {
plan_id: data.plan?.key || null,
status: data.state?.key || null,
key: data.key || null,
key_batch_id: data.key_batch_id?.id || null
key_batch_id: data.key_batch_id?.id || null,
out_biz_no: data.out_biz_no || null,
}
}
@ -202,6 +204,17 @@ export default forwardRef(({ onQuery, query, resetChange }, myRef) => {
onClearItem={() => setModels({ ...models, key: "" })}
/>
</FormItem>
<FormItem labelname="交易号:" required="" labelwidth="70px">
<Ipt
value={models.out_biz_no}
countShow={false}
labelWidth="0px"
placeholder="请输入下游交易号"
width={204}
onChange={(va) => setModels({ ...models, out_biz_no: va })}
onClearItem={() => setModels({ ...models, out_biz_no: "" })}
/>
</FormItem>
<div className="button_box">
<Button
@ -210,7 +223,8 @@ export default forwardRef(({ onQuery, query, resetChange }, myRef) => {
if (
onChange(models).plan_id ||
onChange(models).reseller_id ||
onChange(models).key
onChange(models).key ||
onChange(models).out_biz_no
) {
onQuery(onChange(models))
} else {

View File

@ -1,5 +1,5 @@
.keysFind {
width: 1200px;
width: 1320px;
display: flex;
align-items: center;

View File

@ -8,7 +8,8 @@ import {
keyBatchUsage,
keyCancel,
keyUsage,
resetKey
resetKey,
noticeKey
} from "@/assets/api.js"
import menu from "@/assets/enum.js"
import UseUploadExcel from "@/components/UseUploadExcel"
@ -153,7 +154,8 @@ const UseKeyList = () => {
plan_id: "",
status: "",
key: "",
key_batch_id: ""
key_batch_id: "",
out_biz_no: "",
},
keyDelayVisible: false,
keyDelay: [],
@ -192,6 +194,7 @@ const UseKeyList = () => {
status: state.query.status || null,
key: state.query.key || null,
key_batch_id: state.query.key_batch_id || null,
out_biz_no: state.query.out_biz_no || null,
hash: state.hash !== "" ? state.hash : null,
page: state.page,
limit: state.limit
@ -477,6 +480,24 @@ const UseKeyList = () => {
}
const menuItemClick = (e, key, rowData) => {
//
if(Number(key) === 6){
let formdata = {
key: rowData.key
}
noticeKey(formdata).then((res) => {
handelResponse(
res,
(req, msg) => {
setState({ page: 1, limit: 10, isQuery: !state.isQuery })
Notify.success("核销通知成功")
},
(err) => {
Notify.error(err)
}
)
})
}
//key
if(Number(key) === 5){
Sweetalert.confirm({
@ -828,6 +849,11 @@ const UseKeyList = () => {
<MenuItem key="4" disabled={![1, 2].includes(rowData.status)}>
编辑key码有效期
</MenuItem>
<MenuItem
key="6"
>
发起核销通知到下游
</MenuItem>
<MenuItem
key="5"
>