Browse Source

修复代签收列表复核

dev-xx
马远东 8 months ago
parent
commit
8d90ae6ded
  1. 15
      src/api/distribution/SeparateTheList.js
  2. 4
      src/option/distribution/SeparateTheList.js
  3. 166
      src/views/distribution/inventory/delivery/SeparateTheList.vue
  4. 91
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  5. 61
      src/views/distribution/signfor/distributionSignfortreat.vue

15
src/api/distribution/SeparateTheList.js

@ -1,9 +1,18 @@
import request from '@/axios'; import request from '@/axios';
export const $_alltasklist = (params) => { export const $_alltasklist = params => {
return request({ return request({
url: '/api/logpm-distribution/split-order-task/all-task-list', url: '/api/logpm-distribution/split-order-task/all-task-list',
method: 'get', method: 'get',
params params,
}); });
}; };
// 完成总任务
export const $_finishalltask = params => {
return request({
url: '/api/logpm-distribution/split-order-task/finish-all-task',
method: 'post',
params,
});
};

4
src/option/distribution/SeparateTheList.js

@ -58,9 +58,9 @@ export const columnList = [
}, },
{ {
prop: 'state', prop: 'stateNameS',
label: '拆单任务状态', label: '拆单任务状态',
type: 1, type: 3,
values: '', values: '',
width: '150', width: '150',
fixed: true, fixed: true,

166
src/views/distribution/inventory/delivery/SeparateTheList.vue

@ -53,8 +53,8 @@
> >
<template #default="slotProps"> <template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> <template v-if="slotProps.scope.column.label === '操作'">
<el-text @click="handleView(slotProps.scope)"> </el-text> <el-text @click="handleView(slotProps.scope)"> </el-text>
<el-text @click="determine(slotProps.scope.row)"> 完成任务 </el-text>
<el-text @click="handleDelete(false, slotProps.scope.row)"> </el-text> <el-text @click="handleDelete(false, slotProps.scope.row)"> </el-text>
</template> </template>
</template> </template>
@ -111,83 +111,82 @@ import { columnList } from '@/option/distribution/SeparateTheList.js';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { $_alltasklist } from '@/api/distribution/SeparateTheList'; import { $_alltasklist, $_finishalltask } from '@/api/distribution/SeparateTheList';
// //
const $router = useRouter(); const $router = useRouter();
const $store = useStore(); const $store = useStore();
const details = const details = reactive({
reactive ({ /** 是否开启搜索 */
/** 是否开启搜索 */ search: true,
search: true, /** 表格搜索条件 */
/** 表格搜索条件 */ query: {},
query: {}, /** 时间快捷选择设置 */
/** 时间快捷选择设置 */ shortcuts: [
shortcuts: [ {
{ text: '最近一周',
text: '最近一周', value: () => {
value: () => { const end = new Date();
const end = new Date(); const start = new Date();
const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); return [start, end];
return [start, end];
},
},
{
text: '最近一个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
},
{
text: '最近三个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
return [start, end];
},
}, },
],
/** 列表 */
columnList: deepClone(columnList),
/** 列表数据 */
data: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
list: false,
/** 页面loading */
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
/** 是否显示设置表格 */
drawerShow: false,
/** 分页参数 */
page: {
current: 1,
size: 30,
total: 0,
}, },
/** 弹出层显示 */ {
popUpShow: { text: '最近一个月',
/** 图片预览 */ value: () => {
abnormalVisited: false, const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
}, },
/** 列表Dom节点 */ {
listNode: '', text: '最近三个月',
form: {}, value: () => {
/** 全屏 */ const end = new Date();
fullscreenObj: { const start = new Date();
/** 查看 */ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
view: false, return [start, end];
},
}, },
}); ],
/** 列表 */
columnList: deepClone(columnList),
/** 列表数据 */
data: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
list: false,
/** 页面loading */
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
/** 是否显示设置表格 */
drawerShow: false,
/** 分页参数 */
page: {
current: 1,
size: 30,
total: 0,
},
/** 弹出层显示 */
popUpShow: {
/** 图片预览 */
abnormalVisited: false,
},
/** 列表Dom节点 */
listNode: '',
form: {},
/** 全屏 */
fullscreenObj: {
/** 查看 */
view: false,
},
});
const { search, query, shortcuts, stockupDate, data, loadingObj, selectionList, drawerShow, page } = const { search, query, shortcuts, stockupDate, data, loadingObj, selectionList, drawerShow, page } =
toRefs(details); toRefs(details);
@ -212,6 +211,15 @@ const onLoad = debounce(async (params = {}) => {
console.log('初始化参数 ', res); console.log('初始化参数 ', res);
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
data.records.forEach(item => {
if (item.state == 1) {
item.stateNameS = '未完成';
} else if (item.state == 2) {
item.stateNameS = '已完成';
} else if (item.state == 3) {
item.stateNameS = '已撤销';
}
});
details.data = data.records; details.data = data.records;
handleTranslationDataSeclect(details.data, details.columnList); handleTranslationDataSeclect(details.data, details.columnList);
details.page.total = data.total; details.page.total = data.total;
@ -346,6 +354,24 @@ const handleDelete = (isBatch, row = {}) => {
const handleExport = () => { const handleExport = () => {
getVehicleExport(); getVehicleExport();
}; };
//
const determine = row => {
console.log(row);
ElMessageBox.confirm('是否确认完成任务?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
let data = {
taskId: row.id,
};
$_finishalltask(data).then(res => {
console.log(res, '完成');
});
})
.catch(() => {});
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

91
src/views/distribution/inventory/delivery/distributionStockArticle.vue

@ -417,6 +417,8 @@
class="el_form_box" class="el_form_box"
ref="ruleFormRef" ref="ruleFormRef"
:rules="ruleForm" :rules="ruleForm"
v-loading="tcloading"
element-loading-text="Loading..."
> >
<template v-for="(item, index) in Splittheform.PackageList"> <template v-for="(item, index) in Splittheform.PackageList">
<div class="el_item_box"> <div class="el_item_box">
@ -432,7 +434,7 @@
:controls="false" :controls="false"
placeholder="请输入拆单件数" placeholder="请输入拆单件数"
@change="changeTaskNumber" @change="changeTaskNumber"
:value-on-clear='0' :value-on-clear="0"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -517,6 +519,7 @@ export default {
return { return {
excelForm: {}, excelForm: {},
excelBox: false, excelBox: false,
tcloading: false,
Totalnumbersplitorders: 0, Totalnumbersplitorders: 0,
dataRwo: {}, dataRwo: {},
ruleForm: { ruleForm: {
@ -1229,13 +1232,30 @@ export default {
Splittheorder(row) { Splittheorder(row) {
console.log(row); console.log(row);
this.dataRwo = row; this.dataRwo = row;
let data={ let data = {
orderCode:row.orderCode, orderCode: row.orderCode,
} };
$_checkordercode(data).then(res=>{ this.loading = true;
console.log(res,'是否可以拆单'); $_checkordercode(data)
}) .then(res => {
this.dialogSplitthe = true; console.log(res, '是否可以拆单');
if (res.data.code == 200) {
if (res.data.msg) {
this.$message({
message: '当前订单已经执行过拆单',
type: 'warning',
});
} else {
this.dialogSplitthe = true;
}
}
})
.catch(error => {
console.log(error);
})
.finally(() => {
this.loading = false;
});
}, },
// //
changeTaskNumber() { changeTaskNumber() {
@ -1296,25 +1316,42 @@ export default {
}); });
return; return;
} }
let data = []; ElMessageBox.confirm('是否确认拆单?', '提示', {
this.Splittheform.PackageList.forEach(item => { confirmButtonText: '确认',
data.push({ cancelButtonText: '取消',
stockArticleId: this.dataRwo.id, //ID type: 'warning',
orderCode: this.dataRwo.orderCode, // })
mallName: this.dataRwo.mallName, // .then(() => {
taskNumber: item.taskNumber, // let data = [];
customerName: item.customerName, // this.Splittheform.PackageList.forEach(item => {
customerTelephone: item.customerTelephone, // data.push({
customerAddress: item.customerAddress, // stockArticleId: this.dataRwo.id, //ID
}); orderCode: this.dataRwo.orderCode, //
}); mallName: this.dataRwo.mallName, //
taskNumber: item.taskNumber, //
console.log(data, '要提交的数据'); customerName: item.customerName, //
$_batchcreatetask(data).then(res => { customerTelephone: item.customerTelephone, //
console.log(res, '拆单成功'); customerAddress: item.customerAddress, //
}); });
} else { });
console.log('验证不通过'); console.log(data, '要提交的数据');
this.tcloading = true;
$_batchcreatetask(data)
.then(res => {
console.log(res, '拆单成功');
if (res.data.code == 200) {
this.dialogSplitthe = false;
this.onLoad(this.page);
}
})
.catch(error => {
console.log(error);
})
.finally(() => {
this.tcloading = false;
});
})
.catch(() => {});
} }
}); });
}, },

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

