This commit is contained in:
faiz 2024-05-15 18:33:47 +08:00
parent 7b003ac83f
commit 7707c44cf0
8 changed files with 238 additions and 24 deletions

View File

@ -19,6 +19,12 @@ export function merchantMenuCreateApi() {
export function merchantMenuUpdateApi(id) {
return request.get(`merchant/menu/update/form/${id}`)
}
/**
* @description 签署 -- 签署链接
*/
export function merchantContactApi(id) {
return request.get(`system/merchant/contact/${id}`)
}
/**
* @description 商户权限管理 -- 删除
*/

View File

@ -111,6 +111,18 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否新商户:" prop="is_new">
<el-switch
v-model="merData.is_new"
:active-value="1"
:inactive-value="0"
:width="50"
active-text="是"
inactive-text="否"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">

View File

@ -94,9 +94,9 @@
<el-option key="0" label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="企业关键字:" prop="keyword">
<el-form-item label="企业关键字:" prop="company">
<el-input
v-model="tableFrom.keyword"
v-model="tableFrom.company"
@keyup.enter.native="getList(1)"
placeholder="请输入店铺/企业名称关键字"
class="selWidth"
@ -142,6 +142,18 @@
<el-option key="0" label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="是否新商户:" prop="is_new">
<el-select
v-model="tableFrom.is_new"
clearable
placeholder="请选择"
class="selWidth"
@change="getList(1)"
>
<el-option key="1" label="是" value="1" />
<el-option key="0" label="否" value="0" />
</el-select>
</el-form-item>
<el-form-item label="备注:" prop="mark">
<el-input
v-model="tableFrom.mark"
@ -204,11 +216,21 @@
<span>{{ scope.row.is_soldier == 1 ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column prop="is_new" label="是否新商户" min-width="90">
<template slot-scope="scope">
<span>{{ scope.row.is_new == 1 ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column prop="is_store_mgr" label="是否店长店" min-width="90">
<template slot-scope="scope">
<span>{{ scope.row.is_store_mgr == 1 ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column prop="is_sign" label="是否签署" min-width="90">
<template slot-scope="scope">
<span>{{ scope.row.is_sign == 1 ? "是" : "否" }}</span>
</template>
</el-table-column>
<el-table-column
prop="ext.idcard.name"
label="法人姓名"
@ -227,7 +249,7 @@
/>
</template>
</el-table-column>
<el-table-column prop="status" label="开启/关闭" min-width="100">
<el-table-column prop="status" label="开启/关闭权限" min-width="110">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
@ -287,7 +309,7 @@
<el-table-column prop="sort" label="排序" min-width="100" />
<el-table-column prop="mark" label="备注" min-width="200" />
<el-table-column label="操作" min-width="180" fixed="right">
<el-table-column label="操作" min-width="220" fixed="right">
<template slot-scope="scope">
<el-button
v-if="isStatus=== '1'"
@ -296,6 +318,13 @@
@click="onLogo(scope.row.mer_id)"
>登录</el-button
>
<el-button
v-if="isStatus=== '1'"
type="text"
size="small"
@click="handleSign(scope.row.mer_id)"
>签署</el-button
>
<el-button
type="text"
size="small"
@ -367,6 +396,7 @@ import {
exportMerchantApi,
getMerCateApi,
marginDeductionForm,
merchantContactApi
} from "@/api/merchant";
import merDetail from "./handle/merDetails.vue";
import { fromList } from "@/libs/constants.js";
@ -398,7 +428,7 @@ export default {
{
count: "",
type: "0",
title: "已关闭商户",
title: "已关闭权限商户",
},
{
count: "",
@ -415,7 +445,7 @@ export default {
limit: 20,
date: "",
status: "1",
keyword: "",
company: "",
is_trader: "",
is_best: "",
category_id: "",
@ -424,7 +454,8 @@ export default {
city: "",
phone:'',
name:'',
mark:''
mark:'',
is_new:''
},
isStatus:'1',
autoUpdate: true,
@ -497,6 +528,16 @@ export default {
this.$refs.searchForm.resetFields();
this.getList(1);
},
handleSign(id) {
merchantContactApi(id)
.then((res) => {
this.$message.success(res.message);
window.open(res.message)
})
.catch((res) => {
this.$message.error(res.message);
});
},
onLogo(id) {
merchantLoginApi(id)
.then((res) => {

View File

@ -60,7 +60,20 @@
</el-table-column>
<el-table-column label="占比" min-width="100" align="center">
<template slot-scope="scope">
<el-input-number :disabled="true" v-model="oneFormBatch[0].proportion" :min="0" class="priceBox" controls-position="right"/>
<el-select @change="BatchProportionChange" v-model="oneFormBatch[0].proportion" placeholder="请选择">
<el-option
v-for="item in proportionList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<!-- <el-input-number :disabled="true" v-model="oneFormBatch[0].proportion" :min="0" class="priceBox" controls-position="right"/> -->
</template>
</el-table-column>
<el-table-column label="抵扣卷" min-width="100" align="center">
<template slot-scope="scope">
<el-input-number :disabled='true' v-model="oneFormBatch[0].coupon" :min="0" class="priceBox" controls-position="right"/>
</template>
</el-table-column>
<el-table-column label="库存" min-width="100" align="center">
@ -110,7 +123,15 @@
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope">
<el-input @input="handleCost(scope.row,iii)" :disabled="formThead[iii].title === '占比'" v-model="scope.row[iii]" type="text" class="priceBox" />
<el-select @change="proportionChange(scope.row,iii,$event)" v-if="formThead[iii].title === '占比'" v-model="scope.row[iii]" placeholder="请选择">
<el-option
v-for="item in proportionList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-input @input="handleCost(scope.row,iii)" :disabled="formThead[iii].title =='抵扣卷'" v-if="formThead[iii].title != '占比'" v-model="scope.row[iii]" type="text" class="priceBox" />
<!-- <el-input v-else @input="handleCost(scope.row,iii)" :disabled="formThead[iii].title === '占比'" v-model="scope.row[iii]" class="priceBox" controls-position="right"/> -->
</template>
</el-table-column>
@ -149,7 +170,15 @@
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
<template slot-scope="scope">
<el-input @input="handleCost(scope.row,iii)" :disabled="formThead[iii].title === '占比'" v-model="scope.row[iii]" type="text" class="priceBox" />
<el-input @input="handleCost(scope.row,iii)" :disabled="formThead[iii].title =='抵扣卷'" v-if="formThead[iii].title !=='占比'" v-model="scope.row[iii]" type="text" class="priceBox" />
<el-select @change="proportionChange(scope.row,iii,$event)" v-if="formThead[iii].title === '占比'" v-model="scope.row[iii]" placeholder="请选择">
<el-option
v-for="item in proportionList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<!-- <el-input v-if="formThead[iii].title==='商品编号'" v-model="scope.row[iii]" type="text" class="priceBox" /> -->
<!-- <el-input v-else @input="handleCost(scope.row,iii)" :disabled="formThead[iii].title === '占比'" v-model="scope.row[iii]" class="priceBox" controls-position="right"/> -->
</template>
@ -219,6 +248,7 @@ const defaultObj = {
cost: 0,
ot_price: 0,
proportion:0.6,
coupon:'',
stock: 0,
growth:0,
bar_code: '',
@ -239,6 +269,9 @@ const objTitle = {
proportion: {
title: '占比'
},
coupon:{
title:'抵扣卷'
},
stock: {
title: '库存'
},
@ -260,6 +293,74 @@ export default {
components: {},
data() {
return {
proportionList:[
{
value: '0.60',
label: '0.60',
coupon:0.3,
growth:0.5
},
{
value: '0.55',
label: '0.55',
coupon:0.35,
growth:0.55
},
{
value: '0.50',
label: '0.50',
coupon:0.4,
growth:0.6
},
{
value: '0.45',
label: '0.45',
coupon:0.45,
growth:0.65
},
{
value: '0.40',
label: '0.40',
coupon:0.5,
growth:0.7
},
{
value: '0.35',
label: '0.35',
coupon:0.55,
growth:0.75
},
{
value: '0.30',
label: '0.30',
coupon:0.6,
growth:0.8
},
{
value: '0.25',
label: '0.25',
coupon:0.65,
growth:0.85
},
{
value: '0.20',
label: '0.20',
coupon:0.7,
growth:0.9
},
// {
// value: '0.15',
// label: '0.15',
// coupon:0.75,
// growth:0.95
// },
// {
// value: '0.1',
// label: '0.10',
// coupon:0.8,
// growth:1
// },
],
product_id: '',
roterPre: roterPre,
modals: false,
@ -294,6 +395,7 @@ export default {
price: 0,
cost: 0,
proportion:0.6,
coupon:'',
growth:0,
ot_price: 0,
stock: 0,
@ -309,6 +411,7 @@ export default {
image: '',
price: 0,
proportion:0.6,
coupon:'',
growth:0,
cost: 0,
ot_price: 0,
@ -343,18 +446,34 @@ export default {
},
methods: {
//
proportionChange(val,i,e){
val.cost = (val.price * e).toFixed(2)
let obj = this.proportionList.find(item=>item.value==e)
val.coupon = Math.floor(val.price*obj.coupon)
val.growth = Math.floor(val.price*obj.growth)
},
BatchProportionChange(){
this.oneFormBatch[0].cost = (this.oneFormBatch[0].price * this.oneFormBatch[0].proportion).toFixed(2)
let obj = this.proportionList.find(item=>item.value==this.oneFormBatch[0].proportion)
this.oneFormBatch[0].coupon = Math.floor(this.oneFormBatch[0].price*obj.coupon)
this.oneFormBatch[0].growth = Math.floor(this.oneFormBatch[0].price*obj.growth)
},
handleOnform(type){
if(type=='ot_price'){
this.oneFormBatch[0].ot_price = this.oneFormBatch[0].ot_price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
}else if(type=='cost'){
this.oneFormBatch[0].cost = this.oneFormBatch[0].cost.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
this.oneFormBatch[0].growth = parseInt( this.oneFormBatch[0].price*(0.9-( this.oneFormBatch[0].cost/ this.oneFormBatch[0].price)))
this.oneFormBatch[0].proportion = (this.oneFormBatch[0].cost/this.oneFormBatch[0].price).toFixed(2)
// this.oneFormBatch[0].growth = parseInt( this.oneFormBatch[0].price*(0.9-( this.oneFormBatch[0].cost/ this.oneFormBatch[0].price)))
// this.oneFormBatch[0].proportion = (this.oneFormBatch[0].cost/this.oneFormBatch[0].price).toFixed(2)
}else{
this.oneFormBatch[0].price = this.oneFormBatch[0].price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
this.oneFormBatch[0].growth = parseInt( this.oneFormBatch[0].price*(0.9-( this.oneFormBatch[0].cost/ this.oneFormBatch[0].price)))
this.oneFormBatch[0].proportion = (this.oneFormBatch[0].cost/this.oneFormBatch[0].price).toFixed(2)
this.oneFormBatch[0].cost = (this.oneFormBatch[0].price * this.oneFormBatch[0].proportion).toFixed(2)
let obj = this.proportionList.find(item=>item.value==this.oneFormBatch[0].proportion)
this.oneFormBatch[0].coupon = Math.floor(this.oneFormBatch[0].price*obj.coupon)
this.oneFormBatch[0].growth = Math.floor(this.oneFormBatch[0].price*obj.growth)
// this.oneFormBatch[0].growth = parseInt( this.oneFormBatch[0].price*(0.9-( this.oneFormBatch[0].cost/ this.oneFormBatch[0].price)))
// this.oneFormBatch[0].proportion = (this.oneFormBatch[0].cost/this.oneFormBatch[0].price).toFixed(2)
}
},
@ -371,9 +490,8 @@ export default {
switch(i){
case 'cost':
val.cost=val.cost.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
// val.proportion = (val.cost/val.price).toFixed(2)
// val.growth = parseInt(val.price*(0.9-(val.cost/val.price)))
val.proportion = (val.cost/val.price).toFixed(2)
val.growth = parseInt(val.price*0.5)
break;
case 'ot_price':
val.ot_price=val.ot_price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
@ -383,8 +501,10 @@ export default {
break;
case 'price':
val.price=val.price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
val.proportion = (val.cost/val.price).toFixed(2)
val.growth = parseInt(val.price*0.5)
let obj = this.proportionList.find(item=>item.value==val.proportion)
val.cost = (val.price * val.proportion).toFixed(2)
val.coupon = Math.floor(val.price*obj.coupon)
val.growth = Math.floor(val.price*obj.growth)
break;
case 'growth':
val.growth=val.growth.replace(/[^\d]/g,'')
@ -400,6 +520,7 @@ export default {
image: '',
price: 0,
proportion:0.6,
coupon:'',
growth:0,
cost: 0,
ot_price: 0,
@ -422,6 +543,7 @@ export default {
this.$set(val, 'volume', this.oneFormBatch[0].volume)
this.$set(val, 'growth', this.oneFormBatch[0].growth)
this.$set(val, 'proportion', this.oneFormBatch[0].proportion)
this.$set(val, 'coupon', this.oneFormBatch[0].coupon)
this.$set(val, 'extension_one', this.oneFormBatch[0].extension_one)
this.$set(val, 'extension_two', this.oneFormBatch[0].extension_two)
}
@ -480,6 +602,7 @@ export default {
cost: 0,
ot_price: 0,
proportion:0.6,
coupon:'',
stock: 0,
growth:0,
bar_code: '',
@ -513,6 +636,7 @@ export default {
cost: 0,
ot_price: 0,
proportion:0.6,
coupon:'',
stock: 0,
growth:0,
bar_code: '',
@ -554,6 +678,7 @@ export default {
image: '',
price: 0,
proportion:0.6,
coupon:'',
growth:0,
cost: 0,
ot_price: 0,

View File

@ -168,6 +168,22 @@
clearable
/>
</el-form-item>
<el-form-item label="更新选择:" prop="update_date">
<el-date-picker
v-model="updateTimeVal"
value-format="yyyy/MM/dd"
format="yyyy/MM/dd"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 280px"
:picker-options="pickerOptions"
@change="onchangeUpdateTime"
clearable
/>
</el-form-item>
<!-- <el-form-item label="是否惠美乡村:" prop="is_huimei">
<el-select
v-model="tableFrom.is_huimei"
@ -406,6 +422,7 @@
</template>
</el-table-column>
<el-table-column prop="refusal" label="拒绝/锁定原因" min-width="110" />
<el-table-column prop="extend" label="操作人" min-width="110" />
<el-table-column prop="create_time" sortable='custom' label="创建时间" min-width="120" />
<el-table-column prop="update_time" sortable='custom' label="更新时间" min-width="120" />
<el-table-column key="8" label="操作" min-width="260" fixed="right">
@ -815,6 +832,7 @@ export default {
props: { emitPath: false },
pickerOptions: timeOptions,
timeVal: [],
updateTimeVal: [],
ruleValidate: {
store_name: [
{
@ -1044,10 +1062,18 @@ export default {
this.tableFrom.date = e ? this.timeVal.join("-") : "";
this.getList(1);
},
//
onchangeUpdateTime(e) {
this.updateTimeVal = e;
this.tableFrom.update_date = e ? this.updateTimeVal.join("-") : "";
this.getList(1);
},
/**重置 */
searchReset() {
this.timeVal = [];
this.updateTimeVal = [];
this.tableFrom.date = "";
this.tableFrom.update_date = "";
this.setSort()
this.$refs.searchForm.resetFields();
this.getList(1);

View File

@ -271,7 +271,7 @@
</div>
</span>
<span class="upload">
<div class="upload_left">助农文件及其他资质</div>
<div class="upload_left">其他资质</div>
<div class="upload_right">
<div
v-for="(item, index) in qualification.otherList"
@ -713,6 +713,7 @@ const defaultObj = {
cost: null,
ot_price: null,
proportion: 0.6,
coupon:'',
stock: 0,
growth: 0,
bar_code: "",
@ -743,6 +744,9 @@ const objTitle = {
proportion: {
title: "占比",
},
coupon:{
title:'抵扣卷'
},
stock: {
title: "库存",
},
@ -1023,6 +1027,7 @@ export default {
import_name: "",
};
this.qualification = res.data.qualification || qualification;
this.qualification.commodityList = this.qualification.commodityList.slice(0,20)
this.svip_type = res.data.svip_price_type;
if (this.projectData.spec_type === 0) {

View File

@ -996,7 +996,7 @@
</div>
</span>
<span class="upload">
<div class="upload_left">助农文件及其他资质</div>
<div class="upload_left">其他资质</div>
<div class="upload_right">
<div
v-for="(item, index) in qualification.otherList"
@ -1356,6 +1356,7 @@ export default {
import_name: "",
};
this.qualification = res.data.qualification || qualification;
this.qualification.commodityList = this.qualification.commodityList.slice(0,20)
this.mer_svip_status = res.data.mer_svip_status;
this.svip_type = res.data.svip_price_type;
if (this.productData.spec_type === 0) {

View File

@ -10,7 +10,6 @@
<el-option label="全部" value="">全部</el-option>
<el-option label="用户昵称" value="nickname">用户昵称</el-option>
<el-option label="手机号" value="phone">手机号</el-option>
<el-option label="用户ID" value="uid">用户ID</el-option>
</el-select>
</el-input>
</el-form-item>
@ -45,7 +44,6 @@
<el-option label="全部" value="">全部</el-option>
<el-option label="用户昵称" value="nickname">用户昵称</el-option>
<el-option label="手机号" value="phone">手机号</el-option>
<el-option label="用户ID" value="uid">用户ID</el-option>
</el-select>
</el-input>
</el-form-item>
@ -205,7 +203,7 @@
<el-checkbox :disabled="scope.row.cancel_time" :value="!scope.row.cancel_time && (checkedIds.indexOf(scope.row.uid) > -1 || (chkName === 'duo' && noChecked.indexOf(scope.row.uid) === -1))" @change="(v)=>changeOne(v,scope.row)" />
</template>
</el-table-column>
<el-table-column prop="uid" label="ID" min-width="60" />
<el-table-column label="头像" min-width="50">
<template slot-scope="scope">
<div class="demo-image__preview">