Browse Source

Squashed commit of the following:

commit 5fdc85adae
Merge: 019f62e 90be2b3
Author: pref_mail@163.com <123456>
Date:   Sun Jun 25 13:58:38 2023 +0800

    Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

commit 019f62ea84
Author: pref_mail@163.com <123456>
Date:   Sun Jun 25 13:57:03 2023 +0800

    修改地图插件问题

commit 90be2b3038
Merge: eb05df9 3c44f6d
Author: caoyizhong <1270296080@qq.com>
Date:   Sun Jun 25 13:37:24 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit eb05df91e1
Author: caoyizhong <1270296080@qq.com>
Date:   Sun Jun 25 13:37:18 2023 +0800

    修改客户信息

# Conflicts:
#	src/views/distribution/delivery/distributionDelivery.vue
dev-warehouse
zhangsiyu 2 years ago
parent
commit
3efbe7ea51
  1. 5
      package.json
  2. 7
      src/api/basicdata/basicStoreContact.js
  3. 7
      src/main.js
  4. 132
      src/option/basicdata/basicClientFrom.js
  5. 5
      src/option/basicdata/basicStoreContact.js
  6. 20
      src/views/basicdata/brand/basicClient.vue
  7. 33
      src/views/basicdata/brand/basicClientFrom.vue
  8. 96
      src/views/basicdata/brand/basicStoreContact.vue
  9. 113
      src/views/distribution/reservation/atlas.vue

5
package.json

@ -7,7 +7,6 @@
"serve": "vite preview --host"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@antfu/utils": "^0.7.2",
"@element-plus/icons-vue": "^2.0.9",
"@saber/nf-design-base-elp": "^1.0.0",
@ -15,7 +14,6 @@
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"animate.css": "^4.1.1",
"avue-plugin-map": "^1.0.1",
"axios": "^0.21.1",
"crypto-js": "^4.1.1",
"dayjs": "^1.10.6",
@ -29,8 +27,7 @@
"nprogress": "^0.2.0",
"vite-plugin-mock": "^2.9.4",
"vue": "^3.2.40",
"vue-amap": "^0.5.10",
"vue-bmap-gl": "^0.1.2",
"vue-baidu-map": "^0.21.22",
"vue-i18n": "^9.1.9",
"vue-router": "^4.1.5",
"vuex": "^4.0.2"

7
src/api/basicdata/basicStoreContact.js

