Commit a33f2146 by 前端

更新again again again

1 parent a8a26ace
...@@ -250,5 +250,52 @@ export default { ...@@ -250,5 +250,52 @@ export default {
data: params data: params
}) })
}, },
// 快递到家地址信息查询
queryExpressInformation(params){
params.method = 'marketing.api.self.red.envelope.customer.write.detail.query'
return http({
url,
data: params
})
},
// 新建活动模板
newActivityTemplate(params){
params.method = 'marketing.api.self.red.envelope.template.save'
return http({
url,
data: params,
returnAll:true
})
},
// 快递到家地址信息配置列表
expressConfigList(params){
params.method = 'marketing.api.self.red.envelope.customer.write.config.list'
return http({
url,
data: params
})
},
// 活动模板管理列表、
activeTmpManageList(params){
params.method = 'marketing.api.self.red.envelope.template.page'
return http({
url,
data: params
})
},
// 商品核销发货
goodsAreWrittenOffAndShipped(params){
params.method = 'marketing.api.self.red.envelope.send.out.goods'
return http({
url,
data: params,
returnAll:true
})
}
} }
<template>
<div>
<div id="div-demo"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'textBox',
data() {
return {
editor: '',
content: '',
editorOption: {}
}
},
props: {
excludeMenus: {
type: Array,
default: () => ['code']
},
boxHeight:{
type: Number,
default: 240
}
},
mounted() {
this.getEdit()
},
methods: {
handleEditorClick(e) {
const target = e.target;
console.log(target.nodeName)
if (target.nodeName === 'VIDEO') {
// 视频被点击,移动光标到视频后面
// const range = document.createRange();
// const selection = window.getSelection();
// range.setStartAfter(target); // 设置范围的起点为视频元素之后
// range.collapse(true); // 折叠范围
// selection.removeAllRanges(); // 清除所有范围
// selection.addRange(range); // 添加新范围
}
},
getEdit() {
const _this = this
this.editor = new E('#div-demo')
this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = this.boxHeight
this.editor.config.width = 500
this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.pasteIgnoreImg = true
// this.editor.config.uploadImgHooks = {
// before: (xhr, editer, files) => {
// if(files[0].name === 'image.png') {
// return {
// prevent: true,
// msg: '请您将截图以上传图片的方式显示在文本框中!'
// }
// }
// }
// }
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.onfocus = () => {
this.$emit('focus')
}
// 上传图片
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertImgFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
// 上传视频
this.editor.config.customUploadVideo = function(resultFiles, insertVideoFn) {
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const videoFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + videoFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertVideoFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// 上传图片,返回结果,将图片插入到编辑器中
}
}
this.editor.config.onchangeTimeout = 5000
this.editor.create()
// 绑定点击事件处理器
this.editor.$textElem.on('click', this.handleEditorClick)
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
},
forbidEdit() {
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
}
}
}
</script>
<style lang="scss" scoped>
#div-demo {
// margin: 16px 300px 0 0;
}
.el-form .editor {
margin-top: 20px;
}
.myQuillEditor {
background-color: #fff;
height: 200px;
}
</style>
<style>
.w-e-text-container {
z-index: 1 !important;
}
.w-e-toolbar {
z-index: 2 !important;
}
</style>
<template> <template>
<div class="activity-content"> <div class="new-tmp">
<glsx-combi-form <h2>新建活动模版</h2>
<hr/>
<div class="activity-wrap">
<div class="activity-content"><glsx-combi-form
ref="formRef" ref="formRef"
:isEdit="true" :isEdit="true"
:isBlock="true" :isBlock="true"
...@@ -32,40 +35,117 @@ ...@@ -32,40 +35,117 @@
</template> </template>
</el-select> </el-select>
</template> </template>
</glsx-combi-form>
<template #pageTheme>
<div class="page-theme">
<el-form-item label="第一行" prop="theme1" >
<el-input v-model="configForm.theme1" maxLength="5"></el-input>
</el-form-item>
<el-form-item label="第二行" prop="theme2" >
<el-input v-model="configForm.theme2" maxLength="5"></el-input>
</el-form-item>
</div>
</template>
<p
slot="cardCover"
class="cover-tips"
>建议格式:高度88px,png</p>
<template #activityRuleDes>
<textBox style="width:45vw" @change="writeChange" ref="textBox" @forbid="forbidEdit"></textBox>
</template>
<template #physicalWinningCfg>
<div class="physical-winning">
<el-form-item
label="活动形式:"
prop="exchangeType"
class="m-t-20"
>
<el-radio-group
v-model="configForm.exchangeType"
class="fit-width radio"
>
<el-radio :label="0">快递到家</el-radio>
<el-radio :label="1">到店核销</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="填写信息:" prop="describeId" v-if="configForm.exchangeType == 0">
<el-checkbox-group v-model="configForm.describeId">
<el-checkbox v-for="(item,index) in expressList" :key="index" :label="item"><span>{{ item.describeMsg }}</span></el-checkbox>
</el-checkbox-group>
</el-form-item>
</div>
</template>
</glsx-combi-form></div>
<div class="redEnvelope-bg">
<img v-if="configForm.logo" :src="configForm.logo">
<p v-html="configForm.theme1"></p>
<p class="p2" v-html="configForm.theme2"></p>
</div>
</div>
<GLFooter>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">确定</el-button>
</GLFooter>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import { getMerchantListMixin } from '@/mixins' import {getMerchantListMixin} from '@/mixins'
import textBox from '@/components/text-box'
export default { export default {
name: 'StepOne', name: 'add',
mixins: [getMerchantListMixin], mixins: [getMerchantListMixin],
props: { props: {
disabled: Boolean disabled: Boolean
}, },
data () { components: {
textBox
},
data() {
return { return {
configForm: { merchantObj: {
nothing: false,
data: [],
currentPage: 1,
name: '', name: '',
loading: false,
total: 0
},
expressList:[],
configForm: {
templateName: '',
merchantId: '', merchantId: '',
cardTitle: '', activityType: '0',
cardCover: '', theme1:'',
activityId: '', theme2:'',
merchantName: '' logo: '',
merchantName: '',
pageTheme:'11',
exchangeType: '',
ruleDescribe:'',
describeId: [],
}, },
rule: { rule: {
name: [{ required: true, message: '请输入问卷名称', trigger: 'change' }], templateName: [{required: true, message: '请输入模板名称', trigger: 'change'}],
merchantId: [{ required: true, message: '请选择所属渠道', trigger: 'change' }], merchantId: [{required: true, message: '请选择所属渠道', trigger: 'change'}],
cardTitle: [{ required: true, message: '请输入卡片标题', trigger: 'change' }], activityType: [{required: true, message: '请选择活动形式', trigger: 'change'}],
cardCover: [{ required: true, message: '请上传卡片封面', trigger: 'change' }], logo: [{required: true, message: '请上传卡片封面', trigger: 'change'}],
pageTheme: [{required: true, message: '请输入页面主题'}],
exchangeType: [{required: true, message: '请选择活动形式', trigger: 'change'}],
describeId: [{required: true, message: '请选择填写信息', trigger: 'change'}]
}, },
formData: [ formData: [
{ {
label: '模板名称', label: '模板名称',
name: 'name', name: 'templateName',
type: 'input', type: 'input',
maxlength: 50, maxlength: 25
}, },
{ {
label: '所属渠道', label: '所属渠道',
...@@ -74,14 +154,23 @@ export default { ...@@ -74,14 +154,23 @@ export default {
addHtml: 'merchantId' addHtml: 'merchantId'
}, },
{ {
label: '卡片标题', label: '活动形式',
name: 'cardTitle', name: 'activityType',
type: 'input', type: 'radio',
maxlength: 20, optionList: [
{text: '随机红包', id: '0'}
],
optionId: 'id',
optionLabel: 'text',
},
{
label: '页面主题',
name: 'pageTheme',
addHtml: 'pageTheme'
}, },
{ {
label: '卡片封面', label: 'logo图片',
name: 'cardCover', name: 'logo',
type: 'upload', type: 'upload',
width: '320px', width: '320px',
limitSize: 10, limitSize: 10,
...@@ -96,7 +185,7 @@ export default { ...@@ -96,7 +185,7 @@ export default {
arrBase64 = imgFile.split(',')[1], arrBase64 = imgFile.split(',')[1],
str = file.name.split('.'), str = file.name.split('.'),
base64 = str.at(-1) + '@' + arrBase64, base64 = str.at(-1) + '@' + arrBase64,
res = await this.$apis.common.pictureUpload({ file: base64, fileType: 'image' }) res = await this.$apis.common.pictureUpload({file: base64, fileType: 'image'})
if (res) { if (res) {
this.configForm[targetItem.name] = res this.configForm[targetItem.name] = res
this.formRef().validateField(targetItem.name) this.formRef().validateField(targetItem.name)
...@@ -109,30 +198,70 @@ export default { ...@@ -109,30 +198,70 @@ export default {
} }
}, },
{ {
label: '关联活动', label: '活动规则描述',
addHtml: 'activity' addHtml: 'activityRuleDes'
},
{
label: '实物中奖配置',
addHtml: 'physicalWinningCfg'
} }
], ],
} }
}, },
watch: { watch: {},
mounted() {
}, this.getExpressInfo()
mounted () {
}, },
methods: { methods: {
change (id) { getExpressInfo(){
this.clearActivity() this.$apis.redenvelope.expressConfigList({}
).then(res => {
this.expressList = res.map(item => ({'describeMsg':item.describeMsg,'describeId':item.describeId}))
})
},
validateForm() {
return new Promise((resolve, reject) => {
this.formRef().validate((valid) => {
if (valid) {
resolve();
} else {
reject(new Error('缺少必填内容'));
}
});
});
},
writeChange(val) {
this.configForm.ruleDescribe = val
},
change(id) {
this.configForm.merchantName = '' this.configForm.merchantName = ''
this.activityObj = this.$options.data.call(this).activityObj
if (id) { if (id) {
this.configForm.merchantName = this.merchantObj.data.find(e => e.confId == id).confName this.configForm.merchantName = this.merchantObj.data.find(e => e.confId == id).confName
this.getActivityList() }
} else this.activityObj.flag = true
}, },
formRef () { formRef() {
return this.$refs.formRef.$refs.formRef return this.$refs.formRef.$refs.formRef
}, },
handleCancel() {
this.$router.back()
},
handleSave() {
this.validateForm().then(() => {
const {describeId,pageTheme,...params} = this.configForm
if (!params.theme1 && !params.theme2) return this.$message.error('请填写页面主题');
params.writeInfoList = [...describeId]
this.$apis.redenvelope.newActivityTemplate(params).then(res => {
if (res.code == 0){
this.$message.success('新建活动模板成功');
this.handleCancel()
}else{
this.$message.error(res.message);
}
})
}).catch(error => {
this.$message.error(error.message);
});
}
}, },
...@@ -140,8 +269,76 @@ export default { ...@@ -140,8 +269,76 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.activity-content{ .new-tmp{
background: #fff; background: #fff;
h2{
padding: 10px 0 0 16px;
}
.activity-wrap{
display: flex;
.cover-tips{
position: absolute;
color: #999999;
left: 90px;
top: 60px;
}
.activity-content {
width: 70%;
padding: 20px; padding: 20px;
.page-theme{
.el-form-item{
display: flex;
width: 340px;
/deep/.el-form-item__label{
margin-right: 8px;
}
}
}
.physical-winning {
background: #F9F9F9;
width: 400px;
padding: 10px;
.el-form-item{
/deep/.el-form-item__label{
width: auto;
}
}
}
}
.redEnvelope-bg{
position: relative;
width: 500px;
height: 800px;
background-image: url("./../../../../assets/redEnvelope-bg.png");
background-repeat: no-repeat;
img{
position: absolute;
width: 98px;
height: 33px;
top: 55px;
left:28px;
}
p{
position: absolute;
font-family: SourceHanSansCN-Heavy;
font-weight: 900;
font-size: 35.5px;
letter-spacing: 0;
text-align: center;
background: linear-gradient(to bottom, #FFFFFF, #FFD58E); /* 设置背景渐变 */
-webkit-background-clip: text; /* Safari/Chrome */
-webkit-text-fill-color: transparent; /* Safari/Chrome */
color: transparent; /* Firefox/Opera */
text-shadow: 0 1px 3px #ffe9e9de;
top: 100px;
left: 45px;
}
.p2{
top: 150px;
}
}
}
} }
</style> </style>
...@@ -13,41 +13,43 @@ export default { ...@@ -13,41 +13,43 @@ export default {
searchFormData: [ searchFormData: [
{ {
label: '模板名称', label: '模板名称',
name: 'wechatName', name: 'templateName',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
}, },
{ {
label: '所属渠道', label: '所属渠道',
name: 'userPhone', name: 'merchantName',
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
} }
], ],
getListApi: this.$apis.redenvelope.drawListApi, getListApi: this.$apis.redenvelope.activeTmpManageList,
tableParams: { tableParams: {
listName: 'list', listName: 'data',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '模板名称', label: '模板名称',
prop: 'userPhone', prop: 'templateName',
minWidth: 100 minWidth: 100
}, },
{ {
label: '所属渠道', label: '所属渠道',
prop: 'wechatName', prop: 'merchantName',
minWidth: 100 minWidth: 100
}, },
{ {
label: '活动形式', label: '活动形式',
prop: 'link', prop: 'activityType',
minWidth: 100 formatter: cell => {
return {0: '随机红包', 1: '九宫格', 2: '翻牌', 3: '大转盘'}[cell.activityType]
}
}, },
{ {
label: '创建时间', label: '创建时间',
minWidth: 100, minWidth: 100,
prop:'activityName' prop:'createdTime'
} }
] ]
}, },
......
...@@ -78,5 +78,5 @@ export default { ...@@ -78,5 +78,5 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
//@import "../common/style.scss"; @import "../common/style.scss";
</style> </style>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<!-- 快递信息 --> <!-- 快递信息 -->
<div class="form-section"> <div class="form-section">
<h3 class="section-title">核销信息</h3> <h3 class="section-title">核销信息</h3>
<el-form-item label="核销码" prop="logisticsNumber" :rules="[{ required: true, message: '核销码不能为空', trigger: 'blur' }]"> <el-form-item label="核销码" prop="cancelNumber" :rules="[{ required: true, message: '核销码不能为空', trigger: 'blur' }]">
<el-input v-model="form.logisticsNumber"></el-input> <el-input v-model="form.cancelNumber"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -52,15 +52,16 @@ export default { ...@@ -52,15 +52,16 @@ export default {
size: 'small', size: 'small',
disabled: false, disabled: false,
form: { form: {
logisticsCompany: '', cancelNumber: '',
logisticsNumber: '',
} }
} }
}, },
methods:{ methods:{
handleConfirm(){ handleConfirm(){
this.validateForm().then(() => { this.validateForm().then(() => {
this.$emit('submit', this.form); this.$emit('submit', {
...this.form,id:this.cancelObj.id
});
this.handleClose(); this.handleClose();
}).catch(error => { }).catch(error => {
this.$message.error(error.message); this.$message.error(error.message);
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<el-form-item label="物流公司" prop="logisticsCompany" :rules="[{ required: true, message: '物流公司不能为空', trigger: 'blur' }]"> <el-form-item label="物流公司" prop="logisticsCompany" :rules="[{ required: true, message: '物流公司不能为空', trigger: 'blur' }]">
<el-input v-model="form.logisticsCompany"></el-input> <el-input v-model="form.logisticsCompany"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="物流单号" prop="logisticsNumber" :rules="[{ required: true, message: '物流单号不能为空', trigger: 'blur' }]"> <el-form-item label="物流单号" prop="logisticsOrderNo" :rules="[{ required: true, message: '物流单号不能为空', trigger: 'blur' }]">
<el-input v-model="form.logisticsNumber"></el-input> <el-input v-model="form.logisticsOrderNo"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -56,13 +56,17 @@ export default { ...@@ -56,13 +56,17 @@ export default {
type: String, type: String,
default: '50%' default: '50%'
}, },
goodsObj:{
type: Object,
default: () => {}
},
infoSections: Array // 传入的数据结构数组 infoSections: Array // 传入的数据结构数组
}, },
data() { data() {
return { return {
form: { form: {
logisticsCompany: '', logisticsCompany: '',
logisticsNumber: '', logisticsOrderNo: '',
} }
}; };
}, },
...@@ -83,7 +87,7 @@ export default { ...@@ -83,7 +87,7 @@ export default {
}, },
submitForm() { submitForm() {
this.validateForm().then(() => { this.validateForm().then(() => {
this.$emit('submit', this.form); this.$emit('submit', {...this.form,...this.goodsObj});
this.closeDrawer(); this.closeDrawer();
}).catch(error => { }).catch(error => {
this.$message.error(error.message); this.$message.error(error.message);
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
{ {
label: '奖品名称', label: '奖品名称',
minWidth: 100, minWidth: 100,
prop: 'activityName', prop: 'prizeName',
}, },
{ {
label: '核销类型', label: '核销类型',
...@@ -167,18 +167,45 @@ export default { ...@@ -167,18 +167,45 @@ export default {
return sectionIndex return sectionIndex
}, },
// 列表发货处理 // 列表发货处理
handleDeliverGoods(row) { async handleDeliverGoods(row) {
await this.getExpressInfo(row)
this.goodsObj ={id:row.awardInfoId}
this.updateInfoSections(row, '基本信息'); this.updateInfoSections(row, '基本信息');
this.isDrawerVisible = true; this.isDrawerVisible = true;
}, },
// 通过接口获取快递到家信息
async getExpressInfo(row) {
try {
const receiveGoodsIndex = this.infoSections.findIndex(item => item.title === '收货信息');
if (receiveGoodsIndex === -1) {
// 如果找不到收货信息的索引,可能需要处理或提示
return;
}
const params = { awardInfoId: row.awardInfoId };
const res = await this.$apis.redenvelope.queryExpressInformation(params);
res.writeDetailList.forEach(expressItem => {
const infoItem = this.infoSections[receiveGoodsIndex].items.find(info => info.label === expressItem.describeMsg);
if (infoItem) {
infoItem.value = expressItem.detail;
}
});
} catch (error) {
// 异常处理逻辑,例如显示错误消息
this.$message.error('获取快递信息失败');
}
},
// 列表核销处理 // 列表核销处理
cancelAfterVerification(row){ cancelAfterVerification(row){
let basicInfoIndex = this.updateInfoSections(row, '基本信息'); let basicInfoIndex = this.updateInfoSections(row, '基本信息');
this.cancelObj = { this.cancelObj = {
show: true, show: true,
title: '核销', title: '核销',
id: row.id || '', id: row.awardInfoId || '',
infoSections:[this.infoSections[basicInfoIndex]] infoSections:[this.infoSections[basicInfoIndex]]
} }
} }
......
...@@ -45,9 +45,22 @@ ...@@ -45,9 +45,22 @@
<DeliverGoods :title="'发货'" <DeliverGoods :title="'发货'"
:visible.sync="isDrawerVisible" :visible.sync="isDrawerVisible"
:infoSections="infoSections" :infoSections="infoSections"
:goodsObj = "goodsObj"
@submit="handleShipping"></DeliverGoods> @submit="handleShipping"></DeliverGoods>
<CancelAfterVerification :cancelObj.sync="cancelObj" @submit="handleCancel"></CancelAfterVerification> <CancelAfterVerification ref="afterVerification" :cancelObj.sync="cancelObj" @submit="handleCancel"></CancelAfterVerification>
<GLDialog
title="提示"
:has-footer="false"
:visible.sync="tipsObj.show"
mode="small"
>
<template #default>
<div class="over-box">
<div :class="tipsObj.iconType"></div>
<div class="tips">{{ tipsObj.text }}</div>
</div>
</template>
</GLDialog>
</div> </div>
</template> </template>
...@@ -66,6 +79,12 @@ export default { ...@@ -66,6 +79,12 @@ export default {
}, },
data() { data() {
return { return {
tipsObj:{
show:false,
text:'',
iconType:'el-icon-success'
},
goodsObj:{},
isDrawerVisible:false, isDrawerVisible:false,
infoSections: [ infoSections: [
{ {
...@@ -80,13 +99,13 @@ export default { ...@@ -80,13 +99,13 @@ export default {
{ {
title: '收货信息', title: '收货信息',
items: [ items: [
{ label: '收件人', value: '张三' }, { label: '收件人', value: '',key:'activityName' },
{ label: '联系电话', value: '0987654321' }, { label: '联系电话', value: '',key:'activityName' },
{ label: '身份证', value: '张三' }, { label: '身份证', value: '',key:'activityName' },
{ label: '收货地址', value: '0987654321' }, { label: '收货地址', value: '',key:'activityName' },
{ label: '小区名称', value: '张三' }, { label: '小区名称', value: '',key:'activityName' },
{ label: '楼栋', value: '0987654321' }, { label: '楼栋', value: '',key:'activityName' },
{ label: '房号', value: '0987654321' } { label: '房号', value: '',key:'activityName' }
] ]
}, },
], ],
...@@ -96,15 +115,49 @@ export default { ...@@ -96,15 +115,49 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
handleShipping(form) { async handleOperation(form, operationType) {
// 处理发货逻辑 const { id, logisticsOrderNo, logisticsCompany, cancelNumber } = form;
console.log(form) const params = operationType === 'shipping' ? {
console.log('发起请求') awardInfoId: id,
logisticsOrderNo,
logisticsCompany
} : {
awardInfoId: id,
code: cancelNumber
};
try {
const res = await this.$apis.redenvelope.goodsAreWrittenOffAndShipped(params);
if (res.code == 0 && res.data == true) {
this.tipsObj = {
show:true,
iconType:'el-icon-success',
text: operationType === 'shipping' ? '发货成功' : '核销成功'
}
if (operationType === 'shipping') {
this.isDrawerVisible = false;
} else {
this.$refs.afterVerification.handleClose();
}
this.handleSearch();
} else {
this.tipsObj = {
show:true,
iconType:'el-icon-error',
text: res.message
}
}
} catch (error) {
this.$message.error('操作失败');
}
},
handleShipping(form) {
this.handleOperation(form, 'shipping');
}, },
handleCancel(form){
console.log(form) handleCancel(form) {
console.log('核销') this.handleOperation(form, 'cancel');
}, },
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
...@@ -117,4 +170,19 @@ export default { ...@@ -117,4 +170,19 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
@import "../common/style.scss"; @import "../common/style.scss";
.over-box{
.el-icon-success {
font-size: 48px;
color: #67c23a;
}
.el-icon-error {
font-size: 48px;
color: #EB4E4E;
}
.tips{
color: #333333;
font-size: 16px;
font-weight: 600;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!