Browse Source

表格组件新增类型,修改地图,修改部分页面表格部分

fix_bug_pro20231227
zhangsiyu 2 years ago
parent
commit
e1f0c12123
  1. 2
      index.html
  2. 8
      src/api/work/work.js
  3. 6
      src/components/tablecmt/tablecmt.vue
  4. 113
      src/page/index/top/index.vue
  5. 7
      src/utils/store.js
  6. 2079
      src/views/distribution/inventory/distrilbutionBillLading.vue
  7. 2
      src/views/distribution/inventory/distrilbutionBillLadingList.vue
  8. 1
      src/views/distribution/reservation/atlas1.vue
  9. 3302
      src/views/distribution/reservation/reservationAddFrom.vue

2
index.html

@ -23,7 +23,7 @@
</script> </script>
<script type="text/javascript" <script type="text/javascript"
src='https://webapi.amap.com/maps?v=2.0&key=f003ec4feb3fcc4cf0742e94f569fd33&plugin=AMap.PlaceSearch,AMap.Geocoder,Map3D,ElasticMarker,AMap.Driving'></script> src='https://webapi.amap.com/maps?v=1.4.14&key=f003ec4feb3fcc4cf0742e94f569fd33&plugin=AMap.PlaceSearch,AMap.Geocoder,Map3D,ElasticMarker,AMap.Driving'></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script> <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script type="text/javascript" <script type="text/javascript"
src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=FpjVxjf9nGo47eLj9I0ZuUvSZm1wGGqr"></script> src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=FpjVxjf9nGo47eLj9I0ZuUvSZm1wGGqr"></script>

8
src/api/work/work.js

@ -92,4 +92,12 @@ export const preserveCurrentWarehouse = data => {
method: 'post', method: 'post',
data, data,
}); });
};
export const getclearWarehouseCache = data => {
return request({
url: '/api/logpm-basicdata/warehouse/clearWarehouseCache',
method: 'get',
data,
});
}; };

6
src/components/tablecmt/tablecmt.vue

