Browse Source

注册服务列表

pull/97/head
pengda 2 months ago
parent
commit
8b35c78b4d
  1. 15
      src/components/paymentMethod.vue
  2. 354
      src/components/site/addSiteStep/step3.vue
  3. 2
      src/router/index.js
  4. 12
      src/views/agent/siteServiceAdd.vue
  5. 78
      src/views/agent/siteServiceList.vue

15
src/components/paymentMethod.vue

@ -3,10 +3,11 @@
<draggable v-model="list" @start="drag=true" @end="onEnd" :move="checkMove" handle=".drag-handle" >
<div class="payment-item" v-for="(item, index) in list" :key="item.name">
<dl :class="index === list.length - 1 ? '' : 'drag-handle'">
<img v-if="item.pay_type == '1'" src="@/assets/register/card_pay.png" alt="">
<img v-if="item.pay_type == '2'" src="@/assets/register/weixin_pay.png" alt="">
<img v-if="item.pay_type == '3'" src="@/assets/register/zhifubao_pay.png" alt="">
<img v-if="item.pay_type == '4'" src="@/assets/register/taobao_pay.png" alt="">
<img v-if="item.pay_type === 0" src="@/assets/register/taobao.svg" alt="">
<img v-if="item.pay_type === 1" src="@/assets/register/card_pay.png" alt="">
<img v-if="item.pay_type === 2" src="@/assets/register/weixin.svg" alt="">
<img v-if="item.pay_type === 3" src="@/assets/register/zhifubao.svg" alt="">
<img v-if="item.pay_type === 11" src="@/assets/register/pinduoduo.svg" alt="">
<dd>
<p class="pay-name">{{ item.name }}</p>
<p v-if="item.account" class="pay-account">{{ item.account }}</p>
@ -32,12 +33,6 @@ export default {
},
data(){
return {
payImg:{
'1':'@/assets/register/weixin_pay.png',
'2':'@/assets/register/zhifubao_pay.png',
'3':'@/assets/register/taobao_pay.png',
'4':'@/assets/register/jingdong_pay.png',
},
list:[],
drag: false,
}

354
src/components/site/addSiteStep/step3.vue

@ -12,7 +12,7 @@
<div>
<div class="flex-common table-wrap">
<el-form>
<GuipTable :border="true" :tableData="tableData" :loading="tableLoading">
<GuipTable :border="true" :tableData="serviceList" :loading="tableLoading">
<el-table-column prop="name" fixed="left" label="检测服务" width="200">
<template slot-scope="scope">
<div class="flex nowrap ">
@ -22,42 +22,32 @@
</div>
</template>
</el-table-column>
<el-table-column prop="stock" label="今日供货价" min-width="138">
<template slot-scope="scope">
<div class="flex cell_render">
<span>¥{{ scope.row.stock }}/</span>
</div>
</template>
</el-table-column>
<el-table-column prop="price" label="售价" width="300">
<el-table-column prop="supply_price_desc" label="今日供货价"></el-table-column>
<el-table-column prop="price_desc" label="售价">
<template #default="{ row,$index }">
<el-popover v-model="row.pricePopoverVisible" :ref="`pricePopover-${row.id}`"
<el-popover v-model="row.pricePopoverVisible" :ref="`pricePopover-${row.type}`"
placement="bottom" trigger="manual" :append-to-body="false" :visible-arrow="true"
popper-class="custom-popover" @show="popshow" >
<div style="text-align: center">
<GuipInput ref="GuipInput" v-if="!row.word" width="252px" v-model="row.edit_price" label="售价"
placeholder="请输入售价" unit="元">
</GuipInput>
<div v-else class="flex">
<GuipInput ref="GuipInput" width="133px" v-model="row.edit_price" label="售价" placeholder="请输入售价"
unit="元">
</GuipInput>
<div class="flex">
<GuipInput ref="GuipInput" width="133px" v-model="row.price" label="售价" placeholder="请输入售价" :unit="row.price_unit"></GuipInput>
<template v-if="row.price_unit_num>1">
<span class="shortspan">/</span>
<GuipInput ref="GuipInput" width="133px" v-model="row.edit_word" placeholder="请输入字符" unit="字符">
<GuipInput ref="GuipInput" width="133px" v-model="row.price_unit_num" unit="字符">
</GuipInput>
</template>
</div>
<div class="flex" style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row, 'price')">取消</GuipButton>
<GuipButton type="primary" @click="savePrice(row, 'price')" size="medium">确定</GuipButton>
<GuipButton type="primary" @click="saveEdit(row, 'price')" size="medium">确定</GuipButton>
</div>
</div>
<template #reference>
<div class="flex cell_render" @click="handlePriceClick(row,$index,'price')">
<span v-if="row.word" :key="random()">¥{{ row.price }}/{{ row.word }}</span>
<span v-else :key="random()">¥{{ row.price }}/</span>
<span>测试用一下</span>
<span>随便写的</span>
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'"
<div class="flex cell_render" @click="handleEditClick(row,$index,'price')">
<span :key="random()">{{ row.price_desc }}</span>
<svg-icon :size="16" :path="require('@/assets/site/tableEdit.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
</div>
</template>
@ -65,71 +55,58 @@
</template>
</el-table-column>
<el-table-column prop="num" label="排序" min-width="95">
<el-table-column prop="sort_id" label="排序">
<template #default="{ row,$index }">
<!-- <el-tooltip :manual="true" v-model="row.numPopoverVisible" placement="top" effect="light">
<template #content>
<div style="text-align: center">
<GuipInput ref="GuipInput" width="252px" v-model="row.edit_num" label="排序" placeholder="请输入数字">
</GuipInput>
<p
style="width: 252px;margin-left: 40px;text-align: right;color: #8A9099;letter-spacing: 0.08em;">
输入0的数越小排序越前重复则新者优先0则默认排序</p>
<div class="flex" style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row, 'num')">取消</GuipButton>
<GuipButton type="primary" @click="savePrice(row, 'num')" size="medium">确定</GuipButton>
</div>
</div>
</template>
<div class="flex cell_render" @click="row.numPopoverVisible = true">
<span>{{ row.num }}</span>
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
</div>
</el-tooltip> -->
<el-popover v-model="row.numPopoverVisible" :ref="`popover-${row.id}`"
<el-popover v-model="row.sortPopoverVisible" :ref="`popover-${row.type}`"
placement="bottom" trigger="manual" :append-to-body="false" :visible-arrow="true"
popper-class="custom-popover" @show="popshow" >
<!-- <el-popover v-model="row.numPopoverVisible" placement="top" class="single-popover" trigger="manual" :append-to-body="false" :ref="`popover-${row.id}`"> -->
<div style="text-align: center" :visible-arrow="true">
<GuipInput ref="GuipInput" width="252px" v-model="row.edit_num" label="排序" placeholder="请输入数字">
</GuipInput>
<p
style="width: 252px;margin-left: 40px;text-align: right;color: #8A9099;letter-spacing: 0.08em;">
输入0的数越小排序越前重复则新者优先0则默认排序</p>
<div style="text-align: center">
<GuipInput ref="GuipInput" width="252px" v-model="row.edit_sort_id" label="排序" placeholder="请输入数字"></GuipInput>
<p style="width: 252px;margin-left: 40px;text-align: right;color: #8A9099;letter-spacing: 0.08em;">输入0的数越小排序越前重复则新者优先0则默认排序</p>
<div class="flex" style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row, 'num')">取消</GuipButton>
<GuipButton type="primary" @click="savePrice(row, 'num')" size="medium">确定</GuipButton>
<GuipButton size="medium" @click="cancelEdit(row, 'sort')">取消</GuipButton>
<GuipButton type="primary" @click="saveEdit(row, 'sort')" size="medium">确定</GuipButton>
</div>
</div>
<span slot="reference" @click="handlePriceClick(row,$index,'num')">
<div class="flex cell_render">
<GuipToolTip :content="row.num">
<span class="nowrap">{{ row.num }}</span>
</GuipToolTip>
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')" :color="'#8A9099'"
<template #reference>
<div class="flex cell_render" @click="handleEditClick(row,$index,'sort')">
<span :key="random()">{{ row.sort_id }}</span>
<svg-icon :size="16" :path="require('@/assets/site/tableEdit.svg')" :color="'#8A9099'"
:hoverColor="'#006AFF'" />
</div>
</span>
</template>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="stock" label="收款方式" min-width="258">
<el-table-column prop="payment_method_desc" label="收款方式">
<template slot-scope="scope">
<div class="flex cell_render">
<span :class="(scope.row.payment == '0' ? 'normal_payment' : 'self_payment')">
{{ scope.row.payment == '0' ? '默认站点支付' : '自定义支付' }}</span>
<span class="default-pay-method">{{scope.row.payment_method_desc}}</span>
<svg-icon :size="16" :path="require('@/assets/site/tableEdit.svg')" :color="'#8A9099'" :hoverColor="'#006AFF'" />
</div>
</template>
<template slot-scope="scope">
<div class="flex cell_render">
<span :class="(scope.row.payment_method_desc == '默认站点支付' ? 'normal_payment' : 'self_payment')">
{{ scope.row.payment_method_desc == '默认站点支付' ? '默认站点支付' : '自定义支付' }}
</span>
<svg-icon :size="16" :path="require('@/assets/register/tableEdit.svg')"
:color="'#8A9099'" :hoverColor="'#006AFF'" />
@click="popPayMentModal(scope.row)" :color="'#8A9099'" :hoverColor="'#006AFF'" />
</div>
</template>
</el-table-column>
<el-table-column prop="stock" fixed="right" label="上首页" min-width="160">
<el-table-column prop="sort_id" label="上首页">
<template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.homeFlag">
</GuipSwitch>
<div class="flex cell_render">
<GuipSwitch :modelValue="scope.row.is_index_display" active-value="1" inactive-value="0" @change="onSwitchChange(scope.row)"></GuipSwitch>
</div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="150px">
<div class="flex">
<el-button type="text">编辑</el-button>
@ -140,8 +117,14 @@
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="tableData.length">
:total="serviceList.length">
</el-pagination>
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="false" @confirm="handleConfirm"
@cancel="handleCancel" type="center" >
<PromptText text='按住左侧图标,上下拖动可进行排序,平台卡券只能放到最后。' :type="1" class="mb24 mt12"/>
<PaymentMethod :paymentList="payList" @confirm="confirmPayment"/>
</GuipDialog>
</el-form>
</div>
@ -156,13 +139,15 @@
</template>
<script>
import GuipButton from "@/components/GuipButton.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipToolTip from "@/components/GuipToolTip.vue";
import SvgIcon from "@/components/SvgIcon.vue";
import GuipSwitch from "@/components/GuipSwitch.vue";
import GuipTable from "@/components/GuipTable.vue";
import {getServicePriceDesc} from "@/utils/common";
import PaymentMethod from "@/components/paymentMethod.vue";
import GuipDialog from "@/components/GuipDialog.vue";
import PromptText from "@/components/PromptText.vue";
export default {
name: 'domainSet',
@ -173,20 +158,30 @@ export default {
}
},
components: {
GuipTable, GuipSwitch, SvgIcon, GuipToolTip, GuipInput,
PromptText, GuipDialog, PaymentMethod,
GuipTable, GuipSwitch, SvgIcon, GuipInput,
GuipButton
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k',
tableData:[],
serviceList:[],
tableLoading:false,
currentPage: 1, //
pageSize: 2, //
total: 0, //
//
payList: [],
//
popoverFlag:false,
//
dialogVisible: false, //
dialogTitle: "", //
editRow:{},
// url
serviceAddUrl: '/agent/siteAddService',
serviceAddUrl: '/agent/siteAddFinally',
}
},
mounted() {
@ -195,8 +190,13 @@ export default {
this.$emit('handelStep', 1)
return false;
}
this.getSiteServiceList()
},
methods:{
random() {
return Math.random();
},
jumpStep(){
this.$emit('handelStep', 4)
},
@ -205,7 +205,26 @@ export default {
this.$emit('handelStep', 4)
},
//
getSiteServiceList() {
this.tableLoading = true
const that = this
that.serviceList = []
that.$http('POST', '/agentnew/ajax_get_service_list', {
uid: that.siteInfo.uid,
},{
headers:{
'Auth': that.token
}
}).then(response => {
that.tableLoading = false
that.$nextTick(() => {
that.serviceList = response.data.service_list
})
}).catch(error => {
console.error(error, 'error')
})
},
handleSizeChange(val) {
this.pageSize = val
@ -217,54 +236,173 @@ export default {
this.$router.push(this.serviceAddUrl + '?uid=' + this.siteInfo.uid + '&prodid=' + prodid)
},
//
handleEditClick(row, index, type) {
//
this.popoverFlag = true;
this.serviceList.forEach((item, i) => {
if (i !== index) {
item[type + 'PopoverVisible'] = false;
}
});
//
row[type + 'PopoverVisible'] = true;
},
popshow() {
var ariaEls = document.querySelectorAll('.el-popover')
ariaEls.forEach((item) => {
item.removeAttribute('aria-hidden')
})
ariaEls = document.querySelectorAll('.el-radio__original')
ariaEls.forEach((item) => {
item.removeAttribute('aria-hidden')
})
},
//
saveEdit(row, type) {
row[type + 'PopoverVisible'] = false; //
if(type == 'price') this.savePrice(row)
if(type == 'sort') this.saveSort(row)
},
//
cancelEdit(row, type) {
row[type + 'PopoverVisible'] = false;
this.popoverFlag = false
// row[type + '_popover'] = false; //
// this.$Message.info('');
},
async savePrice(row){
if (row.price === '') {
this.$message.warning('价格不能为空');
return;
}
let obj = {}
obj.uid = this.siteInfo.uid
obj.type = row.type
obj.unit_num = row.price_unit_num
if(row.price_unit == '元'){
obj.unit_price = row.price
}else{
obj.unit_piece = row.price
}
handleEvent(data){
this.newDomain = data
const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj)
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num);
},
saveConfirm() {
async onSwitchChange(row){
console.log(row)
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
if(this.domainFrom === '1'){
if(!this.newDomain.prefix || !this.newDomain.domain) return false
obj.domain = this.newDomain.prefix + this.newDomain.domain
}else{
obj.domain = ''
obj.uid = this.siteInfo.uid
obj.type = row.type
obj.is_index_display = row.is_index_display
const res = await this.saveRequest('/agentnew/ajax_update_service_show', obj)
console.log(res)
if(!res) row.is_index_display = row.is_index_display === "1" ? "0" : "1"
},
async saveSort(row){
let obj = {}
obj.uid = this.siteInfo.uid
obj.type = row.type
obj.sort_id = row.sort_id
const res = await this.saveRequest('/agentnew/ajax_update_service_show', obj)
if(res) {
row.sort_id = row.edit_sort_id;
this.sortServiceList()
}
},
sortServiceList() {
const sortable = this.serviceList
.map((row, i) => ({ row, i }))
.filter(item => item.row.sort_id > 0)
.sort((a, b) => a.row.sort_id - b.row.sort_id);
let i = 0;
this.serviceList = this.serviceList.map(row => {
if (row.sort_id > 0) {
return sortable[i++].row;
}
return row;
});
},
async saveRequest(url, obj){
const that = this
this.$http('POST', '/agentnew/ajax_update_service_domain', obj,{
return await this.$http('POST', url, obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
//
const protocol = new URL(that.info.domain).protocol;
if(this.domainFrom === '1'){
that.info.domain = protocol + "//" +obj.domain;
that.info.ser_domain = protocol + "//" +obj.domain;
}else{
that.info.domain = that.info.site_domain;
that.info.ser_domain = '';
}
that.$emit('saveEvent', that.info)
return true;
}
that.$message.error(response.info);
return false;
}).catch(error => {
console.error(error, 'error')
})
},
popPayMentModal(row){
this.dialogVisible = true;
this.dialogTitle = row.type_desc + '-收款方式'
this.editRow = row
this.getPayList(row.type)
},
//
getPayList(type) {
const that = this
that.payList = []
this.$http('POST', '/agentnew/ajax_get_service_pay_list', {
uid: that.siteInfo.uid,
type: type,
},{
headers:{
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
that.payList = response.data.paylist
})
}).catch(error => {
console.error(error, 'error')
})
},
confirmPayment(payList){
this.payList = payList
},
//
async handleConfirm() {
this.dialogVisible = false;
let obj = {}
obj.uid = this.siteInfo.uid
obj.type = this.editRow.type
obj.info = ""
let hasClose = false
this.payList.forEach((row) => {
if(row.status == 1) {
let value = row.pay_type
if(row.id) value += ',' + row.id
obj.info = obj.info + ';' + value;
}else{
hasClose = true
}
});
obj.info = obj.info.substr(1, obj.info.length-1);
await this.saveRequest('/agentnew/ajax_payment_switch', obj, this.editRow)
const res = await this.saveRequest('/agentnew/ajax_payment_switch', obj, this.editRow)
if(res && hasClose) {
this.editRow.payment_method_desc = '自定义支付';
}
},
//
handleCancel() {
this.dialogVisible = false;
},
}
}
</script>
@ -292,4 +430,12 @@ export default {
}
}
}
.custom-popover {
position: fixed !important;
// max-height: 290px;
// overflow-y: auto;
margin-top: 0 !important;
margin-left: 0 !important;
transform: none !important;
}
</style>

