Browse Source

修复代签收列表复核

dev-xx
马远东 8 months ago
parent
commit
8d90ae6ded
  1. 13
      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

13
src/api/distribution/SeparateTheList.js

@ -1,9 +1,18 @@
import request from '@/axios';
export const $_alltasklist = (params) => {
export const $_alltasklist = params => {
return request({
url: '/api/logpm-distribution/split-order-task/all-task-list',
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: '拆单任务状态',
type: 1,
type: 3,
values: '',
width: '150',
fixed: true,

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

@ -53,8 +53,8 @@
>
<template #default="slotProps">
<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>
</template>
</template>
@ -111,83 +111,82 @@ import { columnList } from '@/option/distribution/SeparateTheList.js';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router';
import { ElMessage, ElMessageBox } from 'element-plus';
import { $_alltasklist } from '@/api/distribution/SeparateTheList';
import { $_alltasklist, $_finishalltask } from '@/api/distribution/SeparateTheList';
//
const $router = useRouter();
const $store = useStore();
const details =
reactive ({
/** 是否开启搜索 */
search: true,
/** 表格搜索条件 */
query: {},
/** 时间快捷选择设置 */
shortcuts: [
{
text: '最近一周',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
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];
},
const details = reactive({
/** 是否开启搜索 */
search: true,
/** 表格搜索条件 */
query: {},
/** 时间快捷选择设置 */
shortcuts: [
{
text: '最近一周',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
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,
{
text: '最近一个月',
value: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
return [start, end];
},
},
/** 列表Dom节点 */
listNode: '',
form: {},
/** 全屏 */
fullscreenObj: {
/** 查看 */
view: false,
{
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: {
/** 图片预览 */
abnormalVisited: false,
},
/** 列表Dom节点 */
listNode: '',
form: {},
/** 全屏 */
fullscreenObj: {
/** 查看 */
view: false,
},
});
const { search, query, shortcuts, stockupDate, data, loadingObj, selectionList, drawerShow, page } =
toRefs(details);
@ -212,6 +211,15 @@ const onLoad = debounce(async (params = {}) => {
console.log('初始化参数 ', res);
const { code, data } = res.data;
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;
handleTranslationDataSeclect(details.data, details.columnList);
details.page.total = data.total;
@ -346,6 +354,24 @@ const handleDelete = (isBatch, row = {}) => {
const handleExport = () => {
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>
<style scoped lang="scss">

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

@ -417,6 +417,8 @@
class="el_form_box"
ref="ruleFormRef"
:rules="ruleForm"
v-loading="tcloading"
element-loading-text="Loading..."
>
<template v-for="(item, index) in Splittheform.PackageList">
<div class="el_item_box">
@ -432,7 +434,7 @@
:controls="false"
placeholder="请输入拆单件数"
@change="changeTaskNumber"
:value-on-clear='0'
:value-on-clear="0"
/>
</el-form-item>
<el-form-item
@ -517,6 +519,7 @@ export default {
return {
excelForm: {},
excelBox: false,
tcloading: false,
Totalnumbersplitorders: 0,
dataRwo: {},
ruleForm: {
@ -1229,13 +1232,30 @@ export default {
Splittheorder(row) {
console.log(row);
this.dataRwo = row;
let data={
orderCode:row.orderCode,
}
$_checkordercode(data).then(res=>{
console.log(res,'是否可以拆单');
})
this.dialogSplitthe = true;
let data = {
orderCode: row.orderCode,
};
this.loading = true;
$_checkordercode(data)
.then(res => {
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() {
@ -1296,25 +1316,42 @@ export default {
});
return;
}
let data = [];
this.Splittheform.PackageList.forEach(item => {
data.push({
stockArticleId: this.dataRwo.id, //ID
orderCode: this.dataRwo.orderCode, //
mallName: this.dataRwo.mallName, //
taskNumber: item.taskNumber, //
customerName: item.customerName, //
customerTelephone: item.customerTelephone, //
customerAddress: item.customerAddress, //
});
});
console.log(data, '要提交的数据');
$_batchcreatetask(data).then(res => {
console.log(res, '拆单成功');
});
} else {
console.log('验证不通过');
ElMessageBox.confirm('是否确认拆单?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
let data = [];
this.Splittheform.PackageList.forEach(item => {
data.push({
stockArticleId: this.dataRwo.id, //ID
orderCode: this.dataRwo.orderCode, //
mallName: this.dataRwo.mallName, //
taskNumber: item.taskNumber, //
customerName: item.customerName, //
customerTelephone: item.customerTelephone, //
customerAddress: item.customerAddress, //
});
});
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 :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">
<div class="TcFrom" v-loading="TcFromloading" element-loading-text="Loading..." >
<el-form :model="TcForm" label-width="120px" >
<el-form-item label="收货人姓名">
<el-input disabled v-model="TcForm.consignee" placeholder="暂无收货人姓名" />
</el-form-item>
@ -339,7 +335,7 @@
:action="doubledCount"
list-type="picture-card"
:on-preview="EnlargeTheTmageC"
:before-upload="beforeUpload"
:before-upload="beforeUpload"
:on-remove="handleRemove"
:on-success="ImgSuccessC"
:headers="headers"
@ -360,7 +356,7 @@
v-model:file-list="HomePhotos"
:action="doubledCount"
list-type="picture-card"
:before-upload="beforeUpload"
:before-upload="beforeUpload"
:on-preview="EnlargeTheTmageD"
:on-remove="handleRemove"
:on-success="ImgSuccessD"
@ -383,7 +379,7 @@
:action="doubledCount"
list-type="picture-card"
:on-preview="EnlargeTheTmageE"
:before-upload="beforeUpload"
:before-upload="beforeUpload"
:on-remove="handleRemove"
:on-success="ImgSuccessE"
:headers="headers"
@ -526,7 +522,7 @@ import {
$_retentionScan,
} 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 { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
@ -544,6 +540,7 @@ export default {
webCamera: false, //
Abnormalloading: false, //
dialogImageUrl: '', //
TcFromloading: false,
dialogVisible: false, //
dialogImageUrlA: '',
dialogImageUrlB: '',
@ -1862,18 +1859,6 @@ export default {
},
//
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 = {};
row.map = {
photo_1: [],
@ -1912,7 +1897,6 @@ export default {
}
});
//
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_3 = this.generatePhotoArray('photo_3', this.FragilePhotos, this.reservationId);
@ -1927,7 +1911,7 @@ export default {
this.deduplicateByIdAndUpdate(row.map.photo_5);
console.log(row, '要提交的参数');
//
this.TcFromloading=true
updatesign(row).then(res => {
console.log(res, '提交之后返回的参数');
this.signBox = false;
@ -1940,35 +1924,20 @@ export default {
ElMessage.error('操作失败');
}
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) {
this.dialogImageUrlA = uploadFile.url;
this.dialogVisibleA = true;
},
async beforeUpload(file){
const compressedBlob = await compressImageBlob(file);
return compressedBlob;
async beforeUpload(file) {
const compressedBlob = await compressImageBlob(file);
return compressedBlob;
},
EnlargeTheTmageB(uploadFile) {
this.dialogImageUrlB = uploadFile.url;

Loading…
Cancel
Save