@ -86,7 +86,7 @@
<template #default="scope"> <template #default="scope">
<el-text class="mx-2 tabculconte" v-if="(Number(column.type)<6&&Number(column.type)>0)">{{ scope.row[column.prop] }}</el-text> <el-text class="mx-2 tabculconte" v-if="(Number(column.type)<6&&Number(column.type)>0)">{{ scope.row[column.prop] }}</el-text>
<el-text style="" class="mx-2 tabculconte colors" v-if="column.type == 9" @click="godowns(scope.row[column.downprop])">{{ scope.row[column.prop] }}</el-text> <el-text style="" class="mx-2 tabculconte colors" v-if="column.type == 9" @click="godowns(scope.row[column.downprop])">{{ scope.row[column.prop] }}</el-text>
<el-input v-if="column.type == 10" v-model="scope.row[column.prop]" type="number" :min="0"></el-input>
<div class="slotbuts" v-if="column.type == 6"> <div class="slotbuts" v-if="column.type == 6">
<slot v-if="column.type == 6" :scope="scope"> <slot v-if="column.type == 6" :scope="scope">
</slot> </slot>
@ -163,6 +163,7 @@ interface TableColumnType {
* 7:图片 * 7:图片
* 8:带背景的文字 * 8:带背景的文字
* 9:下载附件 * 9:下载附件
* 10.输入框的表格内容
*/ */
type: number | string; type: number | string;
/** 用于接受表头的值 */ /** 用于接受表头的值 */
@ -531,6 +532,9 @@ watchEffect(()=>{
color: #409EFF !important; color: #409EFF !important;
cursor: pointer !important; cursor: pointer !important;
} }
.el-table .cell{
line-height: 22px !important;
}
.el-table .el-input__inner{ .el-table .el-input__inner{
font-size: 12px !important; font-size: 12px !important;
} }

113
src/page/index/top/index.vue

@ -44,9 +44,7 @@
<router-link to="/">{{ $t('navbar.dashboard') }}</router-link> <router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item> <el-dropdown-item>
<div @click="showcl(true)"> <div @click="showcl(true)">切换仓库</div>
切换仓库
</div>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item> <el-dropdown-item>
<router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link> <router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>
@ -62,19 +60,19 @@
</div> </div>
</div> </div>
<el-dialog v-model="isshow" title="切换仓库" width="30%"> <el-dialog v-model="isshow" title="切换仓库" width="30%">
<div style="display: flex;flex-direction: column;align-items: center;"> <div style="display: flex; flex-direction: column; align-items: center">
<el-select class="selecin" v-model="warehousevalue" placeholder="请选择切换的仓库"> <el-select class="selecin" v-model="warehousevalue" placeholder="请选择切换的仓库">
<el-option <el-option
v-for="(item,index) in datalist" v-for="(item, index) in datalist"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="index" :value="index"
/> />
</el-select> </el-select>
<div class="copnbx"> <div class="copnbx">
<el-button @click="showcl(false)">取消</el-button> <el-button @click="showcl(false)">取消</el-button>
<el-button type="primary" @click="confirmcks">确认</el-button> <el-button type="primary" @click="confirmcks">确认</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -88,7 +86,11 @@ import topLogs from './top-logs.vue';
import topLang from './top-lang.vue'; import topLang from './top-lang.vue';
import topFull from './top-full.vue'; import topFull from './top-full.vue';
import topSetting from '../setting.vue'; import topSetting from '../setting.vue';
import { getMyWarehouseList , preserveCurrentWarehouse } from '@/api/work/work' import {
getMyWarehouseList,
preserveCurrentWarehouse,
getclearWarehouseCache,
} from '@/api/work/work';
export default { export default {
components: { components: {
@ -104,14 +106,12 @@ export default {
name: 'top', name: 'top',
data() { data() {
return { return {
isshow:false, isshow: false,
datalist:[], datalist: [],
warehousevalue:'' warehousevalue: '',
}; };
}, },
mounted(){ mounted() {},
},
filters: {}, filters: {},
created() {}, created() {},
computed: { computed: {
@ -128,22 +128,40 @@ export default {
]), ]),
}, },
methods: { methods: {
async confirmcks(){ async confirmcks() {
if(typeof this.warehousevalue !='number'){ if (typeof this.warehousevalue != 'number') {
return return;
} }
console.log(this.warehousevalue) console.log(this.warehousevalue);
let res=await preserveCurrentWarehouse(this.datalist[this.warehousevalue]) if (
if(res.data.code==200){ this.datalist[this.warehousevalue].id == '0' &&
this.$message({message:'切换成功',type:'success'}) this.datalist[this.warehousevalue].name == '全部'
this.$router.push({ ) {
path:'/' let res = await getclearWarehouseCache({});
}) if (res.data.code == 200) {
setTimeout(() => { this.$message({ message: '切换成功', type: 'success' });
window.location.reload(); this.$router.push({
}, 1000); path: '/',
}else{ });
this.$message({message:res.data.msg,type:'error'}) setTimeout(() => {
window.location.reload();
}, 1000);
} else {
this.$message({ message: res.data.msg, type: 'error' });
}
} else {
let res = await preserveCurrentWarehouse(this.datalist[this.warehousevalue]);
if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' });
this.$router.push({
path: '/',
});
setTimeout(() => {
window.location.reload();
}, 1000);
} else {
this.$message({ message: res.data.msg, type: 'error' });
}
} }
}, },
setCollapse() { setCollapse() {
@ -160,13 +178,14 @@ export default {
}); });
}); });
}, },
showcl(flg){ showcl(flg) {
this.isshow=flg this.isshow = flg;
if(this.isshow){ if (this.isshow) {
getMyWarehouseList().then(res=>{ getMyWarehouseList().then(res => {
console.log(res.data.data,'getMyWarehouseList') console.log(res.data.data, 'getMyWarehouseList');
this.datalist=res.data.data let arr = [{ name: '全部', id: '0' }];
}) this.datalist = arr.concat(res.data.data);
});
} }
}, },
}, },
@ -174,14 +193,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.copnbx{ .copnbx {
margin-top: 30px; margin-top: 30px;
button{ button {
width: 120px; width: 120px;
height: 40px; height: 40px;
}
}
.selecin{
width: 60%;
} }
}
.selecin {
width: 60%;
}
</style> </style>

7
src/utils/store.js

@ -5,7 +5,7 @@ const keyName = website.key + '-';
/** /**
* 存储localStorage * 存储localStorage
*/ */
export const setStore = (params = {}) => { export const setStore = (params = {},value) => {
try { try {
let { name, content, type } = params; let { name, content, type } = params;
name = keyName + name; name = keyName + name;
@ -28,7 +28,10 @@ export const setStore = (params = {}) => {
keys.map(item=>{ keys.map(item=>{
localStorage.removeItem(item) localStorage.removeItem(item)
}) })
setStore(params) if(value!=1){
setStore(params,1)
}
} }
}; };
/** /**

2079
src/views/distribution/inventory/distrilbutionBillLading.vue

File diff suppressed because it is too large Load Diff

2
src/views/distribution/inventory/distrilbutionBillLadingList.vue

@ -617,7 +617,7 @@ export default {
label: '操作', label: '操作',
type: 6, type: 6,
values: '', values: '',
width: '150', width: '200',
checkarr: [], checkarr: [],
fixed: 'right', fixed: 'right',
hide: true, hide: true,

1
src/views/distribution/reservation/atlas1.vue

@ -84,6 +84,7 @@ function init(data) {
if (status === 'complete' && result.info === 'OK') { if (status === 'complete' && result.info === 'OK') {
// result // result
console.log(result.geocodes); console.log(result.geocodes);
details.mapLoc.setCenter([result.geocodes[0].location.lng, result.geocodes[0].location.lat])
geocodess.push({ geocodess.push({
pontion: result.geocodes[0].location, pontion: result.geocodes[0].location,
content: item.customerName + '--' + item.customerAddress + '--' + item.customerTelephone, content: item.customerName + '--' + item.customerAddress + '--' + item.customerTelephone,

3302
src/views/distribution/reservation/reservationAddFrom.vue

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save