rainbro 3 days ago
parent
commit
df31372a44
  1. 1
      src/assets/site/input_search.svg
  2. 1
      src/assets/site/shop_bag.svg
  3. 213
      src/components/bindGoods.vue
  4. 5
      src/components/site/addSiteStep/step1.vue
  5. 17
      src/router/index.js
  6. 444
      src/views/agent/siteAddFinally.vue

1
src/assets/site/input_search.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_247_91584"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_247_91584)"><g transform="matrix(1,0.0003452669770922512,0.0003452669770922512,1,-0.0006626046704887312,-0.0006625765588703647)"><path d="M10.552186732444763,3.9526081523895265C12.374626732444764,5.775058152389526,12.374626732444764,8.729828152389526,10.552186732444763,10.552268152389527C10.552186732444763,10.552268152389527,11.494996732444763,11.495078152389526,11.494996732444763,11.495078152389526C13.838126732444763,9.151938152389526,13.838126732444763,5.352948152389526,11.494996732444763,3.0097981523895263C11.494996732444763,3.0097981523895263,10.552186732444763,3.9526081523895265,10.552186732444763,3.9526081523895265C10.552186732444763,3.9526081523895265,10.552186732444763,3.9526081523895265,10.552186732444763,3.9526081523895265ZM10.552186732444763,10.552268152389527C8.729746732444763,12.374708152389527,5.774976732444763,12.374708152389527,3.9525267324447633,10.552268152389527C3.9525267324447633,10.552268152389527,3.009716732444763,11.495078152389526,3.009716732444763,11.495078152389526C5.352866732444763,13.838208152389527,9.151856732444763,13.838208152389527,11.494996732444763,11.495078152389526C11.494996732444763,11.495078152389526,10.552186732444763,10.552268152389527,10.552186732444763,10.552268152389527C10.552186732444763,10.552268152389527,10.552186732444763,10.552268152389527,10.552186732444763,10.552268152389527ZM3.9525267324447633,10.552268152389527C2.130081732444763,8.729828152389526,2.130081732444763,5.775058152389526,3.9525267324447633,3.9526081523895265C3.9525267324447633,3.9526081523895265,3.009716732444763,3.0097981523895263,3.009716732444763,3.0097981523895263C0.6665767324447631,5.352948152389526,0.6665767324447631,9.151938152389526,3.009716732444763,11.495078152389526C3.009716732444763,11.495078152389526,3.9525267324447633,10.552268152389527,3.9525267324447633,10.552268152389527C3.9525267324447633,10.552268152389527,3.9525267324447633,10.552268152389527,3.9525267324447633,10.552268152389527ZM3.9525267324447633,3.9526081523895265C5.774976732444763,2.1301631523895264,8.729746732444763,2.1301631523895264,10.552186732444763,3.9526081523895265C10.552186732444763,3.9526081523895265,11.494996732444763,3.0097981523895263,11.494996732444763,3.0097981523895263C9.151856732444763,0.6666581523895263,5.352866732444763,0.6666581523895263,3.009716732444763,3.0097981523895263C3.009716732444763,3.0097981523895263,3.9525267324447633,3.9526081523895265,3.9525267324447633,3.9526081523895265C3.9525267324447633,3.9526081523895265,3.9525267324447633,3.9526081523895265,3.9525267324447633,3.9526081523895265ZM10.552186732444763,11.495078152389526C10.552186732444763,11.495078152389526,13.380626732444764,14.323508152389527,13.380626732444764,14.323508152389527C13.380626732444764,14.323508152389527,14.323426732444764,13.380708152389527,14.323426732444764,13.380708152389527C14.323426732444764,13.380708152389527,11.494996732444763,10.552268152389527,11.494996732444763,10.552268152389527C11.494996732444763,10.552268152389527,10.552186732444763,11.495078152389526,10.552186732444763,11.495078152389526C10.552186732444763,11.495078152389526,10.552186732444763,11.495078152389526,10.552186732444763,11.495078152389526Z" fill="#626573" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

