rainbro 4 days ago
parent
commit
8e3f1c2d97
  1. BIN
      src/assets/register/card_pay.png
  2. 44
      src/components/paymentMethod.vue
  3. 4
      src/views/agent/siteServiceAdd.vue
  4. 660
      src/views/agent/siteServiceEdit.vue
  5. 71
      src/views/agent/siteServiceList.vue

BIN
src/assets/register/card_pay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

44
src/components/paymentMethod.vue

@ -1,17 +1,15 @@
<template> <template>
<div class="payment-wrap"> <div class="payment-wrap">
<draggable v-model="list" @start="drag=true" @end="onEnd" :move="checkMove" handle=".drag-handle" > <draggable v-model="list" @start="drag=true" @end="onEnd" :move="checkMove" handle=".drag-handle" >
<div class="payment-item" v-for="item in list" :key="item.name"> <div class="payment-item" v-for="(item, index) in list" :key="item.name">
<dl> <dl :class="index === list.length - 1 ? '' : 'drag-handle'">
<dt class="drag-handle"> <img v-if="item.pay_type == '1'" src="@/assets/register/card_pay.png" alt="">
<img v-if="item.pay_type == '1'" src="@/assets/register/jingdong_pay.png" alt="">
<img v-if="item.pay_type == '2'" src="@/assets/register/weixin_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 == '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 == '4'" src="@/assets/register/taobao_pay.png" alt="">
</dt>
<dd> <dd>
<p>{{ item.name }}</p> <p class="pay-name">{{ item.name }}</p>
<p>{{ item.account }}</p> <p v-if="item.account" class="pay-account">{{ item.account }}</p>
</dd> </dd>
</dl> </dl>
<el-form> <el-form>
@ -86,33 +84,39 @@ export default {
<style lang="scss"> <style lang="scss">
.payment-wrap{ .payment-wrap{
.payment-item{ .payment-item{
padding: 24px 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #DFE2E6;
dl{ dl{
display: flex; display: flex;
align-items: center;
margin: 0;
} }
dt img{ dl img{
width: 32px; width: 22px;
height: 32px;
} }
dd{ dd{
text-align: left;
margin-left: 12px; margin-left: 12px;
p{ font-variation-settings: "opsz" auto;
letter-spacing: 0.08em;
.pay-name{
font-size: 14px;
line-height: 18px;
color: #1E2226;
}
.pay-account{
font-size: 12px; font-size: 12px;
font-weight: normal;
line-height: 13px; line-height: 13px;
letter-spacing: 0.08em; margin-top: 6px;
font-variation-settings: "opsz" auto;
text-align: left;
color: #8A9099; color: #8A9099;
} }
} }
dd p:first-child{
font-size: 14px; .el-form-item{
line-height: 18px; margin: 0;
margin-bottom: 6px;
color: #1E2226;
} }
} }
.drag-handle { .drag-handle {

4
src/views/agent/siteServiceAdd.vue

@ -30,7 +30,7 @@
<GuipRadio label="计费方式" v-model="row.default_set" :options="methodOptions" @change="methodChange()"/> <GuipRadio label="计费方式" v-model="row.default_set" :options="methodOptions" @change="methodChange()"/>
</div> </div>
<div class="service-info-item"> <div class="service-info-item">
<GuipInput v-model="row.unit_price" label="售价管理" ref="GuipInput" width="180px" unit="元"></GuipInput> <GuipInput v-model="row.price" label="售价管理" ref="GuipInput" width="180px" unit="元"></GuipInput>
<template v-if="row.default_set == 0"> <template v-if="row.default_set == 0">
<span class="mr12"></span> <span class="mr12"></span>
<GuipInput v-model="row.unit_num" ref="GuipInput" width="180px" unit="字符"></GuipInput> <GuipInput v-model="row.unit_num" ref="GuipInput" width="180px" unit="字符"></GuipInput>
@ -139,7 +139,7 @@ export default {
uid: that.uid, uid: that.uid,
type: row.type, type: row.type,
unit_num: row.unit_num, unit_num: row.unit_num,
unit_price: row.unit_price, unit_price: row.price,
// unit_piece: row.unit_piece, // unit_piece: row.unit_piece,
b_unit_num: row.b_unit_num, b_unit_num: row.b_unit_num,
b_unit_price: row.b_unit_price, b_unit_price: row.b_unit_price,

660
src/views/agent/siteServiceEdit.vue

@ -1,406 +1,323 @@
<template> <template>
<div class="main-content12"> <div class="main-content12">
<!-- page header -->
<div class="pageheader"> <div class="pageheader">
<span class="pagetitle">基本设置</span> <span class="pagetitle">基本设置</span>
</div> </div>
<!-- page content --> <!-- 收款方式-->
<div class="site-setting-wrap min-flex-right"> <div class="flex-common payment-area">
<div class="siteMessage flex-common" id="siteMessage1"> <div class="notice-text">
<h3>站点信息</h3> <img class="notice-icon" src="@/assets/site/siteSemInfo_Icon.svg" alt="">
<el-form> <span>按住左侧图标上下拖动可进行排序平台卡券只能放到最后</span>
</div>
<PaymentMethod :paymentList="payList" @confirm="confirmPayment"/>
</div>
<!-- 提交页seo-->
<div class="flex-common">
<div class="warning-text">
<img class="warning-icon" src="@/assets/site/info_filled.svg" alt="">
<span>温馨提示提交页标题不允许使用知网pmlcamlcsmlc等关键词</span>
</div>
<el-form ref="formRef">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipInput ref="GuipInput" column="column" label="站点简称" :maxlength="10" <GuipFormItem column="column" class="mb24" label="提交页标题(T:title)">
:showWordLimit="true" desc="一个站点对应一个销售渠道,定义好名字好区分" v-model="siteInfo.short_name" <GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
prop="short_name" placeholder="仅自己区分站点销售渠道,客户看不到" /> placeholder="建议80字内">
</GuipInput>
<GuipInput ref="GuipInput" column="column" label="公司电话" desc="在站点首页底部“关于我们”展示" </GuipFormItem>
v-model="siteInfo.phone_num" prop="company_phone" placeholder="非必填" /> <GuipFormItem column="column" label="提交页关键词(K:keyword)">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="68px" type="textarea">
</GuipInput>
</GuipFormItem>
</div> </div>
<div class="flex-line "></div> <div class="flex-line "></div>
<div class="flex-right"> <div class="flex-right">
<GuipTextarea v-model="siteInfo.company_name" label="详细介绍" column="column" <GuipFormItem column="column" label="提交页描述(D:description)">
prop="doctor_detail" width="100%" height="90px" placeholder="请输入描述内容" <GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea">
desc="在站点首页底部“关于我们”展示" show-word-limit /> </GuipInput>
</GuipFormItem>
</div> </div>
</div> </div>
</el-form> </el-form>
<GroupFormBtns @cancel="cancleUpdateSiteInfo()" @confirm="updateSiteInfo()" /> </div>
<!-- 报告页seo-->
<div class="flex-common">
<div class="warning-text">
<img class="warning-icon" src="@/assets/site/info_filled.svg" alt="">
<span>温馨提示报告页标题不允许使用知网pmlcamlcsmlc等关键词</span>
</div> </div>
<div class="siteMessage flex-common" id="siteMessage2">
<h3>站点信息</h3> <el-form ref="formRef">
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipFormItem column="column" class="mb24" label="域名来源" required="true"> <GuipFormItem column="column" class="mb24" label="报告页标题(T:title)">
<GuipRadio slot="formDom" v-model="siteForm1.domain_source" :options="domain_source" <GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
prop="domain_source" @change="domain_radioChange" /> placeholder="建议80字内">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="报告页关键词(K:keyword)">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="68px" type="textarea">
</GuipInput>
</GuipFormItem> </GuipFormItem>
</div> </div>
<div class="flex-line "></div> <div class="flex-line "></div>
<div class="flex-right"> <div class="flex-right">
<!-- <GuipFormItem column="column" label="域名设置" required="true"> <GuipFormItem column="column" label="报告页描述(D:description)">
<GuipInput slot="formDom" v-model="siteForm1.domain_set" placeholder="仅支持数字、字母"> <GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea">
<span slot="appendshow">.chachongz.com</span>
</GuipInput>
</GuipFormItem> -->
<GuipFormItem column="column" class="combo-formItem" label="域名设置" required="true">
<div slot="formDom" class="self-drop-wrap flex" style="width: 100%;">
<GuipInput style="width: 60%;" v-model="siteForm1.domain_set"
placeholder="仅支持数字、字母">
</GuipInput> </GuipInput>
<div @click="toggleDrop" class="point flex appendDrop" style="width: 40%;">{{ </GuipFormItem>
siteForm1.domainSuffix }}</div>
</div>
<CustomDropdown slot="formDom" ref="dropDomain" width="100%"
v-model="siteForm1.domainSuffix" :options="domainOptions" @change="changeSelectIp"
placeholder="请选择">
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>添加新域名</b>
<p class="one ft12">域名需要在阿里云完成ICP备案并解析到平台服务器</p>
<p class="ft12">如果暂时未准备好可先选用平台免费域名随时支持域名修改 </p>
</div>
<div class="right">
<GuipButton size="form">前往绑定</GuipButton>
</div> </div>
</div> </div>
</template> </el-form>
<!-- 自定义下拉选项 -->
<!-- <template #item="{ item }">
<div class="flex-between">
<div class="left">
<p class="one">{{ item.label }}</p>
</div> </div>
<div class="right">
<img v-if="siteForm1.domainSuffix == item.value" <!-- 展示设置-->
src="@/assets/register/drop-selected.svg" alt=""> <div class="flex-common">
<h3 class="mb16">基础信息</h3>
<div class="warning-text">
<img class="warning-icon" src="@/assets/site/info_filled.svg" alt="">
<span>温馨提示服务别名首页服务广告词和首页服务描述不允许使用"知网""pmlc""amlc""smlc"等关键词 </span>
</div> </div>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="服务别名">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="建议80字内" desc="展示在用户端的服务名称">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="服务广告词">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="建议20字内" desc="用来简短概括的解释服务">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="服务描述">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea"
desc="用来详细的解释服务">
</GuipInput>
</GuipFormItem>
</div> </div>
</template> --> <div class="flex-line "></div>
</CustomDropdown> <div class="flex-right">
<GuipFormItem column="column" label="服务Logo">
<hover-button slot="formDom" ref="GuipInput" button-text="选择图片" :default-icon="require('@/assets/upLoad_grey.svg')"
:hover-icon="require('@/assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF"/>
</GuipFormItem> </GuipFormItem>
</div> </div>
</div> </div>
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
</div> </div>
<div class="siteMessage flex-common" id="siteMessage3">
<h3>店铺收款</h3> <div class="flex-common">
<el-form :model="siteForm2" ref="formRef"> <h3>展示开关</h3>
<el-form ref="formRef">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<GuipFormItem column="column" class="mb24"> <div class="card-item">
<div slot="formLeft" class="form-top-icon"> <div class="card-info">
<img src="@/assets/register/weixin.svg" style="width: 26px;height: 26px;" <p class="card-name">首页服务显示</p>
alt=""><span>微信收款</span> <p class="card-desc">控制首页是否显示本服务</p>
</div>
<CustomDropdown slot="formDom" width="100%" v-model="siteForm1.weixin_pay"
:options="options_weixin" @change="changeSelectWeixin" placeholder="请选择"
:options_null="options_weixin_null" @changeNormal="changeNormalWeixin">
<!-- 自定义触发按钮 -->
<template #trigger>
<span v-if="selectedItemWeixin"
style="color: #1E2226;font-family: Microsoft YaHei UI;">{{
select_placeholder_weixin ? select_placeholder_weixin :
selectedItemWeixin.desc }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新微信收款</b>
<p class="one">需要使用您公司的微信支付</p>
<p>需在微信商户平台-产品中心开通Native支付</p>
</div> </div>
<div class="right"> <el-form>
<GuipButton type="primary" size="medium">前往绑定</GuipButton> <GuipSwitch active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭">
</GuipSwitch>
</el-form>
</div> </div>
<div class="card-item">
<div class="card-info">
<p class="card-name">检测页价格展示</p>
<p class="card-desc">本服务检测页面是否展示价格</p>
</div> </div>
</template> <el-form>
<GuipSwitch active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭">
<!-- 自定义下拉选项 --> </GuipSwitch>
<template #item="{ item }"> </el-form>
<div class="flex-between"> </div>
<div class="left"> </div>
<p class="one">{{ item.label }}</p> <div class="flex-line "></div>
<p>{{ item.desc }}</p> <div class="flex-right">
<div class="card-item">
<div class="card-info">
<p class="card-name">首页推荐位</p>
<p class="card-desc">开启即上推荐位</p>
</div> </div>
<div class="right"> <el-form>
<img v-if="selectedItem.value == item.value" <GuipSwitch active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭">
src="@/assets/register/drop-selected.svg" alt=""> </GuipSwitch>
</el-form>
</div> </div>
</div> </div>
</template> </div>
</CustomDropdown> </el-form>
</div>
<!-- 页面品牌和颜色-->
<div class="flex-common">
<h3>PC端页面品牌</h3>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="提交页Logo上传">
<hover-button slot="formDom" ref="GuipInput" button-text="选择图片" :default-icon="require('@/assets/upLoad_grey.svg')"
:hover-icon="require('@/assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF"/>
</GuipFormItem>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="报告页Logo上传">
<hover-button slot="formDom" ref="GuipInput" button-text="选择图片" :default-icon="require('@/assets/upLoad_grey.svg')"
:hover-icon="require('@/assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF"/>
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column">
<div slot="formLeft" class="form-top-icon">
<img src="@/assets/register/zhifubao.svg" style="width: 26px;height: 26px;"
alt=""><span>支付宝收款</span>
</div>
<!-- <GuipSelect slot="formDom" v-model="siteForm2.zhifubao_pay" prop="zhifubao_pay"
:options="options_zhifubao" placeholder="未绑定支付宝收款" /> -->
<CustomDropdown slot="formDom" width="100%" v-model="siteForm1.zhifubao_pay"
:options="options_weixin" @change="changeSelectWeixin" placeholder="请选择"
:options_null="options_weixin_null" @changeNormal="changeNormalWeixin">
<!-- 自定义触发按钮 -->
<template #trigger>
<span v-if="selectedItemWeixin"
style="color: #1E2226;font-family: Microsoft YaHei UI;">{{
select_placeholder_weixin ? select_placeholder_weixin :
selectedItemWeixin.desc }}</span>
<span v-else>请选择</span>
</template>
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>绑定新支付宝收款</b>
<p class="one">需要使用您公司的支付宝支付</p>
<p>需在支付宝商户平台-产品中心开通Native支付</p>
</div> </div>
<div class="right">
<GuipButton type="primary" size="medium">前往绑定</GuipButton>
</div> </div>
</el-form>
</div> </div>
</template>
<!-- 自定义下拉选项 --> <div class="flex-common">
<template #item="{ item }"> <h3 class="mb16">页面色彩</h3>
<div class="flex-between"> <div class="notice-text">
<div class="left"> <img class="notice-icon" src="@/assets/site/siteSemInfo_Icon.svg" alt="">
<p class="one">{{ item.label }}</p> <span>操作说明点击色块可打开调色盘改色也可直接更改6位色值数据进行改色</span>
<p>{{ item.desc }}</p> </div>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
aaa
</div> </div>
<div class="right"> <div class="flex-line "></div>
<img v-if="selectedItem.value == item.value" <div class="flex-right">
src="@/assets/register/drop-selected.svg" alt=""> bbb
</div> </div>
</div> </div>
</template> </el-form>
</CustomDropdown> </div>
<!-- 自定义导航-->
<div class="flex-common">
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="首页链接">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="请输入首页链接" desc="您希望用户能找到服务的首页或您自建站点页面">
</GuipInput>
<el-checkbox slot="formDom">同步到本站的其他检测首页项上</el-checkbox>
</GuipFormItem> </GuipFormItem>
</div> </div>
<div class="flex-line "></div> <div class="flex-line "></div>
<div class="flex-right"> <div class="flex-right">
<!-- <div>{{ input1 }}</div> --> <GuipFormItem column="column" label="检测服务链接">
<div class="addStore flex"> <GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
<div></div> placeholder="请输入检测服务链接" desc="方便用户快速找到再次检测入口">
添加其他收款方式 </GuipInput>
</div> <el-checkbox slot="formDom">同步到本站的其他检测首页项上</el-checkbox>
</GuipFormItem>
</div> </div>
</div> </div>
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm2')" />
</div> </div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// import GuipInput from '@/components/GuipInput.vue';
import store from '@/store'; import PaymentMethod from "@/components/paymentMethod.vue";
import { mapState } from 'vuex'; import GuipButton from "@/components/GuipButton.vue";
import GuipFormItem from '@/components/GuipFormItem.vue'; import GuipFormItem from "@/components/GuipFormItem.vue";
import GuipInput from '@/components/GuipInput.vue'; import GuipInput from "@/components/GuipInput.vue";
import GuipTextarea from '@/components/GuipTextarea.vue'; import HoverButton from "@/components/HoverButton.vue";
import GuipRadio from '@/components/GuipRadio.vue'; import GuipSwitch from "@/components/GuipSwitch.vue";
import CustomDropdown from '@/components/CustomDropdown.vue';
import GuipButton from '@/components/GuipButton.vue';
import GroupFormBtns from '@/components/GroupFormBtns.vue';
// import {setHighActive} from '@/utils/common';
export default { export default {
// //
name: '', name: '',
props: [''], props: [''],
components: { components: {
GuipRadio, GuipSwitch,
GuipFormItem, HoverButton,
GuipInput, GuipInput, GuipFormItem,
GuipTextarea,
CustomDropdown,
GuipButton, GuipButton,
GroupFormBtns PaymentMethod
}, },
data() { data() {
return { return {
// AUTH // AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU', token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
//
siteInfo: { uid:0,
short_name: '', type:0,
company_name: '', payList: [],
phone_num: '',
}, //
domainOptions: [ saveBtnStyleObj: {
{ width: '144px',
value: '.chachongz.com', height: '46px',
label: '.chachongz.com' borderRadius: '4px',
}, background: '#006AFF',
{
value: '.turnitin.org.cn',
label: '.turnitin.org.cn'
},
{
value: '.jishu.chachongz.com',
label: '.jishu.chachongz.com'
},
],
siteForm: {
company_name: '',
company_address: '',
company_phone: '',
site_alias: '',
},
// siteFormrules: {
// site_alias: [
// { required: true, message: '', trigger: 'blur' }
// ]
// },
siteForm1: {
domain_set: '',
domainSuffix:'.chachongz.com',
domain_source: '平台免费域名',
},
siteForm2: {
zhifubao_pay: '',
weixin_pay: '',
},
siteFormrules1: {
domain_source: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
domain_source: [
{ label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" },
{ label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" },
],
options_weixin_null: {
label: '暂无收款账号',
value: '暂时没有收款账号,我想稍后配置',
desc: '暂无收款账号,稍后配置'
}, },
select_placeholder_weixin: '暂无收款账号,稍后配置',
selectedItemWeixin: {},//
options_weixin: [],
options_zhifubao: [],
} }
}, },
computed: { computed: {
...mapState(['pageTitle']) // VuexshowSidebar
}, },
created() { created() {
store.commit('SET_CUSTOMIZE', true); if(!this.$route.query.uid && !this.$route.query.type) {
store.commit('SET_SLIDER_MENU', 'siteSettingData'); this.$message.error('非法请求');
this.$router.push('/agent/siteList')
}
this.uid = this.$route.query.uid;
this.type = this.$route.query.type;
}, },
mounted() { mounted() {
store.commit('SET_PAGETITLE', '基本设置'); this.getPayList()
this.getSiteInfo();
}, },
methods: { methods: {
// //
toggleDrop(e){ getPayList() {
this.$refs.dropDomain.toggleDropdown(e)
},
changeSelectIp(item) {
//
this.selectedItem1 = { ...item };
},
//
getSiteInfo() {
const that = this const that = this
that.siteInfo = [] that.payList = []
this.$http('POST', '/agentnew/ajax_get_site_info', { this.$http('POST', '/agentnew/ajax_get_service_pay_list', {
uid: this.$route.query.uid, uid: that.uid,
type: that.type,
},{ },{
headers:{ headers:{
'Auth': this.token 'Auth': this.token
} }
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
that.siteInfo = response.data that.payList = response.data.paylist
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
updateSiteInfo() { confirmPayment(payList){
this.$http('POST', '/agentnew/ajax_update_site_info', { this.payList = payList
uid: this.$route.query.uid,
short_name: this.siteInfo.short_name,
company_name: this.siteInfo.company_name,
company_phone: this.siteInfo.phone_num,
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
},
cancleUpdateSiteInfo() {
this.getSiteInfo();
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
}
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
console.log(data, '---');
},
submitForm(form) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
alert('提交成功!');
} else {
return false;
}
});
}, },
cancelClick() {
console.log('quxiao');
},
confirmClick(type) {
console.log(type, '确认');
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mb16{
margin-bottom: 16px;
}
.pageheader { .pageheader {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
/* 关键属性 */ /* 关键属性 */
align-items: center; align-items: center;
margin: 16px 0px 16px 0px; margin: 16px 0 16px 0;
} }
.pagetitle { .pagetitle {
@ -411,98 +328,109 @@ export default {
color: #1E2226; color: #1E2226;
margin-top: 8px; margin-top: 8px;
} }
.flex-common{
margin-bottom: 12px;
}
.siteMessage { .notice-text{
display: flex;
align-items: center;
padding: 8px 13px;
align-self: stretch;
z-index: 1;
border-radius: 4px; border-radius: 4px;
transition: all .5s; background: #F2F7FF;
border: 1px solid transparent; border: 1px solid #BFDAFF;
margin-bottom: 32px;
.notice-icon{
width: 16px;
height: 16px;;
margin-right: 8px;
} }
.combo-formItem { span{
::v-deep { color: #1E2226;
.form-item-bottom { letter-spacing: 0.08em;
position: relative;
} }
.select-trigger {
background: #F6F7FA;
border-color: transparent;
} }
.is-open .select-trigger { ::v-deep .payment-item{
border-color: #006AFF; width: 540px;
height: 95px;
padding: 0 24px;
background: #FAFAFA;
border-radius: 4px;
border: none;
margin-bottom: 12px;
} }
.el-input__inner { .save-button{
border-radius: 2px 0 0 2px; position: fixed;
} left: 0;
} bottom: 0;
.self-drop-wrap {
position: absolute;
z-index: 1;
width: 100%; width: 100%;
} background: #fff;
.appendDrop { box-shadow: 0 4px 16px 0 rgba(17, 55, 143, 0.12);
height: 38px; display: flex;
align-items: center; align-items: center;
border-radius: 0 2px 2px 0;
border: 1px solid #DFE2E6;
border-left-color: transparent;
justify-content: center; justify-content: center;
box-sizing: border-box; padding: 16px 0;
padding: 0 30px 0 12px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
&:hover {
border: 1px solid #006AFF;
}
}
}
.addStore {
margin-top: 12px;
// border-radius: 4px;
// opacity: 1;
// /* text/text_white_2 */
// border: 1px dashed #BABDC2;
// padding: 15px 20px;
// color: #626573;
// justify-content: center;
// img {
// margin-right: 12px;
// }
} }
.site-setting-wrap { .warning-text{
width: 100%; display: flex;
align-items: center;
padding: 8px 13px;
align-self: stretch;
z-index: 1;
border-radius: 4px;
background: #FFF1F0;
border: 1px solid #FFA39E;
margin-bottom: 32px;
.warning-icon{
width: 16px;
height: 16px;;
margin-right: 8px;
} }
span{
#siteMessage2 { color: #1E2226;
margin: 12px 0; letter-spacing: 0.08em;
} }
.domain-wrap {
.domain-item {
margin-bottom: 10px;
} }
::v-deep .form-item-bottom{
.domain-item p:last-child { text-align: left;
padding-left: 23px;
color: #8A9099;
} }
p { .card-item{
padding: 24px;
display: flex;
align-items: center;
justify-content: space-between;
background: #FAFAFA;
border-radius: 4px;
border: none;
margin-bottom: 12px;
.card-info{
text-align: left; text-align: left;
margin-left: 12px;
font-variation-settings: "opsz" auto;
letter-spacing: 0.08em;
.card-name{
font-size: 14px;
line-height: 18px; line-height: 18px;
margin-bottom: 8px; color: #1E2226;
}
.card-desc{
font-size: 12px;
line-height: 13px;
margin-top: 12px;
color: #8A9099;
}
} }
.domain-box { .el-form-item{
display: flex; margin: 0;
flex-direction: column;
justify-content: flex-start;
} }
} }
</style> </style>

71
src/views/agent/siteServiceList.vue

@ -112,14 +112,14 @@
<el-table-column prop="sort_id" label="上首页"> <el-table-column prop="sort_id" label="上首页">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex cell_render"> <div class="flex cell_render">
<GuipSwitch :modelValue="scope.row.is_display" active-value="1" inactive-value="0" @change="onSwitchChange(scope.row)"></GuipSwitch> <GuipSwitch :modelValue="scope.row.is_index_display" active-value="1" inactive-value="0" @change="onSwitchChange(scope.row)"></GuipSwitch>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" :href="serviceEditUrl+'?type='+scope.row.type" target="_blank" class="mr-16">编辑</el-link> <el-link type="primary" :href="serviceEditUrl+'?uid='+uid+'&type='+scope.row.type" target="_blank" class="mr-16">编辑</el-link>
<el-link type="primary" @click="handleDelClick(scope.row, scope.$index)">删除</el-link> <el-link type="primary" @click="handleDelClick(scope.row, scope.$index)">删除</el-link>
</template> </template>
</el-table-column> </el-table-column>
@ -127,7 +127,11 @@
</GuipTable> </GuipTable>
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="false" @confirm="handleConfirm" <GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="false" @confirm="handleConfirm"
@cancel="handleCancel"> @cancel="handleCancel" type="center" >
<div class="notice-text">
<img class="notice-icon" src="@/assets/site/siteSemInfo_Icon.svg" alt="">
<span>按住左侧图标上下拖动可进行排序平台卡券只能放到最后</span>
</div>
<PaymentMethod :paymentList="payList" @confirm="confirmPayment"/> <PaymentMethod :paymentList="payList" @confirm="confirmPayment"/>
</GuipDialog> </GuipDialog>
@ -371,7 +375,7 @@ export default {
saveEdit(row, type) { saveEdit(row, type) {
row[type + 'PopoverVisible'] = false; // row[type + 'PopoverVisible'] = false; //
if(type == 'price') this.savePrice(row) if(type == 'price') this.savePrice(row)
if(type == 'sort') this.saveSort(row) if(type == 'sort') this.saveUpdateInfo(row, true)
}, },
// //
cancelEdit(row, type) { cancelEdit(row, type) {
@ -403,23 +407,21 @@ export default {
this.saveRequest('/agentnew/ajax_set_service_price', obj, row) this.saveRequest('/agentnew/ajax_set_service_price', obj, row)
}, },
saveSort(row){
let obj = {}
obj.uid = this.uid
obj.type = row.type
obj.sort_num = row.sort_id
this.saveRequest('/agentnew/ajax_set_service_sort', obj, row)
},
onSwitchChange(row){ onSwitchChange(row){
row.is_display = row.is_display == "1" ? "0" : "1" row.is_index_display = row.is_index_display == "1" ? "0" : "1"
this.saveUpdateInfo(row)
},
saveUpdateInfo(row, resort = false){
let obj = {} let obj = {}
obj.uid = this.uid obj.uid = this.uid
obj.type = row.type obj.type = row.type
obj.is_display = row.is_display obj.sort_id = row.sort_id
this.saveRequest('/agentnew/ajax_set_service_display_index', obj, row) 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)
}, },
saveRequest(url, obj, row){ saveRequest(url, obj, row, resort = false){
const that = this const that = this
this.$http('POST', url, obj,{ this.$http('POST', url, obj,{
headers:{ headers:{
@ -430,6 +432,9 @@ export default {
that.$message.success('保存成功'); that.$message.success('保存成功');
this.$nextTick(() => { this.$nextTick(() => {
that.$set(that.serviceList, row) that.$set(that.serviceList, row)
if(resort){
this.sortServiceList()
}
}) })
return true; return true;
} }
@ -438,6 +443,20 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
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;
});
},
popPayMentModal(row){ popPayMentModal(row){
this.dialogVisible = true; this.dialogVisible = true;
this.dialogTitle = row.type_desc + '-收款方式' this.dialogTitle = row.type_desc + '-收款方式'
@ -555,6 +574,26 @@ export default {
letter-spacing: 0.08em; letter-spacing: 0.08em;
} }
} }
.notice-text{
display: flex;
align-items: center;
padding: 8px 13px;
align-self: stretch;
z-index: 1;
border-radius: 4px;
background: #F2F7FF;
border: 1px solid #BFDAFF;
margin: 12px 0 24px 0;
.notice-icon{
width: 16px;
height: 16px;;
margin-right: 8px;
}
span{
color: #1E2226;
letter-spacing: 0.08em;
}
}
.pageheader { .pageheader {
display: flex; display: flex;
justify-content: space-between; /* 关键属性 */ justify-content: space-between; /* 关键属性 */

Loading…
Cancel
Save