2
src/router/index.js

@ -132,7 +132,7 @@ const routes = [{
path: '/agent/siteAddFinally',
name: '添加站点-添加服务',
isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteAddFinally.vue'),
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteServiceAdd.vue'),
meta: {
title: '添加服务',
breadcrumbParent: '添加站点',

12
src/views/agent/siteServiceAdd.vue

@ -59,7 +59,7 @@
<GuipSelect width="100%" v-model="serviceInfo.unit" placeholder="选择计费方式"
:options="serviceAddInfo.set_units" />
</div>
<div class="short-width" v-if="serviceInfo.unit > 0">
<div class="short-width" v-if="serviceInfo.unit !== '0'">
<GuipInput v-if="serviceInfo.unit === '1'" v-model="serviceInfo.price" width="100%"
ref="GuipInput" unit="元/篇"></GuipInput>
<GuipInput v-if="serviceInfo.unit === '2'" v-model="serviceInfo.price" width="100%"
@ -338,8 +338,6 @@ export default {
that.serviceAddInfo = response.data
//
if (that.serviceAddInfo.shop_name === '拼多多') this.initPddParam(that.uid)
//
that.serviceInfo.unit = that.serviceAddInfo.unit
//
that.getServiceInfo()
@ -364,14 +362,22 @@ export default {
'Auth': this.token
}
}).then(response => {
that.$nextTick(() => {
//
that.serviceInfo.unit = that.serviceAddInfo.unit
//
that.serviceInfo.status = false
})
if (response.status && response.data) {
that.$nextTick(() => {
that.serviceInfo = response.data.service_info
that.serviceInfo.status = true
console.log(that.serviceInfo,'ccc')
})
that.getServiceBindGoods()
}
console.log(that.serviceInfo,'aaa')
}).catch(error => {
console.error(error, 'error')
})

78
src/views/agent/siteServiceList.vue

@ -89,7 +89,7 @@
placement="bottom" trigger="manual" :append-to-body="false" :visible-arrow="true"
popper-class="custom-popover" @show="popshow" >
<div style="text-align: center">
<GuipInput ref="GuipInput" width="252px" v-model="row.sort_id" label="排序" placeholder="请输入数字"></GuipInput>
<GuipInput ref="GuipInput" width="252px" v-model="row.edit_sort_id" label="排序" placeholder="请输入数字"></GuipInput>
<p style="width: 252px;margin-left: 40px;text-align: right;color: #8A9099;letter-spacing: 0.08em;">输入0的数越小排序越前重复则新者优先0则默认排序</p>
<div class="flex" style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row, 'sort')">取消</GuipButton>
@ -372,25 +372,24 @@ export default {
saveEdit(row, type) {
row[type + 'PopoverVisible'] = false; //
if(type == 'price') this.savePrice(row)
if(type == 'sort') this.saveUpdateInfo(row, true)
if(type == 'sort') this.saveSort(row)
},
//
cancelEdit(row, type) {
row[type + 'PopoverVisible'] = false;
this.popoverFlag = false
// row[type + '_popover'] = false; //
this.$Message.info('已取消编辑');
// this.$Message.info('');
},
random() {
var randomNumber = Math.random();
return randomNumber
},
savePrice(row){
async savePrice(row){
if (row.price === '') {
this.$message.warning('价格不能为空');
return;
}
row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num);
let obj = {}
obj.uid = this.uid
@ -402,43 +401,28 @@ export default {
obj.unit_piece = row.price
}
this.saveRequest('/agentnew/ajax_set_service_price', obj, row)
const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj)
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num);
},
onSwitchChange(row){
row.is_index_display = row.is_index_display == "1" ? "0" : "1"
this.saveUpdateInfo(row)
},
saveUpdateInfo(row, resort = false){
async onSwitchChange(row){
console.log(row)
let obj = {}
obj.uid = this.uid
obj.type = row.type
obj.sort_id = row.sort_id
obj.is_index_display = row.is_index_display
obj.is_display_price = row.is_display_price
obj.is_recommend = row.is_recommend
this.saveRequest('/agentnew/ajax_update_service_show', obj, row, resort)
const res = await this.saveRequest('/agentnew/ajax_update_service_show', obj)
if(!res) row.is_index_display = row.is_index_display === "1" ? "0" : "1"
},
saveRequest(url, obj, row, resort = false){
const that = this
this.$http('POST', url, obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
this.$nextTick(() => {
that.$set(that.serviceList, row)
if(resort){
async saveSort(row){
let obj = {}
obj.uid = this.uid
obj.type = row.type
obj.sort_id = row.sort_id
const res = await this.saveRequest('/agentnew/ajax_update_service_show', obj)
if(res) {
row.sort_id = row.edit_sort_id;
this.sortServiceList()
}
})
return true;
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
sortServiceList() {
const sortable = this.serviceList
@ -454,6 +438,23 @@ export default {
return row;
});
},
async saveRequest(url, obj){
const that = this
return await this.$http('POST', url, obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
return true;
}
that.$message.error(response.info);
return false;
}).catch(error => {
console.error(error, 'error')
})
},
popPayMentModal(row){
this.dialogVisible = true;
this.dialogTitle = row.type_desc + '-收款方式'
@ -483,7 +484,7 @@ export default {
this.payList = payList
},
//
handleConfirm() {
async handleConfirm() {
this.dialogVisible = false;
let obj = {}
@ -504,9 +505,10 @@ export default {
});
obj.info = obj.info.substr(1, obj.info.length-1);
if(hasClose) this.editRow.payment_method_desc = '自定义支付';
this.saveRequest('/agentnew/ajax_payment_switch', obj, this.editRow)
const res = await this.saveRequest('/agentnew/ajax_payment_switch', obj, this.editRow)
if(res && hasClose) {
this.editRow.payment_method_desc = '自定义支付';
}
},
//
handleCancel() {

Loading…
Cancel
Save