1
src/assets/site/shop_bag.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><defs><clipPath id="master_svg0_354_94330"><rect x="0" y="0" width="20" height="20" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_354_94330)"><g><path d="M7.49987171875,5.00016609375L6.66654171875,5.00016609375L6.66654171875,4.16682609375C6.66654171875,2.32587609375,8.158921718750001,0.83349609375,9.99987171875,0.83349609375C11.84081171875,0.83349609375,13.33321171875,2.32587609375,13.33321171875,4.16682609375L13.33321171875,5.00016609375L12.49991171875,5.00016609375L12.49991171875,4.16682609375C12.49991171875,2.78831609375,11.37839171875,1.66682909375,9.99987171875,1.66682909375C8.62136171875,1.66682909375,7.49987171875,2.78831609375,7.49987171875,4.16682609375L7.49987171875,5.00016609375ZM18.24211171875,17.99599609375L16.731611718750003,5.91266609375C16.66581171875,5.39180609375,16.22321171875,5.00099609375,15.69821171875,5.00016609375L13.33321171875,5.00016609375L13.33321171875,7.61227609375C13.78191171875,7.87133609375,13.88791171875,8.47271609375,13.55491171875,8.86961609375C13.22191171875,9.26651609375,12.61121171875,9.26651609375,12.27821171875,8.86961609375C11.94511171875,8.47271609375,12.05121171875,7.87133609375,12.49991171875,7.61227609375L12.49991171875,5.00016609375L7.49987171875,5.00016609375L7.49987171875,7.61227609375C7.94858171875,7.87133609375,8.054621718749999,8.47271609375,7.72158171875,8.86961609375C7.38854171875,9.26651609375,6.77788171875,9.26651609375,6.44484171875,8.86961609375C6.11180171875,8.47271609375,6.21784171875,7.87133609375,6.66654171875,7.61227609375L6.66654171875,5.00016609375L4.30157171875,5.00016609375C3.77656171875,5.00099609375,3.33395171875,5.39180609375,3.26810171875,5.91266609375L1.75768737875,17.99599609375C1.68009011875,18.61769609375,2.16475771875,19.16679609375,2.79115171875,19.16679609375L17.20861171875,19.16679609375C17.83511171875,19.16679609375,18.31991171875,18.61769609375,18.24221171875,17.99599609375L18.24211171875,17.99599609375Z" fill="#626573" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

213
src/components/bindGoods.vue

