提交 bbef9b77 编写于 作者: bo.dang's avatar bo.dang

Merge branch 'dev-20210528' into 'release'

Dev 20210528,code review:bo.dang

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!263
......@@ -65,7 +65,7 @@
</div>
</template>
<script>
// import { openLoading, closeLoading } from "../../utils/utils";
import { openLoading, closeLoading } from "../../utils/utils";
import ChangeInfo from "./change-info";
import { checkMobile } from '@/utils/patients/checkValid';
import { updateExpress } from "@/utils/shop";
......@@ -167,12 +167,19 @@
if (para.orderNo) {
para.id = para.orderNo;
}
openLoading(this);
updateExpress(para).then(res => {
closeLoading(this);
if (res.code == '000000') {
this.$message.success('操作成功')
this.$refs.sendSetForm.resetFields();
this.sendSetForm.remark = '';
this.$emit('closeSendSet',{type: 2})
// this.$emit('closeSendSet',{type: 2})
let timeoutId = null
timeoutId && clearTimeout(timeoutId)
timeoutId = setTimeout(() => {
this.close()
}, 500)
}else {
this.$message.error(res.message);
}
......@@ -183,6 +190,11 @@
})
},
close(){
this.$emit('closeSendSet',{type: 2})
},
//修改买家收货信息
changeInfo() {
this.showChangeInfo = true;
......
......@@ -812,6 +812,7 @@
goodsId: 0, // 新增时传0,更新时必需>0
goodsType: '',
storeId: '',
commissionFlag: 2,
// 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段
......@@ -842,10 +843,11 @@
},
created() {
vm = this;
const { id, storeId, goodsType, inputType } = this.$route.query;
const { id, storeId, goodsType, inputType, commissionFlag} = this.$route.query;
this.goodsType = goodsType;
this.storeId = storeId;
this.inputType = inputType || '';
this.commissionFlag = commissionFlag;
// this.formData = originForm;
// this.formData1 = originForm1;
// this.formData2 = originForm2;
......@@ -854,7 +856,7 @@
this.rules2 = originRules2;
// this.rules2.barCode = originRules.barCode;
this.jumPathThird = '/goods-manage?storeId='+storeId
this.jumPathThird = '/goods-manage?storeId=' + storeId +'&commissionFlag=' + this.commissionFlag;
//this.jumPathThird = '/create-good?id=add&storeId=46'
this.title = id == 'add' ? '新增商品' : '编辑商品';
this.isEdit = id != 'add';
......@@ -1295,6 +1297,7 @@
path: '/goods-manage',
query: {
storeId: this.formData.storeId,
commissionFlag: this.commissionFlag
}
})
})
......
......@@ -26,6 +26,20 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="分佣方式" v-if="commissionFlag == 2">
<el-select
v-model="searchForm.commissionType"
placeholder="请选择分佣方式"
size="small"
clearable>
<el-option
v-for="item in commissionTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" size="small" @click="searchList">查询</el-button>
......@@ -39,6 +53,7 @@
</el-col>
<el-col :span="12" style="text-align: right">
<el-button v-if="commissionFlag == 2" type="primary" size="small" @click="batchSetPrice()">批量设置分佣</el-button>
<el-button type="primary" size="small" @click="exportOpt">批量导出商品</el-button>
<el-button v-if="isSSO" type="primary" size="small" @click="batchOpt(3)">批量导入商品</el-button>
<el-button type="primary" size="small" @click="edit('add')">新建单个商品</el-button>
......@@ -54,7 +69,7 @@
</el-table-column>
<el-table-column prop="goodsId" label="商品ID" width="120" align="center">
</el-table-column>
<el-table-column prop="goodsName" label="商品名称" width="140" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="goodsName" label="商品名称" width="160" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="type" label="商品类型" width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.goodsTypeStr }}</span>
......@@ -68,7 +83,7 @@
<el-table-column prop="quantityOfSale" label="销量" width="120" align="center">
</el-table-column>
<el-table-column prop="size" label="规格" width="100" align="center">
<el-table-column prop="size" label="规格" width="120" align="center">
</el-table-column>
<el-table-column prop="costPrice" label="价格" width="120" align="center">
......@@ -76,12 +91,25 @@
<span>{{scope.row.costPrice | rangePrice}}</span>
</template>
</el-table-column>
<el-table-column prop="saleTime" label="发布时间" width="150" align="center">
<el-table-column prop="commissionType" v-if="commissionFlag == 2" label="分佣方式" width="150" align="center">
<template slot-scope="scope">
<span>{{ scope.row.commissionType | commissionTypeFormat}}</span>
</template>
</el-table-column>
<el-table-column prop="commissionPrice" v-if="commissionFlag == 2" label="商品分佣" width="150" align="center">
<template slot-scope="scope">
<span v-if="scope.row.commissionType == 1">{{scope.row.commissionPrice | priceNum}}%</span>
<span v-if="scope.row.commissionType == 2">{{scope.row.commissionPrice | priceNum}}</span>
</template>
</el-table-column>
<el-table-column prop="saleTime" label="发布时间" width="170" align="center">
</el-table-column>
<el-table-column label="操作" width="200" align="center" fixed="right">
<template slot-scope="scope">
<div v-if="scope.row.commissionFlag == 2">
<el-button @click="setPrice(scope.row, false)" type="text" size="small">设置分佣</el-button>
</div>
<div v-if="scope.row.goodsStatus == 0">
<el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
<el-button @click="shelfOpt(scope.row,2)" type="text" size="small">上架销售</el-button>
......@@ -169,9 +197,48 @@
<el-button type="primary" @click="batchDialog = false">完成</el-button>
</span>
</el-dialog>
<!-- 设置分佣 -->
<el-dialog
title="店铺设置分佣"
:visible.sync="setPriceVisible"
width="55%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setPriceForm"
:rules="setPriceRules"
:model="setPriceForm"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="分佣方式" prop="commissionType">
<el-col :span="18">
<el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">
<div>
<el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="setPriceForm.commissionPrice1" size="small" :precision="2" :min="0"></el-input-number></span>
</div>
<div>
<el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>
<span style="float: right;width: 100px;margin-left: 14px;"><el-input-number v-model="setPriceForm.commissionPrice2" size="small" :precision="2" :min="0" :max="9999.99"></el-input-number></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer">
<el-button @click="setPriceVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmSetPrice">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
let vm = null;
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { getRangeList,updateRangeStatus, getGoodsExportUrl, getOrdersExportUrl } from "../../utils/yqrange/yqrangeApi";
......@@ -215,6 +282,7 @@
pageNo:1,
pageSize: 10,
storeId:0,
commissionType: 0
},
innerVisible:false,
selectList:[],
......@@ -229,18 +297,51 @@
totalRows: 0,
tableData: [],
goodsTypes:[],
commissionTypeList: [
{
value: 0,
label: "全部"
},
{
value: 1,
label: "按比例分佣"
},
{
value: 2,
label: "固定分佣"
}],
typeList: [],
//uploadUrl:getBaseUrl('store/goods/import'),
postData:{},
validateFailedList:[],
isSSO: 0, // 是否是sso后台管理员 1是 0否
multipleSelection: [],
batchUpdatePriceFlag: false,
commissionFlag: 2,
setPriceVisible: false,
setPriceForm:{
commissionType: 1,
commissionPrice: '',
commissionPrice1: '',
commissionPrice2: '',
storeId: '',
goodsId: '',
maxPrice: ''
},
setPriceRules: {
commissionType: [
{required: true, message: "请选择分佣方式", trigger: 'blur'}
]
},
}
},
created() {
vm = this;
this.getLists()
this.getLever()
const {storeId} = this.$route.query;
const {storeId,commissionFlag} = this.$route.query;
this.searchForm.storeId = Number(storeId) || 0;
this.commissionFlag = commissionFlag;
// if(storeId){
// this.searchForm.storeId = storeId
// }
......@@ -273,8 +374,30 @@
let str = '¥'
str += price/100
return str
},
commissionTypeFormat(value) {
if (!value && value != 0) {
return "-";
} else {
let hash = {
1: "按比例分佣",
2: "固定分佣",
};
return hash[value];
}
},
priceNum (value) {
if(value != "" && value != null && value != "null"){
return (value/100).toFixed(2);
}
else if(value == 0){
return (value/100).toFixed(2);
}
else {
return value;
}
},
},
methods: {
handlePreview(){},
handleRemove(){},
......@@ -377,8 +500,8 @@
type: 'error'
});
}
this.tableData = res.data.goodsList
this.totalRows = res.data.totalCount
this.tableData = res.data.goodsList;
this.totalRows = res.data.totalCount;
this.isSSO = res.data.isSSO;
})
},
......@@ -424,9 +547,9 @@
const { goodsType } = row;
let url = ''
if(row == 'add'){
url = `/create-good?id=add&storeId=${this.searchForm.storeId}&inputType=1`
url = `/create-good?id=add&storeId=${this.searchForm.storeId}&inputType=1&commissionFlag=${this.commissionFlag}`
}else{
url = `/create-good?id=${row.goodsId}&storeId=${this.searchForm.storeId}&goodsType=${goodsType}`
url = `/create-good?id=${row.goodsId}&storeId=${this.searchForm.storeId}&goodsType=${goodsType}&commissionFlag=${this.commissionFlag}`
}
// this.$store.dispatch('goodsManage/changeGoodsInfo', {...row});
this.$router.push({
......@@ -529,6 +652,7 @@
this.searchForm.goodsIdList = []
this.searchForm.goodsName = ''
this.searchForm.goodsType = ''
this.searchForm.commissionType = 0;
this.searchForm.pageNo = 1
this.searchForm.pageSize = 10
......@@ -554,7 +678,152 @@
}
window.open(res.data);
});
},
batchSetPrice(){
if(this.selectList.length == 0){
this.$message({
message: '请先选择要操作的数据',
type: "warning"
});
return;
}
this.setPrice(this.selectList[0], true);
},
setPrice(row, batchUpdatePriceFlag){
if(this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields()
}
this.batchUpdatePriceFlag = batchUpdatePriceFlag;
this.setPriceForm.storeId = row.storeId;
this.setPriceForm.goodsId = row.goodsId;
this.setPriceForm.commissionType = "";
this.setPriceForm.commissionPrice1 = undefined;
this.setPriceForm.commissionPrice2 = undefined;
this.setPriceForm.commissionType = row.commissionType;
if(this.setPriceForm.commissionType == 1){
this.setPriceForm.commissionPrice1 = row.commissionPrice/100;
}
else if(this.setPriceForm.commissionType == 2){
this.setPriceForm.commissionPrice2 = row.commissionPrice/100;
}
this.setPriceVisible = true;
// this.setPriceForm.price = row.price;
this.setPriceVisible = true;
// if(this.$refs.setPriceForm) {
// this.$refs.setPriceForm.resetFields()
// }
// this.getProfit(row);
},
confirmSetPrice() {
if(this.setPriceForm.commissionType == null || this.setPriceForm.commissionType == ""){
this.$message({
message: '请选择分佣方式',
type: "warning"
});
return;
}
if(this.setPriceForm.commissionType == 1 && this.setPriceForm.commissionPrice1 == undefined ){
this.$message({
message: '请输入按比例分佣',
type: "warning"
});
return;
}
else if(this.setPriceForm.commissionType == 1 && this.setPriceForm.commissionPrice1 > 100){
this.$message({
message: '请输入按比例分佣0-100',
type: "warning"
});
return;
}
if(this.setPriceForm.commissionType == 2 && this.setPriceForm.commissionPrice2 == undefined ){
this.$message({
message: '请输入固定分佣金额',
type: "warning"
});
return;
}
let timeoutId = null
timeoutId && clearTimeout(timeoutId)
timeoutId = setTimeout(() => {
this.clickHandle()
}, 500)
},
// 防止按钮多次点击
clickHandle() {
this.$refs.setPriceForm.validate((valid) => {
if(valid) {
vm.loading = true
// 批量设置价格
if(vm.batchUpdatePriceFlag){
let setPriceList = [];
if(vm.setPriceForm.commissionType == 1){
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice1;
}
else if(vm.setPriceForm.commissionType == 2){
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice2;
}
let parm = {
commissionPrice: vm.setPriceForm.commissionPriceStr * 100,
commissionType: vm.setPriceForm.commissionType,
goodsIdList:[],
storeId: vm.setPriceForm.storeId
}
for(let i = 0; i < vm.selectList.length; i++){
parm.goodsIdList.push(vm.selectList[i].goodsId);
}
vm.POST('/store/commission/admin/batch/goods/save', parm).then(res => {
vm.loading = false
// closeLoading(this);
if (res.code == "000000") {
vm.$message({
message: '设置价格成功',
type: "success"
});
vm.setPriceVisible = false
vm.searchList()
}else {
vm.$message({
message: res.message,
type: "error"
})
}
});
}
else {
if(vm.setPriceForm.commissionType == 1){
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice1;
}
else if(vm.setPriceForm.commissionType == 2){
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice2;
}
vm.setPriceForm.commissionPrice = vm.setPriceForm.commissionPriceStr * 100;
vm.POST('/store/commission/admin/goods/save', vm.setPriceForm).then(res => {
vm.loading = false
// closeLoading(this);
if (res.code == "000000") {
vm.$message({
message: '设置价格成功',
type: "success"
});
vm.setPriceVisible = false
vm.searchList()
}else {
vm.$message({
message: res.message,
type: "error"
})
}
});
}
}
})
},
},
}
</script>
......
......@@ -56,6 +56,7 @@
<span>{{ scope.row.amount | toFixed2}}</span>
</template>
</el-table-column>
<el-table-column prop="prescriberName" label="创建人" min-width="100" align="center"></el-table-column>
<el-table-column prop="receiver" label="买家" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantityList" label="数量" min-width="100" align="center">
<template slot-scope="scope">
......@@ -86,6 +87,7 @@
<div>
<!--<el-button @click="closeTrade(scope.row)" type="text" size="small">关闭交易</el-button>-->
<!--<el-button @click="changePrice(scope.row)" type="text" size="small">修改价格</el-button>-->
<!-- <el-button @click="sendGoods(scope.row)" type="text" size="small">发货</el-button>-->
<el-button v-if="scope.row.storeType == 1 && scope.row.showStatus == 3 && scope.row.refundStatus == 0" @click="sendGoods(scope.row)" type="text" size="small">发货</el-button>
<el-button v-if="scope.row.storeType == 2 && scope.row.showStatus == 3 && scope.row.refundStatus == 0" @click="distribute(scope.row)" type="text" size="small">配送</el-button>
<el-button v-if="scope.row.storeType == 1 && (scope.row.showStatus == 1 || scope.row.showStatus == 2)" @click="viewLogistics(scope.row)" type="text" size="small">查看物流</el-button>
......@@ -245,7 +247,7 @@
</div>
</template>
<script>
// import { openLoading, closeLoading } from "../../utils/utils";
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import SendSetDialog from "@/components/shop/send-set-dialog";
import { getOrdersExportUrl } from "@/utils/yqrange/yqrangeApi";
......@@ -342,14 +344,19 @@
},
methods: {
searchList(){
console.log("searchList搜索开始")
openLoading(this);
queryOrderList(this.searchForm).then(res => {
closeLoading(this);
if (res.code == '000000') {
console.log("searchList搜索结束")
this.tableData = res.data.orderSingleDtoList;
this.totalRows = res.data.totalNum;
}
})
},
resetForm() {
console.log("resetForm重置")
this.activeName = 'all';
this.searchForm = {
showStatus: -1,
......@@ -417,8 +424,10 @@
this.sendSetForm = row;
},
closeSendSet(val) {
console.log("关闭,val.type:" + val.type);
//保存操作
if (val.type == 2) {
console.log("刷新列表resetForm");
this.resetForm();//更新列表
}
this.sendGoodsDialog = false;
......
......@@ -26,6 +26,20 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="分佣方式">
<el-select
v-model="searchForm.commissionType"
placeholder="请选择分佣方式"
size="small"
clearable>
<el-option
v-for="item in commissionTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" size="small" @click="searchList">查询</el-button>
......@@ -71,9 +85,21 @@
<span>{{ scope.row.tradeStore.createdTime }}</span>
</template>
</el-table-column>
<el-table-column prop="commissionType" label="分佣方式" width="120" align="center">
<template slot-scope="scope">
<span>{{ scope.row.tradeStore.commissionType | commissionTypeFormat}}</span>
</template>
</el-table-column>
<el-table-column prop="commissionPrice" label="店铺分佣" width="120" align="center">
<template slot-scope="scope">
<span v-if="scope.row.tradeStore.commissionType == 1">{{scope.row.tradeStore.commissionPrice | priceNum}}%</span>
<span v-if="scope.row.tradeStore.commissionType == 2">{{scope.row.tradeStore.commissionPrice | priceNum}}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="230" align="center" fixed="right">
<template slot-scope="scope">
<div>
<el-button v-if="scope.row.tradeStore.commissionFlag == 2" @click="setPrice(scope.row, false)" type="text" size="small">设置分佣</el-button>
<el-button @click="editShop(scope.row)" type="text" size="small">{{scope.row.tradeStore.storeType == 3 ? '查看' : '编辑'}}</el-button>
<el-button @click="shopManage(scope.row)" type="text" size="small">商品管理</el-button>
<el-button @click="orderManage(scope.row)" type="text" size="small">订单管理</el-button>
......@@ -94,10 +120,49 @@
:total="totalRows"
></el-pagination>
</div>
<!-- 设置分佣 -->
<el-dialog
title="店铺设置分佣"
:visible.sync="setPriceVisible"
width="55%">
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form ref="setPriceForm"
:rules="setPriceRules"
:model="setPriceForm"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%;">
<el-form-item label="分佣方式" prop="commissionType">
<el-col :span="18">
<el-radio-group v-model="setPriceForm.commissionType" size="small" style="line-height: 45px;">
<div>
<el-radio :label="1" style="float: left;margin-top: 5px;line-height: 20px;">按比例分佣(%)</el-radio>
<span style="float: right;width: 100px;"><el-input-number v-model="setPriceForm.commissionPrice1" size="small" :precision="2" :min="0"></el-input-number></span>
</div>
<div>
<el-radio :label="2" style="float: left;margin-top: 30px;line-height: 20px;">固定分佣金额(元)</el-radio>
<span style="float: right;width: 100px;margin-left: 14px;"><el-input-number v-model="setPriceForm.commissionPrice2" size="small" :precision="2" :min="0" :max="9999.99"></el-input-number></span>
</div>
</el-radio-group>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<span slot="footer" class="dialog-footer">
<el-button @click="setPriceVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmSetPrice">确 定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
let vm = null;
import { openLoading, closeLoading } from "../../utils/utils";
import BreadCrumb from "@/components/breadcrumb.vue";
import { queryStore, queryShopAuth, closeShop } from '@/utils/shop';
......@@ -118,6 +183,7 @@
pageSize: 10,
id: null,
type: null,
commissionType: 0
},
canAdd: false,
totalRows: 0,
......@@ -146,9 +212,38 @@
}],
idType: 0,
storageIdType: 0,
commissionTypeList: [
{
value: 0,
label: "全部"
},
{
value: 1,
label: "按比例分佣"
},
{
value: 2,
label: "固定分佣"
}],
setPriceVisible: false,
setPriceForm:{
commissionType: 1,
commissionPrice: '',
commissionPrice1: '',
commissionPrice2: '',
storeId: '',
goodsId: '',
maxPrice: ''
},
setPriceRules: {
commissionType: [
{required: true, message: "请选择分佣方式", trigger: 'blur'}
]
},
}
},
created() {
vm = this;
// this.idType = localStorage.getItem("storageIdType");
this.storageIdType = localStorage.getItem("storageIdType") - 0;
console.log(this.storageIdType);
......@@ -199,6 +294,7 @@
pageSize: 10,
id: null,
type: null,
commissionType: 0
};
this.searchList();
},
......@@ -214,6 +310,7 @@
path: '/goods-manage',
query: {
storeId: row.tradeStore.id,
commissionFlag:row.tradeStore.commissionFlag
}
})
},
......@@ -267,6 +364,101 @@
// this.$message.error('操作失败');
})
},
confirmSetPrice() {
if(this.setPriceForm.commissionType == null || this.setPriceForm.commissionType == ""){
this.$message({
message: '请选择接诊服务费结算方式(上级医生)',
type: "warning"
});
return;
}
if(this.setPriceForm.commissionType == 1 && this.setPriceForm.commissionPrice1 == undefined ){
this.$message({
message: '请输入按比例分佣',
type: "warning"
});
return;
}
else if(this.setPriceForm.commissionType == 1 && this.setPriceForm.commissionPrice1 > 100){
this.$message({
message: '请输入按比例分佣0-100',
type: "warning"
});
return;
}
if(this.setPriceForm.commissionType == 2 && this.setPriceForm.commissionPrice2 == undefined ){
this.$message({
message: '请输入固定分佣金额',
type: "warning"
});
return;
}
let timeoutId = null
timeoutId && clearTimeout(timeoutId)
timeoutId = setTimeout(() => {
this.clickHandle()
}, 500)
},
// 防止按钮多次点击
clickHandle() {
this.$refs.setPriceForm.validate((valid) => {
if(valid) {
vm.loading = true;
if(vm.setPriceForm.commissionType == 1){
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice1;
}
else if(vm.setPriceForm.commissionType == 2){
vm.setPriceForm.commissionPriceStr = vm.setPriceForm.commissionPrice2;
}
vm.setPriceForm.commissionPrice = vm.setPriceForm.commissionPriceStr * 100;
vm.POST('/store/commission/admin/store/save', vm.setPriceForm).then(res => {
vm.loading = false
// closeLoading(this);
if (res.code == "000000") {
vm.$message({
message: '设置分佣成功',
type: "success"
});
vm.setPriceVisible = false
vm.searchList();
}else {
vm.$message({
message: res.message,
type: "error"
})
}
});
}
})
},
setPrice(row, batchUpdatePriceFlag){
if(this.$refs.setPriceForm) {
this.$refs.setPriceForm.resetFields()
}
// this.batchUpdatePriceFlag = batchUpdatePriceFlag;
this.setPriceForm.storeId = row.tradeStore.id;
this.setPriceForm.goodsId = row.tradeStore.goodsId;
this.setPriceForm.commissionType = "";
this.setPriceForm.commissionPrice1 = undefined;
this.setPriceForm.commissionPrice2 = undefined;
this.setPriceForm.commissionType = row.tradeStore.commissionType;
if(this.setPriceForm.commissionType == 1){
this.setPriceForm.commissionPrice1 = row.tradeStore.commissionPrice/100;
}
else if(this.setPriceForm.commissionType == 2){
this.setPriceForm.commissionPrice2 = row.tradeStore.commissionPrice/100;
}
this.setPriceVisible = true;
// if(this.$refs.setPriceForm) {
// this.$refs.setPriceForm.resetFields()
// }
// this.getProfit(row);
},
},
filters: {
storeTypeFormat: function(value){
......@@ -292,6 +484,28 @@
return hash[value];
}
},
commissionTypeFormat(value) {
if (!value && value != 0) {
return "-";
} else {
let hash = {
1: "按比例分佣",
2: "固定分佣",
};
return hash[value];
}
},
priceNum (value) {
if(value != "" && value != null && value != "null"){
return (value/100).toFixed(2);
}
else if(value == 0){
return (value/100).toFixed(2);
}
else {
return value;
}
},
},
}
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册