|
|
|
@ -383,13 +383,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
|
|
const state = reactive({ |
|
|
|
|
multiple: new URLSearchParams(location.search).get('multiple') || false, |
|
|
|
|
status: new URLSearchParams(location.search).get('status'), |
|
|
|
|
use_scope: new URLSearchParams(location.search).get('use_scope'), |
|
|
|
|
ids: new URLSearchParams(location.search).get('ids'), // 选中的优惠券id
|
|
|
|
|
data: [], |
|
|
|
|
selected: [], |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
function getData() { |
|
|
|
|
let tempSearch = { |
|
|
|
|
status: state.status |
|
|
|
|
status: state.status, |
|
|
|
|
use_scope: state.use_scope, |
|
|
|
|
}; |
|
|
|
|
let search = composeFilter(tempSearch); |
|
|
|
|
Fast.api.ajax({ |
|
|
|
@ -422,15 +425,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function onConfirm() { |
|
|
|
|
// let ids = state.ids.join(',')
|
|
|
|
|
let ids = state.ids.join(',') |
|
|
|
|
Fast.api.ajax({ |
|
|
|
|
url: 'shopro/coupon/select', |
|
|
|
|
type: 'GET', |
|
|
|
|
data: { |
|
|
|
|
type: 'select', |
|
|
|
|
search: JSON.stringify({ use_scope: 'goods','status':'normal' }) |
|
|
|
|
search: JSON.stringify({ use_scope: ['goods','='],status:['normal','='],id: [ids, 'in'] }) |
|
|
|
|
}, |
|
|
|
|
}, function (ret, res) { |
|
|
|
|
Fast.api.close(state.selected) |
|
|
|
|
Fast.api.close(res.data) |
|
|
|
|
return false |
|
|
|
|
}, function (ret, res) { }) |
|
|
|
|