Browse Source

2023-12-25

master
guoxing 2 years ago
parent
commit
565518beac
  1. 2
      .env.development
  2. 9
      src/api/marketingCard/marketingCard.js
  3. 4
      src/views/marketingCard/index.vue
  4. 73
      src/views/marketingCard/pickupCardSet.vue

2
.env.development

@ -8,6 +8,6 @@ VUE_APP_BASE_API = '/api'
# VUE_APP_URL = "http://jianguan.yyundong.com/shgfapi" # VUE_APP_URL = "http://jianguan.yyundong.com/shgfapi"
VUE_APP_URL = "http://192.168.2.106:7201" VUE_APP_URL = "http://192.168.2.101:7201"
VUE_APP_REPORT_URL = "http://192.168.2.106:7202" VUE_APP_REPORT_URL = "http://192.168.2.106:7202"
##VUE_APP_URL = "http://8.130.39.13:8112" ##VUE_APP_URL = "http://8.130.39.13:8112"

9
src/api/marketingCard/marketingCard.js

@ -93,6 +93,15 @@ export default {
}) })
}, },
// 作废提货卡
cancelCard: function(sid) {
return request({
url: '/lpkgiftcard/cancelCard/'+sid,
method: 'get'
});
},
// 获取提货卡页面 礼包列表 // 获取提货卡页面 礼包列表
giftBagList: function(data) { giftBagList: function(data) {

4
src/views/marketingCard/index.vue

@ -42,12 +42,12 @@
<el-table-column label="是否上架" align="center" width="140"> <el-table-column label="是否上架" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.isEnable" v-model="scope.row.isGrounding"
active-text="上架" active-text="上架"
inactive-text="下架" inactive-text="下架"
active-value="1" active-value="1"
inactive-value="0" inactive-value="0"
@change="enableChange(scope.row.sid,scope.row.isEnable)" @change="enableChange(scope.row.sid,scope.row.isGrounding)"
/> />
</template> </template>
</el-table-column> </el-table-column>

73
src/views/marketingCard/pickupCardSet.vue

@ -35,10 +35,10 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="editRow(scope.row)"> <el-button type="primary" size="mini" @click="editRow(scope.row)">
发放 发放
</el-button> --> </el-button>
<el-button type="primary" size="mini" @click="showRow(scope.row)"> <el-button type="primary" size="mini" @click="showRow(scope.row.sid)">
明细 明细
</el-button> </el-button>
</template> </template>
@ -100,13 +100,13 @@
:row-style="{height: '40px'}"> :row-style="{height: '40px'}">
<el-table-column label="序号" width="70px" type="index" align="center"> <el-table-column label="序号" width="70px" type="index" align="center">
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" width="150px" align="center"> <el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editRow(scope.row)"> <el-button type="primary" :disabled="scope.row.customerSid!=''||scope.row.state=='已作废'" size="mini" @click="delectItem(scope.row)">
明细 作废
</el-button> </el-button>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column prop="serialNumber" label="序列号" align="center"> <el-table-column prop="serialNumber" label="序列号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="code" label="提货码" align="center"> <el-table-column prop="code" label="提货码" align="center">
@ -485,8 +485,8 @@
editRow(row) { editRow(row) {
this.editDialog = true this.editDialog = true
}, },
showRow(row) { showRow(sid) {
this.listQuery.params.sid = row.sid this.listQuery.params.sid =sid
this.viewState = 2 this.viewState = 2
req.recordDetails(this.listQuery) req.recordDetails(this.listQuery)
.then(resp => { .then(resp => {
@ -624,11 +624,14 @@
req.cardGrant(this.from) req.cardGrant(this.from)
.then(resp => { .then(resp => {
this.$message({
showClose: true, if(resp.success){
type: 'success', this.$message({
message: resp.msg showClose: true,
}) type: 'success',
message: resp.msg
})
}
this.editDialog = false this.editDialog = false
this.from = { this.from = {
start: "", start: "",
@ -684,20 +687,44 @@
// _this.reportFileList.push(upfile) // _this.reportFileList.push(upfile)
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
const _this = this
let delete_index = 0
for (let i = 0, len = _this.reportFileList.length; i < len; i++) {
if (file.uid === _this.reportFileList[i].fileuid) {
delete_index = i
break
}
}
_this.reportFileList.splice(delete_index, 1)
}, },
submitUpload() { submitUpload() {
this.$refs.upload.submit() this.$refs.upload.submit()
},
delectItem(row){
console.log("row", row);
const tip = '请确认是否作废所选卡券?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.cancelCard(row.sid).then((resp) => {
loading.close()
if (resp.success) {
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
this.showRow(this.listQuery.params.sid)
} else {
// resp.code
}
}).catch(e => {
loading.close()
})
}).catch(() => {})
} }
} }

Loading…
Cancel
Save