Commit 51b882e7 by wangzhihui

Merge branch 'SAAS+V5.8.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.8.0
2 parents 6f9abed6 eed592e0
...@@ -97,7 +97,7 @@ export function storeApprovePageQuery(data) { ...@@ -97,7 +97,7 @@ export function storeApprovePageQuery(data) {
export function storeApproveCreateDraft(data) { export function storeApproveCreateDraft(data) {
data.method = "dj.api.oaapproval.store.approve.createDraft"; data.method = "dj.api.oaapproval.store.approve.createDraft";
return request(data, "post"); return request(data, "post", ["file"]);
} }
/** /**
*查询门店上架审批单详情 *查询门店上架审批单详情
...@@ -124,3 +124,19 @@ export function storeApproveReSubmit(data) { ...@@ -124,3 +124,19 @@ export function storeApproveReSubmit(data) {
data.method = "dj.api.oaapproval.store.approve.reSubmit"; data.method = "dj.api.oaapproval.store.approve.reSubmit";
return request(data, "post"); return request(data, "post");
} }
/**
* 查询销售范围类型列表
*/
export function queryProductTypes (data = {}) {
data.method = "dj.api.oaapproval.store.approve.queryProductTypes";
return request(data, "post");
}
/**
* 查询销售品类列表
*/
export function queryProductCategories (data = {}) {
data.method = "dj.api.oaapproval.store.approve.queryProductCategories";
return request(data, "post");
}
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
btn-ok-label="下载" btn-ok-label="下载"
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm">
<!-- <el-button v-if="isTmpl" slot="btn-end" type="primary" @click="handleSystemBill" :loading="$store.state.d2admin.loading.value">系统对账</el-button> -->
<el-form ref="accountForm" <el-form ref="accountForm"
v-loading="loading" v-loading="loading"
:model="infoForm" :model="infoForm"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
btn-ok-label="系统对账" btn-ok-label="系统对账"
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleSystemBill"> @confirmDialog="handleSystemBill">
<!-- <el-button v-if="isTmpl" slot="btn-end" type="primary" @click="handleSystemBill" :loading="$store.state.d2admin.loading.value">系统对账</el-button> -->
<el-form ref="accountForm" <el-form ref="accountForm"
v-loading="loading" v-loading="loading"
:model="infoForm" :model="infoForm"
...@@ -34,21 +34,6 @@ ...@@ -34,21 +34,6 @@
</el-radio> --> </el-radio> -->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="infoForm.merchantType == '7'"
label="账单类型:"
prop="reportType">
<el-radio-group v-model="infoForm.reportType" @change="judgeTmpl">
<el-radio label="1">
普通对账单
</el-radio>
<el-radio label="2">
安装费对账单
</el-radio>
<el-radio label="3">
营销费对账单
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="对账商户:" prop="merchant"> <el-form-item label="对账商户:" prop="merchant">
<el-select v-model="infoForm.merchant" <el-select v-model="infoForm.merchant"
filterable filterable
...@@ -60,7 +45,7 @@ ...@@ -60,7 +45,7 @@
:value="item.merchantId" /> :value="item.merchantId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="isTmpl && infoForm.merchantType == '7'" <el-form-item v-if="isTmpl && infoForm.merchantType === '7'"
label="流量方:" label="流量方:"
prop="shopMerchantId"> prop="shopMerchantId">
<el-select v-model="infoForm.shopMerchantId" style="width:400px"> <el-select v-model="infoForm.shopMerchantId" style="width:400px">
...@@ -234,7 +219,6 @@ export default { ...@@ -234,7 +219,6 @@ export default {
merchant: "", merchant: "",
payStartDate: "", payStartDate: "",
payEndDate: "", payEndDate: "",
reportType: "1",
shopMerchantId: "", shopMerchantId: "",
businessLine: "", businessLine: "",
reconciliationStatus: "all", reconciliationStatus: "all",
...@@ -403,7 +387,7 @@ export default { ...@@ -403,7 +387,7 @@ export default {
/** /**
* 商户类型 - 商户类型value - 是否有模版 * 商户类型 - 商户类型value - 是否有模版
* 流量方 - 2 - 是 * 流量方 - 2 - 是
* 服务商 - 7 - 仅“服务商对账单”(reportType = 4)时,是有模版 * 其他商户类型 - 否
* 园区店 - 6 - 否 * 园区店 - 6 - 否
*/ */
judgeTmpl() { judgeTmpl() {
...@@ -568,12 +552,11 @@ export default { ...@@ -568,12 +552,11 @@ export default {
params[merchantId] = item.merchantId; params[merchantId] = item.merchantId;
}); });
params.merchantType = infoForm.merchantType; params.merchantType = infoForm.merchantType;
if (infoForm.merchantType == "7") {
params.reportType = infoForm.reportType;
}
params.sceneType = infoForm.sceneType; params.sceneType = infoForm.sceneType;
// 对账状态 // 对账状态
infoForm.reconciliationStatus == "all" ? "" : (params.reconciliationStatus = infoForm.reconciliationStatus); if (infoForm.reconciliationStatus !== "all") {
params.reconciliationStatus = infoForm.reconciliationStatus;
}
// infoForm.payeeType == 'all' ? '' : (params.payeeType = infoForm.payeeType) // infoForm.payeeType == 'all' ? '' : (params.payeeType = infoForm.payeeType)
if (infoForm.shopMerchantId) { if (infoForm.shopMerchantId) {
params.shopMerchantId = infoForm.shopMerchantId; params.shopMerchantId = infoForm.shopMerchantId;
......
...@@ -78,11 +78,13 @@ ...@@ -78,11 +78,13 @@
>查看</el-button> >查看</el-button>
<!--👇 仅系统状态=“草稿”的记录可操作 --> <!--👇 仅系统状态=“草稿”的记录可操作 -->
<el-button <el-button
v-if="scope.scope.systemStatus == 1"
type="text" type="text"
@click="handleEdit(scope.scope)" @click="handleEdit(scope.scope)"
>编辑</el-button> >编辑</el-button>
<!--👇 仅审批状态=“已驳回”“已撤销”“通过后撤销”的记录可操作 --> <!--👇 仅审批状态=“已驳回”“已撤销”“通过后撤销”的记录可操作 -->
<el-button <el-button
v-if="[3,4,5].includes(scope.scope.approveStatus)"
type="text" type="text"
@click="handleEdit(scope.scope,'reapply')" @click="handleEdit(scope.scope,'reapply')"
>重新发起</el-button> >重新发起</el-button>
...@@ -106,6 +108,9 @@ import { ...@@ -106,6 +108,9 @@ import {
LISTING_TYPE_OPTIONS LISTING_TYPE_OPTIONS
} from './constant' } from './constant'
import { storeApprovePageQuery } from '@/api/salesManagement.js' import { storeApprovePageQuery } from '@/api/salesManagement.js'
import {
getStaffSceneLabelList,
} from "@api/resident";
export default { export default {
name: 'availableInStores', name: 'availableInStores',
components: { components: {
...@@ -185,8 +190,8 @@ export default { ...@@ -185,8 +190,8 @@ export default {
name: 'baseSceneCode', name: 'baseSceneCode',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'id', optionId: 'baseSceneCode',
optionLabel: 'label', optionLabel: 'name',
optionsName: 'businessSceneOptions' optionsName: 'businessSceneOptions'
} }
], ],
...@@ -201,18 +206,17 @@ export default { ...@@ -201,18 +206,17 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '单据编码', label: '单据编码',
prop: 'businessCode' prop: 'businessCode',
minWidth: 120,
}, },
{ {
label: '上架类型', label: '上架类型',
prop: 'shelfTypeName', prop: 'shelfTypeName',
// formatter: (cellValue) => {
// return deepClone(LISTING_TYPE_OPTIONS.find(item => item.id == cellValue.shelfType)?.label);
// },
}, },
{ {
label: '业务场景', label: '业务场景',
prop: 'sceneTypeName', prop: 'sceneTypeName',
minWidth: 120,
}, },
{ {
label: '流量方信息', label: '流量方信息',
...@@ -222,13 +226,12 @@ export default { ...@@ -222,13 +226,12 @@ export default {
{ {
label: '审批类型', label: '审批类型',
prop: 'approveTypeName', prop: 'approveTypeName',
// formatter: (cellValue) => { minWidth: 120,
// return deepClone(APPROVAL_TYPE_OPTIONS.find(item => item.id == cellValue.approveType)?.label);
// },
}, },
{ {
label: '审批编码', label: '审批编码',
prop: 'workWechatCode', prop: 'workWechatCode',
minWidth: 120,
}, },
{ {
label: '提交时间', label: '提交时间',
...@@ -241,15 +244,12 @@ export default { ...@@ -241,15 +244,12 @@ export default {
{ {
label: '系统状态', label: '系统状态',
prop: 'systemStatusName', prop: 'systemStatusName',
// formatter: (cellValue) => {
// return deepClone(SYSTEM_STATUS_OPTIONS.find(item => item.id == cellValue.systemStatus)?.label);
// },
}, },
{ {
label: '审批状态', label: '审批状态',
prop: 'approveStatus', prop: 'approveStatus',
formatter: (cellValue) => { formatter: (cellValue) => {
return deepClone(approveStatusOpt.find(item => item.confId == cellValue.approveStatus)?.confValue); return deepClone(approveStatusOpt.find(item => item.confId == cellValue.approveStatus)?.confValue) || '-';
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
...@@ -278,16 +278,23 @@ export default { ...@@ -278,16 +278,23 @@ export default {
}, },
mounted () { mounted () {
this.getBaseData() this.getStaffSceneLabelList()
}, },
methods: { methods: {
getBaseData () { getStaffSceneLabelList () {
getStaffSceneLabelList().then(res => {
this.getBaseData('businessSceneOptions', res)
})
},
getBaseData (key, val) {
this.baseData = { this.baseData = {
approvalTypeOptions: deepClone(APPROVAL_TYPE_OPTIONS), approvalTypeOptions: deepClone(APPROVAL_TYPE_OPTIONS),
systemStatusOptions: deepClone(SYSTEM_STATUS_OPTIONS), systemStatusOptions: deepClone(SYSTEM_STATUS_OPTIONS),
approveStatusOpt: deepClone(approveStatusOpt), approveStatusOpt: deepClone(approveStatusOpt),
listingTypeOptions: deepClone(LISTING_TYPE_OPTIONS) listingTypeOptions: deepClone(LISTING_TYPE_OPTIONS),
businessSceneOptions: deepClone(val)
} }
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName]) { if (item.type === 'select' && this.baseData[item.optionsName]) {
...@@ -325,18 +332,22 @@ export default { ...@@ -325,18 +332,22 @@ export default {
}) })
}, },
// 根据审批类型跳转到对应页面 // 根据审批类型跳转到对应页面
navigateToApprovalPage (query) { navigateToApprovalPage (params) {
const routeMap = { const routeMap = {
1: 'tigaListingAndSalesContract', 1: 'tigaListingAndSalesContract',
2: 'addAndModifyTheListing' 2: 'addAndModifyTheListing'
} }
const routeName = routeMap[query.approveType] const routeName = routeMap[params.approveType]
if (!routeName) { if (!routeName) {
this.$message.warning('未知的审批类型') this.$message.warning('未知的审批类型')
return return
} }
const query = {
approveType: params.approveType
}
if (params.businessCode) query.businessCode = params.businessCode
if (params.pageType) query.pageType = params.pageType
this.$router.push({ this.$router.push({
name: routeName, name: routeName,
query query
......
...@@ -149,10 +149,10 @@ ...@@ -149,10 +149,10 @@
:style="{ width: '530px' }" :style="{ width: '530px' }"
> >
<el-option <el-option
v-for="subItem in options.sceneType" v-for="subItem in options.sceneTypeOpts"
:key="subItem.confId" :key="subItem.sceneType"
:label="subItem.confValue" :label="subItem.name"
:value="subItem.confId" :value="subItem.sceneType"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -271,7 +271,9 @@ import GlOssApi from "glsk-oss-jssdk"; ...@@ -271,7 +271,9 @@ import GlOssApi from "glsk-oss-jssdk";
import { mapActions, mapState } from "vuex"; import { mapActions, mapState } from "vuex";
import { getMerchantPage } from "@api/shelfManage.js"; import { getMerchantPage } from "@api/shelfManage.js";
import { baseConfig } from "@/main"; import { baseConfig } from "@/main";
import {
getStaffSceneLabelList,
} from "@api/resident";
export default { export default {
name: 'StepOne', name: 'StepOne',
components: { components: {
...@@ -300,17 +302,23 @@ export default { ...@@ -300,17 +302,23 @@ export default {
merchantId: "", // 4s店商户号, merchantId: "", // 4s店商户号,
shelfType: 1, // 上架类型:1-单店模式 2-项目制批量上架 shelfType: 1, // 上架类型:1-单店模式 2-项目制批量上架
sceneType: 1, sceneType: 1,
baseSceneCode: ''
}, },
uploadKey: Date.now(), uploadKey: Date.now(),
options: { options: {
merchant: [], merchant: [],
shelfType: shelfTypeOpt, shelfType: shelfTypeOpt,
sceneType: [ sceneTypeOpts: []
{ confId: 1, confValue: "精品升级" }, },
{ confId: 0, confValue: "会员权益升级" }, }
] },
watch: {
'infoForm.sceneType': {
handler (val) {
this.infoForm.baseSceneCode = this.options.sceneTypeOpts.find(item => item.sceneType == val)?.baseSceneCode || ''
}, },
immediate: true,
deep: true,
} }
}, },
computed: { computed: {
...@@ -367,8 +375,12 @@ export default { ...@@ -367,8 +375,12 @@ export default {
formRef () { formRef () {
return this.$refs.formRef return this.$refs.formRef
}, },
sceneTypeName () {
return this.options.sceneTypeOpts.find(item => item.sceneType == this.infoForm.sceneType)?.name || ''
}
}, },
mounted () { mounted () {
this.getStaffSceneLabelList();
this.GlOssApi = new GlOssApi({ this.GlOssApi = new GlOssApi({
baseConfig, baseConfig,
}); });
...@@ -376,6 +388,10 @@ export default { ...@@ -376,6 +388,10 @@ export default {
methods: { methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
...mapActions({ close: "d2admin/page/close" }), ...mapActions({ close: "d2admin/page/close" }),
async getStaffSceneLabelList () {
const res = await getStaffSceneLabelList();
this.options.sceneTypeOpts = res;
},
handleFileChange (file, fileList, targetItem) { handleFileChange (file, fileList, targetItem) {
// return false // return false
// // setTimeout(() => { // // setTimeout(() => {
......
<template> <template>
<div class="business-information-container"> <div class="business-information-container">
<el-form
ref="formRef"
label-width="150px"
:model="componentData"
:size="size"
:rules="rules"
>
<div class="business-information-content"> <div class="business-information-content">
<template v-for="(i,index) in fixedInfo">
<el-form-item
class="business-information-item"
:label="i.label + ':'"
:key="`fixedInfo${index}`"
>
{{ getData(i.key) || '-' }}
</el-form-item>
</template>
<template v-for="(i,index) in businessInformation"> <template v-for="(i,index) in businessInformation">
<el-form-item <el-form-item
class="business-information-item" class="business-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="index" :key="`businessInformation${index}`"
:prop="i.key"
> >
<template v-if="i.type == 'text' || isViewMode">{{ data[i.key] || '-' }}</template> <template v-if="i.type == 'text' || isViewMode">{{ componentData[i.key] || '-' }}</template>
<template v-else> <template v-else>
<el-input <el-input
v-model="data[i.key]" v-model="componentData[i.key]"
@input="filterInputVal(i,$event,'data')" @input="filterInputVal(i,$event,'data')"
:maxlength="i.maxlength || -1" :maxlength="i.maxlength || -1"
></el-input> ></el-input>
...@@ -18,10 +37,12 @@ ...@@ -18,10 +37,12 @@
</el-form-item> </el-form-item>
</template> </template>
</div> </div>
</el-form>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { deepClone } from '@/common/util'
import { isView } from '@/views/goods/shelfManage/utils'; import { isView } from '@/views/goods/shelfManage/utils';
import componentsMixin from './mixins.js'; import componentsMixin from './mixins.js';
export default { export default {
...@@ -37,25 +58,60 @@ export default { ...@@ -37,25 +58,60 @@ export default {
default: false default: false
} }
}, },
inject: ['size'],
watch: {
data: {
handler (newVal) {
this.componentData = deepClone(newVal)
},
deep: true,
immediate: true
}
},
computed: {
formRef () {
return this.$refs.formRef
},
djGrossProfit () {
return 123
},
djGpr () {
return 1
}
},
data () { data () {
return { return {
componentData: {},
fixedInfo: [
{ label: '嘀加毛利', key: 'djGrossProfit', type: 'text' },
{ label: '嘀加毛利率', key: 'djGpr', type: 'text' },
],
businessInformation: [ businessInformation: [
{ label: '嘀加毛利', key: 'b-a', type: 'text' }, { label: '预估交付数/月', key: 'deliveryCount', filterRule: 'integerRange', min: 0, max: 999999, maxlength: 6 },
{ label: '嘀加毛利率', key: 'b-b', type: 'text' }, { label: '预估触客率', key: 'customerTouchRate', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '预估交付数/月', key: 'b-c', filterRule: 'integerRange', min: 0, max: 999999, maxlength: 6 },
{ label: '预估触客率', key: 'b-d', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '人员成本', key: 'personnelCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '人员成本', key: 'personnelCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '房租', key: 'rentCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '房租', key: 'rentCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '折旧与摊销', key: 'depreciationCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '折旧与摊销', key: 'depreciationCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '其他(水电、耗材等)', key: 'otherCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '其他(水电、耗材等)', key: 'otherCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '门店单台利润额', key: 'b-j', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '门店单台利润额', key: 'storeProfitPerCar', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
] ],
rules: {
deliveryCount: [{ required: true, message: '请输入预估交付数/月', trigger: 'blur' }],
customerTouchRate: [{ required: true, message: '请输入预估触客率', trigger: 'blur' }],
personnelCost: [{ required: true, message: '请输入人员成本', trigger: 'blur' }],
rentCost: [{ required: true, message: '请输入房租', trigger: 'blur' }],
depreciationCost: [{ required: true, message: '请输入折旧与摊销', trigger: 'blur' }],
otherCost: [{ required: true, message: '请输入其他(水电、耗材等)', trigger: 'blur' }],
storeProfitPerCar: [{ required: true, message: '请输入门店单台利润额', trigger: 'blur' }]
}
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
getData (key) {
return this[key]
}
} }
} }
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
v-model="data[i.key]" v-model="data[i.key]"
:placeholder="`请选择${i.label}`" :placeholder="`请选择${i.label}`"
class="select" class="select"
:disabled="setDisabled(i)"
> >
<el-option <el-option
v-for="option in i.options" v-for="option in i.options"
...@@ -92,21 +93,12 @@ ...@@ -92,21 +93,12 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import data from '@/views/stockManage/returnManage/constant/data'; import data from '@/views/stockManage/returnManage/constant/data';
import { SALES_CATEGORY_LIST } from './constant' import { SALES_CATEGORY_LIST, SALES_CATEGORY_RULES } from './constant'
import componentsMixin from './mixins.js'; import componentsMixin from './mixins.js';
import { queryProductTypes, queryProductCategories } from '@/api/salesManagement.js'
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
const validatorFrom = (rule, value, callback) => {
let { field, required } = rule,
list = [],
label = ''
SALES_CATEGORY_LIST.map(i => {
if (i.list) list.push(...i.list)
})
label = list.find(i => i.key === field)?.label || ''
if (required && (value == null || value == '' || value == undefined)) callback(new Error(`${label}不能为空`))
else callback()
}
export default { export default {
mixins: [componentsMixin], mixins: [componentsMixin],
name: 'SalesCategoryDetail', name: 'SalesCategoryDetail',
...@@ -120,34 +112,15 @@ export default { ...@@ -120,34 +112,15 @@ export default {
default: () => ({}) default: () => ({})
}, },
}, },
inject: ['GET_BASE_SCENE_CODE'],
data () { data () {
return { return {
salesCategoryList: deepClone(SALES_CATEGORY_LIST), salesCategoryList: deepClone(SALES_CATEGORY_LIST),
size: 'small', size: 'small',
viewKey: Date.now(), viewKey: Date.now(),
detailInfo: {
},
loading: false, loading: false,
data: {}, data: {},
rules: { rules: SALES_CATEGORY_RULES
productType: [{ required: true, validator: validatorFrom }],
productCategory: [{ required: true, validator: validatorFrom }],
feeSettlementMode: [{ required: true, validator: validatorFrom }],
penetrationRate: [{ required: true, validator: validatorFrom }],
conversionRate: [{ required: true, validator: validatorFrom }],
revenuePerCar: [{ required: true, validator: validatorFrom }],
g: [{ required: true, validator: validatorFrom }],
upgradePrice: [{ required: true, validator: validatorFrom }],
revenue: [{ required: true, validator: validatorFrom }],
trafficFee: [{ required: true, validator: validatorFrom }],
marketFee1: [{ required: true, validator: validatorFrom }],
marketFee2: [{ required: true, validator: validatorFrom }],
incentive1: [{ required: true, validator: validatorFrom }],
incentive2: [{ required: true, validator: validatorFrom }],
resourceFee: [{ required: true, validator: validatorFrom }],
productCost: [{ required: true, validator: validatorFrom }],
recyclingFilm: [{ required: true, validator: validatorFrom }],
}
} }
}, },
computed: { computed: {
...@@ -159,6 +132,9 @@ export default { ...@@ -159,6 +132,9 @@ export default {
this.close() this.close()
} }
}, },
baseSceneCode () {
return this.GET_BASE_SCENE_CODE()
},
}, },
watch: { watch: {
dialogShow: { dialogShow: {
...@@ -168,14 +144,41 @@ export default { ...@@ -168,14 +144,41 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
}, },
'data.productType': {
handler (val) {
if (val) {
this.queryProductCategories()
}
},
immediate: true,
deep: true
},
item: {
handler (val) {
this.data = val
},
immediate: true,
deep: true
},
}, },
mounted () { mounted () {
}, },
methods: { methods: {
init () { init () {
this.queryProductTypes()
// this.loading = true // this.loading = true
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
async queryProductTypes () {
const { items } = await queryProductTypes({ baseSceneCode: this.baseSceneCode })
this.salesCategoryList[0].list[0].options = items.map(i => ({ label: i, value: i }))
},
async queryProductCategories () {
const { items } = await queryProductCategories({ baseSceneCode: this.baseSceneCode, productType: this.data.productType })
this.salesCategoryList[0].list[1].options = items.map(i => ({ label: i, value: i }))
if (this.data.productCategory && !items.includes(this.data.productCategory)) this.data.productCategory = ''
},
close () { close () {
this.$emit('update:dialogVisible', false) this.$emit('update:dialogVisible', false)
}, },
...@@ -186,6 +189,13 @@ export default { ...@@ -186,6 +189,13 @@ export default {
} }
}) })
}, },
setDisabled (i) {
let flag = false
if (i.key == 'productCategory') {
flag = !this.data.productType
}
return flag
}
} }
} }
</script> </script>
......
...@@ -12,9 +12,16 @@ ...@@ -12,9 +12,16 @@
:size="size" :size="size"
plain plain
type="info" type="info"
v-if="" v-if="length > 1"
>删除</el-button> >删除</el-button>
</div> </div>
<el-form
ref="formRef"
label-width="150px"
:model="componentData"
:size="size"
:rules="rules"
>
<template v-for="(item,index) in salesCategoryList"> <template v-for="(item,index) in salesCategoryList">
<div <div
class="sales-category-item-box" class="sales-category-item-box"
...@@ -27,53 +34,66 @@ ...@@ -27,53 +34,66 @@
class="sales-category-item" class="sales-category-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="ind" :key="ind"
:prop="i.key"
> >
{{ componentData[i.key] || '-' }} {{ componentData[i.key] != null ? componentData[i.key] : '-' }}
</el-form-item> </el-form-item>
</template> </template>
</div> </div>
</div> </div>
</template> </template>
</el-form>
<SalesCategoryDetail <EditSalesCategory
:dialogVisible.sync="salesCategoryDetailVisible" :dialogVisible.sync="salesCategoryDetailVisible"
:item="currentItem" :item="currentItem"
@submit="handleEditSalesCategory"
/> />
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { SALES_CATEGORY_LIST } from './constant' import { SALES_CATEGORY_LIST, SALES_CATEGORY_RULES } from './constant'
import SalesCategoryDetail from './SalesCategoryDetail.vue' import EditSalesCategory from './EditSalesCategory.vue'
export default { export default {
name: 'SalesCategory', name: 'SalesCategory',
components: { SalesCategoryDetail }, components: { EditSalesCategory },
props: { props: {
data: { data: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
} },
length: {
type: Number,
default: 0
},
}, },
inject: ['size'], inject: ['size'],
watch: { watch: {
data: { data: {
handler (newVal) { handler (newVal) {
console.log(newVal, '===')
this.componentData = deepClone(newVal) this.componentData = deepClone(newVal)
}, },
deep: true, deep: true,
immediate: true immediate: true
} }
}, },
computed: {
formRef () {
return this.$refs.formRef
},
},
data () { data () {
return { return {
componentData: {}, componentData: {},
editStatus: false, editStatus: false,
salesCategoryList: deepClone(SALES_CATEGORY_LIST), salesCategoryList: deepClone(SALES_CATEGORY_LIST),
salesCategoryDetailVisible: false, salesCategoryDetailVisible: false,
currentItem: {} currentItem: {},
rules: SALES_CATEGORY_RULES
} }
}, },
mounted () { mounted () {
...@@ -91,7 +111,33 @@ export default { ...@@ -91,7 +111,33 @@ export default {
this.salesCategoryDetailVisible = true this.salesCategoryDetailVisible = true
}, },
deleteSalesCategory () { deleteSalesCategory () {
this.$confirm("删除后不可恢复,是否确定删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
}).then(async () => {
this.$emit('delete', this.data)
// const data = await deleteStrategy({
// id: item.id
// })
// if (data) {
// this.$emit('refresh')
// this.$message.success('操作成功')
// this.close()
// } else this.$message.error('操作失败')
})
},
handleEditSalesCategory (data) {
console.log(data)
if (data.edit) {
delete data.edit
this.$emit('edit', data)
this.salesCategoryDetailVisible = false
} else {
this.$emit('add', data)
this.salesCategoryDetailVisible = false
}
} }
} }
} }
......
...@@ -22,12 +22,20 @@ ...@@ -22,12 +22,20 @@
>保存</el-button> >保存</el-button>
</template> </template>
</div> </div>
<el-form
ref="formRef"
label-width="150px"
:model="componentData"
:size="size"
:rules="rules"
>
<div class="traffic-provider-information-content"> <div class="traffic-provider-information-content">
<template v-for="(i,index) in trafficProviderInformation"> <template v-for="(i,index) in trafficProviderInformation">
<el-form-item <el-form-item
class="traffic-provider-information-item" class="traffic-provider-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="index" :key="`trafficProviderInformation${index}`"
:prop="i.key"
> >
<template v-if="editStatus"> <template v-if="editStatus">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
...@@ -54,7 +62,10 @@ ...@@ -54,7 +62,10 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
{{ componentData[i.key] || '-' }} <template v-if="i.type == 'select'">
{{ componentData[i.key] && getSelectText(i) }}
</template>
<template v-else> {{ componentData[i.key] || '-' }}</template>
</template> </template>
</el-form-item> </el-form-item>
...@@ -66,7 +77,8 @@ ...@@ -66,7 +77,8 @@
<el-form-item <el-form-item
class="traffic-provider-information-item" class="traffic-provider-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="index" :key="`customerInformation${index}`"
:prop="i.key"
> >
<template v-if="editStatus"> <template v-if="editStatus">
<el-select <el-select
...@@ -77,25 +89,30 @@ ...@@ -77,25 +89,30 @@
> >
<el-option <el-option
v-for="item in i.options" v-for="item in i.options"
:key="item.value" :key="item.uuid"
:label="item.label" :label="item.staffName"
:value="item.value" :value="item.uuid"
/> />
</el-select> </el-select>
</template> </template>
<template v-else> <template v-else>
{{ componentData[i.key] && componentData[i.key].join('/') || '-' }} {{ getMultipleSelectText(i) }}
</template> </template>
</el-form-item> </el-form-item>
</template> </template>
</div> </div>
</el-form>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { merchantStaffByRoleList } from '@api/index';
import {
getServiceList,
getyqMerchantList,
} from "@api/merchant";
export default { export default {
name: 'TrafficProviderInformation', name: 'TrafficProviderInformation',
props: { props: {
...@@ -108,34 +125,44 @@ export default { ...@@ -108,34 +125,44 @@ export default {
watch: { watch: {
data: { data: {
handler (newVal) { handler (newVal) {
if (newVal) {
if (newVal.areaOpId) newVal.areaOpIdList = newVal.areaOpId.split(',')
if (newVal.onlineOpId) newVal.onlineOpIdList = newVal.onlineOpId.split(',')
if (newVal.regionSupervisorId) newVal.regionSupervisorIdList = newVal.regionSupervisorId.split(',')
}
this.componentData = deepClone(newVal) this.componentData = deepClone(newVal)
}, },
deep: true, deep: true,
immediate: true immediate: true
} }
}, },
computed: {
formRef () {
return this.$refs.formRef
}
},
data () { data () {
return { return {
componentData: {}, componentData: {},
editStatus: false, editStatus: false,
trafficProviderInformation: [ trafficProviderInformation: [
{ label: '流量方信息', key: 'trafficPartyName', type: 'input', disabled: true }, { label: '流量方信息', key: 'trafficPartyName', type: 'input', disabled: true },
{ label: '集团(上级商户)', key: 'parentPartnerName', type: 'input', disabled: true }, { label: '集团(上级商户)', key: '', type: 'input', disabled: true },
{ label: '开通场景', key: 't-c', type: 'input', disabled: true }, { label: '开通场景', key: 'sceneTypeName', type: 'input', disabled: true },
{ label: '签约主体', key: 'contractingMerchantName', type: 'select', options: [] }, { label: '签约主体', key: 'signingEntityId', type: 'select', options: [] },
{ {
label: '业务模式', key: 'businessMode', type: 'select', options: [ label: '业务模式', key: 'businessMode', type: 'select', options: [
{ {
label: '直营渠道', label: '直营渠道',
value: '1' value: 1
}, },
{ {
label: '服务商渠道', label: '服务商渠道',
value: '2' value: 2
}, },
{ {
label: '其他', label: '其他',
value: '3' value: 3
}, },
] ]
}, },
...@@ -143,27 +170,43 @@ export default { ...@@ -143,27 +170,43 @@ export default {
label: '运营模式', key: 'operationMode', type: 'select', options: [ label: '运营模式', key: 'operationMode', type: 'select', options: [
{ {
label: '直营', label: '直营',
value: '1' value: 1
}, },
{ {
label: '非直营', label: '非直营',
value: '2' value: 2
}, },
] ]
}, },
{ label: '服务商2/F公司', key: 'serviceMerchant2fName', type: 'select', options: [] }, { label: '服务商2/F公司', key: 'serviceMerchant2fId', type: 'select', options: [] },
{ label: '服务商', key: 'partnerName', type: 'select', options: [] }, { label: '服务商', key: 'partnerId', type: 'select', options: [] },
{ label: '上级服务商', key: 'parentServiceMerchantName', type: 'input', options: [], maxlength: 50 }, { label: '上级服务商', key: 'parentServiceMerchantName', type: 'input', maxlength: 50 },
{ label: '园区店', key: 'yqMerchantName', type: 'select', options: [] }, { label: '园区店', key: 'yqMerchantId', type: 'select', options: [] },
], ],
customerInformation: [ customerInformation: [
{ label: '区域运营', key: 'areaOpId', type: 'select', options: [] }, { label: '区域运营', key: 'areaOpIdList', type: 'select', options: [] },
{ label: '线上运营', key: 'onlineOpId', type: 'select', options: [] }, { label: '线上运营', key: 'onlineOpIdList', type: 'select', options: [] },
{ label: '区域督导', key: 'regionSupervisorId', type: 'select', options: [] }, { label: '区域督导', key: 'regionSupervisorIdList', type: 'select', options: [] },
] ],
rules: {
signingEntityId: [{ required: true, message: '请选择签约主体', trigger: 'change' }],
businessMode: [{ required: true, message: '请选择业务模式', trigger: 'change' }],
operationMode: [{ required: true, message: '请选择运营模式', trigger: 'change' }],
partnerId: [{ required: true, message: '请选择服务商', trigger: 'change' }],
yqMerchantId: [{ required: true, message: '请选择园区店', trigger: 'change' }],
areaOpIdList: [{ required: true, message: '请选择区域督导', trigger: 'change' }],
onlineOpIdList: [{ required: true, message: '请选择线上运营', trigger: 'change' }],
regionSupervisorIdList: [{ required: true, message: '请选择区域督导', trigger: 'change' }],
}
} }
}, },
mounted () { mounted () {
// 人员下拉框
this.merchantStaffByRoleList()
// 园区店下拉框
this.getyqMerchantList();
// 服务商下拉框
this.getServiceList();
}, },
methods: { methods: {
edit () { edit () {
...@@ -180,6 +223,44 @@ export default { ...@@ -180,6 +223,44 @@ export default {
this.$emit('updateData', deepClone(this.componentData)) this.$emit('updateData', deepClone(this.componentData))
this.$emit('edit', false) this.$emit('edit', false)
}, },
getSelectText (i) {
if (!i.options.length) return '-'
return i.options.find(item => item.value == this.componentData[i.key]).label || '-'
},
getMultipleSelectText (i) {
if (!i.options.length) return '-'
return i.options.filter(item => this.componentData[i.key].includes(item.uuid)).map(item => item.staffName).join('/') || '-'
},
async merchantStaffByRoleList () {
const [areaOpIdList, onlineOpIdList, regionSupervisorIdList] = await Promise.all([
merchantStaffByRoleList({ roleName: '区域运营' }),
merchantStaffByRoleList({ roleName: '线上运营' }),
merchantStaffByRoleList({ roleName: '飞行督导' }),
])
const data = {
areaOpIdList,
onlineOpIdList,
regionSupervisorIdList,
}
this.customerInformation.map(item => {
item.options = data[item.key]
})
},
async getyqMerchantList () {
const { list } = await getyqMerchantList({ currentPage: 1, pageSize: 100000 })
this.trafficProviderInformation.find(item => item.key == 'yqMerchantId').options = list.map(item => {
return { label: item.merchantName, value: Number(item.merchantNo) }
})
},
async getServiceList () {
const { list } = await getServiceList({ currentPage: 1, pageSize: 100000 })
let data = list.map(item => {
return { label: item.merchantName, value: Number(item.merchantNo) }
})
this.trafficProviderInformation.map(item => {
if (['serviceMerchant2fId', 'partnerId'].includes(item.key)) item.options = data
})
},
} }
} }
</script> </script>
......
...@@ -5,9 +5,9 @@ const SALES_CATEGORY_LIST = [ ...@@ -5,9 +5,9 @@ const SALES_CATEGORY_LIST = [
{ label: '销售品类', key: 'productCategory', type: 'select', options: [] }, { label: '销售品类', key: 'productCategory', type: 'select', options: [] },
{ {
label: '流量费结算模式', key: 'feeSettlementMode', type: 'select', options: [ label: '流量费结算模式', key: 'feeSettlementMode', type: 'select', options: [
{ label: '按信息量', value: '1' }, { label: '按信息量', value: '按信息量' },
{ label: '按有效流量', value: '2' }, { label: '按有效流量', value: '按有效流量' },
{ label: '按销售额', value: '3' }, { label: '按销售额', value: '按销售额' },
] ]
}, },
] ]
...@@ -43,5 +43,34 @@ const SALES_CATEGORY_LIST = [ ...@@ -43,5 +43,34 @@ const SALES_CATEGORY_LIST = [
] ]
}, },
] ]
const VAILIDATOR_FROM = (rule, value, callback) => {
module.exports = { SALES_CATEGORY_LIST } let { field, required } = rule,
list = [],
label = ''
SALES_CATEGORY_LIST.map(i => {
if (i.list) list.push(...i.list)
})
label = list.find(i => i.key === field)?.label || ''
if (required && (value === null || value === '' || value === undefined)) callback(new Error(`${label}不能为空`))
else callback()
}
const SALES_CATEGORY_RULES = {
productType: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'change' }],
productCategory: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'change' }],
feeSettlementMode: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
penetrationRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
conversionRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
revenuePerCar: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
conversionRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
upgradePrice: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
revenue: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
trafficFee: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
marketFee1: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
marketFee2: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
incentive1: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
incentive2: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
resourceFee: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
productCost: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
recyclingFilm: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
}
module.exports = { SALES_CATEGORY_LIST, SALES_CATEGORY_RULES }
...@@ -48,14 +48,6 @@ ...@@ -48,14 +48,6 @@
> >
<template v-if="!updateStatus"> <template v-if="!updateStatus">
<div class="dialog-content"> <div class="dialog-content">
<div>
<el-progress
:percentage="updatePercentage"
type="circle"
:width="80"
>
</el-progress>
</div>
<div class="dialog-tips-big"> <div class="dialog-tips-big">
正在处理中 正在处理中
</div> </div>
...@@ -66,32 +58,30 @@ ...@@ -66,32 +58,30 @@
</template> </template>
<template v-else> <template v-else>
<div <div
v-if="succNum > 0" v-if="errorFileUrl"
class="dialog-content" class="dialog-content"
> >
<div class="dialog-tips-big"> <div class="dialog-tips-big">
处理成功,可返回列表查看。 处理失败。可点击 <span>下载失败模版</span> 查看失败原因。
</div> </div>
</div> </div>
<div <div
v-if="failNum > 0" v-else
class="dialog-content" class="dialog-content"
> >
<div class="dialog-tips-big"> <div class="dialog-tips-big">
处理失败,可点击右上角下载失败模版,查看失败原因。 处理成功,可返回列表查看。
</div> </div>
</div> </div>
</template> </template>
<template #footer> <template #footer>
<span <span class="dialog-footer">
class="dialog-footer"
v-if="updateStatus && updatePercentage === 100"
>
<el-button <el-button
v-if="updateStatus"
type="primary" type="primary"
@click="nextStep" @click="nextStep"
> >
{{succNum > 0 ? '继续下一步' : '确定'}} {{!errorFileUrl ? '继续下一步' : '确定'}}
</el-button> </el-button>
</span> </span>
</template> </template>
...@@ -104,7 +94,7 @@ import { mapActions, mapState } from "vuex"; ...@@ -104,7 +94,7 @@ import { mapActions, mapState } from "vuex";
import StepOne from './components/StepOne.vue'; import StepOne from './components/StepOne.vue';
import StepTwo from './components/StepTwo/index.vue'; import StepTwo from './components/StepTwo/index.vue';
import { getWorkwechatTemplate, getBusisDetailBasic } from "@api/shelfManage.js"; import { getWorkwechatTemplate, getBusisDetailBasic } from "@api/shelfManage.js";
import { storeApproveCreateDraft, storeApproveEditDraft } from '@/api/salesManagement.js' import { storeApproveCreateDraft, storeApproveEditDraft, storeApproveQueryDetail } from '@/api/salesManagement.js'
import { deepClone } from "@/common/util"; import { deepClone } from "@/common/util";
export default { export default {
...@@ -115,7 +105,8 @@ export default { ...@@ -115,7 +105,8 @@ export default {
}, },
provide () { provide () {
return { return {
GET_PAGE_TYPE: () => this.pageType GET_PAGE_TYPE: () => this.pageType,
GET_BASE_SCENE_CODE: () => this.baseSceneCode,
} }
}, },
data () { data () {
...@@ -126,62 +117,56 @@ export default { ...@@ -126,62 +117,56 @@ export default {
templateInfo: [], templateInfo: [],
shelfTypeDisabled: false, shelfTypeDisabled: false,
dialogVisible: false, dialogVisible: false,
updateStatus: "", updateStatus: false,
updatePercentage: 0, updatePercentage: 0,
succNum: 0, errorFileUrl: "",
failNum: 0, baseSceneCode: '',
businessCode: ''
} }
}, },
watch: { watch: {
updateList: {
handler (newVal) {
if (newVal.length > 0) {
for (let i = 0; i < newVal.length; i++) {
if (newVal[i].uuid == this.updateUuid) {
this.updatePercentage = deepClone(newVal[i].progress);
if (newVal[i].progress === 100) {
this.updateStatus = deepClone(newVal[i].ifSuccess) || false;
this.succNum = deepClone(newVal[i].succNum) || 0;
this.failNum = deepClone(newVal[i].failNum) || 0;
}
}
}
}
},
deep: true,
},
}, },
computed: { computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
updateList: state => state.d2admin.user.updateList,
}),
stepOneRef () { stepOneRef () {
return this.$refs.stepOneRef return this.$refs.stepOneRef
}, },
stepTwoRef () { stepTwoRef () {
return this.$refs.stepTwoRef return this.$refs.stepTwoRef
} },
}, },
mounted () { mounted () {
// return this.getDetail() this.step = 2
let { approveType, pageType, id } = this.$route.query this.pageComplete = true
setTimeout(() => {
this.baseSceneCode = '100101'
}, 2e3)
return
let { approveType, pageType, businessCode } = this.$route.query
if (pageType) { if (pageType) {
this.businessCode = businessCode
this.pageType = pageType this.pageType = pageType
if (pageType == 'view') return this.getDetail(id) if (pageType == 'view') return this.getDetail(businessCode, pageType)
else if (pageType == 'reapply') this.getReapplyInfo(id) else if (pageType == 'reapply') this.getReapplyInfo(businessCode)
else this.getApprovalTemplate(approveType) else {
this.getApprovalTemplate(approveType, pageType, businessCode)
}
} else { } else {
this.getApprovalTemplate(approveType) this.getApprovalTemplate(approveType)
} }
}, },
methods: { methods: {
async getDetail (id) { async getDetail (businessCode, pageType) {
const data = await storeApproveQueryDetail({ businessCode })
if (pageType == 'view') {
this.step = 2 this.step = 2
} else {
}
this.pageComplete = true this.pageComplete = true
}, },
/**获取审批模板 */ /**获取审批模板 */
async getApprovalTemplate (type) { async getApprovalTemplate (type, pageType, businessCode) {
try { try {
const data = await getWorkwechatTemplate({ id: type }) const data = await getWorkwechatTemplate({ id: type })
if (data) { if (data) {
...@@ -193,8 +178,11 @@ export default { ...@@ -193,8 +178,11 @@ export default {
} }
return item; return item;
}) })
this.pageComplete = true
this.step = 1 this.step = 1
if (pageType) {
this.getDetail(businessCode, pageType)
} else this.pageComplete = true
} else throw '获取模板信息失败' } else throw '获取模板信息失败'
} catch (error) { } catch (error) {
this.$message.error(error) this.$message.error(error)
...@@ -236,14 +224,14 @@ export default { ...@@ -236,14 +224,14 @@ export default {
} }
}, },
async submit () { async submit () {
let { step } = this let { step } = this
if (step == 1) { if (step == 1) {
console.log(this.stepOneRef.infoForm, this.templateInfo) this.clearStatus()
this.stepOneRef.formRef.validate(async (valid) => { this.stepOneRef.formRef.validate(async (valid) => {
if (valid) { if (valid) {
let { infoForm } = this.stepOneRef, let { infoForm, sceneTypeName } = this.stepOneRef,
{ approveType } = this.$route.query, { approveType } = this.$route.query,
basicApproveInfo = this.templateInfo.map((item) => { basicApproveInfo = this.templateInfo.map((item) => {
// 1.文本;2.多行文本;3.数字;4.金额;5.单选;6.多选;7.附件 // 1.文本;2.多行文本;3.数字;4.金额;5.单选;6.多选;7.附件
if ([1, 2, 3, 4, 5].includes(item.inputType)) { if ([1, 2, 3, 4, 5].includes(item.inputType)) {
...@@ -270,45 +258,63 @@ export default { ...@@ -270,45 +258,63 @@ export default {
basicApproveInfo: JSON.stringify(basicApproveInfo), basicApproveInfo: JSON.stringify(basicApproveInfo),
approveType: approveType, approveType: approveType,
shelfType: infoForm.shelfType, shelfType: infoForm.shelfType,
submitFlag: 0 submitFlag: 0,
baseSceneCode: infoForm.baseSceneCode,
} }
if (infoForm.shelfType == 1) { if (infoForm.shelfType == 1) {
params.merchantId = infoForm.merchantId; params.merchantId = infoForm.merchantId;
params.merchantName = infoForm.merchantName; params.merchantName = infoForm.merchantName;
} }
const res = await storeApproveCreateDraft(params) this.baseSceneCode = infoForm.baseSceneCode
this.dialogVisible = true; this.dialogVisible = true;
this.updateUuid = res; const { errorFileUrl, trafficPartyDetails, businessCode } = await storeApproveCreateDraft(params)
// this.updatePercentage = 0 this.updateStatus = true;
// 异步处理文件上传 把id传入处理轮询 this.businessCode = businessCode
const list = [ if (errorFileUrl) {
...this.updateList, this.errorFileUrl = errorFileUrl
{ } else {
name: infoForm.fileName,
ifSuccess: false,
uuid: res,
type: "upload",
},
];
this.actionSetDownloadList({ list, type: "updateList" });
this.stepTwoRef.basicinformationFormList = this.templateInfo
infoForm.sceneTypeName = sceneTypeName
this.stepTwoRef.init({
basicinformationFormList: this.templateInfo,
basicinformationData: infoForm,
infoForm: trafficPartyDetails
})
}
} }
}) })
} else { } else {
console.log(this.stepTwoRef.infoForm) this.stepTwoRef.validate(async (valid, data) => {
this.stepTwoRef.formRef.validate(async (valid) => {
if (valid) { if (valid) {
console.log(data)
let { businessCode } = this,
{ trafficValidationData, businessValidationData, productDetails } = data,
trafficPartyDetails = {
...trafficValidationData,
...businessValidationData,
},
parmas = {
businessCode,
trafficPartyDetails
}
parmas.trafficPartyDetails.productDetails = productDetails
console.log(parmas)
// 提交 // 提交
} }
}) })
} }
}, },
nextStep () { nextStep () {
if (this.succNum > 0) { if (!this.errorFileUrl) {
this.stepTwoRef.basicinformationData = this.infoForm
this.stepTwoRef.basicinformationFormList = this.templateInfo
this.step = 2 this.step = 2
} else this.dialogVisible = false }
this.clearStatus()
},
clearStatus () {
this.dialogVisible = false
this.errorFileUrl = ""
this.updateStatus = false
} }
} }
} }
...@@ -347,5 +353,21 @@ export default { ...@@ -347,5 +353,21 @@ export default {
.fixed-btn-box { .fixed-btn-box {
height: 86px; height: 86px;
} }
.dialog-content {
text-align: center;
.dialog-tips-big {
font-size: 16px;
color: #333333;
margin-bottom: 20px;
span {
cursor: pointer;
color: rgba(42, 88, 173, 1);
}
}
.dialog-tips-small {
font-size: 12px;
color: #666666;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!