Browse Source

预约弹窗图片上传,预约列表详情页

fix_bug_pro20231227
13208366016 1 year ago
parent
commit
8aad829437
  1. 80
      src/views/distribution/reservation/atlas.vue
  2. 1258
      src/views/distribution/signfor/devtmp.vue
  3. 3515
      src/views/distribution/signfor/distributionSignforedt.vue
  4. 2299
      src/views/distribution/signfor/distributionSignforedtYL.vue
  5. 217
      src/views/distribution/signfor/distributionSignfortreat.vue
  6. 22
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  7. 4
      vite.config.js

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

@ -6,25 +6,29 @@
<div class="bmap" id="container"></div>
</div>
<div class="maplists">
<el-table :data="DataInfo" border style="width: 100%">
<el-table-column type="selection" width="55" />
<el-table-column prop="consignee" label="仓库" width="500" />
<el-table-column prop="content" label="位置" width="500" />
<el-table-column prop="deliveryPhone" label="电话" width="500" />
<el-table-column prop="time" label="时间" width="180" />
<el-table-column prop="distance" label="公里" width="200" />
<el-table-column label="件数" width="100">
<template #default="props">
{{ props.row.items.reservationNum + props.row.items.reservationStockListNum }}
</template>
</el-table-column>
</el-table>
<div style="display: flex; align-items: center; justify-content: center">
<el-button @click="checkgoto">确认(转配送)</el-button>
<el-button icon="el-icon-circle-close" @click="back"> </el-button>
</div>
<el-scrollbar>
<div class="mbx">
<el-checkbox
v-for="item in datalists"
v-model="item.isck"
:label="`${item.content}--时间:${item.time}--距离:${item.distance}公里(${
item.items.reservationNum + item.items.reservationStockListNum
})`"
size="large"
/>
<!-- <el-text class="mx-1 txbx" type="primary">
{{ item.content }}--时间:{{ item.time }}--距离:{{ item.distance }}公里({{
item.items.handQuantity
}})
</el-text> -->
</div>
</el-scrollbar>
</div>
</div>
<div style="display: flex; align-items: center; justify-content: center">
<el-button @click="checkgoto">确认(转配送)</el-button>
<el-button icon="el-icon-circle-close" @click="back"> </el-button>
</div>
</div>
</basic-container>
</template>
@ -33,7 +37,7 @@
import { useStore } from 'vuex';
import { getReservationAddr } from '@/api/distribution/distributionReservation';
import { getDictionaryBiz } from '@/api/system/dict';
import { onMounted, reactive, toRefs, watchEffect, ref } from 'vue';
import { onMounted, reactive, toRefs, watchEffect } from 'vue';
import { useRouter } from 'vue-router';
import { selectStockArticleAtlasInfo } from '@/api/distribution/distributionDeliveryList';
// import { getReservationAddr } from '@/api/distribution/distributionReservation';
@ -55,7 +59,6 @@ let details = reactive({
drivingarrs: [],
// datalist:[]
});
const DataInfo = ref([]); //
onMounted(() => {
initmap();
});
@ -64,11 +67,13 @@ watchEffect(() => {
details.item = router.currentRoute.value.query.id;
if (!details.item) return;
getReservationAddr(details.item).then(res => {
console.log(res, '获取到的参数+');
DataInfo.value = res.data.data;
console.log(DataInfo, '接收参数');
this.console.log(res.data.data);
// selectStockArticleAtlasInfo(details.item.id).then(res => {
console.log(res.data.data);
const data = res.data.data;
// details.lng = res.data.data[0].jingdu;
// details.lat = res.data.data[0].weidu;
// details.abbreviation=res?.data?.data[0]?.warehouseName
// console.log('res------------->', data);
details.reservationData = data;
details.mapLoc.remove(details.markersarr);
details.drivingarrs.map(item => {
@ -102,7 +107,6 @@ function checkgoto() {
return;
}
let stids = ids.join(',');
//
router.push({
path: '/distribution/turndelivery/deliveryMarket',
query: {
@ -225,7 +229,6 @@ const { datalists } = toRefs(details);
}
.mabxmp {
display: flex;
height: 100%;
align-items: flex-start;
> .mapbox {
width: 50%;
@ -250,31 +253,4 @@ const { datalists } = toRefs(details);
box-sizing: border-box;
width: 100%;
}
:deep(.el-card) {
height: 100%;
}
.amap-container {
height: 100%;
margin-bottom: 10px;
}
:deep(.el-card__body) {
height: 100%;
.avue-crud {
height: 100%;
.mapbox {
height: 100%;
}
}
}
:deep(.cell) {
display: flex;
padding: 0;
align-items: center;
justify-content: center;
}
:deep(.el-table-column--selection) {
display: flex;
align-items: center;
justify-content: center;
}
</style>

1258
src/views/distribution/signfor/devtmp.vue

File diff suppressed because it is too large Load Diff

3515
src/views/distribution/signfor/distributionSignforedt.vue

File diff suppressed because it is too large Load Diff

2299
src/views/distribution/signfor/distributionSignforedtYL.vue

File diff suppressed because it is too large Load Diff

217
src/views/distribution/signfor/distributionSignfortreat.vue

@ -133,12 +133,16 @@
@click="viewAbnormalLoading(slotProps.scope)"
> </el-text
>
<!-- v-if="
slotProps.scope.row.sijiSigningStatus == '司机已签收' &&
slotProps.scope.row.wenyuanSigningStatus == '文员待审核'
" -->
<el-text
size="small"
v-if="
slotProps.scope.row.sijiSigningStatus == '司机已签收' &&
slotProps.scope.row.wenyuanSigningStatus == '文员待审核'
"
size="small"
@click="handleSign(slotProps.scope.row)"
> </el-text
>
@ -244,28 +248,23 @@
</template>
</el-dialog>
<el-dialog :title="'签收'" v-model="signBox" width="45%" append-to-body>
<avue-form :option="signoption" v-model="signform" :data="signdata" ref="signform">
</avue-form>
<div style="bottom: 7%; margin-left: 250px; width: 50%">
<div style="width: 100%">
<el-button type="primary" @click="submitForm" style="margin-right: 40%">确定</el-button>
<el-button type="primary" @click="cancellation">取消</el-button>
</div>
</div>
<span>-------------------------------------------------------------------------------</span>
<el-dialog :title="'签收'" v-model="signBox" width="60%" append-to-body>
<!-- <avue-form :option="signoption" v-model="signform" :data="signdata" ref="signform">
</avue-form> -->
<!-- <span>-------------------------------------------------------------------------------</span> -->
<div class="TcFrom">
<el-form :model="TcForm" label-width="120px">
<el-form-item label="收货人姓名">
<el-input disabled v-model="TcForm.consignee" />
<el-input disabled v-model="TcForm.consignee" placeholder="暂无收货人姓名" />
</el-form-item>
<el-form-item label="收货人电话">
<el-input disabled v-model="TcForm.deliveryPhone" />
<el-input disabled v-model="TcForm.deliveryPhone" placeholder="暂无收货人电话" />
</el-form-item>
<el-form-item label="收货人地址">
<el-input disabled v-model="TcForm.deliveryAddress" />
<el-input disabled v-model="TcForm.deliveryAddress" placeholder="暂无收货人地址" />
</el-form-item>
<el-form-item label="签收人类型">
@ -276,17 +275,19 @@
</el-form-item>
<el-form-item label="备注">
<el-input v-model="TcForm.clerkSignRemarks" />
<el-input v-model="TcForm.clerkSignRemarks" placeholder="暂无备注" />
</el-form-item>
</el-form>
<div class="imgName">
<span>上门照</span>
<el-upload
v-model:file-list="DoorstepPhoto"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:action="doubledCount"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="ImgSuccessA"
:headers="headers"
>
<el-icon><Plus /></el-icon>
</el-upload>
@ -299,10 +300,12 @@
<span>堆码照</span>
<el-upload
v-model:file-list="StackingPhoto"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:action="doubledCount"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="ImgSuccessB"
:headers="headers"
>
<el-icon><Plus /></el-icon>
</el-upload>
@ -315,10 +318,12 @@
<span>易碎照</span>
<el-upload
v-model:file-list="FragilePhotos"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:action="doubledCount"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="ImgSuccessC"
:headers="headers"
>
<el-icon><Plus /></el-icon>
</el-upload>
@ -331,10 +336,12 @@
<span>家配照</span>
<el-upload
v-model:file-list="HomePhotos"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:action="doubledCount"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="ImgSuccessD"
:headers="headers"
>
<el-icon><Plus /></el-icon>
</el-upload>
@ -347,10 +354,12 @@
<span>签收照</span>
<el-upload
v-model:file-list="SignForPhotos"
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
:action="doubledCount"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-success="ImgSuccessE"
:headers="headers"
>
<el-icon><Plus /></el-icon>
</el-upload>
@ -358,6 +367,13 @@
<img w-full :src="dialogImageUrl" alt="IMG" />
</el-dialog>
</div>
<div style="bottom: 7%; margin-left: 250px; width: 50%">
<div style="width: 100%">
<el-button type="primary" @click="submitForm" style="margin-right: 40%">确定</el-button>
<el-button type="primary" @click="cancellation">取消</el-button>
</div>
</div>
</div>
</el-dialog>
</div>
@ -457,7 +473,7 @@ import option from '@/option/distribution/distributionSignfor';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { getToken } from '@/utils/auth';
export default {
data() {
return {
@ -474,7 +490,7 @@ export default {
HomePhotos: [],
//
SignForPhotos: [],
reservationId: null, //ID
columnList: [
// {
// prop: '',
@ -1347,6 +1363,14 @@ export default {
});
return ids.join(',');
},
//
doubledCount() {
return '/api/blade-resource/oss/endpoint/put-file';
},
// TOKEN
headers() {
return { 'Blade-Auth': 'Bearer ' + getToken() };
},
},
methods: {
showdrawer(value) {
@ -1363,6 +1387,41 @@ export default {
console.log('执行了2回调');
dialogVisible.value = true;
},
photo(name, data) {
if (response.success == true) {
console.log(response, '图片上传成功');
this.name[this.name.length - 1].url = data.data.link;
}
},
methods: {
//
handleImageUploadSuccess(response, uploadFile, photoArray) {
if (response.success === true) {
console.log(response, '图片上传成功');
this.$set(photoArray, photoArray.length - 1, { url: response.data.link });
}
},
//
ImgSuccessA(response, uploadFile) {
this.handleImageUploadSuccess(response, uploadFile, this.DoorstepPhoto);
},
//
ImgSuccessB(response, uploadFile) {
this.handleImageUploadSuccess(response, uploadFile, this.StackingPhoto);
},
//
ImgSuccessC(response, uploadFile) {
this.handleImageUploadSuccess(response, uploadFile, this.FragilePhotos);
},
//
ImgSuccessD(response, uploadFile) {
this.handleImageUploadSuccess(response, uploadFile, this.HomePhotos);
},
//
ImgSuccessE(response, uploadFile) {
this.handleImageUploadSuccess(response, uploadFile, this.SignForPhotos);
},
},
/**
* 弹窗的勾选回调用于更改头部数组
* 固定搭配只需要更换 columnList
@ -1387,31 +1446,114 @@ export default {
//
submitForm() {
// this.isDis = true;
console.log(this.$refs.signform.validate, 'this.$refs.signform');
// let row = {};
// row.id = this.signform.id;
// row.clerkSignPictures = this.signform.clerkSignPictures;
// row.clerkSignRemarks = this.signform.clerkSignRemarks;
// console.log(row, '');
this.$refs.signform.validate(valid => {
if (valid) {
let row = {};
row.map = {
photo_1: [],
photo_2: [],
photo_3: [],
photo_4: [],
photo_5: [],
};
//
//
row.id = this.signform.id;
row.reservationId = this.reservationId;
row.clerkSignPictures = this.signform.clerkSignPictures;
row.clerkSignRemarks = this.signform.clerkSignRemarks;
row.signingStatus = '2';
// if (!!row.id){
updatesign(row).then(
() => {
this.$message({
type: 'success',
message: '操作成功!',
row.clerkSignRemarks = this.TcForm.clerkSignRemarks;//
row.signingStatus = '2';//
//
const photoMap = {
photo_1: 'photo_1',
photo_2: 'photo_2',
photo_3: 'photo_3',
photo_4: 'photo_4',
photo_5: 'photo_5',
};
this.TcForm.printVOList.forEach(item => {
const type = item.type;
if (photoMap.hasOwnProperty(type)) {
const photoProperty = photoMap[type];
row.map[photoProperty].push({
name: item.name,
reservationId: this.reservationId,
type: type,
urlRoute: item.urlRoute,
});
this.signBox = false;
this.onLoad(this.page);
},
error => {
console.log(error);
this.signBox = false;
}
);
});
//
//
function generatePhotoArray(photoType, photoItems, reservationId) {
const photoArray = [];
photoItems.forEach(item => {
photoArray.push({
name: item.name,
reservationId: reservationId,
type: photoType,
urlRoute: item.url,
});
});
return photoArray;
}
row.map.photo_1 = generatePhotoArray('photo_1', this.DoorstepPhoto, this.reservationId);
row.map.photo_2 = generatePhotoArray('photo_2', this.StackingPhoto, this.reservationId);
row.map.photo_3 = generatePhotoArray('photo_3', this.FragilePhotos, this.reservationId);
row.map.photo_4 = generatePhotoArray('photo_4', this.HomePhotos, this.reservationId);
row.map.photo_5 = generatePhotoArray('photo_5', this.SignForPhotos, this.reservationId);
//
//
this.deduplicateByIdAndUpdate(row.map.photo_1);
this.deduplicateByIdAndUpdate(row.map.photo_2);
this.deduplicateByIdAndUpdate(row.map.photo_3);
this.deduplicateByIdAndUpdate(row.map.photo_4);
this.deduplicateByIdAndUpdate(row.map.photo_5);
console.log(row, '要提交的参数');
//
// updatesign(row).then(res => {
// console.log(res, '');
// });
// if (!!row.id){
// updatesign(row).then(
// () => {
// console.log(row, '');
// this.$message({
// type: 'success',
// message: '!',
// });
// this.signBox = false;
// this.onLoad(this.page);
// },
// error => {
// console.log(error);
// this.signBox = false;
// }
// );
}
});
},
deduplicateByIdAndUpdate(val) {
const result = val.filter((item, index, array) => {
// some ID
return !array.slice(0, index).some(prevItem => prevItem.urlRoute === item.urlRoute);
});
//
val.length = 0;
//
result.forEach(item => {
val.push(item);
});
},
selectionsc(value) {
console.log(value);
},
@ -1459,6 +1601,7 @@ export default {
console.log('签收>>>>>>>>>>', row);
// this.title = '';
// this.view = true;
this.reservationId = row.reservationId; //ID
this.signform = row;
this.signBox = true;
getDetail(row.id).then(res => {

22
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -1163,6 +1163,28 @@ const menuData = ref([
// sortable: true,
// head: true,
// },
{
prop: 'mallCode',
label: '商场编号',
type: 1,
values: '',
width: '260',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'storeCode',
label: '经销商编码',
type: 1,
values: '',
width: '260',
checkarr: [],
fixed: false,
sortable: true,
head: true,
},
{
prop: 'storeName',
label: '门店名称',

4
vite.config.js

@ -20,9 +20,9 @@ export default ({ mode, command }) => {
// caoge
// target: 'http://192.168.10.101:8888',
// cyz
target: 'http://192.168.10.75:8777',
// target: 'http://192.168.10.75:8777',
// tjj
// target: 'http://192.168.10.29:13000',
target: 'http://192.168.10.29:13000',
// target: 'http://test.api.huitongys.com',
// target: 'http://h5uapi.huitongys.com',
changeOrigin: true,

Loading…
Cancel
Save