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. 59
      src/page/index/top/index.vue
  5. 7
      src/utils/store.js
  6. 1233
      src/views/distribution/inventory/distrilbutionBillLading.vue
  7. 2
      src/views/distribution/inventory/distrilbutionBillLadingList.vue
  8. 1
      src/views/distribution/reservation/atlas1.vue
  9. 1274
      src/views/distribution/reservation/reservationAddFrom.vue

2
index.html

@ -23,7 +23,7 @@
</script>
<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 type="text/javascript"
src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=FpjVxjf9nGo47eLj9I0ZuUvSZm1wGGqr"></script>

8
src/api/work/work.js

@ -93,3 +93,11 @@ export const preserveCurrentWarehouse = 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">
<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-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">
<slot v-if="column.type == 6" :scope="scope">
</slot>
@ -163,6 +163,7 @@ interface TableColumnType {
* 7:图片
* 8:带背景的文字
* 9:下载附件
* 10.输入框的表格内容
*/
type: number | string;
/** 用于接受表头的值 */
@ -531,6 +532,9 @@ watchEffect(()=>{
color: #409EFF !important;
cursor: pointer !important;
}
.el-table .cell{
line-height: 22px !important;
}
.el-table .el-input__inner{
font-size: 12px !important;
}

59
src/page/index/top/index.vue

@ -44,9 +44,7 @@
<router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
</el-dropdown-item>
<el-dropdown-item>
<div @click="showcl(true)">
切换仓库
</div>
<div @click="showcl(true)">切换仓库</div>
</el-dropdown-item>
<el-dropdown-item>
<router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>
@ -62,7 +60,7 @@
</div>
</div>
<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-option
v-for="(item, index) in datalist"
@ -88,7 +86,11 @@ import topLogs from './top-logs.vue';
import topLang from './top-lang.vue';
import topFull from './top-full.vue';
import topSetting from '../setting.vue';
import { getMyWarehouseList , preserveCurrentWarehouse } from '@/api/work/work'
import {
getMyWarehouseList,
preserveCurrentWarehouse,
getclearWarehouseCache,
} from '@/api/work/work';
export default {
components: {
@ -106,12 +108,10 @@ export default {
return {
isshow: false,
datalist: [],
warehousevalue:''
warehousevalue: '',
};
},
mounted(){
},
mounted() {},
filters: {},
created() {},
computed: {
@ -130,20 +130,38 @@ export default {
methods: {
async confirmcks() {
if (typeof this.warehousevalue != 'number') {
return
return;
}
console.log(this.warehousevalue)
let res=await preserveCurrentWarehouse(this.datalist[this.warehousevalue])
console.log(this.warehousevalue);
if (
this.datalist[this.warehousevalue].id == '0' &&
this.datalist[this.warehousevalue].name == '全部'
) {
let res = await getclearWarehouseCache({});
if (res.data.code == 200) {
this.$message({message:'切换成功',type:'success'})
this.$message({ message: '切换成功', type: 'success' });
this.$router.push({
path:'/'
})
path: '/',
});
setTimeout(() => {
window.location.reload();
}, 1000);
} else {
this.$message({message:res.data.msg,type:'error'})
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() {
@ -161,12 +179,13 @@ export default {
});
},
showcl(flg) {
this.isshow=flg
this.isshow = flg;
if (this.isshow) {
getMyWarehouseList().then(res => {
console.log(res.data.data,'getMyWarehouseList')
this.datalist=res.data.data
})
console.log(res.data.data, 'getMyWarehouseList');
let arr = [{ name: '全部', id: '0' }];
this.datalist = arr.concat(res.data.data);
});
}
},
},

7
src/utils/store.js

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

1233
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: '操作',
type: 6,
values: '',
width: '150',
width: '200',
checkarr: [],
fixed: 'right',
hide: true,

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

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

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

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