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) { ...@@ -24,6 +24,11 @@ export function conversationPage(data) {
data.method = `${path2}inspection.conversation.batch.page` data.method = `${path2}inspection.conversation.batch.page`
return request(data, "post") 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) { export function conversationPointPage(data) {
......
...@@ -40,6 +40,8 @@ export const routerName = { ...@@ -40,6 +40,8 @@ export const routerName = {
parentId: "91301", parentId: "91301",
label: "查看", label: "查看",
handle: "handleDetail", handle: "handleDetail",
category: "Button",
type: "primary",
addRoutePath: [ addRoutePath: [
{ {
authId: "91303", authId: "91303",
...@@ -292,7 +294,21 @@ export const routerName = { ...@@ -292,7 +294,21 @@ export const routerName = {
parentId: "913", parentId: "913",
cache: false cache: false
}, },
auth: [], auth: [
{
authId: "9130902",
parentId: "91309",
label: "新增配置",
handle: "goStatisticsPage",
addRoutePath: [
{
authId: "91311",
name: "新增配置",
parentId: "91309"
}
]
}
],
component: _import("contentManager/packageConfig/index") component: _import("contentManager/packageConfig/index")
}, },
91310: { 91310: {
...@@ -307,6 +323,17 @@ export const routerName = { ...@@ -307,6 +323,17 @@ export const routerName = {
auth: [], auth: [],
component: _import("contentManager/packageConfig/edit") component: _import("contentManager/packageConfig/edit")
}, },
91311: {
path: "/addEquity",
name: "addEquity",
meta: {
title: "新增配置",
authId: "91311",
parentId: "91309",
cache: false
},
component: _import("contentManager/packageConfig/addEquity")
},
91315: { 91315: {
path: "/customerTags", path: "/customerTags",
name: "customerTags", name: "customerTags",
...@@ -331,7 +358,7 @@ export const routerName = { ...@@ -331,7 +358,7 @@ export const routerName = {
auth: [], auth: [],
component: _import("contentManager/customerFile/index") component: _import("contentManager/customerFile/index")
}, },
9131701:{ 9131701: {
path: "/customerFileDetails", path: "/customerFileDetails",
name: "customerFileDetails", name: "customerFileDetails",
meta: { meta: {
......
...@@ -3,6 +3,9 @@ import { getAllGoodsList } from "@api/grounding" ...@@ -3,6 +3,9 @@ import { getAllGoodsList } from "@api/grounding"
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
estimatedFlow: "",
estimatedUpgradeRate: "",
operationModeAsync: "",
shelfUpdateMerchant: { shelfUpdateMerchant: {
merchantId: "", merchantId: "",
merchantName: "", merchantName: "",
...@@ -192,6 +195,15 @@ export default { ...@@ -192,6 +195,15 @@ export default {
}, },
shelfUpdateParMer(state) { shelfUpdateParMer(state) {
return state.shelfUpdateParMer 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 \ No newline at end of file
<!-- 驻店目标配置 -->
<template> <template>
<div> <div class="in-store-list-wrap">
<d2-container> <div class="header" slot="header">
<div class="header" slot="header" style="padding: 10px 20px"> <el-tabs v-model="activeName" @tab-click="handleClick">
<d2-search <el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
ref="showSearch" </el-tab-pane>
class="show-search" </el-tabs>
:search-form="searchForm" <components :is="tabName" :scene-type="activeName"></components>
:label-width="labelWidth" </div>
: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> </div>
</template> </template>
<script> <script>
import { deepClone } from "@/common/util" import UpgradeLightly from "./UpgradeLightly.vue"
import { materialPage } from "@api/contentManager" import EquityUpgrade from "./EquityUpgrade.vue"
import addDialog from "./components/addDialog"
export default { export default {
name: "StaffMassSendingIndex",
components: { components: {
addDialog UpgradeLightly,
EquityUpgrade
}, },
data() { data() {
return { return {
dialogVisible: false, activeName: "0",
labelWidth: "100px", tabPaneList: [
cloneId: null,
dialogType: "",
searchForm: {
merchantId: "",
merchantName: ""
},
searchFormSearch: {},
showFormData: [
{ {
label: "商户名称", label: "权益升级",
name: "merchantName", name: "0"
type: "input",
maxlength: "30",
isClear: true
}, },
{ {
label: "商户号", label: '轻改升级',
name: "merchantId", name: "1"
inputType: "number",
type: "input",
maxlength: "20",
isClear: true
} }
], ],
getListApi: materialPage, tabName: "EquityUpgrade"
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 ? "禁用套餐" : "启用"
}
}
]
}
} }
}, },
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: { methods: {
beforeSearchFn() { handleClick() {
return new Promise((resolve) => { const arr = {
this.searchFormSearch = deepClone(this.searchForm) 0: "EquityUpgrade",
resolve() 1: "UpgradeLightly",
}) }
}, this.tabName = arr[+this.activeName]
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> </script>
<style scoped> <style scoped lang="scss">
.count-txt { .in-store-list-wrap {
font-weight: 700; padding: 0 26px 0 20px;
color: #2a58ad;
margin: 0 2px;
}
.leftSpan { .header {
display: inline-block; ::v-deep .el-tabs__header {
box-sizing: border-box; margin: 0;
margin-right: 10px; padding: 0 20px;
}
}
} }
</style> </style>
...@@ -6,12 +6,7 @@ ...@@ -6,12 +6,7 @@
</div> </div>
<div style="padding: 20px 20px 0"> <div style="padding: 20px 20px 0">
<el-form :model="merchantInfo" label-width="250px"> <el-form :model="merchantInfo" label-width="250px">
<el-form-item <el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ width: '48%' }">
v-for="(item, index) in editFormData"
:key="index"
class="form-item"
:style="{ width: '48%' }"
>
<span slot="label" class="label">{{ item.label }}:</span> <span slot="label" class="label">{{ item.label }}:</span>
<span>{{ merchantInfo[item.name] || "-" }}{{ item.suffix }}</span> <span>{{ merchantInfo[item.name] || "-" }}{{ item.suffix }}</span>
</el-form-item> </el-form-item>
...@@ -32,13 +27,18 @@ export default { ...@@ -32,13 +27,18 @@ export default {
props: { props: {
merchantInfo: { merchantInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
watch: { watch: {
merchantInfo(val) { merchantInfo: {
this.dealInitData() handler(val, oldVal) {
if (val) {
this.dealInitData()
}
},
deep: true
} }
}, },
data() { data() {
......
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
<script> <script>
import { mapActions, mapMutations } from "vuex" import { mapActions, mapMutations } from "vuex"
import { getGoodsDetail } from "@api/shelfManage.js" import { getGoodsDetail } from "@api/shelfManage.js"
import goodTab from "../common/goodTab.vue" import goodTab from "./components/goodTab.vue"
import packageTab from "../common/packageTab.vue" import packageTab from "./components/packageTab.vue"
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
export default { export default {
name: "GoodsInfo", name: "GoodsInfo",
......
...@@ -5,43 +5,18 @@ ...@@ -5,43 +5,18 @@
<span>流量方信息</span> <span>流量方信息</span>
</div> </div>
<div style="padding: 20px"> <div style="padding: 20px">
<glsx-combi-form <glsx-combi-form class="edit-form-container" ref="editFormRef" label-width="250px" default-width="314px"
class="edit-form-container" :form-ref="editChildRef" :form-obj="editData" :form-data="editFormData" :form-rules="formRules">
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"> <div slot="merchantId" slot-scope="scope">
<el-select <el-select v-model="editData[scope.scope.name]" disabled :placeholder="scope.scope.placeholder"
v-model="editData[scope.scope.name]" @change="scope.scope.changeAttr" style="width: 274px" filterable remote reserve-keyword
disabled @visible-change="(event) => selectVisibleChange(event, scope.scope)" :remote-method="(event) => remoteMethod(event, scope.scope.searchKey, 'store')
:placeholder="scope.scope.placeholder" " v-el-select-loadmore="interestsLoadmoreMerchant">
@change="scope.scope.changeAttr" <el-option v-for="subItem in scope.scope.optionList" :key="subItem[scope.scope.optionId]"
style="width: 274px" :label="subItem[scope.scope.optionLabel]" :value="subItem[scope.scope.optionId]">
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-option>
</el-select> </el-select>
<el-button type="text" class="add-mer-btn" @click="handleAddMerchant" <el-button type="text" class="add-mer-btn" @click="handleAddMerchant">新建</el-button>
>新建</el-button
>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -70,7 +45,7 @@ export default { ...@@ -70,7 +45,7 @@ export default {
props: { props: {
editData: { editData: {
type: Object, type: Object,
default: () => {} default: () => { }
} }
}, },
...@@ -396,7 +371,7 @@ export default { ...@@ -396,7 +371,7 @@ export default {
hasAll && hasAll &&
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this[formName][index].optionLabel this[formName][index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -419,7 +394,7 @@ export default { ...@@ -419,7 +394,7 @@ export default {
hasAll && hasAll &&
this.baseData[item.optionsName].length && this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][ this.baseData[item.optionsName][0][
this[formName][index].optionLabel this[formName][index].optionLabel
] !== "全部" ] !== "全部"
) { ) {
const temp = {} const temp = {}
...@@ -677,14 +652,7 @@ export default { ...@@ -677,14 +652,7 @@ export default {
} }
}) })
}) })
// this.$refs.editFormRef.$refs[this.editChildRef].validate(
// (valid, item) => {
// console.log(valid, item)
// return valid
// }
// )
}, },
handleAddMerchant() { handleAddMerchant() {
this.$emit("addMerchant") 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 \ No newline at end of file
<!-- 2 - 分账金额设置 --> <!-- 2 - 分账金额设置 -->
<template> <template>
<div class="division-rule"> <div class="division-rule">
<el-form <el-form class="formSty" ref="divisionRuleRef" :model="form" :rules="rules" label-suffix=":" label-width="180px">
class="formSty"
ref="divisionRuleRef"
:model="form"
:rules="rules"
label-suffix=":"
label-width="180px"
>
<el-form-item label="" label-width="54px"> <el-form-item label="" label-width="54px">
<table cellpadding="0" cellspacing="0" class="table-block"> <table cellpadding="0" cellspacing="0" class="table-block">
<tr class="tableHeader"> <tr class="tableHeader">
...@@ -20,41 +13,22 @@ ...@@ -20,41 +13,22 @@
</tr> </tr>
<tr> <tr>
<td class="merchantNameTd p-b-20"> <td class="merchantNameTd p-b-20">
<p <p :title="item | filterMerchantType" v-for="(item, index) in tableSelectOptions" :key="index">
:title="item | filterMerchantType"
v-for="(item, index) in tableSelectOptions"
:key="index"
>
{{ item | filterMerchantType }} {{ item | filterMerchantType }}
</p> </p>
</td> </td>
<td <td class="p-b-20" v-for="(item, index) in radioList" :key="index + 'radioList'">
class="p-b-20" <el-form-item label-width="0" :prop="`id${item.expenseCategoryId}`" :rules="[
v-for="(item, index) in radioList" {
:key="index + 'radioList'" required: true,
> message: `请选择${item.applicationObjectName}`,
<el-form-item trigger: 'change'
label-width="0" }
:prop="`id${item.expenseCategoryId}`" ]">
:rules="[ <el-radio-group v-model="form['id' + item.expenseCategoryId]" @change="
{ (e) => handleClearValid(e, 'id' + item.expenseCategoryId)
required: true, ">
message: `请选择${item.applicationObjectName}`, <el-radio v-for="(el, index) in tableSelectOptions" :key="index" :label="+el.merchantId" />
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-radio-group>
</el-form-item> </el-form-item>
</td> </td>
...@@ -73,7 +47,7 @@ export default { ...@@ -73,7 +47,7 @@ export default {
// 列选项 // 列选项
classificationObjSelect: { classificationObjSelect: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
merchantDistributionRules: { merchantDistributionRules: {
type: Array, type: Array,
...@@ -143,9 +117,9 @@ export default { ...@@ -143,9 +117,9 @@ export default {
computed: { computed: {
radioList: function () { radioList: function () {
const obj = this.classificationObjSelect const obj = this.classificationObjSelect
let list = [], let list = []
arr = [], let arr = []
arrIdx = [1, 2, 302, 701, 4] const arrIdx = [1, 2, 302, 701, 4]
for (const key in obj) { for (const key in obj) {
obj[key].map((item) => { obj[key].map((item) => {
if ( if (
...@@ -189,7 +163,7 @@ export default { ...@@ -189,7 +163,7 @@ export default {
// immediate: true // immediate: true
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
initList() { initList() {
// console.log('initList') // console.log('initList')
...@@ -347,9 +321,12 @@ export default { ...@@ -347,9 +321,12 @@ export default {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.table-block td{
font-size :14px !important;; .table-block td {
font-size: 14px !important;
;
} }
.division-rule .table-block .el-radio { .division-rule .table-block .el-radio {
display: block; display: block;
height: 60px; height: 60px;
...@@ -360,6 +337,7 @@ export default { ...@@ -360,6 +337,7 @@ export default {
.p-b-20 { .p-b-20 {
padding-bottom: 26px !important; padding-bottom: 26px !important;
} }
.division-rule ::v-deep { .division-rule ::v-deep {
.table-block .el-radio__label { .table-block .el-radio__label {
display: none !important; 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 \ No newline at end of file
...@@ -12,17 +12,10 @@ ...@@ -12,17 +12,10 @@
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info> <base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info <shop-merchant-info ref="shopMerchant" :edit-data="merchantEditData"
ref="shopMerchant" @addMerchant="handleAddMerchant"></shop-merchant-info>
:edit-data="merchantEditData"
@addMerchant="handleAddMerchant"
></shop-merchant-info>
<!-- 流量方信息 - 新增 - 新增商户 --> <!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant <add-merchant v-if="addMerVisible" :add-mer-visible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant>
v-if="addMerVisible"
:add-mer-visible="addMerVisible"
@handleClose="handleAddMerchant"
></add-merchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
<goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info> <goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -223,10 +216,8 @@ export default { ...@@ -223,10 +216,8 @@ export default {
var params = { var params = {
businessCode: this.routeObj.businessCode, businessCode: this.routeObj.businessCode,
merchant: this.$refs.shopMerchant.editData, merchant: this.$refs.shopMerchant.editData,
settleDistributeRule: settleDistributeRule: this.$refs.divisionConfig.submitParams,
settleDistributeRule || this.$refs.divisionConfig.submitParams, reconciliationRule: this.$refs.financeConfig.submitParams
reconciliationRule:
reconciliationRule || this.$refs.financeConfig.submitParams
} }
console.log(params, "params----") console.log(params, "params----")
this.$EventBus.$emit("dataFromParent", params) this.$EventBus.$emit("dataFromParent", params)
...@@ -237,6 +228,7 @@ export default { ...@@ -237,6 +228,7 @@ export default {
console.log(res, "res----") console.log(res, "res----")
this.basicInfo = res.basicInfo || {} this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {} this.merchantEditData = res.createBusinessApproveMerchant || {}
this.SET_DATA({ this.SET_DATA({
name: "shelfUpdateMerchant", name: "shelfUpdateMerchant",
data: { data: {
......
...@@ -11,18 +11,12 @@ ...@@ -11,18 +11,12 @@
<d2-container class="edit-contract" v-loading="isLoad"> <d2-container class="edit-contract" v-loading="isLoad">
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info> <base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info <multilateralShopMerchant ref="multilateralShopMerchant" :merchants-list="merchantEditData"
ref="shopMerchant" @addMerchant="handleAddMerchant"></multilateralShopMerchant>
:edit-data="merchantEditData"
@addMerchant="handleAddMerchant"
></shop-merchant-info>
<!-- 流量方信息 - 新增 - 新增商户 --> <!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant <add-merchant v-if="addMerVisible" :add-mer-visible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant>
v-if="addMerVisible"
:add-mer-visible="addMerVisible"
@handleClose="handleAddMerchant"
></add-merchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
<goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info> <goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -45,10 +39,11 @@ ...@@ -45,10 +39,11 @@
<script> <script>
import { mapActions, mapMutations } from "vuex" import { mapActions, mapMutations } from "vuex"
import BaseInfo from "./components/editCon/BaseInfo.vue" 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 AddMerchant from "./components/editCon/AddMerchant"
import GoodsInfo from "./components/editCon/GoodsInfo.vue" 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 FinanceConfig from "./components/editCon/FinanceConfig.vue"
import { import {
getBusisDetailBasic, getBusisDetailBasic,
...@@ -67,7 +62,7 @@ export default { ...@@ -67,7 +62,7 @@ export default {
isLoad: true, isLoad: true,
addMerVisible: false, addMerVisible: false,
basicInfo: {}, basicInfo: {},
merchantEditData: {}, merchantEditData: [],
editData: { editData: {
merchantName: "" merchantName: ""
}, },
...@@ -84,11 +79,12 @@ export default { ...@@ -84,11 +79,12 @@ export default {
components: { components: {
BaseInfo, BaseInfo,
ShopMerchantInfo, // ShopMerchantInfo,
AddMerchant, AddMerchant,
GoodsInfo, GoodsInfo,
DivisionConfig, DivisionConfig,
FinanceConfig FinanceConfig,
multilateralShopMerchant
}, },
mounted() { mounted() {
this.routeObj = this.$route.query this.routeObj = this.$route.query
...@@ -128,7 +124,11 @@ export default { ...@@ -128,7 +124,11 @@ export default {
.then((res) => { .then((res) => {
console.log(res, "res----") console.log(res, "res----")
this.basicInfo = res.basicInfo || {} 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", { // this.$EventBus.$emit("shelfUpdatMerchantId", {
// merchantId: this.merchantEditData.merchantId, // merchantId: this.merchantEditData.merchantId,
// merchantName: this.merchantEditData.merchantName, // merchantName: this.merchantEditData.merchantName,
...@@ -137,9 +137,9 @@ export default { ...@@ -137,9 +137,9 @@ export default {
this.SET_DATA({ this.SET_DATA({
name: "shelfUpdateMerchant", name: "shelfUpdateMerchant",
data: { data: {
merchantId: this.merchantEditData.merchantId, merchantId: this.merchantEditData[0].merchantId,
merchantName: this.merchantEditData.merchantName, merchantName: this.merchantEditData[0].merchantName,
scene: this.merchantEditData.sceneType scene: this.merchantEditData[0].sceneType
} }
}) })
}) })
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
// 返回测算数据 // 返回测算数据
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.submit() const financeSubmitResult = await this.$refs.financeConfig.submit()
const merchantSubmitResult = await this.$refs.shopMerchant.submit() const merchantSubmitResult = await this.$refs.multilateralShopMerchant.submit()
if ( if (
!merchantSubmitResult || !merchantSubmitResult ||
!divisionSubmitResult || !divisionSubmitResult ||
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
} }
var params = { var params = {
businessCode: this.routeObj.businessCode, businessCode: this.routeObj.businessCode,
merchant: this.$refs.shopMerchant.editData, merchant: this.$refs.multilateralShopMerchant.getAllParams(),
settleDistributeRule: this.$refs.divisionConfig.submitParams, settleDistributeRule: this.$refs.divisionConfig.submitParams,
reconciliationRule: this.$refs.financeConfig.submitParams reconciliationRule: this.$refs.financeConfig.submitParams
} }
...@@ -176,9 +176,10 @@ export default { ...@@ -176,9 +176,10 @@ export default {
if (confirmType == "save") { if (confirmType == "save") {
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
const financeSubmitResult = await this.$refs.financeConfig.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() const goodsInfoSubmitResult = await this.$refs.goodsInfo.submit()
// return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult) // return console.log("goodsInfoSubmitResult", goodsInfoSubmitResult)
console.log(merchantSubmitResult, 'merchantSubmitResult')
if ( if (
!merchantSubmitResult || !merchantSubmitResult ||
!divisionSubmitResult || !divisionSubmitResult ||
...@@ -200,7 +201,7 @@ export default { ...@@ -200,7 +201,7 @@ export default {
businessCode: this.routeObj.businessCode, businessCode: this.routeObj.businessCode,
goods: this.$refs.goodsInfo.submitParamsGoods(), goods: this.$refs.goodsInfo.submitParamsGoods(),
packages: this.$refs.goodsInfo.submitParamsPackages(), packages: this.$refs.goodsInfo.submitParamsPackages(),
merchant: this.$refs.shopMerchant.editData, merchant: this.$refs.multilateralShopMerchant.getAllParams(),
settleDistributeRule: settleDistributeRule:
settleDistributeRule || this.$refs.divisionConfig.submitParams, settleDistributeRule || this.$refs.divisionConfig.submitParams,
reconciliationRule: reconciliationRule:
......
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
</template> </template>
<script> <script>
import { conversationDetailPage, getPointCategory } from "@api/resident" import { conversationDetailPage, getPointCategory, getShortUrl } from "@api/resident"
import Empty from "./Empty" import Empty from "./Empty"
import watchScrollTrackMixin from '@/mixins/watchScrollTrackMixin' import watchScrollTrackMixin from '@/mixins/watchScrollTrackMixin'
export default { export default {
...@@ -284,20 +284,22 @@ export default { ...@@ -284,20 +284,22 @@ export default {
this.loading = false this.loading = false
} }
}, },
copyText () { async copyText () {
const { detailObj } = this, const { detailObj } = this,
receptionStatus = { receptionStatus = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
}[detailObj.receptionStatus], }[detailObj.receptionStatus],
{ customerName, startTime, duration, fileUrl, id } = detailObj { customerName, startTime, duration, fileUrl, id, merchantNo, batchId } = detailObj
// 获取短链
const _url = await getShortUrl({merchantNo, batchId})
// 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址 // 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [ let text = [
customerName, customerName,
startTime, startTime,
this.formatTime(duration), this.formatTime(duration),
receptionStatus, receptionStatus,
fileUrl _url
].join(" - ") ].join(" - ")
this.copyTrack = { this.copyTrack = {
context: text, context: text,
......
<!-- 月度库存结算单弹窗 --> <!-- 月度库存结算单弹窗 -->
<template> <template>
<d2-dialog title="月度库存结算单" :is-visible="stockMonthVisible" class="stockMonthDailog" width="70%" :no-cancel="true" <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>
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :search-select-obj="searchSelectObj" <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"> <div slot="yearChoose" slot-scope="scope">
<el-date-picker v-model="searchForm.year" type="year" placeholder="选择年" value-format="yyyy" format="yyyy" <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> </el-date-picker>
</div> </div>
</d2-search> </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>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table ref="recordTable" :table-data="tableData" :search-form="searchFormSearch" :table-params="tableParams" <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> </d2-table>
</div> </div>
<span class="btn-tips"><img src="../../../assets/icon-warn.png">说明:月平均加权单价=上月结存库存金额+本月采购金额/上月结存库存数量+本月采购数量</span> <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!