Commit 9fae8594 by 前端

Merge branch 'SAAS+V4.53.0-0528' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.53.0-0528
2 parents 030104d5 a52e2da6
Showing 24 changed files with 798 additions and 326 deletions
......@@ -24,6 +24,11 @@ export function conversationPage(data) {
data.method = `${path2}inspection.conversation.batch.page`
return request(data, "post")
}
// 生产短链
export function getShortUrl(data) {
data.method = 'dj.api.smartcarlife.inspection.batch.file.short.url'
return request(data, "post")
}
// 质检点管理-分页列表
export function conversationPointPage(data) {
......
......@@ -40,6 +40,8 @@ export const routerName = {
parentId: "91301",
label: "查看",
handle: "handleDetail",
category: "Button",
type: "primary",
addRoutePath: [
{
authId: "91303",
......@@ -292,7 +294,21 @@ export const routerName = {
parentId: "913",
cache: false
},
auth: [],
auth: [
{
authId: "9130902",
parentId: "91309",
label: "新增配置",
handle: "goStatisticsPage",
addRoutePath: [
{
authId: "91311",
name: "新增配置",
parentId: "91309"
}
]
}
],
component: _import("contentManager/packageConfig/index")
},
91310: {
......@@ -307,6 +323,17 @@ export const routerName = {
auth: [],
component: _import("contentManager/packageConfig/edit")
},
91311: {
path: "/addEquity",
name: "addEquity",
meta: {
title: "新增配置",
authId: "91311",
parentId: "91309",
cache: false
},
component: _import("contentManager/packageConfig/addEquity")
},
91315: {
path: "/customerTags",
name: "customerTags",
......@@ -331,7 +358,7 @@ export const routerName = {
auth: [],
component: _import("contentManager/customerFile/index")
},
9131701:{
9131701: {
path: "/customerFileDetails",
name: "customerFileDetails",
meta: {
......
......@@ -3,6 +3,9 @@ import { getAllGoodsList } from "@api/grounding"
export default {
namespaced: true,
state: {
estimatedFlow: "",
estimatedUpgradeRate: "",
operationModeAsync: "",
shelfUpdateMerchant: {
merchantId: "",
merchantName: "",
......@@ -192,6 +195,15 @@ export default {
},
shelfUpdateParMer(state) {
return state.shelfUpdateParMer
},
estimatedFlow(state) {
return state.estimatedFlow
},
estimatedUpgradeRate(state) {
return state.estimatedUpgradeRate
},
operationModeAsync(state) {
return state.operationModeAsync
}
}
}
<template>
<div>
<d2-container class="m-t-40">
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
:form-data="showFormData">
<template slot="brand">
<el-cascader v-model="searchForm.brand" filterable :options="options" :props="{ checkStrictly: true }"
clearable></el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button size="small" type="primary" @click="handleDialog">
新增配置
</el-button>
</d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.scope)">
编辑
</el-button>
<el-button type="text" @click="handleClone(scope.scope)">
删除
</el-button>
</div>
</d2-table>
</div>
</d2-container>
</div>
</template>
<script>
import { deepClone } from "@/common/util"
import { getSingleLabelList } from "@/api/verbal.js"
import { materialPage } from "@api/contentManager"
export default {
data() {
return {
searchForm: {
brand: ''
},
showFormData: [
{
label: "品牌",
name: "sceneLabelCode",
addHtml: 'brand'
},
{
label: "门店",
name: "businessType",
type: "select",
isClear: true,
optionList: [],
optionId: "sceneLabelCode",
optionLabel: "sceneLabelName",
optionsName: "sceneLabelList"
},
],
searchFormSearch: {},
getListApi: materialPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [
{
label: "品牌",
prop: "merchantName"
},
{
label: "子品牌",
prop: "merchantId"
},
{
label: "关联门店",
prop: "merchantId",
addHtml: "polishContent"
},
{
label: "更新时间",
prop: "merchantId",
},
]
},
baseData: {
sceneLabelList: [],
},
options: [{
value: 'zhinan',
label: '指南',
children: [{
value: 'shejiyuanze',
label: '设计原则',
}, {
value: 'daohang',
label: '导航'
}]
}, {
value: 'zujian',
label: '组件',
children: [{
value: 'basic',
label: 'Basic',
}, {
value: 'form',
label: 'Form',
}, {
value: 'data',
label: 'Data',
}, {
value: 'notice',
label: 'Notice',
}, {
value: 'navigation',
label: 'Navigation',
}, {
value: 'others',
label: 'Others',
}]
}, {
value: 'ziyuan',
label: '资源',
}]
}
},
mounted() {
this.initSelect()
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
console.log(this.searchForm, '=-===')
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
console.log("this.searchForm", this.searchForm)
this.handleSearch()
},
initSelect() {
// 使用 Promise.all 处理多个异步任务,并捕获所有可能的错误
Promise.allSettled([this.getSceceLabelList()])
.then((results) => {
// 检查每个任务的结果
results.forEach((result, index) => {
if (result.status === "rejected") {
console.error(`Task ${index} failed:`, result.reason)
}
})
// 统一调用 getOptionsList
this.getOptionsList()
})
.catch((err) => {
console.error("Unexpected error in initSelect:", err)
this.getOptionsList() // 确保即使有意外错误也调用 getOptionsList
})
},
getSceceLabelList() {
return new Promise((resolve, reject) => {
getSingleLabelList({})
.then((res) => {
this.baseData.sceneLabelList = res
resolve(res) // 返回结果以便主流程感知
})
.catch((err) => {
console.error("Error in getSingleLabelList:", err)
reject(err) // 捕获并传递错误
})
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
// if (item.optionsName != "brandList") {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
// }
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
handleDialog() {
this.$router.push({ name: "addEquity" })
}
}
}
</script>
<style scoped>
.m-t-40 {
margin-top: 40px;
}
</style>
<template>
<div>
<d2-container class="m-t-40">
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<el-button size="small" type="primary" @click="handleDialog">
新增门店
</el-button>
</d2-table-header>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.scope)">
编辑
</el-button>
<el-button
type="text"
@click="handleClone(scope.scope)"
v-if="scope.scope.merchantId"
>
复制素材
</el-button>
</div>
</d2-table>
</div>
</d2-container>
<!-- 新增提现 -->
<add-dialog
:dialogVisible="dialogVisible"
v-if="dialogVisible"
:cloneId="cloneId"
@dialogClose="addDialogClose"
/>
</div>
</template>
<script>
import { deepClone } from "@/common/util"
import { materialPage } from "@api/contentManager"
import addDialog from "./components/addDialog"
export default {
name: "UpgradeLightly",
components: {
addDialog
},
data() {
return {
dialogVisible: false,
labelWidth: "100px",
cloneId: null,
dialogType: "",
searchForm: {
merchantId: "",
merchantName: ""
},
searchFormSearch: {},
showFormData: [
{
label: "商户名称",
name: "merchantName",
type: "input",
maxlength: "30",
isClear: true
},
{
label: "商户号",
name: "merchantId",
inputType: "number",
type: "input",
maxlength: "20",
isClear: true
}
],
getListApi: materialPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [
{
label: "商户名称",
prop: "merchantName"
// width: '200px'
},
{
label: "商户号",
prop: "merchantId"
},
{
label: "业务场景",
prop: "businessScene"
},
{
label: "配置类型",
prop: "configType",
formatter: (cell) => {
return cell.configType == 0 ? "默认" : "自定义"
}
},
{
label: "状态",
prop: "hidePackage",
formatter: (cell) => {
return cell.hidePackage ? "禁用套餐" : "启用"
}
}
]
}
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
handleDialog(val) {
if (!val) this.cloneId = null
this.dialogVisible = true
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleClone(row) {
const { merchantId } = row
this.cloneId = merchantId
this.handleDialog(true)
},
handleEdit(row) {
const { id, merchantId, merchantName, configType } = row
this.$router.push({
name: "packageEdit",
query: {
id,
configType,
merchantId,
merchantName
}
})
},
handleReset() {
this.searchForm = {}
this.$refs.recordTable.refreshTable(false, true)
},
addDialogClose() {
this.dialogVisible = false
this.$refs.recordTable.refreshTable()
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
}
.m-t-40 {
margin-top: 40px;
}
</style>
<template>
<div>新增配置</div>
</template>
\ No newline at end of file
<!-- 驻店目标配置 -->
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<!-- </d2-container>
<d2-container> -->
<div class="d2-container-content">
<d2-table-header>
<el-button size="small" type="primary" @click="handleDialog">
新增门店
</el-button>
</d2-table-header>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.scope)">
编辑
</el-button>
<el-button
type="text"
@click="handleClone(scope.scope)"
v-if="scope.scope.merchantId"
>
复制素材
</el-button>
</div>
</d2-table>
</div>
</d2-container>
<!-- 新增提现 -->
<add-dialog
:dialogVisible="dialogVisible"
v-if="dialogVisible"
:cloneId="cloneId"
@dialogClose="addDialogClose"
/>
<div class="in-store-list-wrap">
<div class="header" slot="header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane>
</el-tabs>
<components :is="tabName" :scene-type="activeName"></components>
</div>
</div>
</template>
<script>
import { deepClone } from "@/common/util"
import { materialPage } from "@api/contentManager"
import addDialog from "./components/addDialog"
import UpgradeLightly from "./UpgradeLightly.vue"
import EquityUpgrade from "./EquityUpgrade.vue"
export default {
name: "StaffMassSendingIndex",
components: {
addDialog
UpgradeLightly,
EquityUpgrade
},
data() {
return {
dialogVisible: false,
labelWidth: "100px",
cloneId: null,
dialogType: "",
searchForm: {
merchantId: "",
merchantName: ""
},
searchFormSearch: {},
showFormData: [
activeName: "0",
tabPaneList: [
{
label: "商户名称",
name: "merchantName",
type: "input",
maxlength: "30",
isClear: true
label: "权益升级",
name: "0"
},
{
label: "商户号",
name: "merchantId",
inputType: "number",
type: "input",
maxlength: "20",
isClear: true
label: '轻改升级',
name: "1"
}
],
getListApi: materialPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// tableOption: { width: '200px' },
tableOption: true,
tableColumns: [
{
label: "商户名称",
prop: "merchantName"
// width: '200px'
},
{
label: "商户号",
prop: "merchantId"
},
{
label: "业务场景",
prop: "businessScene"
},
{
label: "配置类型",
prop: "configType",
formatter: (cell) => {
return cell.configType == 0 ? "默认" : "自定义"
}
},
{
label: "状态",
prop: "hidePackage",
formatter: (cell) => {
return cell.hidePackage ? "禁用套餐" : "启用"
}
}
]
}
tabName: "EquityUpgrade"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
handleDialog(val) {
if (!val) this.cloneId = null
this.dialogVisible = true
},
handleSearch() {
this.$refs.recordTable.refreshTable(false, true)
},
handleClone(row) {
const { merchantId } = row
this.cloneId = merchantId
this.handleDialog(true)
},
handleEdit(row) {
const { id, merchantId, merchantName, configType } = row
this.$router.push({
name: "packageEdit",
query: {
id,
configType,
merchantId,
merchantName
}
})
},
handleReset() {
this.searchForm = {}
this.$refs.recordTable.refreshTable(false, true)
},
addDialogClose() {
this.dialogVisible = false
this.$refs.recordTable.refreshTable()
handleClick() {
const arr = {
0: "EquityUpgrade",
1: "UpgradeLightly",
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
margin: 0 2px;
}
<style scoped lang="scss">
.in-store-list-wrap {
padding: 0 26px 0 20px;
.leftSpan {
display: inline-block;
box-sizing: border-box;
margin-right: 10px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
......@@ -6,12 +6,7 @@
</div>
<div style="padding: 20px 20px 0">
<el-form :model="merchantInfo" label-width="250px">
<el-form-item
v-for="(item, index) in editFormData"
:key="index"
class="form-item"
:style="{ width: '48%' }"
>
<el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ width: '48%' }">
<span slot="label" class="label">{{ item.label }}:</span>
<span>{{ merchantInfo[item.name] || "-" }}{{ item.suffix }}</span>
</el-form-item>
......@@ -32,13 +27,18 @@ export default {
props: {
merchantInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
watch: {
merchantInfo(val) {
this.dealInitData()
merchantInfo: {
handler(val, oldVal) {
if (val) {
this.dealInitData()
}
},
deep: true
}
},
data() {
......
......@@ -98,8 +98,8 @@
<script>
import { mapActions, mapMutations } from "vuex"
import { getGoodsDetail } from "@api/shelfManage.js"
import goodTab from "../common/goodTab.vue"
import packageTab from "../common/packageTab.vue"
import goodTab from "./components/goodTab.vue"
import packageTab from "./components/packageTab.vue"
import { deepClone } from "@/common/util"
export default {
name: "GoodsInfo",
......
......@@ -5,43 +5,18 @@
<span>流量方信息</span>
</div>
<div style="padding: 20px">
<glsx-combi-form
class="edit-form-container"
ref="editFormRef"
label-width="250px"
default-width="314px"
:form-ref="editChildRef"
:form-obj="editData"
:form-data="editFormData"
:form-rules="formRules"
>
<glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px"
:form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
<div slot="merchantId" slot-scope="scope">
<el-select
v-model="editData[scope.scope.name]"
disabled
:placeholder="scope.scope.placeholder"
@change="scope.scope.changeAttr"
style="width: 274px"
filterable
remote
reserve-keyword
@visible-change="(event) => selectVisibleChange(event, scope.scope)"
:remote-method="
(event) => remoteMethod(event, scope.scope.searchKey, 'store')
"
v-el-select-loadmore="interestsLoadmoreMerchant"
>
<el-option
v-for="subItem in scope.scope.optionList"
:key="subItem[scope.scope.optionId]"
:label="subItem[scope.scope.optionLabel]"
:value="subItem[scope.scope.optionId]"
>
<el-select v-model="editData[scope.scope.name]" disabled :placeholder="scope.scope.placeholder"
@change="scope.scope.changeAttr" style="width: 274px" filterable remote reserve-keyword
@visible-change="(event) => selectVisibleChange(event, scope.scope)" :remote-method="(event) => remoteMethod(event, scope.scope.searchKey, 'store')
" v-el-select-loadmore="interestsLoadmoreMerchant">
<el-option v-for="subItem in scope.scope.optionList" :key="subItem[scope.scope.optionId]"
:label="subItem[scope.scope.optionLabel]" :value="subItem[scope.scope.optionId]">
</el-option>
</el-select>
<el-button type="text" class="add-mer-btn" @click="handleAddMerchant"
>新建</el-button
>
<el-button type="text" class="add-mer-btn" @click="handleAddMerchant">新建</el-button>
</div>
</glsx-combi-form>
</div>
......@@ -70,7 +45,7 @@ export default {
props: {
editData: {
type: Object,
default: () => {}
default: () => { }
}
},
......@@ -396,7 +371,7 @@ export default {
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -419,7 +394,7 @@ export default {
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -677,14 +652,7 @@ export default {
}
})
})
// this.$refs.editFormRef.$refs[this.editChildRef].validate(
// (valid, item) => {
// console.log(valid, item)
// return valid
// }
// )
},
handleAddMerchant() {
this.$emit("addMerchant")
}
......
<template>
<d2-dialog title="变更说明" :is-visible.sync="dialogShow" width="40%" @confirmDialog="dialogShow = false"
@closeDialog="dialogShow = false" :noCancel="true" class="relateStore">
<d2-table :hasPage="false" :tableData="tableData" :table-params="tableParams">
</d2-table>
</d2-dialog>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'RuleUpdateDialog',
props: {
show: Boolean,
tableData: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableColumns: [
{
label: '变更内容',
prop: 'goodsTypeName',
width: 120
},
{
label: '变更后',
prop: 'orderCount'
},
{
label: '变更前',
prop: 'orderTotalPrice'
}
]
}
}
},
computed: {
dialogShow: {
get() {
return this.show
},
set(n) {
this.$emit('update:show', n)
}
}
},
mounted() {
},
methods: {
init() {
},
handleClick() {
}
}
}
</script>
<style scoped lang='scss'>
.dialog {
&-content {
padding: 5px 0;
.month {
display: flex;
align-items: center;
margin-bottom: 32px;
.label {
color: #333333;
font-size: 14px;
width: 150px;
display: flex;
align-items: center;
justify-content: flex-end;
&::before {
content: "*";
color: #eb4e4e;
display: block;
margin-right: 6px;
}
}
}
}
.input-box {
padding: 4px 10px;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>
\ No newline at end of file
<!-- 2 - 分账金额设置 -->
<template>
<div class="division-rule">
<el-form
class="formSty"
ref="divisionRuleRef"
:model="form"
:rules="rules"
label-suffix=":"
label-width="180px"
>
<el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
<el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block">
<tr class="tableHeader">
......@@ -20,41 +13,22 @@
</tr>
<tr>
<td class="merchantNameTd p-b-20">
<p
:title="item | filterMerchantType"
v-for="(item, index) in tableSelectOptions"
:key="index"
>
<p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
{{ item | filterMerchantType }}
</p>
</td>
<td
class="p-b-20"
v-for="(item, index) in radioList"
:key="index + 'radioList'"
>
<el-form-item
label-width="0"
:prop="`id${item.expenseCategoryId}`"
:rules="[
{
required: true,
message: `请选择${item.applicationObjectName}`,
trigger: 'change'
}
]"
>
<el-radio-group
v-model="form['id' + item.expenseCategoryId]"
@change="
(e) => handleClearValid(e, 'id' + item.expenseCategoryId)
"
>
<el-radio
v-for="(el, index) in tableSelectOptions"
:key="index"
:label="+el.merchantId"
/>
<td class="p-b-20" v-for="(item, index) in radioList" :key="index + 'radioList'">
<el-form-item label-width="0" :prop="`id${item.expenseCategoryId}`" :rules="[
{
required: true,
message: `请选择${item.applicationObjectName}`,
trigger: 'change'
}
]">
<el-radio-group v-model="form['id' + item.expenseCategoryId]" @change="
(e) => handleClearValid(e, 'id' + item.expenseCategoryId)
">
<el-radio v-for="(el, index) in tableSelectOptions" :key="index" :label="+el.merchantId" />
</el-radio-group>
</el-form-item>
</td>
......@@ -73,7 +47,7 @@ export default {
// 列选项
classificationObjSelect: {
type: Object,
default: () => {}
default: () => { }
},
merchantDistributionRules: {
type: Array,
......@@ -143,9 +117,9 @@ export default {
computed: {
radioList: function () {
const obj = this.classificationObjSelect
let list = [],
arr = [],
arrIdx = [1, 2, 302, 701, 4]
let list = []
let arr = []
const arrIdx = [1, 2, 302, 701, 4]
for (const key in obj) {
obj[key].map((item) => {
if (
......@@ -189,7 +163,7 @@ export default {
// immediate: true
}
},
mounted() {},
mounted() { },
methods: {
initList() {
// console.log('initList')
......@@ -347,9 +321,12 @@ export default {
display: flex;
justify-content: space-around;
}
.table-block td{
font-size :14px !important;;
.table-block td {
font-size: 14px !important;
;
}
.division-rule .table-block .el-radio {
display: block;
height: 60px;
......@@ -360,6 +337,7 @@ export default {
.p-b-20 {
padding-bottom: 26px !important;
}
.division-rule ::v-deep {
.table-block .el-radio__label {
display: none !important;
......
<template>
<div class="edit-page shop-merchant-info">
<div class="title">
<span>流量方信息</span>
</div>
<div class="content">
<el-tabs v-model="tabsValue" type="card" :before-leave="beforeLeave" class="my-tab-pane">
<el-tab-pane v-for="(item) in tabsList" :key="item.tabIndex" :name="item.tabIndex + ''">
<span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title }}
</span>
<span>
<shop-merchant-info :ref="`shopMerchant${item.tabIndex}`" :key="item.tabIndex"
:edit-data-obj="merchantsList[item.tabIndex]"></shop-merchant-info>
</span>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import ShopMerchantInfo from "./ShopMerchantInfo"
import { deepClone } from "@/common/util"
export default {
name: "EditMultilateralContract",
components: {
ShopMerchantInfo
},
props: {
merchantsList: {
type: Array,
default: () => { }
}
},
watch: {
merchantsList(val) {
this.tabsList = val.map((item, idx) => {
return {
title: item.merchantName,
tabIndex: idx
}
})
}
},
data() {
return {
tabsValue: 0,
tabsList: []
}
},
mounted() { },
methods: {
getAllParams() {
const list = deepClone(this.tabsList)
const merchants = []
// 需要使用for循环解决异步同步问题
for (var index = 0; index < list.length; index++) {
// const element = array[index];
const node = this.$refs[`shopMerchant${list[index].tabIndex}`][0]
const res = node.getParams()
merchants.push(res)
}
return merchants
// })
},
submit() {
return new Promise(async (resolve, reject) => {
let flag = true
const list = deepClone(this.tabsList)
// 需要使用for循环解决异步同步问题
for (var index = 0; index < list.length; index++) {
// const element = array[index];
const node = this.$refs[`shopMerchant${list[index].tabIndex}`][0]
const res = await node.submit()
flag = flag && res
}
this.$forceUpdate()
resolve(flag)
})
},
/* 活动标签切换时触发 */
beforeLeave(currentName, oldName) {
// console.log("currentName", currentName)
// 通过tab标签的切换事件触发增加的函数
this.currentIndex = currentName
}
}
}
</script>
<style scoped lang="scss">
@import "../../style/editdetailCon.scss";
.shop-merchant-info {
.add-mer-btn {
margin-left: 12px;
}
}
.content {
box-sizing: border-box;
margin: 20px 20px 0 20px;
}
</style>
\ No newline at end of file
......@@ -12,17 +12,10 @@
<!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 -->
<shop-merchant-info
ref="shopMerchant"
:edit-data="merchantEditData"
@addMerchant="handleAddMerchant"
></shop-merchant-info>
<shop-merchant-info ref="shopMerchant" :edit-data="merchantEditData"
@addMerchant="handleAddMerchant"></shop-merchant-info>
<!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant
v-if="addMerVisible"
:add-mer-visible="addMerVisible"
@handleClose="handleAddMerchant"
></add-merchant>
<add-merchant v-if="addMerVisible" :add-mer-visible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant>
<!-- 上架商品及测算 -->
<goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 -->
......@@ -223,10 +216,8 @@ export default {
var params = {
businessCode: this.routeObj.businessCode,
merchant: this.$refs.shopMerchant.editData,
settleDistributeRule:
settleDistributeRule || this.$refs.divisionConfig.submitParams,
reconciliationRule:
reconciliationRule || this.$refs.financeConfig.submitParams
settleDistributeRule: this.$refs.divisionConfig.submitParams,
reconciliationRule: this.$refs.financeConfig.submitParams
}
console.log(params, "params----")
this.$EventBus.$emit("dataFromParent", params)
......@@ -237,6 +228,7 @@ export default {
console.log(res, "res----")
this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {}
this.SET_DATA({
name: "shelfUpdateMerchant",
data: {
......
......@@ -11,18 +11,12 @@
<d2-container class="edit-contract" v-loading="isLoad">
<!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 -->
<shop-merchant-info
ref="shopMerchant"
:edit-data="merchantEditData"
@addMerchant="handleAddMerchant"
></shop-merchant-info>
<multilateralShopMerchant ref="multilateralShopMerchant" :merchants-list="merchantEditData"
@addMerchant="handleAddMerchant"></multilateralShopMerchant>
<!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant
v-if="addMerVisible"
:add-mer-visible="addMerVisible"
@handleClose="handleAddMerchant"
></add-merchant>
<add-merchant v-if="addMerVisible" :add-mer-visible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant>
<!-- 上架商品及测算 -->
<goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 -->
......@@ -45,10 +39,11 @@
<script>
import { mapActions, mapMutations } from "vuex"
import BaseInfo from "./components/editCon/BaseInfo.vue"
import ShopMerchantInfo from "./components/editCon/ShopMerchantInfo"
// import ShopMerchantInfo from "./components/editCon/ShopMerchantInfo"
import multilateralShopMerchant from "./components/editMultilateralCon/multilateralShopMerchant"
import AddMerchant from "./components/editCon/AddMerchant"
import GoodsInfo from "./components/editCon/GoodsInfo.vue"
import DivisionConfig from "./components/editCon/DivisionConfig.vue"
import DivisionConfig from "./components/editMultilateralCon/DivisionConfig.vue"
import FinanceConfig from "./components/editCon/FinanceConfig.vue"
import {
getBusisDetailBasic,
......@@ -67,7 +62,7 @@ export default {
isLoad: true,
addMerVisible: false,
basicInfo: {},
merchantEditData: {},
merchantEditData: [],
editData: {
merchantName: ""
},
......@@ -84,11 +79,12 @@ export default {
components: {
BaseInfo,
ShopMerchantInfo,
// ShopMerchantInfo,
AddMerchant,
GoodsInfo,
DivisionConfig,
FinanceConfig
FinanceConfig,
multilateralShopMerchant
},
mounted() {
this.routeObj = this.$route.query
......@@ -128,7 +124,11 @@ export default {
.then((res) => {
console.log(res, "res----")
this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {}
// 调试用
for (let index = 0; index < 4; index++) {
this.merchantEditData.push(res.createBusinessApproveMerchant)
}
// this.merchantEditData = res.createBusinessApproveMerchant || []
// this.$EventBus.$emit("shelfUpdatMerchantId", {
// merchantId: this.merchantEditData.merchantId,
// merchantName: this.merchantEditData.merchantName,
......@@ -137,9 +137,9 @@ export default {
this.SET_DATA({
name: "shelfUpdateMerchant",
data: {
merchantId: this.merchantEditData.merchantId,
merchantName: this.merchantEditData.merchantName,
scene: this.merchantEditData.sceneType
merchantId: this.merchantEditData[0].merchantId,
merchantName: this.merchantEditData[0].merchantName,
scene: this.merchantEditData[0].sceneType
}
})
})
......@@ -151,7 +151,7 @@ export default {
// 返回测算数据
const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.shopMerchant.submit()
const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit()
if (
!merchantSubmitResult ||
!divisionSubmitResult ||
......@@ -162,7 +162,7 @@ export default {
}
var params = {
businessCode: this.routeObj.businessCode,
merchant: this.$refs.shopMerchant.editData,
merchant: this.$refs.multilateralShopMerchant.getAllParams(),
settleDistributeRule: this.$refs.divisionConfig.submitParams,
reconciliationRule: this.$refs.financeConfig.submitParams
}
......@@ -176,9 +176,10 @@ export default {
if (confirmType == "save") {
const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.shopMerchant.submit()
const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit()
const goodsInfoSubmitResult = await this.$refs.goodsInfo.submit()
// return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult)
console.log(merchantSubmitResult, 'merchantSubmitResult')
if (
!merchantSubmitResult ||
!divisionSubmitResult ||
......@@ -200,7 +201,7 @@ export default {
businessCode: this.routeObj.businessCode,
goods: this.$refs.goodsInfo.submitParamsGoods(),
packages: this.$refs.goodsInfo.submitParamsPackages(),
merchant: this.$refs.shopMerchant.editData,
merchant: this.$refs.multilateralShopMerchant.getAllParams(),
settleDistributeRule:
settleDistributeRule || this.$refs.divisionConfig.submitParams,
reconciliationRule:
......
......@@ -165,7 +165,7 @@
</template>
<script>
import { conversationDetailPage, getPointCategory } from "@api/resident"
import { conversationDetailPage, getPointCategory, getShortUrl } from "@api/resident"
import Empty from "./Empty"
import watchScrollTrackMixin from '@/mixins/watchScrollTrackMixin'
export default {
......@@ -284,20 +284,22 @@ export default {
this.loading = false
}
},
copyText () {
async copyText () {
const { detailObj } = this,
receptionStatus = {
1: "成交",
0: "战败"
}[detailObj.receptionStatus],
{ customerName, startTime, duration, fileUrl, id } = detailObj
{ customerName, startTime, duration, fileUrl, id, merchantNo, batchId } = detailObj
// 获取短链
const _url = await getShortUrl({merchantNo, batchId})
// 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [
customerName,
startTime,
this.formatTime(duration),
receptionStatus,
fileUrl
_url
].join(" - ")
this.copyTrack = {
context: text,
......
<!-- 月度库存结算单弹窗 -->
<template>
<d2-dialog title="月度库存结算单" :is-visible="stockMonthVisible" class="stockMonthDailog" width="70%" :no-cancel="true"
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div>
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :search-select-obj="searchSelectObj"
:form-data="showFormData">
:form-data="showFormData">
<div slot="yearChoose" slot-scope="scope">
<el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy"
:clearable="false" :picker-options="pickerOption" @change="chooseYear">
:clearable="false" :picker-options="pickerOption" @change="chooseYear">
</el-date-picker>
</div>
</d2-search>
<!-- <div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div> -->
</div>
<div class="d2-container-content">
<d2-table ref="recordTable" :table-data="tableData" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :has-page="false" :has-num="false">
:before-search-fn="beforeSearchFn" :has-page="false" :has-num="false">
</d2-table>
</div>
<span class="btn-tips"><img src="../../../assets/icon-warn.png">说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量</span>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!