@ -0,0 +1,213 @@
<template>
<GuipDialog :dialogVisible="dialogVisible" :showFooterButton="showFooterButton"
title="搜索商品" @confirm="handleConfirm" @cancel="handleCancel" @close="handleCancel">
<div class="domain-wrap">
<el-form class="el-row demo-ruleForm" ref="formRef">
<div class="flex flex-between">
<GuipInput width="420px" v-model="keywords">
<GuipToolTip slot="suffix">
<img src="@/assets/site/input_search.svg"/>
</GuipToolTip>
</GuipInput>
<GuipButton type="primary" @click="handleSearch()">搜索</GuipButton>
</div>
<div class="goods-list">
<div class="goods-item" v-for="(row) in list" :key="row.num_iid">
<img src="@/assets/site/kefuTem.png" alt="">
<div class="goods-info">
<p>{{row.title}}</p>
<p>¥{{row.price}}</p>
<GuipSelect v-if="row.skus" v-model="row.skuid" width="200px" placeholder="选择SKU" :options="row.skus" @change="handleSelectSku(row)"/>
<div v-else style="height: 40px"></div>
</div>
<el-checkbox v-model="row.selected" @change="handleSelectGood(row)"></el-checkbox>
</div>
</div>
</el-form>
</div>
</GuipDialog>
</template>
<script>
import GuipDialog from "@/components/GuipDialog.vue";
import GuipToolTip from "@/components/GuipToolTip.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipButton from "@/components/GuipButton.vue";
import GuipSelect from "@/components/GuipSelect.vue";
export default {
name: '',
props:['uid','type','isPdd'],
components: {
GuipSelect,
GuipButton,
GuipInput,
GuipToolTip,
GuipDialog
},
data(){
return {
dialogVisible: true,
showFooterButton: false,
keywords: '',
pati: '',
pageCode: '',
list: [],
empty_text: '',
bindData: {}
}
},
mounted() {
if(this.isPdd) this.initPddSdk()
},
methods:{
handleConfirm(){
this.dialogVisible = false;
},
handleCancel(){
this.dialogVisible = false;
this.$emit('handleBind', this.bindData)
},
handleSearch(){
const that = this
this.$http('POST', '/agentnew/ajax_get_goods_list', {
uid: that.uid,
type: that.type,
keywords: that.keywords,
pdd_pati: that.pdd_pati,
pdd_pagecode: that.pdd_pagecode,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
if(response.status){
if(response.data.length>0){
response.data.forEach((item) => {
item.skuid = ''
item.selected = false
if(item.skus){
Object.entries(item.skus).forEach(([key, val]) => {
item.skus[key] = `${val.title}${val.price}`;
});
}
});
that.$nextTick(() => {
that.list = response.data
that.showFooterButton = true
})
} else {
that.empty_text = '未查询到相关商品'
}
return true
}
that.empty_text = response.info
}).catch(error => {
console.error(error, 'error')
})
},
handleSelectGood(row){
if(row.selected) {
if(row.skus && !row.skuid) {
this.$nextTick(() => {
row.selected = false;
});
this.$message.warning('请选择SKU');
return false
}
this.bindData[row.num_iid] = row.skuid
}else{
this.$delete(this.bindData, row.num_iid);
}
},
handleSelectSku(row){
if(row.selected) {
this.bindData[row.num_iid] = row.skuid
}
},
async getPddPageCode(){
const that = this
this.$http('POST', '/agentnew/ajax_get_pdd_page_code', {
uid: that.uid,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
return response.data
}).catch(error => {
console.error(error, 'error')
})
},
async initPddSdk() {
const that = this
this.pageCode = await this.getPddPageCode()
const script = document.createElement('script');
script.src = 'https://pfile.pddpic.com/galerie-go/open_sdk/pc.202102201613.js';
script.onload = () => {
if (typeof window.PDD_OPEN_init === 'function') {
window.PDD_OPEN_init({
code: that.pageCode
// code codePDD_OPEN_init({}, function () { ... })
}, function () {
//
window.PDD_OPEN_getPati().then(function (pati) {
that.pati = pati
}).catch(error => console.log(error))
});
} else {
console.error('PDD_OPEN_init 不存在,SDK 未正确加载');
}
};
script.onerror = () => {
console.error('拼多多 SDK 加载失败');
};
document.head.appendChild(script);
}
}
}
</script>
<style lang="scss">
.el-form-item{
margin: 0;
}
.el-dialog{
min-height: 0;
}
.goods-list{
max-height: 400px;
overflow-y: scroll;
.goods-item{
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 8px;
background: #FAFAFA;
padding: 16px;
margin-top: 16px;
letter-spacing: 0.08em;
img{
width: 80px;
height: 80px;
}
.goods-info{
width: 100%;
margin: 0 22px;
p{
font-size: 14px;
color: #1E2226;
}
p:nth-child(2){
margin: 12px 0;
color: #626573;
}
}
}
}
</style>

5
src/components/site/addSiteStep/step1.vue

@ -43,7 +43,7 @@
<div class="flex-left"> <div class="flex-left">
<p class="flex-left-desc">销售方向</p> <p class="flex-left-desc">销售方向</p>
<div class="flex mt12"> <div class="flex mt12">
<GuipRadio v-model="formData.site_type" :options="site_types" label="" prop="site_type" @change="radioChange" /> <GuipRadio v-model="formData.site_type" :options="site_types" label="" prop="site_type" @change="radioTypeChange" />
</div> </div>
<div class="tem-home"> <div class="tem-home">
<img class="tem-home-top" src="@/assets/register/tem-img-normal.png" alt=""> <img class="tem-home-top" src="@/assets/register/tem-img-normal.png" alt="">
@ -204,6 +204,9 @@ export default {
this.domainType = val this.domainType = val
this.domainName = val === '1' ? this.platDomain : '' this.domainName = val === '1' ? this.platDomain : ''
}, },
radioTypeChange(val){
this.formData.site_type = val
},
handleClear() { handleClear() {
this.domainPrefix = ''; this.domainPrefix = '';
}, },

17
src/router/index.js