@ -257,12 +257,8 @@
</el-dialog> </el-dialog>
<el-dialog :title="'签收'" v-model="signBox" width="60%" append-to-body> <el-dialog :title="'签收'" v-model="signBox" width="60%" append-to-body>
<!-- <avue-form :option="signoption" v-model="signform" :data="signdata" ref="signform"> <div class="TcFrom" v-loading="TcFromloading" element-loading-text="Loading..." >
</avue-form> --> <el-form :model="TcForm" label-width="120px" >
<!-- <span>-------------------------------------------------------------------------------</span> -->
<div class="TcFrom">
<el-form :model="TcForm" label-width="120px">
<el-form-item label="收货人姓名"> <el-form-item label="收货人姓名">
<el-input disabled v-model="TcForm.consignee" placeholder="暂无收货人姓名" /> <el-input disabled v-model="TcForm.consignee" placeholder="暂无收货人姓名" />
</el-form-item> </el-form-item>
@ -339,7 +335,7 @@
:action="doubledCount" :action="doubledCount"
list-type="picture-card" list-type="picture-card"
:on-preview="EnlargeTheTmageC" :on-preview="EnlargeTheTmageC"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-success="ImgSuccessC" :on-success="ImgSuccessC"
:headers="headers" :headers="headers"
@ -360,7 +356,7 @@
v-model:file-list="HomePhotos" v-model:file-list="HomePhotos"
:action="doubledCount" :action="doubledCount"
list-type="picture-card" list-type="picture-card"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-preview="EnlargeTheTmageD" :on-preview="EnlargeTheTmageD"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-success="ImgSuccessD" :on-success="ImgSuccessD"
@ -383,7 +379,7 @@
:action="doubledCount" :action="doubledCount"
list-type="picture-card" list-type="picture-card"
:on-preview="EnlargeTheTmageE" :on-preview="EnlargeTheTmageE"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-success="ImgSuccessE" :on-success="ImgSuccessE"
:headers="headers" :headers="headers"
@ -526,7 +522,7 @@ import {
$_retentionScan, $_retentionScan,
} from '@/api/distribution/distributionSignfor'; } from '@/api/distribution/distributionSignfor';
import { update as updatesign } from '@/api/distribution/distributionSignfor'; import { update as updatesign } from '@/api/distribution/distributionSignfor';
import{compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js' import { compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js';
import option from '@/option/distribution/distributionSignfor'; import option from '@/option/distribution/distributionSignfor';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
@ -544,6 +540,7 @@ export default {
webCamera: false, // webCamera: false, //
Abnormalloading: false, // Abnormalloading: false, //
dialogImageUrl: '', // dialogImageUrl: '', //
TcFromloading: false,
dialogVisible: false, // dialogVisible: false, //
dialogImageUrlA: '', dialogImageUrlA: '',
dialogImageUrlB: '', dialogImageUrlB: '',
@ -1862,18 +1859,6 @@ export default {
}, },
// //
submitForm() { submitForm() {
console.log(this.DoorstepPhoto,'img最新');
return
// 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 = {}; let row = {};
row.map = { row.map = {
photo_1: [], photo_1: [],
@ -1912,7 +1897,6 @@ export default {
} }
}); });
// //
row.map.photo_1 = this.generatePhotoArray('photo_1', this.DoorstepPhoto, this.reservationId); row.map.photo_1 = this.generatePhotoArray('photo_1', this.DoorstepPhoto, this.reservationId);
row.map.photo_2 = this.generatePhotoArray('photo_2', this.StackingPhoto, this.reservationId); row.map.photo_2 = this.generatePhotoArray('photo_2', this.StackingPhoto, this.reservationId);
row.map.photo_3 = this.generatePhotoArray('photo_3', this.FragilePhotos, this.reservationId); row.map.photo_3 = this.generatePhotoArray('photo_3', this.FragilePhotos, this.reservationId);
@ -1927,7 +1911,7 @@ export default {
this.deduplicateByIdAndUpdate(row.map.photo_5); this.deduplicateByIdAndUpdate(row.map.photo_5);
console.log(row, '要提交的参数'); console.log(row, '要提交的参数');
// //
this.TcFromloading=true
updatesign(row).then(res => { updatesign(row).then(res => {
console.log(res, '提交之后返回的参数'); console.log(res, '提交之后返回的参数');
this.signBox = false; this.signBox = false;
@ -1940,35 +1924,20 @@ export default {
ElMessage.error('操作失败'); ElMessage.error('操作失败');
} }
this.onLoad(this.page); this.onLoad(this.page);
}).catch(err0r=>{
console.log(error);
}).finally(()=>{
this.TcFromloading=false;
}); });
// 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;
// }
// );
// }
// });
}, },
// //
EnlargeTheTmageA(uploadFile) { EnlargeTheTmageA(uploadFile) {
this.dialogImageUrlA = uploadFile.url; this.dialogImageUrlA = uploadFile.url;
this.dialogVisibleA = true; this.dialogVisibleA = true;
}, },
async beforeUpload(file){ async beforeUpload(file) {
const compressedBlob = await compressImageBlob(file); const compressedBlob = await compressImageBlob(file);
return compressedBlob; return compressedBlob;
}, },
EnlargeTheTmageB(uploadFile) { EnlargeTheTmageB(uploadFile) {
this.dialogImageUrlB = uploadFile.url; this.dialogImageUrlB = uploadFile.url;

Loading…
Cancel
Save