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. 34
      src/views/distribution/inventory/delivery/SeparateTheList.vue
  4. 53
      src/views/distribution/inventory/delivery/distributionStockArticle.vue
  5. 47
      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,

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

@ -54,7 +54,7 @@
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<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,14 +111,13 @@ 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 ({
const details = reactive({
/** 是否开启搜索 */
search: true,
/** 表格搜索条件 */
@ -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">

53
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: {
@ -1231,11 +1234,28 @@ export default {
this.dataRwo = row;
let data = {
orderCode: row.orderCode,
}
$_checkordercode(data).then(res=>{
};
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,6 +1316,12 @@ export default {
});
return;
}
ElMessageBox.confirm('是否确认拆单?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
let data = [];
this.Splittheform.PackageList.forEach(item => {
data.push({
@ -1308,13 +1334,24 @@ export default {
customerAddress: item.customerAddress, //
});
});
console.log(data, '要提交的数据');
$_batchcreatetask(data).then(res => {
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;
});
} else {
console.log('验证不通过');
})
.catch(() => {});
}
});
},

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

@ -257,11 +257,7 @@
</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">
<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="暂无收货人姓名" />
@ -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,31 +1924,16 @@ 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);

Loading…
Cancel
Save