|
|
@@ -22,13 +22,13 @@
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/begin-auth?id=hd&authType=1`)">花店公众号激活</el-button>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/begin-auth?id=hd&authType=2`)">花店小程序激活</el-button>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/bind-open?id=hd&actId=6`)">花店小程序体验码</el-button>
|
|
|
-</div>
|
|
|
-<div v-else-if="firstHost == 'theflorist.cn' || firstHost == 'zhhinc.com'">
|
|
|
+ </div>
|
|
|
+ <div v-else-if="firstHost == 'theflorist.cn' || firstHost == 'zhhinc.com'">
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/begin-auth?id=mall&authType=1`)">商城公众号激活</el-button>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/begin-auth?id=mall&authType=2`)">商城小程序激活</el-button>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/bind-open?id=mall&actId=6`)">商城小程序体验码</el-button>
|
|
|
- </div>
|
|
|
-<div v-else>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/begin-auth?id=ghs&authType=1`)">供货商公众号激活</el-button>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/begin-auth?id=ghs&authType=2`)">供货商小程序激活</el-button>
|
|
|
<el-button type="primary" size="mini" @click="bindJump(`/wx-open/bind-open?id=ghs&actId=6`)">供货商小程序体验码</el-button>
|
|
|
@@ -36,7 +36,10 @@
|
|
|
</template>
|
|
|
|
|
|
<template #slot-op-btn="{scope}">
|
|
|
- <el-button size="mini" type="text" @click="relateGhs(scope.row)">找供货商</el-button>
|
|
|
+ <el-button size="mini" type="text" @click="selGoods(scope.row.id)">绑供货商</el-button>
|
|
|
+ </template>
|
|
|
+ <template #slot-add-ad-btn="{scope}">
|
|
|
+ <el-button type="primary" size="mini" class="sj_add_button" @click="addBtnFn">添加</el-button>
|
|
|
</template>
|
|
|
</x-crud>
|
|
|
<!-- 微信支付 -->
|
|
|
@@ -87,14 +90,48 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 支付宝支付 -->
|
|
|
+
|
|
|
+ <!-- 新增弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ title="添加"
|
|
|
+ :visible.sync="addDialog"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="600px"
|
|
|
+ >
|
|
|
+ <div class="ad-modal-content">
|
|
|
+ <el-form :model="adForm" :rules="ruleForm" ref="adForm" label-width="100px" class="demo-form">
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
+ <el-input v-model="adForm.name" placeholder="请输入姓名" size="small"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="resetForm('adForm')">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="submitForm('adForm')">确认</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <sj-list-layer
|
|
|
+ :show.sync="ghsModal"
|
|
|
+ @confirm="selGoodsConfirmFn"
|
|
|
+ @cancel="ghsModal = false"
|
|
|
+ ></sj-list-layer>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getFirstHost } from '@/cool/utils';
|
|
|
import MerchantService from '@/service/merchant/index';
|
|
|
+import SjService from '@/service/sj/index';
|
|
|
+import sjListLayer from '@/components/module/sj-list-layer';
|
|
|
+import GhsService from '@/service/ghs/index';
|
|
|
|
|
|
export default {
|
|
|
+ name:'sjList',
|
|
|
+ components: {
|
|
|
+ sjListLayer
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// x-crud
|
|
|
@@ -105,13 +142,33 @@ export default {
|
|
|
form: {},
|
|
|
rule: {},
|
|
|
wxOpen: { wx_mini_base_id: 0, wx_base_id: 0 },
|
|
|
- firstHost:`${getFirstHost()}`
|
|
|
+ firstHost:`${getFirstHost()}`,
|
|
|
+ addDialog:false,
|
|
|
+ adForm: {
|
|
|
+ name: '',
|
|
|
+ },
|
|
|
+ ruleForm: {
|
|
|
+ name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ ghsModal:false,
|
|
|
+ selectSjId:0
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getWxOpen();
|
|
|
},
|
|
|
methods: {
|
|
|
+ selGoodsConfirmFn(item) {
|
|
|
+
|
|
|
+ GhsService.bindGhs({sjId:this.selectSjId,ghsSjId:item.id}).then(res => {
|
|
|
+ this.$message.success('操作成功!');
|
|
|
+ this.ghsModal = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ selGoods(id) {
|
|
|
+ this.selectSjId = id;
|
|
|
+ this.ghsModal = true;
|
|
|
+ },
|
|
|
wxPayConfigFn() {},
|
|
|
// 绑定跳转
|
|
|
bindJump(url) {
|
|
|
@@ -144,8 +201,8 @@ export default {
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'totalFans',
|
|
|
- label: '粉丝',
|
|
|
+ prop: 'currentStyle',
|
|
|
+ label: '类型',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
@@ -181,8 +238,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
.set('layout', [
|
|
|
- // ['slot-tabs'],
|
|
|
- ['flex1', 'slot-activation', 'refresh-btn'],
|
|
|
+ ['slot-activation','flex1', 'slot-add-ad-btn','refresh-btn'],
|
|
|
['data-table'],
|
|
|
['flex1', 'pagination']
|
|
|
])
|
|
|
@@ -192,7 +248,6 @@ export default {
|
|
|
|
|
|
payOption(type, data) {
|
|
|
this.plamPayType = type;
|
|
|
- console.log(type);
|
|
|
this.$service.saasShop.merchantExtend({ id: data.id }).then(res => {
|
|
|
this.form = { ...res };
|
|
|
this.wxPayDialog = true;
|
|
|
@@ -238,18 +293,30 @@ export default {
|
|
|
let formNamed = formName || 'form';
|
|
|
this.$refs[formNamed].resetFields();
|
|
|
this.wxPayDialog = false;
|
|
|
+ this.addDialog=false;
|
|
|
},
|
|
|
- getH5MallQrCode(id) {
|
|
|
- MerchantService.getH5MallQrCode({ id: id }).then(res => {
|
|
|
- this.$alert(
|
|
|
- "<img src='" + res.imgUrl + "' style='width:200px;margin:0 auto;' />",
|
|
|
- 'H5商城',
|
|
|
- {
|
|
|
- dangerouslyUseHTMLString: true
|
|
|
- }
|
|
|
- );
|
|
|
+ addBtnFn() {
|
|
|
+ this.addDialog = true;
|
|
|
+ },
|
|
|
+ submitForm(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.addFn(formName);
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ addFn(formName) {
|
|
|
+ let adForm = JSON.parse(JSON.stringify(this.adForm));
|
|
|
+ SjService.add(adForm).then(res => {
|
|
|
+ this.$message.success('操作成功!');
|
|
|
+ this.app.refresh();
|
|
|
+ this.resetForm(formName);
|
|
|
+ this.addDialog=false;
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|