From 9fc960434b53309f84a89d2a825cdf8358acae2f Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Wed, 31 May 2023 18:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=B9=E7=94=A8=E5=85=B3?= =?UTF-8?q?=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basicdata/basicdataCostCorrelation.js | 50 +++ src/lang/zh.js | 1 + src/option/basicdata/basicZonePrice.js | 34 +- .../basicdata/basicdataCostCorrelation.js | 109 ++++++ src/page/index/tags.vue | 6 + src/router/views/index.js | 36 ++ src/store/modules/tags.js | 14 + src/views/basicdata/brand/basicClient.vue | 45 ++- src/views/basicdata/brand/basicZonePrice.vue | 125 ++++--- .../brand/basicdataCostCorrelation.vue | 343 ++++++++++++++++++ 10 files changed, 696 insertions(+), 67 deletions(-) create mode 100644 src/api/basicdata/basicdataCostCorrelation.js create mode 100644 src/option/basicdata/basicdataCostCorrelation.js create mode 100644 src/views/basicdata/brand/basicdataCostCorrelation.vue diff --git a/src/api/basicdata/basicdataCostCorrelation.js b/src/api/basicdata/basicdataCostCorrelation.js new file mode 100644 index 00000000..d37caa02 --- /dev/null +++ b/src/api/basicdata/basicdataCostCorrelation.js @@ -0,0 +1,50 @@ +import request from '@/axios'; + +export const getList = (current, size, params) => { + return request({ + url: '/api/logpm-basicdata/basicdataCostCorrelation/list', + method: 'get', + params: { + ...params, + current, + size, + } + }) +} + +export const getDetail = (id) => { + return request({ + url: '/api/logpm-basicdata/basicdataCostCorrelation/detail', + method: 'get', + params: { + id + } + }) +} + +export const remove = (ids) => { + return request({ + url: '/api/logpm-basicdata/basicdataCostCorrelation/remove', + method: 'post', + params: { + ids, + } + }) +} + +export const add = (row) => { + return request({ + url: '/api/logpm-basicdata/basicdataCostCorrelation/submit', + method: 'post', + data: row + }) +} + +export const update = (row) => { + return request({ + url: '/api/logpm-basicdata/basicdataCostCorrelation/submit', + method: 'post', + data: row + }) +} + diff --git a/src/lang/zh.js b/src/lang/zh.js index 3ad4d841..58dd938a 100644 --- a/src/lang/zh.js +++ b/src/lang/zh.js @@ -117,5 +117,6 @@ export default { clearCache: '清除缓存', closeOthers: '关闭其它', closeAll: '关闭所有', + current: '关闭当前页面', }, }; diff --git a/src/option/basicdata/basicZonePrice.js b/src/option/basicdata/basicZonePrice.js index 19374ecc..0c5b71fe 100644 --- a/src/option/basicdata/basicZonePrice.js +++ b/src/option/basicdata/basicZonePrice.js @@ -94,23 +94,23 @@ export default { prop: "brandName", search: true, }, - { - label: "费用标识", - prop: "freightMark", - search: true, - }, - { - label: "费用", - prop: "cost", - }, - { - label: "仓储时间端状态", - prop: "warehousingTimeStatus", - }, - { - label: "仓储时间端费用", - prop: "warehousingTimeCharge", - }, + // { + // label: "费用标识", + // prop: "freightMark", + // search: true, + // }, + // { + // label: "费用", + // prop: "cost", + // }, + // { + // label: "仓储时间端状态", + // prop: "warehousingTimeStatus", + // }, + // { + // label: "仓储时间端费用", + // prop: "warehousingTimeCharge", + // }, { label: "地址", prop: "province", diff --git a/src/option/basicdata/basicdataCostCorrelation.js b/src/option/basicdata/basicdataCostCorrelation.js new file mode 100644 index 00000000..e1f59b46 --- /dev/null +++ b/src/option/basicdata/basicdataCostCorrelation.js @@ -0,0 +1,109 @@ +export default { + expand: false, + index: true, + border: true, + selection: true, + column: [ + { + label: "主键", + prop: "id", + display: false, + hide: true, + }, + { + label: "租户号", + prop: "tenantId", + display: false, + hide: true, + }, + { + label: "创建人", + prop: "createUser", + display: false, + hide: true, + }, + { + label: "创建时间", + prop: "createTime", + display: false, + hide: true, + }, + { + label: "更新人", + prop: "updateUser", + display: false, + hide: true, + }, + { + label: "更新时间", + prop: "updateTime", + display: false, + hide: true, + }, + { + label: "状态", + prop: "status", + display: false, + hide: true, + }, + { + label: "是否已删除", + prop: "isDeleted", + display: false, + hide: true, + }, + { + label: "创建部门", + prop: "createDept", + display: false, + hide: true, + }, + { + label: "预留1", + prop: "reserve1", + display: false, + hide: true, + }, + { + label: "预留2", + prop: "reserve2", + display: false, + hide: true, + }, + { + label: "预留3", + prop: "reserve3", + display: false, + hide: true, + }, + { + label: "预留4", + prop: "reserve4", + display: false, + hide: true, + }, + { + label: "预留5", + prop: "reserve5", + display: false, + hide: true, + }, + // { + // label: "区域价格ID", + // prop: "zonePriceId", + // }, + { + label: "编码", + prop: "coding", + search: true, + }, + { + label: "费用", + prop: "ensue", + }, + // { + // label: "标识", + // prop: "identification", + // }, + ] +} diff --git a/src/page/index/tags.vue b/src/page/index/tags.vue index 84361fbc..af4b6617 100644 --- a/src/page/index/tags.vue +++ b/src/page/index/tags.vue @@ -9,6 +9,7 @@
{{ $t('tagsView.closeOthers') }}
{{ $t('tagsView.closeAll') }}
{{ $t('tagsView.clearCache') }}
+
{{ $t('tagsView.current') }}
({ name: route.query.name, + id: route.query.id}), + component: () => + import(/* webpackChunkName: "views" */ '@/views/basicdata/brand/basicHistoricalContract.vue'), + }, + ], + }, + { + path: '/basicdata/brand/basicStorageServices', + component: Layout, + redirect: '/brand/basicStorageServices', + children: [ + { + path: '/basicdata/brand/basicStorageServices', + name: '服务仓', + meta: { + i18n: 'dict', + }, + props: route => ({ name: route.query.name, + id: route.query.id}), + component: () => + import(/* webpackChunkName: "views" */ '@/views/basicdata/brand/basicStorageServices.vue'), + }, + ], + }, ]; diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js index 1ec92a05..5b20f51a 100644 --- a/src/store/modules/tags.js +++ b/src/store/modules/tags.js @@ -29,8 +29,22 @@ const navs = { }, DEL_TAG_OTHER: state => { state.tagList = state.tagList.filter(item => { + console.log("关闭其他111state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item); return [state.tag.fullPath, website.fistPage.path].includes(item.fullPath); }); + console.log("2222state.tagList",state.tagList); + setStore({ name: 'tagList', content: state.tagList }); + }, + DEL_TAG_CURRENT: state => { + state.tagList = state.tagList.filter(item => { + console.log("state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item); + // const del = '3' + // this.demoData = this.demoData.filter((o) => { + // return state.tag.fullPath !== del + // }) + return state.tag.fullPath !== item.fullPath; + }); + // console.log("state.tagList",state.tagList); setStore({ name: 'tagList', content: state.tagList }); }, }, diff --git a/src/views/basicdata/brand/basicClient.vue b/src/views/basicdata/brand/basicClient.vue index f02fbbd3..3ad6e816 100644 --- a/src/views/basicdata/brand/basicClient.vue +++ b/src/views/basicdata/brand/basicClient.vue @@ -102,12 +102,14 @@ - + @@ -245,6 +247,15 @@ :before-close="handleDrawerClose"> + + + + + + + + +
@@ -630,6 +641,36 @@ export default { this.basicClientId = row.id; this.drawer = true; }, + //历史记录 + handleHistory(row) { + // this.basicClientId = row.id; + // this.drawer = true; + // this.$router.push('/basicdata/brand/basicHistoricalContract?id='+row.id+";name="+row.clientName); + + this.$router.push({ + path:'/basicdata/brand/basicHistoricalContract', + query:{ + id: row.id, + name: "历史记录 - "+row.clientName + } + }); + + }, + //仓库 + handleEntrepot(row) { + // this.basicClientId = row.id; + // this.drawer = true; + // this.$router.push('/basicdata/brand/basicHistoricalContract?id='+row.id+";name="+row.clientName); + + this.$router.push({ + path:'/basicdata/brand/basicStorageServices', + query:{ + id: row.id, + name: "服务仓 - "+row.clientName + } + }); + + }, handleDrawerClose(){ this.basicClientId = ''; this.drawer = false; diff --git a/src/views/basicdata/brand/basicZonePrice.vue b/src/views/basicdata/brand/basicZonePrice.vue index 57fe017e..7f01fb73 100644 --- a/src/views/basicdata/brand/basicZonePrice.vue +++ b/src/views/basicdata/brand/basicZonePrice.vue @@ -82,11 +82,12 @@ - + @@ -116,7 +117,7 @@ - + + + + @@ -250,15 +260,24 @@ import option from "@/option/basicdata/basicZonePrice"; import { mapGetters } from "vuex"; import { getLazyTreeAll } from '@/api/base/region'; import { getDictionaryBiz } from '@/api/system/dict'; +import BasicdataCostCorrelation from '@/views/basicdata/brand/basicdataCostCorrelation.vue' export default { + components:{ + BasicdataCostCorrelation + }, data () { return { height: 0, // 弹框标题 title: '', + costCorrelationId: '', // 是否展示弹框 box: false, + // 是否展示抽屉 + drawer: false, + // 抽屉方向 + direction: 'rtl', // 是否显示查询 search: true, // 加载中 @@ -341,6 +360,14 @@ export default { } }, methods: { + handleDrawerClose(){ + this.costCorrelationId = ''; + this.drawer = false; + }, + handleDrawer(row) { + this.costCorrelationId = row.id; + this.drawer = true; + }, textWarebox(e,index) { console.log(e,index) this.costWraeList[index] = e; @@ -429,10 +456,10 @@ export default { this.clientType = res.data.data; }); //字典 - getDictionaryBiz('warehousing_time_status').then(res => { - // console.log("字典》》》",res); - this.wareType = res.data.data; - }); + // getDictionaryBiz('warehousing_time_status').then(res => { + // // console.log("字典》》》",res); + // this.wareType = res.data.data; + // }); }, searchHide () { this.search = !this.search; @@ -446,6 +473,7 @@ export default { this.onLoad(this.page); }, bianli(costListName,clientType,costList,fei){ + // console.log(">>>>>>>>>",costListName,clientType,costList,fei); this.pan = false; // fei = []; for (let i = 0;i< costListName.length;i++){ @@ -455,30 +483,31 @@ export default { this.pan = true; continue; } - let yon ={ - lable: 1, - value: zhi - }; clientType.forEach( it =>{ - if(it.dictValue == this.costListName[i]){ - yon.lable = it.dictKey; + if(it.dictValue == costListName[i]){ + // console.log("进来了",it.dictValue , costListName[i]); + //2.添加 + fei.set(it.dictKey,zhi) } }) - fei.push(yon); + } }, handleSubmit (from) { this.$refs[from].validate(async (valid) => { if (valid) { if (!this.form.id) { - let fei = []; + // console.log("提交的数据》》》",this.form); + let fei = new Map(); await this.bianli(this.costListName,this.clientType,this.costList,fei); - this.form.fei = fei; - this.form.freightMark = null; - let feishi = []; - await this.bianli(this.costWraeListName,this.wareType,this.costWraeList,feishi); - this.form.feishi = feishi; - this.form.warehousingTimeStatus = null; + this.form.fei = Object.fromEntries(fei); + // console.log("fei",fei); + this.form.freightMark = undefined; + // let feishi = new Map(); + // await this.bianli(this.costWraeListName,this.wareType,this.costWraeList,feishi); + // this.form.feishi = Object.fromEntries(feishi); + // // console.log("feishi",feishi); + // this.form.warehousingTimeStatus = undefined; if(this.pan){ this.$message.warning("请填写完整已勾选的数据费用"); return @@ -638,16 +667,16 @@ export default { } }) }) - this.wareType.forEach(it =>{ - data.records.forEach(i =>{ - if(parseInt( it.dictKey ) == parseInt(i.warehousingTimeStatus)){ - i.warehousingTimeStatus = it.dictValue - } - if(i.warehousingTimeStatus == '-1'){ - i.warehousingTimeStatus = '无' - } - }) - }) + // this.wareType.forEach(it =>{ + // data.records.forEach(i =>{ + // if(parseInt( it.dictKey ) == parseInt(i.warehousingTimeStatus)){ + // i.warehousingTimeStatus = it.dictValue + // } + // if(i.warehousingTimeStatus == '-1'){ + // i.warehousingTimeStatus = '无' + // } + // }) + // }) this.page.total = data.total; this.data = data.records; let dz =""; diff --git a/src/views/basicdata/brand/basicdataCostCorrelation.vue b/src/views/basicdata/brand/basicdataCostCorrelation.vue new file mode 100644 index 00000000..da5eeb04 --- /dev/null +++ b/src/views/basicdata/brand/basicdataCostCorrelation.vue @@ -0,0 +1,343 @@ + + +