diff --git a/src/api/user/oilSiteOilsPrice.js b/src/api/user/oilSiteOilsPrice.js index b2dc022..8051a79 100644 --- a/src/api/user/oilSiteOilsPrice.js +++ b/src/api/user/oilSiteOilsPrice.js @@ -16,6 +16,12 @@ export default { data: page }) }, + findByRelationId(id) { // 分页查询(调度管理) + return request({ + url: `/${service_name}/saasPriceAppRelationRecord/findByRelationId/${id}`, + method: 'get' + }) + }, save(oilSiteOilsPrice) { // 保存 return request({ url: `/${service_name}/${group_name}/save`, diff --git a/src/utils/request.js b/src/utils/request.js index 1e685e7..b58b62a 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -163,9 +163,11 @@ service.interceptors.response.use( type: "error", duration: 5 * 1000 }); + setTimeout(() => { store.dispatch("user/resetToken").then(() => { location.reload(); }); + }, 2000); // 排除自定义的车队返回结果状态码 } else if ( res.code !== 20000 && diff --git a/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue b/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue index 5554cbb..4cadd24 100644 --- a/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue +++ b/src/views/site/oilSiteOilsPrice/OilSiteOilsPriceList.vue @@ -132,6 +132,11 @@ 调价策略 + + + 变更历史 + + - + + + + + + + + + + + + + + + + + + + { + if (data.enableMark == 1){ + return ('启用'); + }else { + return ('禁用'); + } + } + }, { - label: '发改委价格', - value: 'marketPrice' + label: '基础个人价', + value: 'personalPriceBase' }, { - label: '个人加油价格', - value: this.$store.getters.user.userCompany == '1622767323771695104' ? 'personalPriceZp' : 'personalPrice', + label: '调价策略公式', + value: 'appPriceStrategy' }, { - label: '底价加油价格', - value: 'floorPrice' + label: '应用个人价', + value: 'personalPriceApp' }, { - label: '底价加油价格说明', - value: 'floorRemark' + label: '创建人ID', + value: 'createUser' }, { - label: '启用禁用', - value: 'enableMark' + label: '创建人姓名', + value: 'createUserName' }, { - label: '版本号', - value: 'version' + label: '更新人姓名', + value: 'updateUserName' }, { - label: '创建人', - value: 'createUser' + label: '更新人ID', + value: 'updateUser' }, { label: '创建时间', value: 'createTime' }, { - label: '创建来源', - value: 'createSource' - }, - { - label: '修改人', - value: 'updateUser' - }, - { - label: '修改时间', + label: '更新时间', value: 'updateTime' }, { - label: '调价策略', - value: 'appPriceStrategy' + label: '创建来源', + value: 'createSource' }, + // { + // label: '渠道id', + // value: 'id' + // }, + // { + // label: '渠道编码', + // value: 'channelCode', + // remark: 'XOIL:星油 WJY:万金油 LV:老吕(找油网) TY:团油YDJY:一点加油(壳牌)', + // }, + // { + // label: '三方油站编码', + // value: 'otherSiteCode', + // }, + // { + // label: '三方油品编码', + // value: 'otherOilsCode' + // }, + // { + // label: '油枪用逗号隔开', + // value: 'oilsBar' + // }, + // { + // label: '排放标准', + // value: 'oilsGb' + // }, + // { + // label: '发改委价格', + // value: 'marketPrice' + // }, + // { + // label: '个人加油价格', + // value: this.$store.getters.user.userCompany == '1622767323771695104' ? 'personalPriceZp' : 'personalPrice', + // }, + // { + // label: '底价加油价格', + // value: 'floorPrice' + // }, + // { + // label: '底价加油价格说明', + // value: 'floorRemark' + // }, + // { + // label: '版本号', + // value: 'version' + // }, ] }, @@ -359,14 +434,14 @@ export default { prop: "siteName", label: "油站名称", show: true, - minWidth:200, + minWidth: 200, render: (row, column, cell) => { let typeData = { type: row.globalEnable == 'ENABLE' ? 'success' : 'info', value: row.globalEnable == 'ENABLE' ? '启用' : '禁用' } return
- {typeData.value} + {typeData.value} {cell}
{row.siteId} @@ -581,6 +656,13 @@ export default { }, }, }, + watch:{ + showHistory(){ + if(!n){ + this.historyData = [] + } + } + }, created() { this.getByPage(); oilVehicleOwnerApi.getOils().then((res) => { @@ -594,6 +676,12 @@ export default { window.addEventListener("resize", this.getHeight, false); }, methods: { + showHistoryFn(row) { + oilSiteOilsPriceApi.findByRelationId(row.id).then(res => { + this.historyData = res.data; + this.showHistory = true + }) + }, toOutPutPiliang() { if (this.multipleSelection.length < 1) { this.$message.warning('请至少选择一条数据') @@ -643,7 +731,7 @@ export default { }, modifyStrategy(id) { oilSiteOilsPriceApi.get(id.id).then((res) => { - this.oilSiteOilsPrice = res.data + this.oilSiteOilsPrice = res.data // Object.assign(res.data, { // personalPriceApp: id.personalPriceApp, // personalPriceBase: id.personalPriceBase,