增加重置二维码按钮。

feature_0521
kevin jiang 5 years ago
parent f931a828e1
commit b4b31f25be

@ -53,6 +53,7 @@
<img :src="qrCodeImage" style="width:200px;height:200px;"/> <img :src="qrCodeImage" style="width:200px;height:200px;"/>
<div style="text-align: center;"> <div style="text-align: center;">
<Button ghost type="primary" @click="download(rowData)"></Button> <Button ghost type="primary" @click="download(rowData)"></Button>
<Button ghost type="primary" style="margin-left: 20px;" @click="resetQrCode(rowData)"></Button>
</div> </div>
</Modal> </Modal>
@ -539,6 +540,24 @@
}) })
}, },
/**
* 重置二维码
* @param index
*/
resetQrCode: function(index){
if(!index){
return;
}
http.postStoreStaffQrCodeReset({storeCode: index.code, staffCode: index.cpUserId}, function (data) {
if(data.code === '0000'){
this.$Message.success('重置成功');
}else{
this.$Message.error('重置失败');
}
});
},
// //
handlePage: function (value) { handlePage: function (value) {
this.pageNum = value; this.pageNum = value;

@ -13,35 +13,40 @@ import axios from 'axios'
* @returns {Promise<any | never>} * @returns {Promise<any | never>}
*/ */
export function uploadUser(params, call) { export function uploadUser(params, call) {
return http.post('/store/emp/import', params).then(call) return http.post('/store/emp/import', params).then(call)
} }
export function storeList(params, call, errorCallBack) { export function storeList(params, call, errorCallBack) {
return http return http
.post('/store/emp/list', params) .post('/store/emp/list', params)
.then(call) .then(call)
.catch(errorCallBack) .catch(errorCallBack)
} }
export function addStoreWX(params, call) { export function addStoreWX(params, call) {
return http.post('/user/add', params).then(call) return http.post('/user/add', params).then(call)
} }
export function modifyStoreWX(params, call) { export function modifyStoreWX(params, call) {
return http.post('/user/update', params).then(call); return http.post('/user/update', params).then(call);
} }
export function downloadImg(params,name, call) {
return http.downloadImg('/user/img/download',name, params).then(call); export function downloadImg(params, name, call) {
return http.downloadImg('/user/img/download', name, params).then(call);
} }
/** /**
* 下拉框数据品牌公司 * 下拉框数据品牌公司
*/ */
export function downCompanyData(params, call) { export function downCompanyData(params, call) {
return http.get('/retail/company', params).then(call) return http.get('/retail/company', params).then(call)
} }
/** /**
* 下拉框数据品牌公司 * 下拉框数据品牌公司
*/ */
export function downBigRegionData(params, call) { export function downBigRegionData(params, call) {
return http.get('/retail/big/region', params).then(call) return http.get('/retail/big/region', params).then(call)
} }
/** /**
@ -51,10 +56,11 @@ export function downBigRegionData(params, call) {
* @returns {Promise<any | never>} * @returns {Promise<any | never>}
*/ */
export function downloadStoreCode(params, call) { export function downloadStoreCode(params, call) {
return http return http
.downloadZip('/store/emp/download/store/code/bsd', '门店码', params) .downloadZip('/store/emp/download/store/code/bsd', '门店码', params)
.then(call) .then(call)
} }
/** /**
* 下载门店导购码 * 下载门店导购码
* @param params * @param params
@ -62,17 +68,17 @@ export function downloadStoreCode(params, call) {
* @returns {Promise<any | never>} * @returns {Promise<any | never>}
*/ */
export function downloadStoreSellerCode(params, call) { export function downloadStoreSellerCode(params, call) {
return http return http
.downloadZip( .downloadZip(
'/store/emp/download/store/seller/code/bsd', '/store/emp/download/store/seller/code/bsd',
'门店导购码', '门店导购码',
params params
) )
.then(call) .then(call)
} }
export function getBaseUrl() { export function getBaseUrl() {
return axios.defaults.baseURL return axios.defaults.baseURL
} }
/** /**
@ -83,22 +89,34 @@ export function getBaseUrl() {
* @returns {Promise<unknown>} * @returns {Promise<unknown>}
*/ */
export function downloadDataListToList(params, call, errorCallBack) { export function downloadDataListToList(params, call, errorCallBack) {
return http return http
.downloadFileToExcel( .downloadFileToExcel(
'/store/emp/download/store/excel/bsd', '/store/emp/download/store/excel/bsd',
'推广管理-店铺列表', '推广管理-店铺列表',
params params
) )
.then(call) .then(call)
.catch(errorCallBack) .catch(errorCallBack)
} }
export function getWelcomeList(params, call) { export function getWelcomeList(params, call) {
return http.get('/activity/instance/list', params).then(call) return http.get('/activity/instance/list', params).then(call)
} }
export function deleteWelcome(params, call) { export function deleteWelcome(params, call) {
return http.get('/activity/instance/deleteWelcome', params).then(call) return http.get('/activity/instance/deleteWelcome', params).then(call)
} }
/**
* 重置二维码
* @param params
* @param call
* @returns {Promise<any>}
*/
export function postStoreStaffQrCodeReset(params, call) {
return http.post('/store/staff/qrcode/reset', params).then(call)
}
export default { export default {
uploadUser, uploadUser,
getBaseUrl, getBaseUrl,
@ -111,6 +129,7 @@ export default {
downloadStoreCode, downloadStoreCode,
downloadStoreSellerCode, downloadStoreSellerCode,
downloadDataListToList, downloadDataListToList,
getWelcomeList, getWelcomeList,
deleteWelcome, deleteWelcome,
postStoreStaffQrCodeReset
} }

Loading…
Cancel
Save