Commit d4baac8b by 张立顺

feat 嘀加上架方法优化

1 parent 3cd06059
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
Object.values(localRoutes).forEach((item, index) => { Object.values(localRoutes).forEach((item, index) => {
this.routerPath.push(item.meta) this.routerPath.push(item.meta)
}) })
console.log("this.$route", this.$route) // console.log("this.$route", this.$route)
var targetItem = this.$route.matched var targetItem = this.$route.matched
this.findTitle(targetItem[targetItem.length - 1]?.meta) this.findTitle(targetItem[targetItem.length - 1]?.meta)
this.getInfo() this.getInfo()
......
...@@ -10,191 +10,6 @@ export const routerName = { ...@@ -10,191 +10,6 @@ export const routerName = {
cache: false cache: false
} }
}, },
// 90301: {
// path: "/product",
// name: "product",
// meta: {
// title: "素材管理",
// authId: "90301",
// parentId: "903",
// cache: false
// },
// auth: [
// {
// authId: "9030101",
// parentId: "90301",
// label: "新增素材",
// category: "Button",
// type: "primary",
// handle: "handleAdd",
// addRoutePath: [
// {
// authId: "90304",
// name: "素材编辑",
// parentId: "90301"
// }
// ]
// },
// {
// authId: "9030103",
// parentId: "90301",
// label: "导出",
// category: "Button",
// handle: "handleExport"
// },
// {
// authId: "9030102",
// parentId: "90301",
// label: "修改",
// handle: "handleEdit",
// addRoutePath: [
// {
// authId: "90304",
// name: "素材编辑",
// parentId: "90301"
// }
// ]
// },
// {
// authId: "9030104",
// parentId: "90301",
// label: "删除",
// handle: "handleUpOrDown",
// ruleObj: {
// attr: "status",
// rule: {
// 0: "使用",
// 1: "删除"
// }
// }
// }
// ],
// component: _import("goods/product")
// },
// 90302: {
// path: "/commodity",
// name: "commodity",
// meta: {
// title: "商品管理",
// authId: "90302",
// parentId: "903",
// cache: false
// },
// auth: [
// {
// authId: "9030201",
// parentId: "90302",
// label: "新增商品",
// category: "Button",
// type: "primary",
// handle: "handleAdd",
// addRoutePath: [
// {
// authId: "90305",
// name: "商品编辑",
// parentId: "90302"
// }
// ]
// },
// {
// authId: "9030202",
// parentId: "90302",
// label: "导出",
// category: "Button",
// handle: "handleExport"
// },
// {
// authId: "9030203",
// parentId: "90302",
// label: "编辑",
// handle: "handleEdit",
// addRoutePath: [
// {
// authId: "90305",
// name: "商品编辑",
// parentId: "90302"
// }
// ]
// // judgeShow: true
// },
// {
// authId: "9030205",
// parentId: "90302",
// label: "上架",
// handle: "handleUpOrDown",
// // judgeShow: true,
// ruleObj: {
// attr: "status",
// rule: {
// 0: "上架",
// 1: "下架"
// }
// }
// },
// {
// authId: "9030206",
// parentId: "90302",
// label: "删除",
// // judgeShow: true,
// handle: "handleDelete"
// },
// {
// authId: "9030207",
// parentId: "90302",
// label: "审核",
// category: "Button",
// handle: "handleExamine"
// },
// {
// authId: "9030208",
// parentId: "90302",
// label: "单独上架",
// handle: "handleUpOrDownForChild",
// // judgeShow: true,
// ruleObj: {
// attr: "status",
// rule: {
// 0: "单独上架",
// 1: "单独下架"
// }
// }
// },
// {
// authId: "9030209",
// parentId: "90302",
// label: "商品别名设置",
// handle: "handleSettingShopAlias"
// }
// ],
// component: _import("goods/commodity")
// },
// 90304: {
// path: "/editProduct",
// name: "editProduct",
// meta: {
// title: "素材编辑",
// authId: "90304",
// parentId: "90301",
// cache: false,
// sideHidden: true,
// activePath: "/product"
// },
// component: _import("goods/editProduct")
// },
// 90305: {
// path: "/editCommodity",
// name: "editCommodity",
// meta: {
// title: "商品编辑",
// authId: "90305",
// parentId: "90302",
// // cache: false,
// sideHidden: true,
// activePath: "/commodity"
// },
// component: _import("goods/editCommodity")
// },
90307: { 90307: {
path: "/productManage", path: "/productManage",
name: "productManage", name: "productManage",
...@@ -664,6 +479,11 @@ export const routerName = { ...@@ -664,6 +479,11 @@ export const routerName = {
authId: "9031307", authId: "9031307",
name: "运营确认", name: "运营确认",
parentId: "90313" parentId: "90313"
},
{
authId: "9031308",
name: "运营确认",
parentId: "90313"
} }
] ]
}, },
...@@ -724,5 +544,17 @@ export const routerName = { ...@@ -724,5 +544,17 @@ export const routerName = {
activePath: "/shelfManage" activePath: "/shelfManage"
}, },
component: _import("goods/shelfManage/editContract") component: _import("goods/shelfManage/editContract")
},
9031308: {
path: "/editMultilateralContract",
name: "editMultilateralContract",
meta: {
title: "运营确认",
authId: "9031308",
parentId: "90313",
sideHidden: true,
activePath: "/shelfManage"
},
component: _import("goods/shelfManage/editMultilateralContract")
} }
} }
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
// // 列表搜索框状态
// active: true
goodsSource: [], // 财务商品来源 goodsSource: [], // 财务商品来源
goodsSourceReconciliation: [] // 对账 goodsSourceReconciliation: [] // 对账
}, },
......
import { getGoodsCategoryConfiguration } from "@/api/sys.base.js"
import { getAllGoodsList } from "@api/grounding"
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
shelfUpdateMerchant: {
merchantId: "",
merchantName: "",
scene: ""
},
shelfUpdateParMer: {},
shelfUpdateContractMer: {},
operationMode: "",
packageNoticeList: [], // 套餐数据
// 商品数据 // 商品数据
goodsInfoData: { goodsInfoData: {
id: '', id: "",
baseGoodsId: '', baseGoodsId: "",
sapCode: '', sapCode: "",
supplierCode: '', supplierCode: "",
supplierName: '', supplierName: "",
sceneName: '', sceneName: "",
sceneType: '', sceneType: "",
goodsName: '', goodsName: "",
baseGoodsName: '', baseGoodsName: "",
goodsCode: '', goodsCode: "",
brandMerchantName: '', brandMerchantName: "",
specificationType: '1', specificationType: "1",
thumbUrl: [], thumbUrl: [],
goodsTypeName: '', goodsTypeName: "",
goodsImgList: [], goodsImgList: [],
goodsId: [], goodsId: [],
specificationDetailList: [], specificationDetailList: [],
upgradeGoodsList: [], upgradeGoodsList: [],
distributionType: '0', distributionType: "0",
goodsSpecificationNameList: [], goodsSpecificationNameList: [],
status: '', status: "",
goodsSpecificationList: [], goodsSpecificationList: [],
goodsPositionList: [], goodsPositionList: [],
applicableModelNames: '', applicableModelNames: "",
positionNames: '', positionNames: "",
shoppingMallFlag: '0', shoppingMallFlag: "0",
goodsSpecificationSingleList: [], goodsSpecificationSingleList: [],
specificationSingleDetailList: [], specificationSingleDetailList: [],
selectedSceneCode: '', selectedSceneCode: "",
goodsType: '', goodsType: "",
baseGoodsNameEmpty: false, baseGoodsNameEmpty: false,
scrmFlag: 'N' scrmFlag: "N"
} },
promiseGetGoodsCategoryConfiguration: null,
goodsCategoryConfigurationList: null,
isLoadingGoodsCategoryConfiguration: false, // 加载状态
promiseGetGoods: null,
goods: null,
isLoadingGoods: false, // 加载状态
merchantSettleDistributeRuleLastRule: null
}, },
mutations: { mutations: {
/** /**
...@@ -44,13 +62,136 @@ export default { ...@@ -44,13 +62,136 @@ export default {
*/ */
setUpdateGoodsInfo(state, data) { setUpdateGoodsInfo(state, data) {
state.goodsInfoData = Object.assign(state.goodsInfoData, data) state.goodsInfoData = Object.assign(state.goodsInfoData, data)
},
SET_DATA(state, { data, name }) {
state[name] = data
},
SET_LOADING(state, { isLoading, name }) {
state[name] = isLoading
},
SET_ERROR(state, error) {
state.error = error
},
SET_PROMISE(state, { promise, name }) {
state[name] = promise
} }
}, },
actions: { actions: {
// ...原有fetchCategoryList
async refreshCategoryList({ commit, dispatch }) {
// 清空旧数据
commit("SET_DATA", {
data: null,
name: "goodsCategoryConfigurationList"
})
dispatch("getGoodsCategoryConfiguration") // 重新请求
// 清空旧数据
commit("SET_DATA", {
data: null,
name: "goods"
})
dispatch("getGoods") // 重新请求
},
async getGoodsCategoryConfiguration({ commit, state }) {
if (state.goodsCategoryConfigurationList) {
return state.goodsCategoryConfigurationList
}
// 正在请求,返回现有Promise
if (state.promiseGetGoodsCategoryConfiguration) {
return state.promiseGetGoodsCategoryConfiguration
}
try {
commit("SET_LOADING", {
isLoading: true,
name: "isLoadingGoodsCategoryConfiguration"
})
const promise = getGoodsCategoryConfiguration({}) // 替换为你的API调用
commit("SET_PROMISE", {
promise,
name: "promiseGetGoodsCategoryConfiguration"
})
const response = await promise
commit("SET_DATA", {
data: response.list,
name: "goodsCategoryConfigurationList"
})
return response.list
} finally {
commit("SET_LOADING", {
isLoading: false,
name: "isLoadingGoodsCategoryConfiguration"
})
commit("SET_PROMISE", {
promise: null,
name: "promiseGetGoodsCategoryConfiguration"
}) // 清除Promise
}
},
async getGoods({ commit, state }) {
if (state.goods) {
return state.goods
}
// 正在请求,返回现有Promise
if (state.promiseGetGoods) {
return state.promiseGetGoods
}
try {
commit("SET_LOADING", {
isLoading: true,
name: "isLoadingGoods"
})
const promise = getAllGoodsList({
currentPage: 20,
pageSize: 1,
statusList: [1],
sceneTypeList: [0]
}) // 替换为你的API调用
commit("SET_PROMISE", {
promise,
name: "promiseGetGoods"
})
const response = await promise
console.log(response, "getGoods")
commit("SET_DATA", {
data: response,
name: "goods"
})
return response
} finally {
commit("SET_LOADING", {
isLoading: false,
name: "isLoadingGoods"
})
commit("SET_PROMISE", {
promise: null,
name: "promiseGetGoods"
}) // 清除Promise
}
}
}, },
getters: { getters: {
getGoodsInfoData(state) { getGoodsInfoData(state) {
return state.goodsInfoData return state.goodsInfoData
},
merchantSettleDistributeRuleLastRuleInfo(state) {
return state.merchantSettleDistributeRuleLastRule
},
packageNoticeList(state) {
return state.packageNoticeList
},
operationMode(state) {
return state.operationMode
},
shelfUpdateContractMer(state) {
return state.shelfUpdateContractMer
},
shelfUpdateMerchant(state) {
return state.shelfUpdateMerchant
},
shelfUpdateParMer(state) {
return state.shelfUpdateParMer
} }
} }
} }
...@@ -466,7 +466,7 @@ export default { ...@@ -466,7 +466,7 @@ export default {
_formData.upgradeGoods = deepClone(_formData.upgradeGoods_temporary) _formData.upgradeGoods = deepClone(_formData.upgradeGoods_temporary)
this.formData = deepClone(_formData) this.formData = deepClone(_formData)
this.oldVal = deepClone(_formData) this.oldVal = deepClone(_formData)
console.log("this.formData", this.formData) // console.log("this.formData", this.formData)
}, },
calculation() { calculation() {
......
...@@ -3,51 +3,46 @@ ...@@ -3,51 +3,46 @@
<div class="edit-page goods-info"> <div class="edit-page goods-info">
<div class="title"> <div class="title">
<span>上架商品</span> <span>上架商品</span>
<!-- <span class="addBtnSpan"
><el-button
type="primary"
size="small"
icon="el-icon-plus"
@click="addPop"
>新增</el-button
></span
> -->
</div> </div>
<div class="check-tab"> <div class="check-tab">
<el-tabs v-model="tabsValue" type="card" class="my-tab-pane"> <el-tabs v-model="tabsValue" type="card" class="my-tab-pane">
<el-tab-pane v-for="(item, idx) in goodTabs" :key="item.name" :name="item.name"> <el-tab-pane
<span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title ? v-for="(item, idx) in goodTabs"
item.title + (idx + 1) : item.goodsName }} :key="item.name"
:name="item.name"
>
<span slot="label"
><i
class="el-icon-warning car-error-txt"
v-if="item.valiadError == 'Y'"
/>{{ item.title ? item.title + (idx + 1) : item.goodsName }}
</span> </span>
<span> <span>
<good-tab :info="item.info" :tab-idx="item.tabIndex" /> <good-tab :info="item.info" :tab-idx="item.tabIndex" />
</span> </span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-for="(item, idx) in packageTabs" :key="item.name" :label="item.title" :name="item.name"> <el-tab-pane
<span slot="label"><i class="el-icon-warning car-error-txt" v-if="item.valiadError == 'Y'" />{{ item.title ? v-for="(item, idx) in packageTabs"
item.title + (idx + 1) : item.goodsName }} :key="item.name"
:label="item.title"
:name="item.name"
>
<span slot="label"
><i
class="el-icon-warning car-error-txt"
v-if="item.valiadError == 'Y'"
/>{{ item.title ? item.title + (idx + 1) : item.goodsName }}
</span> </span>
<span> <span>
<package-tab :info="item.info" :tab-idx="item.tabIndex" @packageEditInfo="getPackageEditInfo_notice" /> <package-tab
:info="item.info"
:tab-idx="item.tabIndex"
@packageEditInfo="getPackageEditInfo_notice"
/>
</span> </span>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane key="add"
name="add"> -->
<!-- //这是增加的按钮 -->
<!-- <span slot="label"
style="padding: 8px; font-size: 20px; font-weight: bold">+</span>
</el-tab-pane> -->
</el-tabs> </el-tabs>
</div> </div>
<!-- <div style="padding: 20px;">
<div>啦啦啦</div>
</div> -->
<d2-dialog title="选择商品或套餐" v-if="chooseVisible" :is-visible="chooseVisible" @closeDialog="handleSignClose"
@confirmDialog="handleConfirmSign">
<glsx-combi-form :is-block="true" class="edit-form-container" ref="editFormRef" label-width="220px"
default-width="400px" :form-obj="integralForm" :form-data="integralFormData">
</glsx-combi-form>
</d2-dialog>
</div> </div>
</template> </template>
...@@ -71,25 +66,6 @@ export default { ...@@ -71,25 +66,6 @@ export default {
data() { data() {
// 这里存放数据 // 这里存放数据
return { return {
chooseVisible: false,
integralForm: {
goodItem: "1"
},
integralFormData: [
{
label: "新增选择",
name: "goodItem",
type: "radio",
optionId: "confId",
optionLabel: "confName",
optionList: [
{ confId: "1", confName: "商品" },
{ confId: "2", confName: "套餐" }
],
handleRadioChange: (val) => { }
}
],
tabsValue: "1", tabsValue: "1",
currentIndex: 1, currentIndex: 1,
addIndex: 1, addIndex: 1,
...@@ -110,9 +86,6 @@ export default { ...@@ -110,9 +86,6 @@ export default {
this.getDetail() this.getDetail()
}, },
methods: { methods: {
submitParamsPackages() {
return this.goodsInfo.packageGoodsList
},
getDetail() { getDetail() {
console.log("getGoodsDetail") console.log("getGoodsDetail")
// this.recordId // this.recordId
...@@ -154,143 +127,13 @@ export default { ...@@ -154,143 +127,13 @@ export default {
console.log(err) console.log(err)
}) })
}, },
addPop() {
this.chooseVisible = true
},
handleSignClose() {
this.chooseVisible = false
},
handleConfirmSign() {
this.chooseVisible = false
this.addTab(this.integralForm.goodItem)
},
/* 活动标签切换时触发 */ /* 活动标签切换时触发 */
beforeLeave(currentName, oldName) { beforeLeave(currentName, oldName) {
// console.log("currentName", currentName) // console.log("currentName", currentName)
// 通过tab标签的切换事件触发增加的函数 // 通过tab标签的切换事件触发增加的函数
// 如果name是add,则调用增加tab的函数 // 如果name是add,则调用增加tab的函数
// if (currentName == "add") {
// // this.addTab()
// this.addPop()
// return false
// } else {
this.currentIndex = currentName this.currentIndex = currentName
// }
},
addTab(goodType) {
// 根据已有的tab,再增减
if (goodType == 1) {
// 商品
const length = this.goodTabs.length
// this.tabIndex = length + 1
// this.addIndex = length + 1
// this.goodTabs = this.goodTabs.map((item, index) => {
// item.name = index + 1 + ''
// return item
// })
// const newTabIndex = ++this.tabIndex + ""
const tabIndex =
length == 0 ? length : this.goodTabs[length - 1].tabIndex + 1
this.goodTabs.push({
// title: "商品名称" + this.addIndex++,
title: "商品名称",
// name: 'good_' + newTabIndex,
name: "good_" + tabIndex,
tabIndex: tabIndex,
info: {}
})
// this.tabsValue = 'good_' + newTabIndex
// this.currentIndex = 'good_' + newTabIndex
this.tabsValue = "good_" + tabIndex
} else {
// 套餐
const length = this.packageTabs.length
// this.tabIndex = length + 1
// this.addIndex = length + 1
// const newTabIndex = ++this.tabIndex + ""
const tabIndex =
length == 0 ? length : this.packageTabs[length - 1].tabIndex + 1
this.packageTabs.push({
// title: "套餐名称" + this.addIndex++,
title: "套餐名称",
name: "package_" + tabIndex,
tabIndex: tabIndex,
info: null
})
// this.tabsValue = 'package_' + newTabIndex
// this.currentIndex = 'package_' + newTabIndex
this.tabsValue = "package_" + tabIndex
}
},
confirmRemove(targetName) {
// 删除tab
this.$confirm("确认删除标签页吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false // 是否可以点击空白处关闭弹窗
})
.then(() => {
// 确认切换标签页
this.removeTab(targetName)
})
.catch(() => {
// 取消切换标签页
this.$message({
type: "info",
message: "已取消删除"
})
})
},
removeTab(targetName) {
const self = this
let activeName = self.tabsValue
let tabs
if (targetName.split("_")[0] == "good") {
tabs = self.goodTabs
} else {
tabs = self.packageTabs
}
if (activeName === targetName) {
tabs.forEach((tab, index) => {
if (tab.name === targetName) {
const nextTab = tabs[index + 1] || tabs[index - 1]
console.log("tab.name", tab.name)
console.log("nextTab", nextTab)
if (nextTab) {
activeName = nextTab.name
} else {
if (tab.name.split("_")[0] == "good") {
if (
self.packageTabs.length > 0 &&
self.packageTabs[self.packageTabs.length - 1].name
) {
activeName =
self.packageTabs[self.packageTabs.length - 1].name
}
} else {
if (
self.goodTabs.length > 0 &&
self.goodTabs[self.goodTabs.length - 1].name
) {
activeName = self.goodTabs[self.goodTabs.length - 1].name
}
}
}
}
})
}
this.tabsValue = activeName
if (targetName.split("_")[0] == "good") {
this.goodTabs = tabs.filter((tab) => tab.name !== targetName)
} else {
this.packageTabs = tabs.filter((tab) => tab.name !== targetName)
}
this.packageNotice()
}, },
// 填写套餐名称时通知 // 填写套餐名称时通知
getPackageEditInfo_notice(obj) { getPackageEditInfo_notice(obj) {
console.log("obj", obj) console.log("obj", obj)
...@@ -313,8 +156,6 @@ export default { ...@@ -313,8 +156,6 @@ export default {
this.packageInfoList.push(o) this.packageInfoList.push(o)
} }
}) })
console.log("this.packageInfoList", this.packageInfoList)
this.$EventBus.$emit("packageInfoList", this.packageInfoList)
} }
} }
} }
......
...@@ -393,7 +393,7 @@ export default { ...@@ -393,7 +393,7 @@ export default {
_formData.upgradeGoods = deepClone(_formData.upgradeGoods_temporary) _formData.upgradeGoods = deepClone(_formData.upgradeGoods_temporary)
this.formData = deepClone(_formData) this.formData = deepClone(_formData)
this.oldVal = deepClone(_formData) this.oldVal = deepClone(_formData)
console.log("this.formData", this.formData) // console.log("this.formData", this.formData)
}, },
// 处理金额补零 // 处理金额补零
priceFilter(num) { priceFilter(num) {
......
...@@ -4,10 +4,14 @@ ...@@ -4,10 +4,14 @@
<div class="title"> <div class="title">
<span>基础信息</span> <span>基础信息</span>
</div> </div>
<div style="padding: 20px 20px 0;"> <div style="padding: 20px 20px 0">
<el-form :model="basicInfo" label-width="150px"> <el-form :model="basicInfo" label-width="150px">
<el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" <el-form-item
:style="{ 'width': [2, 7].includes(item.inputType) ? '100%' : '48%' }"> v-for="(item, index) in editFormData"
:key="index"
class="form-item"
:style="{ width: [2, 7].includes(item.inputType) ? '100%' : '48%' }"
>
<span slot="label" class="label">{{ item.title }}:</span> <span slot="label" class="label">{{ item.title }}:</span>
<div v-if="item.inputType == 7"> <div v-if="item.inputType == 7">
<div v-if="item.fileList.length == 0">-</div> <div v-if="item.fileList.length == 0">-</div>
...@@ -20,7 +24,7 @@ ...@@ -20,7 +24,7 @@
</div> </div>
</div> </div>
</div> </div>
<span v-else>{{ item.showValue || '-' }}</span> <span v-else>{{ item.showValue || "-" }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -29,11 +33,11 @@ ...@@ -29,11 +33,11 @@
<script> <script>
export default { export default {
name: 'BaseInfo', name: "BaseInfo",
props: { props: {
basicInfo: { basicInfo: {
type: Object, type: Object,
default: () => { } default: () => {}
} }
}, },
...@@ -54,27 +58,27 @@ export default { ...@@ -54,27 +58,27 @@ export default {
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
dealFormData() { dealFormData() {
this.editFormData = JSON.parse(this.basicInfo.basicApproveInfo) this.editFormData = JSON.parse(this.basicInfo.basicApproveInfo)
this.editFormData.forEach(item => { this.editFormData.forEach((item) => {
// 直接展示 // 直接展示
if ([1, 2, 3, 4].includes(item.inputType)) { if ([1, 2, 3, 4].includes(item.inputType)) {
item.showValue = item.value item.showValue = item.value
} else if (item.inputType == 5) { } else if (item.inputType == 5) {
// 单选 // 单选
item.showValue = item.options.find(k => k.key == item.value)?.value || '' item.showValue =
item.options.find((k) => k.key == item.value)?.value || ""
} else if (item.inputType == 6) { } else if (item.inputType == 6) {
// 多选 // 多选
console.log(item.value, 'item.value') // console.log(item.value, 'item.value')
const list = item.value.split(',') const list = item.value.split(",")
item.showValue = '' item.showValue = ""
list.forEach((m, idx) => { list.forEach((m, idx) => {
let label = item.options.find(k => k.key == m)?.value || '' let label = item.options.find((k) => k.key == m)?.value || ""
item.showValue = item.showValue + (idx != 0 ? (',' + label) : label) item.showValue = item.showValue + (idx != 0 ? "," + label : label)
}) })
} else if (item.inputType == 7) { } else if (item.inputType == 7) {
// 附件 // 附件
...@@ -82,30 +86,36 @@ export default { ...@@ -82,30 +86,36 @@ export default {
if (this.basicInfo.goodsCreateExcel) { if (this.basicInfo.goodsCreateExcel) {
item.fileList.push({ item.fileList.push({
url: this.basicInfo.goodsCreateExcel, url: this.basicInfo.goodsCreateExcel,
fileName: this.basicInfo.goodsCreateExcel.split('/')[this.basicInfo.goodsCreateExcel.split('/').length - 1] fileName:
this.basicInfo.goodsCreateExcel.split("/")[
this.basicInfo.goodsCreateExcel.split("/").length - 1
]
}) })
} }
if (this.basicInfo.submitGoodsCreateExcel) { if (this.basicInfo.submitGoodsCreateExcel) {
item.fileList.push({ item.fileList.push({
url: this.basicInfo.submitGoodsCreateExcel, url: this.basicInfo.submitGoodsCreateExcel,
fileName: this.basicInfo.submitGoodsCreateExcel.split('/')[this.basicInfo.goodsCreateExcel.split('/').length - 1] fileName:
this.basicInfo.submitGoodsCreateExcel.split("/")[
this.basicInfo.goodsCreateExcel.split("/").length - 1
]
}) })
} }
// console.log(item.value, 'item.value') // console.log(item.value, 'item.value')
const valueList = item.value ? item.value.split(',') : [] const valueList = item.value ? item.value.split(",") : []
valueList.forEach((k, kIdx) => { valueList.forEach((k, kIdx) => {
if (k) { if (k) {
item.fileList.push({ item.fileList.push({
url: k, url: k,
fileName: k.split('/')[k.split('/').length - 1] fileName: k.split("/")[k.split("/").length - 1]
}) })
} }
}) })
} }
}) })
} }
}, }
}; }
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../style/editdetailCon.scss"; @import "../../style/editdetailCon.scss";
......
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
</template> </template>
<script> <script>
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 "../common/goodTab.vue"
import packageTab from "../common/packageTab.vue" import packageTab from "../common/packageTab.vue"
...@@ -104,7 +105,7 @@ export default { ...@@ -104,7 +105,7 @@ export default {
name: "GoodsInfo", name: "GoodsInfo",
props: { props: {
recordId: { recordId: {
type: Number, type: [String, Number],
default: null default: null
} }
}, },
...@@ -155,6 +156,7 @@ export default { ...@@ -155,6 +156,7 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
...mapMutations("goodsInfoData", ["SET_DATA"]),
submitParamsGoods() { submitParamsGoods() {
this.goodInfoList = [] this.goodInfoList = []
this.goodTabs.forEach((item, idx) => { this.goodTabs.forEach((item, idx) => {
...@@ -170,7 +172,7 @@ export default { ...@@ -170,7 +172,7 @@ export default {
const info = this.$refs["packageTabRef" + idx][0].returnThisTabDate() const info = this.$refs["packageTabRef" + idx][0].returnThisTabDate()
this.packageInfoList.push(info) this.packageInfoList.push(info)
}) })
console.log("this.packageInfoList", this.packageInfoList) // console.log("this.packageInfoList", this.packageInfoList)
return this.packageInfoList return this.packageInfoList
}, },
submit() { submit() {
...@@ -382,7 +384,7 @@ export default { ...@@ -382,7 +384,7 @@ export default {
this.packageNoticeList = [] this.packageNoticeList = []
this.packageTabs.forEach((item) => { this.packageTabs.forEach((item) => {
if (item.info) { if (item.info) {
console.log(item) // console.log(item)
const o = { const o = {
name: item.info.packageName, name: item.info.packageName,
virtualCode: item.info.timeId, virtualCode: item.info.timeId,
...@@ -393,7 +395,8 @@ export default { ...@@ -393,7 +395,8 @@ export default {
} }
}) })
console.log("this.packageInfoList", this.packageNoticeList) console.log("this.packageInfoList", this.packageNoticeList)
this.$EventBus.$emit("packageInfoList", this.packageNoticeList) this.SET_DATA({ name: "packageNoticeList", data: this.packageNoticeList })
// this.$EventBus.$emit("packageInfoList", this.packageNoticeList)
} }
} }
} }
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
</template> </template>
<script> <script>
import { mapActions, mapMutations } from "vuex"
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import { sceneCodeList } from "@/common/constants.js" import { sceneCodeList } from "@/common/constants.js"
...@@ -112,7 +113,6 @@ export default { ...@@ -112,7 +113,6 @@ export default {
editFormData: [ editFormData: [
{ {
label: "流量方信息", label: "流量方信息",
name: "merchantId", name: "merchantId",
addHtml: "merchantId", addHtml: "merchantId",
style: { width: "42%" }, style: { width: "42%" },
...@@ -124,20 +124,25 @@ export default { ...@@ -124,20 +124,25 @@ export default {
searchKey: "merchantNameKeyword", searchKey: "merchantNameKeyword",
changeAttr: (value) => { changeAttr: (value) => {
this.getMerchantLevel() this.getMerchantLevel()
// this.baseData.pointTypeOpt = []
if (value) { if (value) {
const merchantName = this.baseData.merchantList.find( const merchantName = this.baseData.merchantList.find(
(item) => item.merchantId == value (item) => item.merchantId == value
).merchantName ).merchantName
this.editData.merchantName = merchantName this.editData.merchantName = merchantName
this.$EventBus.$emit("shelfUpdatMerchantId", { this.SET_DATA({
name: "shelfUpdateMerchant",
data: {
merchantId: value, merchantId: value,
merchantName: merchantName, merchantName: merchantName,
scene: this.editData.sceneType scene: this.editData.sceneType
}
}) })
// this.$EventBus.$emit("shelfUpdatMerchantId", {
// merchantId: value,
// merchantName: merchantName,
// scene: this.editData.sceneType
// })
} }
// this.editData.pointType = ""
// this.getOptionsList('editFormData', false)
} }
}, },
{ {
...@@ -176,10 +181,17 @@ export default { ...@@ -176,10 +181,17 @@ export default {
(item) => item.merchantId == value (item) => item.merchantId == value
).merchantName ).merchantName
this.editData.contractingMerchantName = merchantName this.editData.contractingMerchantName = merchantName
this.$EventBus.$emit("shelfUpdateConstractMer", { this.SET_DATA({
name: "shelfUpdateContractMer",
data: {
merchantId: value, merchantId: value,
merchantName: merchantName merchantName: merchantName
}
}) })
// this.$EventBus.$emit("shelfUpdateContractMer", {
// merchantId: value,
// merchantName: merchantName
// })
} }
}, },
{ {
...@@ -280,10 +292,17 @@ export default { ...@@ -280,10 +292,17 @@ export default {
(item) => item.merchantId == value (item) => item.merchantId == value
).merchantName ).merchantName
this.editData.partnerMerchantName = merchantName this.editData.partnerMerchantName = merchantName
this.$EventBus.$emit("shelfUpdateParMer", { this.SET_DATA({
name: "shelfUpdateParMer",
data: {
merchantId: value, merchantId: value,
merchantName: merchantName merchantName: merchantName
}
}) })
// this.$EventBus.$emit("shelfUpdateParMer", {
// merchantId: value,
// merchantName: merchantName
// })
} }
}, },
{ {
...@@ -363,6 +382,7 @@ export default { ...@@ -363,6 +382,7 @@ export default {
} }
}, },
methods: { methods: {
...mapMutations("goodsInfoData", ["SET_DATA"]),
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find((k) => k.name == refreshSigle) var item = this[formName].find((k) => k.name == refreshSigle)
...@@ -424,13 +444,25 @@ export default { ...@@ -424,13 +444,25 @@ export default {
) || {} ) || {}
this.editData.partnerMerchantId = obj?.merchantId this.editData.partnerMerchantId = obj?.merchantId
this.editData.partnerMerchantName = obj?.merchantName this.editData.partnerMerchantName = obj?.merchantName
this.$EventBus.$emit("shelfUpdateParMer", { this.SET_DATA({
name: "shelfUpdateParMer",
data: {
merchantId: obj?.merchantId, merchantId: obj?.merchantId,
merchantName: obj?.merchantName, merchantName: obj?.merchantName,
scene: this.editData.sceneType scene: this.editData.sceneType
})
} }
this.$EventBus.$emit("operationMode", this.editData.operationMode) })
// this.$EventBus.$emit("shelfUpdateParMer", {
// merchantId: obj?.merchantId,
// merchantName: obj?.merchantName,
// scene: this.editData.sceneType
// })
}
// this.$EventBus.$emit("operationMode", this.editData.operationMode)
this.SET_DATA({
name: "operationMode",
data: this.editData.operationMode
})
}, },
dealInitData() { dealInitData() {
this.editData.businessMode = this.editData.businessMode =
...@@ -514,7 +546,6 @@ export default { ...@@ -514,7 +546,6 @@ export default {
scene: this.editData.sceneType scene: this.editData.sceneType
} }
getMerchantLevelApi(params).then((res) => { getMerchantLevelApi(params).then((res) => {
// console.log(res, 'getMerchantLevel')
switch (res.merchantAccountLevel) { switch (res.merchantAccountLevel) {
// 4s店 // 4s店
case 4: case 4:
......
...@@ -950,74 +950,6 @@ export default { ...@@ -950,74 +950,6 @@ export default {
} }
}) })
}, },
// 查询4s店及上级列表 参数 channelType=1(流量方对象)
async getMerchantLevelList() {
return new Promise(async (resolve, reject) => {
const that = this
const localRes = localStorage.getItem("getMerchantLevelList")
if (localRes) {
const localdata = JSON.parse(localRes)
getData(localdata)
} else {
const params = {
merchantId: this.merchantRow.merchantId,
channelType: 1,
scene: this.merchantRow.scene
}
const res = await getMerchantLevelListApi(params)
if (res) {
localStorage.setItem("getMerchantLevelList", JSON.stringify(res))
getData(res)
}
}
// 赋值
function getData(res) {
let listArr = []
res?.forEach((val) => {
listArr.push({
merchantId: val.merchantId,
merchantName: val.merchantName
})
})
that.flowList = listArr
resolve()
}
})
},
// 查询平台方列表
async getListPlatformMerchant() {
return new Promise(async (resolve, reject) => {
const that = this
const localRes = localStorage.getItem("getListPlatformMerchant")
if (localRes) {
const localdata = JSON.parse(localRes)
getData(localdata)
} else {
const res = await getPlatformMerchantList({})
if (res) {
res.unshift({
merchantId: -1,
merchantName: "嘀加智慧云"
})
localStorage.setItem("getListPlatformMerchant", JSON.stringify(res))
getData(res)
}
}
// 赋值
function getData(res) {
let listArr = []
res?.forEach((val) => {
listArr.push({
merchantId: val.merchantId,
merchantName: val.merchantName
})
})
that.platformList = listArr
resolve()
}
})
},
// 计算模式修改 // 计算模式修改
updateCalculateModeType(event, name, index) { updateCalculateModeType(event, name, index) {
const obj = this.classificationObj[name][index] const obj = this.classificationObj[name][index]
...@@ -1280,12 +1212,6 @@ export default { ...@@ -1280,12 +1212,6 @@ export default {
}, },
// 对账item的详情 更新和初始化 classificationObj // 对账item的详情 更新和初始化 classificationObj
getEffectRule() { getEffectRule() {
// let promiseArr = [
// this.getListPartnerMerchant(),
// // this.getMerchantLevelList(),
// // this.getListPlatformMerchant()
// ]
// Promise.all(promiseArr).then(() => {
this.$nextTick(() => { this.$nextTick(() => {
const res = deepClone(this.goodsTypeGroupReconciliationRules) const res = deepClone(this.goodsTypeGroupReconciliationRules)
const that = this const that = this
...@@ -1328,8 +1254,6 @@ export default { ...@@ -1328,8 +1254,6 @@ export default {
} }
this.forceUpdate() this.forceUpdate()
}) })
// })
}, },
// 换成后端数据结构 // 换成后端数据结构
getBackendFormat(needFilter = true) { getBackendFormat(needFilter = true) {
......
...@@ -12,10 +12,17 @@ ...@@ -12,10 +12,17 @@
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info :basic-info="basicInfo"></base-info> <base-info :basic-info="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info ref="shopMerchant" :edit-data="merchantEditData" <shop-merchant-info
@addMerchant="handleAddMerchant"></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> <goods-info ref="goodsInfo" :record-id="routeObj.id"></goods-info>
<!-- 分账配置 --> <!-- 分账配置 -->
...@@ -36,14 +43,19 @@ ...@@ -36,14 +43,19 @@
</template> </template>
<script> <script>
import { mapActions } 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 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/editCon/DivisionConfig.vue"
import FinanceConfig from "./components/editCon/FinanceConfig.vue" import FinanceConfig from "./components/editCon/FinanceConfig.vue"
import { getBusisDetailBasic, operationConfirmJsonAsync, approveAsyncProcess } from "@api/shelfManage" import {
getBusisDetailBasic,
operationConfirmJsonAsync,
approveAsyncProcess,
merchantSettleDistributeRuleLastRule
} from "@api/shelfManage"
// 指数退避计算器 // 指数退避计算器
const getBackoffInterval = (attempt, base = 1000) => const getBackoffInterval = (attempt, base = 1000) =>
Math.min(base * 2 ** attempt, 30000) // 最大间隔30秒 Math.min(base * 2 ** attempt, 30000) // 最大间隔30秒
...@@ -59,8 +71,8 @@ export default { ...@@ -59,8 +71,8 @@ export default {
editData: { editData: {
merchantName: "" merchantName: ""
}, },
pollRecordId: '', pollRecordId: "",
status: '未启动', status: "未启动",
pollTimer: null, pollTimer: null,
pollId: 0, // 用于竞态处理 pollId: 0, // 用于竞态处理
retryCount: 0, // 当前重试次数 retryCount: 0, // 当前重试次数
...@@ -84,16 +96,35 @@ export default { ...@@ -84,16 +96,35 @@ export default {
this.getBasicDetail() this.getBasicDetail()
this.$EventBus.$on("requestData", this.sendData) this.$EventBus.$on("requestData", this.sendData)
// 页面可见性监听 // 页面可见性监听
document.addEventListener('visibilitychange', this.handleVisibilityChange) document.addEventListener("visibilitychange", this.handleVisibilityChange)
this.refreshCategoryList()
this.getMerchantSettleDistributeRuleLastRule()
}, },
// 方法集合 // 方法集合
methods: { methods: {
...mapActions({ ...mapActions({
close: "d2admin/page/close" close: "d2admin/page/close"
}), }),
...mapActions("goodsInfoData", ["refreshCategoryList"]),
...mapMutations("goodsInfoData", ["SET_DATA"]),
getMerchantSettleDistributeRuleLastRule() {
merchantSettleDistributeRuleLastRule({
id: this.routeObj.id
})
.then((res) => {
console.log(res, "merchantSettleDistributeRuleLastRule")
this.SET_DATA({
name: "merchantSettleDistributeRuleLastRule",
data: res
})
})
.catch((err) => {
console.log(err)
})
},
async startPolling() { async startPolling() {
this.stopPolling() // 确保单实例运行 this.stopPolling() // 确保单实例运行
this.status = '运行中' this.status = "运行中"
this.startTime = Date.now() this.startTime = Date.now()
this.pollId += 1 // 生成新轮次ID this.pollId += 1 // 生成新轮次ID
this.retryCount = 0 this.retryCount = 0
...@@ -103,7 +134,7 @@ export default { ...@@ -103,7 +134,7 @@ export default {
async runPolling(currentPollId) { async runPolling(currentPollId) {
// 超时检查(5分钟) // 超时检查(5分钟)
if (Date.now() - this.startTime > this.MAX_DURATION) { if (Date.now() - this.startTime > this.MAX_DURATION) {
this.status = '已超时' this.status = "已超时"
return return
} }
...@@ -111,13 +142,13 @@ export default { ...@@ -111,13 +142,13 @@ export default {
this.isLoad = true this.isLoad = true
// 调用轮询api // 调用轮询api
const response = await approveAsyncProcess({ id: this.pollRecordId }) const response = await approveAsyncProcess({ id: this.pollRecordId })
console.log(response, 'response') console.log(response, "response")
// 竞态检查(只处理最新轮次的响应) // 竞态检查(只处理最新轮次的响应)
if (currentPollId !== this.pollId) return if (currentPollId !== this.pollId) return
if (response.processStatus == '3') { if (response.processStatus == "3") {
this.handleSuccess(response) this.handleSuccess(response)
} else if (response.processStatus == '4') { } else if (response.processStatus == "4") {
this.handleFail(response) this.handleFail(response)
} else { } else {
this.scheduleNextPoll(currentPollId) this.scheduleNextPoll(currentPollId)
...@@ -126,7 +157,7 @@ export default { ...@@ -126,7 +157,7 @@ export default {
} catch (error) { } catch (error) {
this.retryCount++ this.retryCount++
if (this.retryCount > this.MAX_RETRIES) { if (this.retryCount > this.MAX_RETRIES) {
this.status = '重试超限' this.status = "重试超限"
} else { } else {
this.scheduleNextPoll(currentPollId) this.scheduleNextPoll(currentPollId)
} }
...@@ -144,7 +175,7 @@ export default { ...@@ -144,7 +175,7 @@ export default {
stopPolling() { stopPolling() {
clearTimeout(this.pollTimer) clearTimeout(this.pollTimer)
this.pollTimer = null this.pollTimer = null
this.status = '已停止' this.status = "已停止"
}, },
handleVisibilityChange() { handleVisibilityChange() {
...@@ -153,7 +184,7 @@ export default { ...@@ -153,7 +184,7 @@ export default {
clearTimeout(this.pollTimer) clearTimeout(this.pollTimer)
} else { } else {
// 恢复时使用最新pollId重新启动 // 恢复时使用最新pollId重新启动
if (this.pollTimer === null && this.status === '运行中') { if (this.pollTimer === null && this.status === "运行中") {
this.pollId += 1 this.pollId += 1
this.runPolling(this.pollId) this.runPolling(this.pollId)
} }
...@@ -174,7 +205,8 @@ export default { ...@@ -174,7 +205,8 @@ export default {
this.stopPolling() this.stopPolling()
this.$message.error(data.errorMessage) this.$message.error(data.errorMessage)
}, },
async sendData() { // 返回测算数据 async sendData() {
// 返回测算数据
let settleDistributeRule let settleDistributeRule
let reconciliationRule let reconciliationRule
const divisionSubmitResult = await this.$refs.divisionConfig.submit() const divisionSubmitResult = await this.$refs.divisionConfig.submit()
...@@ -205,11 +237,19 @@ export default { ...@@ -205,11 +237,19 @@ 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.$EventBus.$emit("shelfUpdatMerchantId", { this.SET_DATA({
name: "shelfUpdateMerchant",
data: {
merchantId: this.merchantEditData.merchantId, merchantId: this.merchantEditData.merchantId,
merchantName: this.merchantEditData.merchantName, merchantName: this.merchantEditData.merchantName,
scene: this.merchantEditData.sceneType scene: this.merchantEditData.sceneType
}
}) })
// this.$EventBus.$emit("shelfUpdatMerchantId", {
// merchantId: this.merchantEditData.merchantId,
// merchantName: this.merchantEditData.merchantName,
// scene: this.merchantEditData.sceneType
// })
}) })
.finally(() => { .finally(() => {
this.isLoad = false this.isLoad = false
...@@ -258,26 +298,31 @@ export default { ...@@ -258,26 +298,31 @@ export default {
} }
console.log(params, "params----") console.log(params, "params----")
this.isLoad = true this.isLoad = true
operationConfirmJsonAsync({ dataString: JSON.stringify(params) }).then( operationConfirmJsonAsync({ dataString: JSON.stringify(params) })
(res) => { .then((res) => {
// this.isLoad = false // this.isLoad = false
console.log(res, "res----") console.log(res, "res----")
this.pollRecordId = res this.pollRecordId = res
const constText = confirmType == "save" ? '<div><p>提交成功。</p><span> 因数据量较大,系统处理预计需要几分钟,请耐心等待。您可在当前页面继续等待或返回列表。处理完成后,系统将自动为您提交至OA审核。</span ></div>' : '<div><p>提交成功。</p><span> 因数据量较大,系统处理预计需要几分钟,请耐心等待。您可在当前页面继续等待或返回列表。</span ></div>' const constText =
confirmType == "save"
? "<div><p>提交成功。</p><span> 因数据量较大,系统处理预计需要几分钟,请耐心等待。您可在当前页面继续等待或返回列表。处理完成后,系统将自动为您提交至OA审核。</span ></div>"
: "<div><p>提交成功。</p><span> 因数据量较大,系统处理预计需要几分钟,请耐心等待。您可在当前页面继续等待或返回列表。</span ></div>"
this.$confirm(constText, "提示", { this.$confirm(constText, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "返回列表", cancelButtonText: "返回列表",
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
// type: "warning" // type: "warning"
}).then((end) => { })
.then((end) => {
if (end == "confirm") { if (end == "confirm") {
this.startPolling() this.startPolling()
} }
}).catch(() => { })
.catch(() => {
this.handleCancel() this.handleCancel()
}) })
} })
).finally(() => { .finally(() => {
this.isLoad = false this.isLoad = false
}) })
}, },
...@@ -290,7 +335,10 @@ export default { ...@@ -290,7 +335,10 @@ export default {
beforeDestroy() { beforeDestroy() {
this.$EventBus.$off("requestData") this.$EventBus.$off("requestData")
this.stopPolling() this.stopPolling()
document.removeEventListener('visibilitychange', this.handleVisibilityChange) document.removeEventListener(
"visibilitychange",
this.handleVisibilityChange
)
} }
} }
</script> </script>
......
...@@ -2,8 +2,13 @@ ...@@ -2,8 +2,13 @@
<template> <template>
<d2-container class="shelfManage"> <d2-container class="shelfManage">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'" <d2-search
:form-data="showFormData"> ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData"
>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId" size="small" type="primary">
...@@ -20,11 +25,20 @@ ...@@ -20,11 +25,20 @@
<auth-button category="Button" :show-btn-ids="['9031301']" /> <auth-button category="Button" :show-btn-ids="['9031301']" />
</span> </span>
<!-- 嘀加上架修改 --> <!-- 嘀加上架修改 -->
<auth-button style="display: inline-block" category="Button" :show-btn-ids="['9031303']" /> <auth-button
style="display: inline-block"
category="Button"
:show-btn-ids="['9031303']"
/>
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="packageIndexTable" :search-form="searchForm" :table-params="tableParams" :get-list-api="getListApi" <d2-table
:before-search-fn="beforeSearchFn"> ref="packageIndexTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<!-- 查看 - 查看合同 --> <!-- 查看 - 查看合同 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
...@@ -39,19 +53,26 @@ ...@@ -39,19 +53,26 @@
<auth-button :data="scope.scope" :show-btn-ids="['9031308']" /> <auth-button :data="scope.scope" :show-btn-ids="['9031308']" />
</span> </span>
<!-- 重新发起 --> <!-- 重新发起 -->
<span style="margin-right: 10px" v-if=" <span
style="margin-right: 10px"
v-if="
scope.scope.systemStatus == 4 || scope.scope.systemStatus == 4 ||
scope.scope.approveStatus == 3 || scope.scope.approveStatus == 3 ||
scope.scope.approveStatus == 4 scope.scope.approveStatus == 4
"> "
>
<auth-button :data="scope.scope" :show-btn-ids="['9031309']" /> <auth-button :data="scope.scope" :show-btn-ids="['9031309']" />
</span> </span>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 驳回 --> <!-- 驳回 -->
<reject-dialog :reject-visible="rejectVisible" :params-obj="recordInfo" v-if="rejectVisible" <reject-dialog
@dialogClose="rejectDialogClose" /> :reject-visible="rejectVisible"
:params-obj="recordInfo"
v-if="rejectVisible"
@dialogClose="rejectDialogClose"
/>
</d2-container> </d2-container>
</template> </template>
<script> <script>
...@@ -250,7 +271,7 @@ export default { ...@@ -250,7 +271,7 @@ export default {
} }
}) })
}, },
getShelfManageList() { }, getShelfManageList() {},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
...@@ -271,9 +292,11 @@ export default { ...@@ -271,9 +292,11 @@ export default {
// 确认 - 编辑合同 // 确认 - 编辑合同
handleEditContract(row) { handleEditContract(row) {
this.close({ tagName: "/editContract" }) // this.close({ tagName: "/editContract" })
this.close({ tagName: "/editMultilateralContract" })
this.$router.push({ this.$router.push({
name: "editContract", name: "editMultilateralContract",
// name: "editContract",
query: { query: {
id: row.id, id: row.id,
businessCode: row.businessCode businessCode: row.businessCode
...@@ -330,7 +353,7 @@ export default { ...@@ -330,7 +353,7 @@ export default {
// 重新发起 // 重新发起
handleAgain(row) { handleAgain(row) {
console.log(row, 'row') console.log(row, "row")
this.close({ tagName: "/editShelf" }) this.close({ tagName: "/editShelf" })
this.$router.push({ this.$router.push({
name: "editShelf", name: "editShelf",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!