@ -22,6 +22,13 @@ export const getListStore = (current, size, params) => {
}
})
}
export const updateCargoControl = (row) => {
return request({
url: '/api/logpm-basicdata/basicdataStoreContact/update',
method: 'post',
data: row
})
}
export const getDetail = (id) => {
return request({

7
src/main.js

@ -27,10 +27,6 @@ import dayjs from 'dayjs';
import 'styles/common.scss';
// 业务组件
import tenantPackage from './views/system/tenantpackage.vue';
import AvueMap from 'avue-plugin-map';
import AMap from 'vue-amap'
window.$crudCommon = crudCommon;
@ -51,8 +47,7 @@ app.config.globalProperties.website = website;
app.config.globalProperties.getScreen = getScreen;
app.use(error);
app.use(i18n);
app.use(AvueMap);
app.use(AMap);

132
src/option/basicdata/basicClientFrom.js

@ -0,0 +1,132 @@
export default {
expand: false,
index: true,
border: true,
selection: true,
column: [
{
label: "租户号",
prop: "tenantId",
display: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
display: true,
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: "主键",
prop: "id",
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: "客户名称",
prop: "clientName",
search: true,
},
{
label: "客户类型",
prop: "clientType",
search: true,
hide: true,
},
{
label: "客户类型",
prop: "typeService",
search: true,
},
{
label: "地址",
prop: "bladeRegionProvinceId",
search: true,
},
{
label: "合同附件",
prop: "fileName",
},
{
label: "控货",
prop: "cargoControl",
hide: true,
},
{
label: "合同开始时间",
prop: "contractStartTime",
search: true,
},
{
label: "合同结束时间",
prop: "contractEntTime",
search: true,
},
]
}

5
src/option/basicdata/basicStoreContact.js

@ -98,6 +98,11 @@ export default {
prop: "phone",
search: true,
},
{
label: "默认联系人",
prop: "defaultType",
search: true,
},
{
label: "创建时间",
prop: "createTime",

20
src/views/basicdata/brand/basicClient.vue

@ -108,6 +108,8 @@
<span target="_blank" v-if="row.clientType == '2'">商场</span>
<span target="_blank" v-if="row.clientType == '3'">装饰</span>
<span target="_blank" v-if="row.clientType == '4'">个人</span>
<span target="_blank" v-if="row.clientType == '5'">待调整</span>
<span target="_blank" v-if="row.clientType == '6'">待调整</span>
<!-- <span target="_blank" v-else>收货方</span>-->
</template>
<!-- <el-link href="https://element.eleme.io" target="_blank" v-if="item.prop === 'fileName'">{{scope}}</el-link>-->
@ -150,6 +152,9 @@
<el-dropdown-item>
<el-button type="primary" text icon="el-icon-setting" @click="handleLinkman(row)">联系人</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button type="primary" text icon="el-icon-setting" @click="handleBrand(row)">品牌</el-button>
</el-dropdown-item>
<!-- <el-dropdown-item v-if="!!row.clientType">-->
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleBase(row)" v-if=" row.clientType == '1'">基地</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleStore(row)" v-if=" row.clientType == '2'">门店</el-button>-->
@ -361,7 +366,7 @@
</template>
<script>
import { getList, getDetail, add, update, updateCargoControl } from '@/api/basicdata/basicClient';
import { getList, getDetail, add, update, updateCargoControl,remove } from '@/api/basicdata/basicClient';
import option from '@/option/basicdata/basicClient';
import { mapGetters } from 'vuex';
import BasicShopSub from '@/views/basicdata/brand/basicShopSub.vue';
@ -461,7 +466,7 @@ export default {
rules: {
clientName: [
{ required: true, message: '请输入客户名称', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
// { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' }
],
typeService: [
{ required: true, message: '请选择客户端类型', trigger: 'change' }
@ -851,6 +856,16 @@ export default {
this.basicClientId = row.id;
this.drawer = true;
},
handleBrand(row) { //
this.$router.push({
path:'/basicdata/brand/basicdataStoreBrand',
query:{
id: row.id,
name: "品牌 - "+row.clientName
}
});
},
//
handleHistory(row) {
// this.basicClientId = row.id;
@ -889,7 +904,6 @@ export default {
query: {
id: row.id,
name: '联系人 - ' + row.clientName,
type: 2
}
});
},

33
src/views/basicdata/brand/basicClientFrom.vue

@ -137,6 +137,9 @@
<el-dropdown-item>
<el-button type="primary" text icon="el-icon-setting" @click="handleLinkman(row)">联系人</el-button>
</el-dropdown-item>
<el-dropdown-item>
<el-button type="primary" text icon="el-icon-setting" @click="handleBrand(row)">品牌</el-button>
</el-dropdown-item>
<!-- <el-dropdown-item v-if="!!row.clientType">-->
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleBase(row)" v-if=" row.clientType == '1'">基地</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-setting" @click="handleStore(row)" v-if=" row.clientType == '2'">门店</el-button>-->
@ -349,13 +352,12 @@
<script>
import { getList, getDetail, add, update, updateCargoControl } from '@/api/basicdata/basicClient';
import option from '@/option/basicdata/basicClient';
import option from '@/option/basicdata/basicClientFrom';
import { mapGetters } from 'vuex';
import BasicShopSub from '@/views/basicdata/brand/basicShopSub.vue';
import { getDictionaryBiz } from '@/api/system/dict';
import { getSelect, getLazyTree, getLazyList, getLazyTreeAll } from '@/api/base/region';
import { getToken } from '@/utils/auth';
import globalc from '@/api/basicdata/globalc';
import { Base64 } from 'js-base64';
@ -481,7 +483,17 @@ export default {
created() {
},
mounted() {
watch: {
'$route.query.id': {
handler(newVal, oldVal) {
console.log(newVal, oldVal);
this.onLoad(this.page);
},
deep: true,
immediate: true
}
},
mounted() {
this.init();
getLazyTreeAll().then(res => {
if (res.data.success) {
@ -622,7 +634,7 @@ export default {
},
async init() {
//
getDictionaryBiz('client_type_add').then(res => {
getDictionaryBiz('client_type').then(res => {
// console.log("",res);
this.clientType = res.data.data;
});
@ -752,7 +764,7 @@ export default {
},
handleAddSon(row) {
this.$router.push({
path: '/basicdata/brand/basicClient',
path: '/basicdata/brand/basicClientFrom',
query: {
id: row.id,
name: '新增 - ' + row.clientName
@ -839,6 +851,15 @@ export default {
this.basicClientId = row.id;
this.drawer = true;
},
handleBrand(row) { //
this.$router.push({
path:'/basicdata/brand/basicdataStoreBrand',
query:{
id: row.id,
name: "品牌 - "+row.clientName
}
});
},
//
handleHistory(row) {
// this.basicClientId = row.id;
@ -954,7 +975,7 @@ export default {
},
selectionClear() {
this.selectionList = [];
this.$refs.table.clearSelection();
// this.$refs.table.clearSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;

96
src/views/basicdata/brand/basicStoreContact.vue

@ -53,6 +53,15 @@
:label="item.label"
:width="item.width"
:key="index">
<template #default="{row,$index}" v-if="item.prop === 'defaultType'">
<el-switch
v-model="row.defaultType"
active-text="开"
inactive-text="关"
@click="makeCargo(row)"
>
</el-switch>
</template>
</el-table-column>
</template>
<!-- 操作栏模块 -->
@ -111,16 +120,16 @@
</template>
<script>
import { getList, getDetail, add, update, remove } from "@/api/basicdata/basicStoreContact";
import { getList, getDetail, add, update, remove,updateCargoControl } from "@/api/basicdata/basicStoreContact";
import option from "@/option/basicdata/basicStoreContact";
import { mapGetters } from "vuex";
export default {
props: {
mainId: {
type: String
},
},
// props: {
// mainId: {
// type: String
// },
// },
data () {
return {
height: 0,
@ -176,17 +185,72 @@ export default {
}
},
watch:{
mainId: {
handler(newVal, oldVal) {
// console.log("");
this.onLoad(this.page);
}
}
// mainId: {
// handler(newVal, oldVal) {
// // console.log("");
// this.onLoad(this.page);
// }
// },
'$route.query.id': {
handler(newVal, oldVal) {
// console.log(newVal, oldVal);
this.onLoad(this.page);
},
deep: true,
immediate: true
}
},
methods: {
init () {
this.height = this.setPx(document.body.clientHeight - 340);
},
//
makeCargo(row) {
console.log('设置默认联系人!!', row);
let r = {
id: row.id,
shopId: row.shopId,
defaultType: row.defaultType
};
console.log("this.page.total",this.page.total);
if(this.page.total < 2){
this.$message.warning("只有一个联系人,暂不支持关闭");
row.defaultType = true;
return
}
this.$confirm(`确定要修改默认联系人吗?`, {
type: 'warning',
//beforeClose
beforeClose: async (action, instance, done) => {
//
if (action === 'confirm') {
//
updateCargoControl(r).then(res => {
console.log(res);
if (res.statusText == 'OK') {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
done();
} else {
this.$message({
type: 'warning',
message: '操作失败!'
});
}
});
} else {
//false
//done
done();
}
}
});
},
searchHide () {
this.search = !this.search;
@ -297,7 +361,7 @@ export default {
},
selectionClear () {
this.selectionList = [];
this.$refs.table.clearSelection();
// this.$refs.table.clearSelection();
},
currentChange (currentPage) {
this.page.currentPage = currentPage;
@ -310,8 +374,8 @@ export default {
onLoad (page, params = {}) {
this.loading = true;
this.query.shopId = this.$route.query.id; //ID
this.query.partitionType = this.$route.query.type; //ID
console.log('this.$route.query.id',this.$route.query.id);
// this.query.partitionType = this.$route.query.type; //ID
// console.log('this.$route.query.id',this.$route.query.id);
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;

113
src/views/distribution/reservation/atlas.vue

@ -21,17 +21,22 @@
</div>
<div style="margin-left: 40%; margin-top: 5%; float: bottom">
<el-button type="primary" icon="el-icon-circle-close" @click="aaa">确认(转配送页面)</el-button>
<el-button icon="el-icon-circle-close" @click="this.$router.go(-1)"> </el-button>
<el-button type="primary" icon="el-icon-circle-close" @click="checkgoto"
>确认(转配送页面)</el-button
>
<el-button icon="el-icon-circle-close" @click="back"> </el-button>
</div>
</template>
<script setup>
<script>
import { useStore } from 'vuex';
import { getReservationAddr } from '@/api/distribution/distributionReservation';
import { getDictionaryBiz } from '@/api/system/dict';
import { onMounted, reactive, toRefs } from 'vue';
import { onMounted, reactive, toRefs, watchEffect } from 'vue';
import { useRouter } from 'vue-router';
// import { ref } from 'vue'
export default {
setup() {
let router = useRouter();
let details = reactive({
name: 'BmapDemo',
@ -41,55 +46,119 @@ import { useRouter } from 'vue-router';
addressList: [],
reservationData: [],
reservationIds: [],
mapLoc: null,
});
onMounted(() => {
console.log(router);
details.ids = router.currentRoute.value.query.id;
initMap(router.currentRoute.value.query.id);
setTimeout(() => {
init();
}, 1500);
// setTimeout(()=>{
// details.mapLoc.clearOverlays();
// },9500)
});
watchEffect(() => {
console.log(details.reservationIds);
if(details.mapLoc){
details.mapLoc.clearOverlays();
}
// details.mapLoc.clearOverlays();
// details.mapLoc.clearLabels()
details.reservationIds.map((item,index) => {
details.reservationData.map(ite => {
if (item == ite.id) {
console.log(ite)
maplabel(ite,index)
}
});
});
// details.reservationData
});
onMounted(() => {});
function init() {
let map = new BMapGL.Map('container'); //
details.mapLoc = new BMapGL.Map('container'); //
let point = new BMapGL.Point(116.404, 39.915); //
map.centerAndZoom(point, 15);
map.enableScrollWheelZoom(true);
details.mapLoc.centerAndZoom(point, 12);
details.mapLoc.enableScrollWheelZoom(true);
// maplabel()
}
function maplabel(item,index) {
let myGeo = new BMapGL.Geocoder();
myGeo.getPoint('四川成都', function (point) {
myGeo.getPoint(item.deliveryAddress, function (point) {
if (point) {
map.centerAndZoom(point, 16);
console.log(point);
console.log(point,'---------------');
if(index==0){
details.mapLoc.centerAndZoom(point, 12);
}
let content = item.consignee;
let label = new BMapGL.Label(content, {
//
position:point,
offset: new BMapGL.Size(10, 20),
});
details.mapLoc.addOverlay(label); //
label.setStyle({
// label
color: '#000',
fontSize: '10px',
border: '1px solid #1E90FF',
borderRadius:'20px',
padding:'5px 10px'
});
console.log(label,'---------------');
} else {
// alert('');
console.log(point);
console.log('您选择的地址没有解析到结果!');
}
});
}
// init()
function initMap(ids) {
if (ids.length > 1) {
ids.split(',');
}
this.loading = true;
details.loading = true;
getReservationAddr(ids).then(res => {
res.data.data.forEach(item => {
this.ids.split(',').forEach(id => {
details.ids.split(',').forEach(id => {
if (item.id == id) {
this.reservationIds.push(item.id);
details.reservationIds.push(item.id);
}
});
});
console.log(this.reservationIds);
this.reservationData = res.data.data;
console.log(details.reservationIds);
details.reservationData = res.data.data;
this.addressList = res.data.data;
details.addressList = res.data.data;
});
this.loading = false;
details.loading = false;
}
function aaa() {
console.log('>>>>>>>>>>>', this.reservationIds);
let ids = this.reservationIds.join(',');
this.$router.push({
function checkgoto() {
console.log('>>>>>>>>>>>', details.reservationIds);
let ids = details.reservationIds.join(',');
router.push({
path: '/distribution/deliveryInfo/deliveryInfo',
query: {
id: ids,
},
});
}
function back() {
router.back(-1);
}
return {
back,
checkgoto,
init,
initMap,
...toRefs(details),
};
},
};
</script>
<style scoped>

Loading…
Cancel
Save