@ -6,10 +6,10 @@ import store from '../store';
Vue.use(VueRouter) Vue.use(VueRouter)
// 第三种侧边栏展示白名单 // 第三种侧边栏展示白名单
const whiteSecondSider = [ const whiteSecondSider = [
'/agent/siteServiceAdd' '/agent/siteAddFinally','/agent/siteServiceAdd'
]; ];
const blackSliderList = [ const blackSliderList = [
'/register', '/agent/siteAdd', '/franchise','/agent/siteServiceList', '/agent/siteTemplate','/agent/siteServiceAdd', '/agent/supplyList' '/register', '/agent/siteAdd', '/franchise','/agent/siteServiceList', '/agent/siteTemplate','/agent/siteAddFinally','/agent/siteServiceAdd', '/agent/supplyList'
]; ];
// 一级路由 // 一级路由
let first_child_router = [] let first_child_router = []
@ -44,7 +44,7 @@ const blackFooterList = [
const routes = [{ const routes = [{
path: '/', path: '/',
name: '首页', name: '首页',
component: () => import( /* webpackChunkName: "register" */ '../views/agent/home.vue'), component: HomeView,
isFirst: true, //是否属于一级路由 isFirst: true, //是否属于一级路由
meta: { meta: {
title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称) title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
@ -52,20 +52,11 @@ const routes = [{
} }
}, },
{ {
path: '/agent/supplyList',
name: '供货列表',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/supplyList.vue'),
// meta: {
// title: '站点设置',
// breadcrumbParent: '站点列表' // 手动指定父级
// }
},
{
path: '/register', path: '/register',
name: 'register', name: 'register',
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import( /* webpackChunkName: "register" */ '../views/agent/home.vue'), component: () => import( /* webpackChunkName: "register" */ '../views/Register.vue'),
meta: { meta: {
title: '注册页', title: '注册页',
hideBreadcrumb: true, // 一级页面不显示面包屑 hideBreadcrumb: true, // 一级页面不显示面包屑

444
src/views/agent/siteAddFinally.vue

@ -0,0 +1,444 @@
<template>
<div>
<PromptText text='操作提示:设置价格并保存,即添加服务' :type="2" class="mr12 ml12"/>
<div class="main-content12">
<!-- page content -->
<div class="flex-common" v-for="(ver_row) in serviceAddList" :key="ver_row.name">
<h3>{{ver_row.name}}</h3>
<div class="service-setting-area" :class="row.status == 1 ? 'service-setting-open' : ''" v-for="(row) in ver_row.list" :key="row.type" :id="'section_'+row.type">
<el-form class="el-row demo-ruleForm" ref="formRef">
<div class="flex flex-between mb24 line40 service-title">
<div class="service-title-left">
<span class="service-title-name">{{row.type_name}}</span>
<span v-if="row.status == 1" class="service-title-status">已开启</span>
<span v-if="row.status == 1" class="service-title-close">关闭服务</span>
</div>
<div class="service-title-right" v-if="row.base_set">
<el-checkbox v-model="row.has_base_price" @change="toggleSetBasePrice(row)">设置起售价格</el-checkbox>
</div>
</div>
<div class="flex mb24 line40" v-if="row.supply_price_warning">
<div class="service-info-item">
<span class="mr12">供货价格</span>
<span>{{row.supply_price}} {{row.supply_price_warning}}</span>
</div>
</div>
<div class="flex mb24 line40">
<div class="service-info-item mr50" v-if="!row.supply_price_warning">
<span class="mr12">供货价格</span>
<span>{{row.supply_price}}</span>
</div>
<div class="service-info-item mr50" v-if="row.set_units">
<GuipRadio label="计费方式" v-model="row.unit" :options="row.set_units" @change="methodChange()"/>
</div>
<div class="service-info-item">
<template v-if="row.price_set_label == '售价管理'">
<GuipInput v-model="row.price" :label="row.price_set_label" ref="GuipInput" width="150px" unit="元"></GuipInput>
</template>
<template v-else>
<GuipInput v-model="row.unit_piece" :label="row.price_set_label" ref="GuipInput" width="150px" unit="件"></GuipInput>
</template>
<template v-if="row.unit == 0">
<span class="slash">/</span>
<GuipInput v-model="row.unit_num" ref="GuipInput" width="150px" unit="字符"></GuipInput>
</template>
<template v-if="row.unit == 1">
<span class="slash">/</span>
<span></span>
</template>
<template v-if="row.unit == 2">
<span class="slash">/</span>
<span></span>
</template>
<!-- <div>对应电商商品件数这样在电商平台进行促销也不影响提交论文</div>-->
</div>
</div>
<div class="flex mb24 line40" v-if="row.has_base_price">
<div class="service-info-item" v-if="row.price_set_label == '售价管理'">
<GuipInput v-model="row.b_unit_num" label="起售价格" ref="GuipInput" width="180px" unit="字符内"></GuipInput>
<span class="ml12 mr12">用户需支付</span>
<GuipInput v-model="row.b_unit_price" ref="GuipInput" width="180px" unit="元"></GuipInput>
<span class="service-base-remark ml12">备注超过设定字符按照正常售价收取</span>
</div>
<div class="service-info-item" v-else>
<GuipInput v-model="row.b_unit_num" label="起售价格" ref="GuipInput" width="180px" unit="字符内"></GuipInput>
<span class="ml12 mr12">用户需支付</span>
<GuipInput v-model="row.b_unit_piece" ref="GuipInput" width="180px" unit="件"></GuipInput>
<span class="service-base-remark ml12">备注超过设定字符按照正常售价收取</span>
</div>
</div>
<div class="flex mb24 line40" v-if="row.enable_bind">
<GuipButton @click="bindGoods(row.type)" class="bind-button" type="ignore" :btnstyle="{width:'148px',height:'40px',background:'#F2F3F5','border-radius':'4px'}">
<div class="bgImg"></div>
<span>关联商品</span>
</GuipButton>
</div>
<div class="flex flex-between service-opt">
<GuipButton type="ignore" @click="reset(row)">重置</GuipButton>
<GuipButton type="primary" @click="save(row)" size="medium">保存</GuipButton>
</div>
</el-form>
</div>
</div>
</div>
<component :is="bindComponent" ref="dynamicComponent" @handleBind="handleBind"
:uid="bindData.uid" :type="bindData.type" :pati="bindData.pati" :pageCode="bindData.pageCode"/>
<div class="register-btns">
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">添加完成</GuipButton>
</div>
</div>
</template>
<script>
import store from '@/store';
import { mapState } from 'vuex';
import GuipRadio from "@/components/GuipRadio.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipButton from "@/components/GuipButton.vue";
import PromptText from "@/components/PromptText.vue";
import bindGoods from "@/components/bindGoods.vue";
export default {
name: 'siteAddFinally',
props: [''],
components: {
bindGoods,
PromptText,
GuipButton,
GuipInput,
GuipRadio
},
data() {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
siteInfo:{},
serviceAddList: [],
menuList:{},
siteAddUrl: '/agent/siteAdd',
showBind:false,
bindComponent:'',
bindData: {
uid: 0,
type: 0,
pati: '',
pageCode: '',
},
}
},
computed: {
...mapState(['pageTitle']) // VuexshowSidebar
},
created() {
if (!this.$route.query.uid) {
this.$message.error('非法请求');
this.$router.push('/agent/siteAdd')
}
this.initPddSdk2(this.$route.query.uid)
console.log('wwww')
},
mounted() {
store.commit('SET_PAGETITLE', '添加服务');
this.getAddServiceList();
this.getServiceAdd();
},
methods: {
bindGoods(type){
this.bindData.uid = this.siteInfo.uid
this.bindData.type = type
// if(this.siteInfo.sale_channel == 3){
// const initData = this.initPddSdk2(this.$route.query.uid)
// this.bindData.type = initData.pageCode
// this.bindData.type = initData.pati
// }
// this.bindComponent = 'bindGoods'
},
async getPddPageCode(uid){
console.log('aaa')
const that = this
that.$http('POST', '/agentnew/ajax_get_pdd_page_code', {
uid: uid,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
console.log(response.data,'bbb')
that.bindData.pageCode = response.data
return response.data
}).catch(error => {
console.error(error, 'error')
})
},
async loadPddSk(pageCode){
console.log('ccc',pageCode)
const script = document.createElement('script');
script.src = 'https://pfile.pddpic.com/galerie-go/open_sdk/pc.202102201613.js';
script.onload = () => {
window.PDD_OPEN_init({
code: pageCode
// code PDD_OPEN_init({}, function () { ... })
}).then(function () {
console.log('ddd')
//
window.PDD_OPEN_getPati().then(
function (pati) {
console.log(pati)
// 使 pati
}).catch(error => console.log(error))
})
};
script.onerror = () => {
console.log('errpr')
console.error('拼多多 SDK 加载失败');
};
document.head.appendChild(script);
},
async initPddSdk2(uid) {
const that = this
try {
const pageCode = await that.getPddPageCode(uid)
// await that.loadPddSk(pageCode)
console.log(pageCode,'eee')
// console.log(that.bindData.pageCode,'bbb')
// that.bindData.pati = await that.loadPddSk(that.bindData.pageCode)
// console.log('aaa')
} catch (e) {
console.log(e)
}
},
handleBind(data){
this.bindComponent = ''
console.log(data)
},
getAddServiceList(){
const that = this
that.siteInfo = []
this.$http('POST', '/agentnew/ajax_get_add_service_list', {
uid: this.$route.query.uid,
prodid: that.$route.query.prodid,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
this.menuList = response.data
store.commit('SET_SECOND_MENU', response.data);
})
}).catch(error => {
console.error(error, 'error')
})
},
//
getServiceAdd() {
const that = this
this.$http('POST', '/agentnew/ajax_get_service_addinfo', {
uid: this.$route.query.uid,
prodid: that.$route.query.prodid,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
that.siteInfo = response.data.siteinfo
that.serviceAddList = response.data.service_add_list
store.commit('SET_BREADRIGHTTEXT', that.siteInfo.short_name);
})
}).catch(error => {
console.error(error, 'error')
})
},
toggleSetBasePrice(row) {
row.has_base_price = row.has_base_price == true ? false : true;
},
methodChange() {
},
reset(row) {
row.price = ''
row.unit_num = ''
row.unit_piece = ''
row.b_unit_num = ''
row.b_unit_price = ''
row.b_unit_piece = ''
},
save(row) {
console.log(row)
const that = this
this.$http('POST', "/agentnew/ajax_set_service_price", {
uid: that.uid,
type: row.type,
unit: row.unit,
unit_num: row.unit_num,
unit_price: row.price,
unit_piece: row.unit_piece,
b_unit_num: row.b_unit_num,
b_unit_price: row.b_unit_price,
b_unit_piece: row.b_unit_piece,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
if (response.status) {
that.$message.success('保存成功');
return true;
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
jumpStep(){
this.$router.push(this.siteAddUrl + '?uid=' + this.uid)
}
}
}
</script>
<style lang="scss" scoped>
.line40{
line-height: 40px;
}
.ml12 {
margin-left: 12px;
}
.mr12 {
margin-right: 12px;
}
.mr50 {
margin-right: 50px;
}
.slash{
margin: 0 6px;
}
.warning-text {
margin: 0 12px;
display: flex;
align-items: center;
padding: 8px 13px;
align-self: stretch;
z-index: 1;
border-radius: 4px;
background: #FEFCE8;
border: 1px solid rgba(255, 140, 0, 0.3);
.warning-icon {
width: 16px;
height: 16px;;
margin-right: 8px;
}
span {
color: #1E2226;
letter-spacing: 0.08em;
font-size: 14px;
}
}
.service-setting-open {
background: #F2FBED !important;
}
.service-setting-area {
padding: 24px;
background: #F6F7FA;
margin-bottom: 12px;
letter-spacing: 0.08em;
.el-form-item {
margin: 0;
}
.el-checkbox {
color: #1E2226;
}
.service-title {
.service-title-left .service-title-name {
color: #1E2226;
margin-right: 24px;
}
.service-title-left .service-title-status {
border-radius: 4px;
border: 1px solid rgba(0, 194, 97, 0.6);
color: #0DAF49;
padding: 2px 10px 2px 32px;
background-image: url(@/assets/site/open_success.svg);
background-repeat: no-repeat;
background-position: 10px 50%;
background-size: 16px 16px;
margin-right: 12px;
}
.service-title-left .service-title-close {
color: #8A9099;
background-image: url(@/assets/site/form_close.svg);
background-repeat: no-repeat;
background-position: 0 50%;
background-size: 16px 16px;
padding: 2px 10px 2px 22px;
}
}
.service-info-item {
display: flex;
align-items: center;
.el-radio-group{
margin: 0;
}
}
.service-base-remark {
font-size: 12px;
color: #8A9099;
}
.service-opt {
justify-content: right;
}
}
.register-btns {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
background: #FFFFFF;
padding: 16px 0px;
/* 蓝色阴影_常规 */
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12);
z-index: 999;
button:nth-child(1) {
margin-right: 56px;
}
}
.bgImg{
width: 20px;
height: 16px;
margin-right: 6px;
background-image: url(@/assets/site/shop_bag.svg);
}
</style>
Loading…
Cancel
Save