Browse Source

新增改单

dev-xx
qb 1 year ago
parent
commit
61c3dd1f32
  1. 2
      src/axios.js
  2. 7
      src/components/SelectBox/SelectBox.vue
  3. 6
      src/utils/util.js
  4. 43
      src/views/aftersales/aftersalesWorkOrder.vue
  5. 87
      src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue
  6. 732
      src/views/aftersales/aftersalesWorkOrderend.vue
  7. 100
      src/views/aftersales/aftersalesWorkOrdermodify.vue
  8. 4
      src/views/distribution/artery/AddVehicleStowage.vue
  9. 4
      src/views/distribution/artery/TripartiteTransferDetails.vue
  10. 191
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  11. 1084
      src/views/distribution/inventory/BookingNote.vue
  12. 606
      src/views/distribution/inventory/CreateOrder.vue
  13. 106
      src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue
  14. 324
      src/views/waybill/CreateZeroOrder.vue
  15. 178
      src/views/waybill/TemporaryStorageList.vue
  16. 4
      src/views/waybill/WaybillOrderList.vue

2
src/axios.js

@ -19,7 +19,7 @@ import { Base64 } from 'js-base64';
import { baseUrl } from '@/config/env'; import { baseUrl } from '@/config/env';
import crypto from '@/utils/crypto'; import crypto from '@/utils/crypto';
axios.defaults.timeout = 60000; axios.defaults.timeout = 10 * 60000;
//返回其他状态吗 //返回其他状态吗
axios.defaults.validateStatus = function (status) { axios.defaults.validateStatus = function (status) {
return status >= 200 && status <= 500; // 默认的 return status >= 200 && status <= 500; // 默认的

7
src/components/SelectBox/SelectBox.vue

@ -38,6 +38,7 @@ import {
watch, watch,
computed, computed,
} from 'vue'; } from 'vue';
import { debounce } from '@/utils/util.js';
const query = ref({ serviceNumber: '' }); const query = ref({ serviceNumber: '' });
const isShowBox = ref(false); const isShowBox = ref(false);
const _bodyNode = ref<any>(''); const _bodyNode = ref<any>('');
@ -79,16 +80,18 @@ const handleFocus = () => {
}; };
const handleBlur = () => { const handleBlur = () => {
console.log('3 :>> ', 3);
props.blur && props.blur(); props.blur && props.blur();
}; };
const handleChange = (value: any) => { const handleChange = (value: any) => {
console.log('2 :>> ', 2);
props.change && props.change(value); props.change && props.change(value);
}; };
const handleInput = () => { const handleInput = debounce(() => {
props.input && props.input(); props.input && props.input();
}; }, 500);
defineExpose({ handleShow, handleClose }); defineExpose({ handleShow, handleClose });
</script> </script>

6
src/utils/util.js

@ -600,7 +600,7 @@ export function computeNumber(a, type, b) {
/** /**
* @param {any} value 传入值, 判断该值是否为数字 * @param {any} value 传入值, 判断该值是否为数字
*/ */
export const isNumer = value => { export const isNumber = value => {
return !isNaN(parseFloat(value)) && isFinite(value); return !isNaN(parseFloat(value)) && isFinite(value);
}; };
@ -608,7 +608,7 @@ export const isNumer = value => {
export function debounce(func, delay) { export function debounce(func, delay) {
let timer; let timer;
if (!delay) delay = 500; if (!delay) delay = 500;
return (function () { return function () {
const context = this; const context = this;
const args = arguments; const args = arguments;
clearTimeout(timer); clearTimeout(timer);
@ -617,7 +617,7 @@ export function debounce(func, delay) {
func(); func();
clearTimeout(timer); clearTimeout(timer);
}, delay); }, delay);
})(); };
} }
/** 去除零宽字符 */ /** 去除零宽字符 */

43
src/views/aftersales/aftersalesWorkOrder.vue

@ -926,7 +926,7 @@ import {
timeoutList, timeoutList,
CustomerColumnList, CustomerColumnList,
} from '@/option/aftersales/vueTvemp.js'; } from '@/option/aftersales/vueTvemp.js';
import { processRowProperty, isNumer, computeNumber } from '@/utils/util'; import { processRowProperty, isNumber, computeNumber } from '@/utils/util';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { downloadXls } from '@/utils/util'; import { downloadXls } from '@/utils/util';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
@ -1067,7 +1067,7 @@ const AppealStatus = ref(false); //申诉列表状态
const dialogModifyAmount = ref(false); // const dialogModifyAmount = ref(false); //
const UserPermissions = ref('仓库客服'); // const UserPermissions = ref('仓库客服'); //
const TabPermissions = ref(0); // const TabPermissions = ref(0); //
const AssignmentType = ref('1');// const AssignmentType = ref('1'); //
const AppealeditorState = ref(false); //() const AppealeditorState = ref(false); //()
const AppealStatusT = ref(false); // const AppealStatusT = ref(false); //
const loadingCustomer = ref(false); // const loadingCustomer = ref(false); //
@ -1450,7 +1450,7 @@ const TransportLossNode = ref([
]); ]);
const Statusprocessing = val => { const Statusprocessing = val => {
val.forEach(item => { val.forEach(item => {
// null // null
// for (const property in item) { // for (const property in item) {
// if (item[property] == null) { // if (item[property] == null) {
@ -1458,7 +1458,7 @@ const Statusprocessing = val => {
// } // }
// } // }
// //
console.log(columnList[10],'columnList[10]'); console.log(columnList[10], 'columnList[10]');
if (item.workOrderType == 1) { if (item.workOrderType == 1) {
item.workOrderTypeNameS = columnList[2].checkarr[0].label; // item.workOrderTypeNameS = columnList[2].checkarr[0].label; //
} else if (item.workOrderType == 2) { } else if (item.workOrderType == 2) {
@ -3732,7 +3732,7 @@ const amountMoney = () => {
TotalamountCompensation.value = 0; TotalamountCompensation.value = 0;
TotalamountReceived.value = 0; TotalamountReceived.value = 0;
CompensationParty.value.forEach(item => { CompensationParty.value.forEach(item => {
const _num = isNumer(item.num) ? item.num : 0; const _num = isNumber(item.num) ? item.num : 0;
// 0 // 0
if (item.state == 0) { if (item.state == 0) {
TotalamountCompensation.value = computeNumber( TotalamountCompensation.value = computeNumber(
@ -3934,7 +3934,7 @@ const defaultAssignments = () => {
let data = { let data = {
current: details.page.currentPage, current: details.page.currentPage,
size: details.page.pageSize, size: details.page.pageSize,
typesOf:AssignmentType.value, typesOf: AssignmentType.value,
}; };
CustomerLoad.value = true; // CustomerLoad.value = true; //
$_aftersalesCustomerMall(data) $_aftersalesCustomerMall(data)
@ -3985,14 +3985,15 @@ const setAsdefault = val => {
let data = {}; let data = {};
data = val.row; data = val.row;
CreateassignmentLoading.value = true; // CreateassignmentLoading.value = true; //
$_aftersalesCustomerMallsetDefault(data).then(res => { $_aftersalesCustomerMallsetDefault(data)
.then(res => {
console.log(res, '设为默认'); console.log(res, '设为默认');
if(res.data.code == 200){ if (res.data.code == 200) {
defaultAssignments() defaultAssignments();
} }
}).catch(res=>{ })
.catch(res => {})
}).finally(()=>{ .finally(() => {
CreateassignmentLoading.value = false; // CreateassignmentLoading.value = false; //
}); });
}; };
@ -4010,18 +4011,18 @@ const CreateAdditions = () => {
}); });
}; };
// //
const AssignSwitch=(val)=>{ const AssignSwitch = val => {
console.log(val); console.log(val);
if(val.props.name == '0'){ if (val.props.name == '0') {
// //
AssignmentType.value='1' AssignmentType.value = '1';
}else if(val.props.name == '1'){ } else if (val.props.name == '1') {
// //
AssignmentType.value='2' AssignmentType.value = '2';
} }
defaultAssignments() defaultAssignments();
} };
// //
const AssignSubmission = () => { const AssignSubmission = () => {
let data = { let data = {
@ -4034,7 +4035,7 @@ const AssignSubmission = () => {
clientId: BatchFrom.value.AssignWarehouse, //ID clientId: BatchFrom.value.AssignWarehouse, //ID
clientName: warehouseData.value.find(res => res.value == BatchFrom.value.AssignWarehouse) clientName: warehouseData.value.find(res => res.value == BatchFrom.value.AssignWarehouse)
.label, // .label, //
typesOf:AssignmentType.value, typesOf: AssignmentType.value,
conditions: '2', conditions: '2',
}); });
}); });
@ -4052,7 +4053,7 @@ const AssignSubmission = () => {
Createassignment.value = false; // Createassignment.value = false; //
AssignCustomerlist.value = []; // AssignCustomerlist.value = []; //
BatchFrom.value.AssignWarehouse = ''; // BatchFrom.value.AssignWarehouse = ''; //
defaultAssignments() defaultAssignments();
}) })
.catch(() => {}); .catch(() => {});
} }

87
src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue

@ -725,7 +725,7 @@ import {
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue'; import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { AddressClosed } from '@/utils/util'; import { AddressClosed } from '@/utils/util';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { computeNumber, isNumer } from '@/utils/util'; import { computeNumber, isNumber } from '@/utils/util';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import error from '@/error'; import error from '@/error';
const $router = useRouter(); const $router = useRouter();
@ -1465,7 +1465,7 @@ const amountMoney = () => {
TotalamountCompensation.value = 0; TotalamountCompensation.value = 0;
TotalamountReceived.value = 0; TotalamountReceived.value = 0;
CompensationParty.value.forEach(item => { CompensationParty.value.forEach(item => {
const _num = isNumer(item.num) ? item.num : 0; const _num = isNumber(item.num) ? item.num : 0;
// 0 // 0
if (item.state == 0) { if (item.state == 0) {
TotalamountCompensation.value = computeNumber( TotalamountCompensation.value = computeNumber(
@ -1538,9 +1538,6 @@ function removeEmptyProperties(obj) {
// //
const ConfirmForm = () => { const ConfirmForm = () => {
console.log(ProcessingpartyData.value, '处理方信息'); console.log(ProcessingpartyData.value, '处理方信息');
// //
if (ProcessingList.value.length) { if (ProcessingList.value.length) {
@ -1783,7 +1780,6 @@ const ConfirmForm = () => {
// warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // ID // warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // ID
warehouseId: item.warehouseId, // warehouseId: item.warehouseId, //
personResponsibleList: item.personResponsibleList, // personResponsibleList: item.personResponsibleList, //
}); });
} else { } else {
DataSubmit['completionRecipientEntities'].push({ DataSubmit['completionRecipientEntities'].push({
@ -1810,31 +1806,30 @@ const ConfirmForm = () => {
DataSubmit.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value DataSubmit.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
.map(item => item.text) .map(item => item.text)
.join(','); .join(',');
DataSubmit.aftersalesProcessingResultsDTO.resultDescription=Indexform.value.resultDescription, // (DataSubmit.aftersalesProcessingResultsDTO.resultDescription = Indexform.value.resultDescription), //
DataSubmit.aftersalesProcessingResultsDTO['processingMoneyEntityList'] = ProcessingList.value (DataSubmit.aftersalesProcessingResultsDTO['processingMoneyEntityList'] = ProcessingList.value
.map(item => { .map(item => {
console.log(item); console.log(item);
let match = ProcessingResults.value.find(element => element.dictValue == item.name); let match = ProcessingResults.value.find(element => element.dictValue == item.name);
if (match) { if (match) {
let paymentMethodMatch = Paymentmethod.value.find( let paymentMethodMatch = Paymentmethod.value.find(
paymentMethod => paymentMethod.dictKey == item.payment paymentMethod => paymentMethod.dictKey == item.payment
); );
return { return {
resultType: match.dictKey, //key resultType: match.dictKey, //key
money: item.input, // money: item.input, //
typesOf: 1, // typesOf: 1, //
compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '', compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '',
compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '', compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '',
resultName: item.name, // resultName: item.name, //
paymentUnit: item.paymentUnit, // paymentUnit: item.paymentUnit, //
compensationTime:item.compensationTime,// compensationTime: item.compensationTime, //
}; };
} else { } else {
return null; return null;
} }
}) })
.filter(item => item !== null); .filter(item => item !== null));
// //
DataSubmit = removeEmptyProperties(DataSubmit); DataSubmit = removeEmptyProperties(DataSubmit);
@ -1874,7 +1869,6 @@ const Arbitrationcompleted = () => {
console.log(Copyprocessingresults.value, '初始化处理结果参数'); console.log(Copyprocessingresults.value, '初始化处理结果参数');
console.log(ProcessingList.value, '最新的处理结果参数'); console.log(ProcessingList.value, '最新的处理结果参数');
if (Processingresults.value) { if (Processingresults.value) {
// //
// //
@ -1933,15 +1927,14 @@ const Arbitrationcompleted = () => {
// } // }
// data.aftersalesProcessingResultsDTO.money = sum; // // data.aftersalesProcessingResultsDTO.money = sum; //
let TotalAmount=0;// let TotalAmount = 0; //
ProcessingList.value.forEach(res=>{ ProcessingList.value.forEach(res => {
console.log(res); console.log(res);
TotalAmount += Number(res.input) TotalAmount += Number(res.input);
}) });
console.log(TotalAmount,'总金额'); console.log(TotalAmount, '总金额');
DataSubmit.aftersalesProcessingResultsDTO.money = TotalAmount; // DataSubmit.aftersalesProcessingResultsDTO.money = TotalAmount; //
data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value
.map(item => item.name) .map(item => item.name)
.join(','); // .join(','); //
@ -2028,10 +2021,11 @@ const Arbitrationcompleted = () => {
}; };
}); });
console.log(data, '处理好的值'); console.log(data, '处理好的值');
$_updateCompletionEnd(data).then(res => { $_updateCompletionEnd(data)
console.log(res, '完结成功'); .then(res => {
console.log(res, '完结编辑'); console.log(res, '完结成功');
editloading.value = false; // console.log(res, '完结编辑');
editloading.value = false; //
if (res.data.code == 200) { if (res.data.code == 200) {
ElMessage({ ElMessage({
message: res.data.msg, message: res.data.msg,
@ -2043,9 +2037,10 @@ const Arbitrationcompleted = () => {
path: '/aftersales/aftersalesWorkOrder', path: '/aftersales/aftersalesWorkOrder',
}); });
} }
}).catch(res=>{ })
editloading.value = false; // .catch(res => {
}); editloading.value = false; //
});
return; return;
} }
@ -2188,7 +2183,7 @@ const Arbitrationcompleted = () => {
resultName: item.name, // resultName: item.name, //
paymentUnit: item.paymentUnit, // paymentUnit: item.paymentUnit, //
id: item.id, //id id: item.id, //id
compensationTime:item.compensationTime,// compensationTime: item.compensationTime, //
}; };
} else { } else {
return null; return null;

732
src/views/aftersales/aftersalesWorkOrderend.vue

@ -1,7 +1,5 @@
<template> <template>
<el-card class="box-card" <el-card class="box-card" v-loading="Pageloading" element-loading-text="Loading...">
v-loading="Pageloading"
element-loading-text="Loading...">
<!-- <template #header> <!-- <template #header>
<div class="card-header"> <div class="card-header">
<span>{{ <span>{{
@ -392,8 +390,8 @@
:placeholder="item.state == 0 ? '请填写赔款方' : '请填写受款方'" :placeholder="item.state == 0 ? '请填写赔款方' : '请填写受款方'"
/> />
</div> --> </div> -->
<!-- 赔款方是那个仓库的 --> <!-- 赔款方是那个仓库的 -->
<div class="sk_input"> <div class="sk_input">
<el-select v-model="item.warehouseId" filterable placeholder="请选择仓库"> <el-select v-model="item.warehouseId" filterable placeholder="请选择仓库">
<el-option <el-option
v-for="item in warehouseData" v-for="item in warehouseData"
@ -415,7 +413,6 @@
placeholder="金额" placeholder="金额"
/> />
</div> </div>
<div class="sk_input" v-if="item.state == 0"> <div class="sk_input" v-if="item.state == 0">
<el-input <el-input
@ -590,7 +587,7 @@
> --> > -->
<el-button <el-button
v-if="$route.query.workOrderStatus == '10' && UserPermissions.value != '仓库客服' " v-if="$route.query.workOrderStatus == '10' && UserPermissions.value != '仓库客服'"
type="primary" type="primary"
class="button" class="button"
@click="CustomerServiceCompleted" @click="CustomerServiceCompleted"
@ -612,41 +609,40 @@
<el-tabs type="border-card"> <el-tabs type="border-card">
<div class="content"> <div class="content">
<el-tab-pane label="调查记录"> <el-tab-pane label="调查记录">
<div class="el_header-top"> <div class="el_header-top">
<div class="el_Processingparty"> <div class="el_Processingparty">
<span>回复</span> <span>回复</span>
<el-select <el-select
v-model="MessageResponsibility" v-model="MessageResponsibility"
multiple multiple
filterable filterable
default-first-option default-first-option
:reserve-keyword="false" :reserve-keyword="false"
placeholder="请选择处理方" placeholder="请选择处理方"
@change="Msgresponsibility" @change="Msgresponsibility"
> >
<el-option <el-option
v-for="item in warehouseData" v-for="item in warehouseData"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
:disabled="item.disabled" :disabled="item.disabled"
/> />
</el-select> </el-select>
</div> </div>
<div class="el_Refresh" @click="Chatrefresh"> <div class="el_Refresh" @click="Chatrefresh">
<el-button type="primary">刷新</el-button> <el-button type="primary">刷新</el-button>
</div>
</div> </div>
</div>
<div class="ovhe" :style="{ height: msgHight + 'px' }" ref="scrollContainer"> <div class="ovhe" :style="{ height: msgHight + 'px' }" ref="scrollContainer">
<el-timeline> <el-timeline>
<el-timeline-item <el-timeline-item
v-for="(item, index) in MessageContent" v-for="(item, index) in MessageContent"
:key="index" :key="index"
:timestamp="item.time" placement="top" :timestamp="item.time"
placement="top"
> >
<el-card> <el-card>
<div class="header-top"> <div class="header-top">
<div class="e_ico"> <div class="e_ico">
@ -654,7 +650,6 @@
<h4>{{ item.username }}{{ item.name }}</h4> <h4>{{ item.username }}{{ item.name }}</h4>
</div> </div>
<el-tag <el-tag
:class="{ :class="{
identifyingC1: item.difference == '1', identifyingC1: item.difference == '1',
@ -882,7 +877,7 @@ import { columnList, recordList } from '@/option/aftersales/vueTvemp.js';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { computeNumber, isNumer, AddressClosed } from '@/utils/util'; import { computeNumber, isNumber, AddressClosed } from '@/utils/util';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
// vuex // vuex
const $store = useStore(); const $store = useStore();
@ -921,7 +916,7 @@ const amplifyurl = ref(''); //当前点击的图片
const amplifysrcList = ref([]); // const amplifysrcList = ref([]); //
const Replycopy = ref([]); // const Replycopy = ref([]); //
const Mydata = ref(); // const Mydata = ref(); //
const Pageloading=ref(false);//load const Pageloading = ref(false); //load
const PackageInfo = ref([ const PackageInfo = ref([
// //
{ packageCode: '', orderCode: '', waybillNumber: '' }, { packageCode: '', orderCode: '', waybillNumber: '' },
@ -1088,7 +1083,7 @@ const TransportChange = val => {
// //
const onLoad = () => { const onLoad = () => {
if(localStorage.getItem('my_data')){ if (localStorage.getItem('my_data')) {
Mydata.value = JSON.parse(localStorage.getItem('my_data')); // Mydata.value = JSON.parse(localStorage.getItem('my_data')); //
} }
// //
@ -1155,7 +1150,7 @@ const onLoad = () => {
// //
res.data.data.processorVOList.forEach(item => { res.data.data.processorVOList.forEach(item => {
if (item) { if (item) {
if (item.typesOf == 2 && item.processingStatus=='1') { if (item.typesOf == 2 && item.processingStatus == '1') {
// //
endFrom.value.processor.push(item.businessId); endFrom.value.processor.push(item.businessId);
MessageResponsibility.value.push(item.businessId); MessageResponsibility.value.push(item.businessId);
@ -1165,15 +1160,13 @@ const onLoad = () => {
}); });
console.log(JSON.parse(localStorage.getItem('my_data')).id); console.log(JSON.parse(localStorage.getItem('my_data')).id);
if (UserPermissions.value == '仓库客服') { if (UserPermissions.value == '仓库客服') {
if (localStorage.getItem('my_data')) {
if(localStorage.getItem('my_data')){
MessageResponsibility.value.push(JSON.parse(localStorage.getItem('my_data')).id); MessageResponsibility.value.push(JSON.parse(localStorage.getItem('my_data')).id);
MessageResponsibility.value = MessageResponsibility.value.filter( MessageResponsibility.value = MessageResponsibility.value.filter(
item => item !== JSON.parse(localStorage.getItem('my_data')).id item => item !== JSON.parse(localStorage.getItem('my_data')).id
); // ); //
} }
MessageResponsibility.value = [...new Set(MessageResponsibility.value)]; // MessageResponsibility.value = [...new Set(MessageResponsibility.value)]; //
} }
console.log(endFrom.value.processor, ' endFrom.value.processor'); console.log(endFrom.value.processor, ' endFrom.value.processor');
@ -1545,45 +1538,38 @@ const AddCompensation = () => {
} }
}); });
let lastIndex = -1;
let lastIndex = -1; for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
if (CompensationParty.value[i].state == 0) {
for (let i = CompensationParty.value.length - 1; i >= 0; i--) { lastIndex = i;
if (CompensationParty.value[i].state == 0) { break; //
lastIndex = i; }
break; //
} }
}
if (lastIndex !== -1) {
CompensationParty.value.splice(lastIndex + 1, 0, {
name: '',
state: 0,
num: 0,
reason: '',
cld: som,
compensationPersonnel: '',
warehouseId: '',
});
// CompensationParty.value.push({
// name: '',
// state: 0,
// num: 0,
// reason: '',
// cld: som,
// compensationPersonnel: '',
// warehouseId: '',
// });
} else {
console.log(`在数组中未找到 ${elementToFind}`);
}
if (lastIndex !== -1) {
CompensationParty.value.splice(lastIndex + 1, 0, {
name: '',
state: 0,
num: 0,
reason: '',
cld: som,
compensationPersonnel: '',
warehouseId: '',
});
// CompensationParty.value.push({
// name: '',
// state: 0,
// num: 0,
// reason: '',
// cld: som,
// compensationPersonnel: '',
// warehouseId: '',
// });
} else {
console.log(`在数组中未找到 ${elementToFind}`);
}
// explains: '' // explains: ''
}; };
@ -1598,28 +1584,24 @@ const AddPayee = () => {
let lastIndex = -1; let lastIndex = -1;
for (let i = CompensationParty.value.length - 1; i >= 0; i--) { for (let i = CompensationParty.value.length - 1; i >= 0; i--) {
if (CompensationParty.value[i].state == 0) { if (CompensationParty.value[i].state == 0) {
lastIndex = i; lastIndex = i;
break; // break; //
}
} }
}
if (lastIndex !== -1) {
CompensationParty.value.splice(lastIndex + 1, 0, {
name: '',
state: 1,
num: 0,
reason: '',
cld: som,
compensationPersonnel: '',
warehouseId: '',
});
}
if (lastIndex !== -1) {
CompensationParty.value.splice(lastIndex + 1, 0, {
name: '',
state: 1,
num: 0,
reason: '',
cld: som,
compensationPersonnel: '',
warehouseId: '',
});
}
// CompensationParty.value.push({ // CompensationParty.value.push({
// name: '', // name: '',
@ -1644,21 +1626,18 @@ const TotalChange = () => {
const payremove = (state, val) => { const payremove = (state, val) => {
// //
if (CompensationParty.value.map(res => res.state == 0).length == 1) {
if(CompensationParty.value.map(res=>res.state == 0).length ==1){ ElMessage({
message: '赔款必填最少一条',
ElMessage({ type: 'warning',
message: '赔款必填最少一条', });
type: 'warning', return;
});
return;
} }
CompensationParty.value.splice(val, 1); CompensationParty.value.splice(val, 1);
for (let i = val; i < CompensationParty.value.length; i++) { for (let i = val; i < CompensationParty.value.length; i++) {
CompensationParty.value[i].cld = CompensationParty.value[i-1].cld + 1; // id CompensationParty.value[i].cld = CompensationParty.value[i - 1].cld + 1; // id
} }
console.log('CompensationParty :>> ', CompensationParty); console.log('CompensationParty :>> ', CompensationParty);
@ -1707,7 +1686,7 @@ const amountMoney = () => {
TotalamountCompensation.value = 0; TotalamountCompensation.value = 0;
TotalamountReceived.value = 0; TotalamountReceived.value = 0;
CompensationParty.value.forEach(item => { CompensationParty.value.forEach(item => {
const _num = isNumer(item.num) ? item.num : 0; const _num = isNumber(item.num) ? item.num : 0;
// 0 // 0
if (item.state == 0) { if (item.state == 0) {
TotalamountCompensation.value = computeNumber( TotalamountCompensation.value = computeNumber(
@ -1799,9 +1778,9 @@ const Msgresponsibility = val => {
console.log(MessageResponsibility.value, '已经选择的责任方'); console.log(MessageResponsibility.value, '已经选择的责任方');
}; };
// //
const Chatrefresh=()=>{ const Chatrefresh = () => {
Chathistory() Chathistory();
} };
// //
const ResponsiblePartychange = (val, index) => { const ResponsiblePartychange = (val, index) => {
console.log(val, '选择的责任方'); console.log(val, '选择的责任方');
@ -1885,310 +1864,279 @@ const PaymentConfirmation = val => {
// }; // };
// //
const submit = async(val) => { const submit = async val => {
console.log(UserPermissions.value, '当前角色'); console.log(UserPermissions.value, '当前角色');
// //
// //
if (routerState.value == 'end') { if (routerState.value == 'end') {
ElMessageBox.confirm( ElMessageBox.confirm('是否提交完结信息?', '完结', {
'是否提交完结信息?',
'完结',
{
confirmButtonText: 'OK', confirmButtonText: 'OK',
cancelButtonText: 'Cancel', cancelButtonText: 'Cancel',
type: 'warning', type: 'warning',
} })
) .then(() => {
.then(() => { console.log(CompensationParty.value);
console.log(CompensationParty.value); // let pay = CompensationParty.value.find(item => item.cld == 1);
// let pay = CompensationParty.value.find(item => item.cld == 1); // console.log(pay);
// console.log(pay); // if (!pay.name || pay.num == null || !pay.reason) {
// if (!pay.name || pay.num == null || !pay.reason) { // ElMessage({
// ElMessage({ // message: '1',
// message: '1', // type: 'warning',
// type: 'warning', // });
// }); // return;
// return; // }
// } console.log(CompensationParty.value, 'CompensationParty');
console.log(CompensationParty.value, 'CompensationParty'); let info = JSON.parse(JSON.stringify(endFrom.value)); //
let info = JSON.parse(JSON.stringify(endFrom.value)); // console.log(info, 'info');
console.log(info, 'info'); let data = [
let data = [ {
{ id: $route.query.id,
id: $route.query.id, completionRecipientEntities: [], //
completionRecipientEntities: [], // completionRecordEntities: [], //
completionRecordEntities: [], // reasonArbitration: endFrom.value.arbitrate, //
reasonArbitration: endFrom.value.arbitrate, // },
}, ];
]; console.log(endFrom.value.duty, '责任方');
console.log(endFrom.value.duty, '责任方'); console.log('赔款总计金额', TotalamountCompensation.value);
console.log('赔款总计金额', TotalamountCompensation.value); console.log('收款总计金额', TotalamountReceived.value);
console.log('收款总计金额', TotalamountReceived.value);
CompensationParty.value.forEach(item => {
CompensationParty.value.forEach(item => { if (item.state == 0) {
if (item.state == 0) { //
// data[0]['completionRecordEntities'].push({
data[0]['completionRecordEntities'].push({ // indemnitor: item.name, //
// indemnitor: item.name, // reason: item.reason, //
reason: item.reason, // money: Number(item.num), //
money: Number(item.num), // reasonArbitration: endFrom.value.arbitrate, //
reasonArbitration: endFrom.value.arbitrate, // workOrderId: info.id, //
workOrderId: info.id, // compensationPersonnel: item.compensationPersonnel, //
compensationPersonnel: item.compensationPersonnel, // warehouseId: item.warehouseId, //ID
warehouseId: item.warehouseId, //ID explains: item.reason, //
explains: item.reason, // });
}); } else {
} else { //
// data[0]['completionRecipientEntities'].push({
data[0]['completionRecipientEntities'].push({ // recipient: item.name, //
// recipient: item.name, // reasonReceivingPayment: item.reason, //
reasonReceivingPayment: item.reason, // money: Number(item.num), //
money: Number(item.num), // responsibleParty: FangAddList.value
responsibleParty: FangAddList.value .map(aItem =>
.map(aItem => warehouseData.value
warehouseData.value .filter(bItem => bItem.value === aItem.businessName)
.filter(bItem => bItem.value === aItem.businessName) .map(match => match.label)
.map(match => match.label) .join(',')
.join(',') )
) .join(','),
.join(','), warehouseId: item.warehouseId, //ID
warehouseId: item.warehouseId, //ID workOrderNumber: info.workOrderNumber, //
workOrderNumber: info.workOrderNumber, // workOrderId: info.id, //
workOrderId: info.id, // });
}
}); });
} console.log(data, '处理好的值');
});
console.log(data, '处理好的值'); //
Pageloading.value = true; //
// $_addCompletionEnd(data)
Pageloading.value = true;// .then(res => {
$_addCompletionEnd(data) console.log(res, '完结成功返回值');
.then(res => { if (res.data.code == 200) {
console.log(res, '完结成功返回值'); ElMessage({
if (res.data.code == 200) { showClose: true,
ElMessage({ message: res.data.msg,
showClose: true, type: 'success',
message: res.data.msg, });
type: 'success', $router.push('/aftersales/aftersalesWorkOrder');
AddressClosed('/aftersales/aftersalesWorkOrderend'); //
}
})
.catch(res => {
Pageloading.value = false; //
console.log(res, '提交失败');
}); });
$router.push('/aftersales/aftersalesWorkOrder');
AddressClosed('/aftersales/aftersalesWorkOrderend'); //
}
}) })
.catch(res => { .catch(() => {});
Pageloading.value = false;//
console.log(res, '提交失败');
});
})
.catch(() => {
})
} else { } else {
// //
console.log(ProcessingList.value,'处理结果'); console.log(ProcessingList.value, '处理结果');
let result = ProcessingList.value.every(function(obj) { let result = ProcessingList.value.every(function (obj) {
// //
return obj.input =='0'; return obj.input == '0';
}); });
if (!result) { if (!result) {
// //
if (ProcessingList.value.length) { if (ProcessingList.value.length) {
for (let item of ProcessingList.value) { for (let item of ProcessingList.value) {
if (!item.payment) { if (!item.payment) {
ElMessage({ ElMessage({
message: `请选择${item.name}的支付方式`, message: `请选择${item.name}的支付方式`,
type: 'warning', type: 'warning',
}); });
return; return;
} }
if (!item.paymentUnit) { if (!item.paymentUnit) {
ElMessage({ ElMessage({
message: `请填写${item.name}的支付单位`, message: `请填写${item.name}的支付单位`,
type: 'warning', type: 'warning',
}); });
return; return;
} }
if (!item.compensationTime) { if (!item.compensationTime) {
ElMessage({ ElMessage({
message: `请填写${item.name}的支付时间`, message: `请填写${item.name}的支付时间`,
type: 'warning', type: 'warning',
}); });
return; return;
}
}
} }
} }
}
}
ElMessageBox.confirm( ElMessageBox.confirm('是否进行处理结果操作?', '处理结果', {
'是否进行处理结果操作?',
'处理结果',
{
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}
)
.then( async() => {
//
console.log($route.query.id, '异常ID');
console.log(ProcessingList.value, 'ProcessingList12312');
let info = JSON.parse(JSON.stringify(endFrom.value)); //
let data = {
resultIdentification:val==1?'1':'2',//12
aftersalesProcessingResultsDTO: {
// ...info,
},
// processingMoneyEntityList: [], //
};
// 0,
if(result && val=='1'){
//
await ElMessageBox.confirm(
'检测到您未填写金额是否提交到理赔金额未出?',
'Warning',
{
confirmButtonText:'确定',
cancelButtonText:'取消',
type: 'warning',
}
)
.then(() => {
data.claimIdentification ='1'
ElMessage({
type: 'success',
message: '已确定选择',
})
})
.catch(() => {
console.log('取消了选择');
}) })
} .then(async () => {
//
data.id = $route.query.id; console.log($route.query.id, '异常ID');
data.aftersalesProcessingResultsDTO['workOrderId'] = $route.query.id; //ID console.log(ProcessingList.value, 'ProcessingList12312');
let sum = 0; // let info = JSON.parse(JSON.stringify(endFrom.value)); //
for (let i = 0; i < ProcessingList.value.length; i++) { let data = {
console.log(ProcessingList.value[i].input); resultIdentification: val == 1 ? '1' : '2', //12
sum = computeNumber(sum, '+', ProcessingList.value[i].input).result; aftersalesProcessingResultsDTO: {
} // ...info,
data.aftersalesProcessingResultsDTO.money = sum; // },
// processingMoneyEntityList: [], //
};
// 0,
if (result && val == '1') {
//
await ElMessageBox.confirm('检测到您未填写金额是否提交到理赔金额未出?', 'Warning', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
data.claimIdentification = '1';
ElMessage({
type: 'success',
message: '已确定选择',
});
})
.catch(() => {
console.log('取消了选择');
});
}
data.aftersalesProcessingResultsDTO.resultDescription = endFrom.value.resultDescription; // data.id = $route.query.id;
data.aftersalesProcessingResultsDTO['workOrderId'] = $route.query.id; //ID
let sum = 0; //
for (let i = 0; i < ProcessingList.value.length; i++) {
console.log(ProcessingList.value[i].input);
sum = computeNumber(sum, '+', ProcessingList.value[i].input).result;
}
data.aftersalesProcessingResultsDTO.money = sum; //
console.log(Paymentmethod.value, 'Paymentmethod.value'); data.aftersalesProcessingResultsDTO.resultDescription = endFrom.value.resultDescription; //
console.log(Paymentmethod.value, 'Paymentmethod.value');
if(ProcessingList.value.every(res=>res.text)){
data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
.map(item => item.text)
.join(',');
}else{
data.aftersalesProcessingResultsDTO['compensationMethod']=''
}
data.aftersalesProcessingResultsDTO.processingMoneyEntityList = ProcessingList.value if (ProcessingList.value.every(res => res.text)) {
.map(item => { data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
console.log(item); .map(item => item.text)
let match = ProcessingResults.value.find(element => element.dictValue == item.name); .join(',');
if (match) {
let paymentMethodMatch = Paymentmethod.value.find(
paymentMethod => paymentMethod.dictKey == item.payment
);
return {
resultType: match.dictKey, //key
money: item.input, //
typesOf: 1, //
compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '',
compensationMethodName: paymentMethodMatch
? paymentMethodMatch.dictValue
: '',
resultName: item.name, //
compensationTime: item.compensationTime, //
paymentUnit: item.paymentUnit, //
};
} else { } else {
return null; data.aftersalesProcessingResultsDTO['compensationMethod'] = '';
} }
})
.filter(item => item !== null);
// data.aftersalesProcessingResultsDTO.paymentUnit = paymentUnit.value; //
// data.aftersalesProcessingResultsDTO.paymentUnit = ProcessingList.value
// .map(item => item.paymentUnit)
// .join(','); //
if(ProcessingList.value.every(res=>res.paymentUnit)){
data.aftersalesProcessingResultsDTO.paymentUnit = ProcessingList.value
.map(item => item.paymentUnit)
.join(','); //
}else{
data.aftersalesProcessingResultsDTO.paymentUnit=''
}
data.aftersalesProcessingResultsDTO.processingMoneyEntityList = ProcessingList.value
.map(item => {
console.log(item);
let match = ProcessingResults.value.find(element => element.dictValue == item.name);
if (match) {
let paymentMethodMatch = Paymentmethod.value.find(
paymentMethod => paymentMethod.dictKey == item.payment
);
return {
resultType: match.dictKey, //key
money: item.input, //
typesOf: 1, //
compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '',
compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '',
resultName: item.name, //
compensationTime: item.compensationTime, //
paymentUnit: item.paymentUnit, //
};
} else {
return null;
}
})
.filter(item => item !== null);
// data.aftersalesProcessingResultsDTO.paymentUnit = paymentUnit.value; //
// data.aftersalesProcessingResultsDTO.paymentUnit = ProcessingList.value
// .map(item => item.paymentUnit)
// .join(','); //
if (ProcessingList.value.every(res => res.paymentUnit)) {
data.aftersalesProcessingResultsDTO.paymentUnit = ProcessingList.value
.map(item => item.paymentUnit)
.join(','); //
} else {
data.aftersalesProcessingResultsDTO.paymentUnit = '';
}
// data.aftersalesProcessingResultsDTO.processingMoneyEntityList = data['processingMoneyEntityList']; // data.aftersalesProcessingResultsDTO.processingMoneyEntityList = data['processingMoneyEntityList'];
console.log('走到了这一步'); console.log('走到了这一步');
data.aftersalesProcessingResultsDTO.workOrderId = $route.query.id; //ID data.aftersalesProcessingResultsDTO.workOrderId = $route.query.id; //ID
data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value
.map(item => item.name) .map(item => item.name)
.join(','); // .join(','); //
let imgLink = ''; // let imgLink = ''; //
// //
// if (endFrom.value['packageImage'].length) { // if (endFrom.value['packageImage'].length) {
// imgLink = endFrom.value['packageImage'].map(item => item.response.data.link).join(','); // // imgLink = endFrom.value['packageImage'].map(item => item.response.data.link).join(','); //
// } // }
if (videoUrl.value && imgLink) { if (videoUrl.value && imgLink) {
data.aftersalesProcessingResultsDTO['annex'] = videoUrl.value + ',' + imgLink; data.aftersalesProcessingResultsDTO['annex'] = videoUrl.value + ',' + imgLink;
} else { } else {
data.aftersalesProcessingResultsDTO['annex'] = imgLink; data.aftersalesProcessingResultsDTO['annex'] = imgLink;
}
delete data.aftersalesProcessingResultsDTO.id; //ID
data.aftersalesProcessingResultsDTO.warehouseId = info.warehouseId; //ID
console.log(data, '处理好的数据');
Pageloading.value = true;//
$_addProcessingResults(data)
.then(res => {
console.log(res, '提交后的参数');
if (res.data.code == 200) {
ElMessage({
showClose: true,
message: res.data.msg,
type: 'success',
});
$router.push('/aftersales/aftersalesWorkOrder');
AddressClosed('/aftersales/aftersalesWorkOrderend'); //
} }
delete data.aftersalesProcessingResultsDTO.id; //ID
data.aftersalesProcessingResultsDTO.warehouseId = info.warehouseId; //ID
console.log(data, '处理好的数据');
Pageloading.value = true; //
$_addProcessingResults(data)
.then(res => {
console.log(res, '提交后的参数');
if (res.data.code == 200) {
ElMessage({
showClose: true,
message: res.data.msg,
type: 'success',
});
$router.push('/aftersales/aftersalesWorkOrder');
AddressClosed('/aftersales/aftersalesWorkOrderend'); //
}
})
.catch(res => {
Pageloading.value = false; //
});
}) })
.catch(res => { .catch(() => {
Pageloading.value = false;// ElMessage({
type: 'info',
message: 'Delete canceled',
});
}); });
})
.catch(() => {
ElMessage({
type: 'info',
message: 'Delete canceled',
})
})
} }
}; };
// //
@ -2781,8 +2729,8 @@ const CustomerServiceCompleted = () => {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height:23px; height: 23px;
:deep(.el-tag){ :deep(.el-tag) {
width: 70px; width: 70px;
} }
} }
@ -2947,10 +2895,10 @@ const CustomerServiceCompleted = () => {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height:23px; height: 23px;
.el-tag{ .el-tag {
width: 70px; width: 70px;
} }
} }
.identifyingC1 { .identifyingC1 {
background-color: #409eff; background-color: #409eff;
@ -2964,7 +2912,7 @@ const CustomerServiceCompleted = () => {
background-color: #d3832a; background-color: #d3832a;
border: none; border: none;
} }
.el_header-top{ .el_header-top {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;

100
src/views/aftersales/aftersalesWorkOrdermodify.vue

@ -354,7 +354,13 @@
:value="item.id" :value="item.id"
/> />
</el-select> </el-select>
<el-input v-else v-model="item.personResponsibleName" :disabled="RouterState == 'Kfend'" clearable placeholder="请输入责任人" /> <el-input
v-else
v-model="item.personResponsibleName"
:disabled="RouterState == 'Kfend'"
clearable
placeholder="请输入责任人"
/>
</div> </div>
<div class="maxBox el_zb"> <div class="maxBox el_zb">
<span class="title">占比:</span> <span class="title">占比:</span>
@ -435,7 +441,7 @@
<div class="Listadmiration"> <div class="Listadmiration">
<div class="name" v-for="(item, index) in ProcessingList" :key="index"> <div class="name" v-for="(item, index) in ProcessingList" :key="index">
<span>{{ item.name }}:</span> <span>{{ item.name }}:</span>
<el-tooltip :content="item.input+'元'" placement="top"> <el-tooltip :content="item.input + '元'" placement="top">
<el-input-number <el-input-number
v-model="item.input" v-model="item.input"
:min="item.min" :min="item.min"
@ -456,7 +462,7 @@
<div class="Paymentname" v-else> <div class="Paymentname" v-else>
{{ item.payment ? item.text : '支付方式' }} {{ item.payment ? item.text : '支付方式' }}
</div> </div>
<div class="el_PaymentUnit"> <div class="el_PaymentUnit">
<span>支付单位:</span> <span>支付单位:</span>
<el-input <el-input
@ -465,18 +471,18 @@
:disabled="Appealeditor == 'appeal' && CompletedEditing" :disabled="Appealeditor == 'appeal' && CompletedEditing"
/> />
</div> </div>
<el-tooltip content="item.input" placement="top"> <el-tooltip content="item.input" placement="top">
<el-date-picker <el-date-picker
v-model="item.compensationTime" v-model="item.compensationTime"
type="datetime" type="datetime"
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
placeholder="支付时间" placeholder="支付时间"
:disabled="Appealeditor == 'appeal' && CompletedEditing" :disabled="Appealeditor == 'appeal' && CompletedEditing"
class="el_Claimpaymenttime" class="el_Claimpaymenttime"
/> />
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
@ -792,7 +798,7 @@ import {
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue'; import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { AddressClosed } from '@/utils/util'; import { AddressClosed } from '@/utils/util';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import { computeNumber, isNumer } from '@/utils/util'; import { computeNumber, isNumber } from '@/utils/util';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import error from '@/error'; import error from '@/error';
const $router = useRouter(); const $router = useRouter();
@ -1039,9 +1045,8 @@ const ResponsiblePartychange = (val, index) => {
}; };
const onLoad = () => { const onLoad = () => {
RouterState.value = $route.query.RouterState; RouterState.value = $route.query.RouterState;
console.log($route.query.Appealeditor,'申诉==='); console.log($route.query.Appealeditor, '申诉===');
if ($route.query.Appealeditor) { if ($route.query.Appealeditor) {
Appealeditor.value = $route.query.Appealeditor; // Appealeditor.value = $route.query.Appealeditor; //
console.log(Appealeditor.value, '申诉编辑状态'); console.log(Appealeditor.value, '申诉编辑状态');
@ -1197,8 +1202,8 @@ const onLoad = () => {
ProcessedId.value = res.data.data.processingResultsVO.id; ProcessedId.value = res.data.data.processingResultsVO.id;
} }
// //
if(res.data.data.processingResultsVO.money){ if (res.data.data.processingResultsVO.money) {
TotalClaimAmount.value = res.data.data.processingResultsVO.money; TotalClaimAmount.value = res.data.data.processingResultsVO.money;
} }
// //
@ -1553,7 +1558,7 @@ const amountMoney = () => {
TotalamountCompensation.value = 0; TotalamountCompensation.value = 0;
TotalamountReceived.value = 0; TotalamountReceived.value = 0;
CompensationParty.value.forEach(item => { CompensationParty.value.forEach(item => {
const _num = isNumer(item.num) ? item.num : 0; const _num = isNumber(item.num) ? item.num : 0;
// 0 // 0
if (item.state == 0) { if (item.state == 0) {
TotalamountCompensation.value = computeNumber( TotalamountCompensation.value = computeNumber(
@ -1912,8 +1917,8 @@ const ConfirmForm = () => {
compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '', compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '',
resultName: item.name, // resultName: item.name, //
paymentUnit: item.paymentUnit, // paymentUnit: item.paymentUnit, //
compensationTime:item.compensationTime,// compensationTime: item.compensationTime, //
id:item.id,//id id: item.id, //id
}; };
} else { } else {
return null; return null;
@ -1956,19 +1961,15 @@ const ConfirmForm = () => {
// //
const Arbitrationcompleted = () => { const Arbitrationcompleted = () => {
// //
if ($route.query.Appealeditor == 'appeal' && $route.query.AppealEstablished) { if ($route.query.Appealeditor == 'appeal' && $route.query.AppealEstablished) {
editloading.value = true; // editloading.value = true; //
let data = { let data = {
completionRecipientEntities: [], // completionRecipientEntities: [], //
completionRecordEntities: [], // completionRecordEntities: [], //
reasonArbitration: Indexform.value.arbitrate, // reasonArbitration: Indexform.value.arbitrate, //
id: $route.query.id, id: $route.query.id,
appealId: $route.query.appealID,//ID appealId: $route.query.appealID, //ID
typesOf: '1', // typesOf: '1', //
workOrderId: $route.query.id, //IDworkOrderId workOrderId: $route.query.id, //IDworkOrderId
}; };
@ -2041,10 +2042,6 @@ const Arbitrationcompleted = () => {
return; return;
} }
console.log(Copyprocessingresults.value, '初始化处理结果参数'); console.log(Copyprocessingresults.value, '初始化处理结果参数');
console.log(ProcessingList.value, '最新的处理结果参数'); console.log(ProcessingList.value, '最新的处理结果参数');
@ -2053,7 +2050,7 @@ const Arbitrationcompleted = () => {
// //
let data = { let data = {
id: $route.query.id, id: $route.query.id,
resultIdentification:2,// resultIdentification: 2, //
// workOrderId: $route.query.id, //ID // workOrderId: $route.query.id, //ID
resultDescription: Indexform.value.resultDescription, // resultDescription: Indexform.value.resultDescription, //
aftersalesProcessingResultsDTO: { aftersalesProcessingResultsDTO: {
@ -2108,16 +2105,14 @@ const Arbitrationcompleted = () => {
// } // }
// data.aftersalesProcessingResultsDTO.money = sum; // // data.aftersalesProcessingResultsDTO.money = sum; //
let TotalAmount=0;// let TotalAmount = 0; //
ProcessingList.value.forEach(res=>{ ProcessingList.value.forEach(res => {
console.log(res); console.log(res);
TotalAmount += Number(res.input) TotalAmount += Number(res.input);
}) });
console.log(TotalAmount,'总金额'); console.log(TotalAmount, '总金额');
data.aftersalesProcessingResultsDTO.money = TotalAmount; // data.aftersalesProcessingResultsDTO.money = TotalAmount; //
data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value
.map(item => item.name) .map(item => item.name)
.join(','); // .join(','); //
@ -2148,8 +2143,6 @@ const Arbitrationcompleted = () => {
return; return;
} }
// //
if (Appealeditor.value == 'appeal') { if (Appealeditor.value == 'appeal') {
// , // ,
@ -2175,7 +2168,7 @@ const Arbitrationcompleted = () => {
warehouseId: item.warehouseId, //ID warehouseId: item.warehouseId, //ID
compensationPersonnel: item.personResponsibleList, // compensationPersonnel: item.personResponsibleList, //
explains: item.reason, // explains: item.reason, //
id:$route.query.id, id: $route.query.id,
}; };
}); });
data['completionRecipientEntities'] = CompensationParty.value data['completionRecipientEntities'] = CompensationParty.value
@ -2196,7 +2189,7 @@ const Arbitrationcompleted = () => {
.join(','), .join(','),
warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // ID warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // ID
workOrderId: $route.query.id, // workOrderId: $route.query.id, //
id:$route.query.id, id: $route.query.id,
}; };
}); });
console.log(data, '处理好的值'); console.log(data, '处理好的值');
@ -2660,12 +2653,12 @@ const isShowFormItem2 = computed(() => {
} }
} }
.el_tool{ .el_tool {
width: 30%; width: 30%;
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;
align-items: center; align-items: center;
span{ span {
width: 120px; width: 120px;
font-size: 14px; font-size: 14px;
border: 1px solid #ccc; border: 1px solid #ccc;
@ -2675,7 +2668,6 @@ const isShowFormItem2 = computed(() => {
} }
} }
:deep(.is-active) { :deep(.is-active) {
border-bottom: 1px solid #e4e7ed !important; border-bottom: 1px solid #e4e7ed !important;
} }
@ -2739,8 +2731,8 @@ const isShowFormItem2 = computed(() => {
color: #606266; color: #606266;
font-size: 16px; font-size: 16px;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-right: 10px; margin-right: 10px;
} }
} }
} }
@ -2766,7 +2758,6 @@ const isShowFormItem2 = computed(() => {
width: 200px; width: 200px;
margin: 0 10px; margin: 0 10px;
} }
} }
.el_handle { .el_handle {
margin-top: 16px; margin-top: 16px;
@ -3017,13 +3008,12 @@ const isShowFormItem2 = computed(() => {
padding: 0 10px; padding: 0 10px;
} }
.el_resj{ .el_resj {
flex-direction: column; flex-direction: column;
.el-form-item__label{ .el-form-item__label {
justify-content: flex-start; justify-content: flex-start;
font-size: 14px; font-size: 14px;
} }
} }
} }
</style> </style>

4
src/views/distribution/artery/AddVehicleStowage.vue

@ -572,7 +572,7 @@ import dayjs from 'dayjs';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
/** 获取字典 */ /** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, setNodeHeight, computeNumber, isNumer, deepClone } from '@/utils/util'; import { downloadXls, setNodeHeight, computeNumber, isNumber, deepClone } from '@/utils/util';
import { import {
columnList, columnList,
nodeInfoColumnList, nodeInfoColumnList,
@ -1217,7 +1217,7 @@ const handleComputedNum = () => {
for (let index = 0; index < nodeInfokeys.length; index++) { for (let index = 0; index < nodeInfokeys.length; index++) {
const _key = nodeInfokeys[index]; const _key = nodeInfokeys[index];
// //
if (!isNumer(item[_key])) item[_key] = 0; if (!isNumber(item[_key])) item[_key] = 0;
else item[_key] = Number(item[_key]); else item[_key] = Number(item[_key]);
_totalNum = computeNumber(_totalNum, '+', item[_key]).result; _totalNum = computeNumber(_totalNum, '+', item[_key]).result;
} }

4
src/views/distribution/artery/TripartiteTransferDetails.vue

@ -675,12 +675,12 @@ const searchHide = async () => {
/** 远程搜索承运商 */ /** 远程搜索承运商 */
const remoteMethod = value => { const remoteMethod = value => {
if (!value) return; if (!value) return;
const res = debounce(async () => { debounce(async () => {
const res = await postFindCarrierByName({ carrierName: value }); const res = await postFindCarrierByName({ carrierName: value });
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.carrierNameOptions = data; details.carrierNameOptions = data;
}, 500); }, 500)();
}; };
/** 查询司机信息 */ /** 查询司机信息 */

191
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -123,90 +123,9 @@
<el-button icon="el-icon-search" @click="searchHide" circle></el-button> <el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div> </div>
</div> </div>
<el-tab-pane label="全部列表" name="first"> <el-tab-pane label="全部列表" name="first"> </el-tab-pane>
<!-- <tablecmt--> <el-tab-pane label="待配送" name="second"> </el-tab-pane>
<!-- :columnList="columnList"--> <el-tab-pane label="配送中" name="third"> </el-tab-pane>
<!-- :tableData="data"-->
<!-- :loading="loading"-->
<!-- @inputTxt="inputsc"-->
<!-- @timeCheck="timesc"-->
<!-- @btnCheck="btnsc"-->
<!-- @selectCheck="selectsc"-->
<!-- @selection="selectionsc"-->
<!-- >-->
<!-- <template #default="slotProps">-->
<!-- <el-text size="small" @click="printOrder(slotProps.scope.row)"> </el-text>-->
<!-- <el-text size="small" @click="editsolt(slotProps.scope)"> </el-text>-->
<!-- <el-text size="small" @click="editmap(slotProps.scope)"> </el-text>-->
<!-- <el-text-->
<!-- size="small"-->
<!-- v-if="-->
<!-- slotProps.scope.row.deliveryStatusName !== '已完成' ||-->
<!-- slotProps.scope.row.deliveryStatus !== '3'-->
<!-- "-->
<!-- @click="handleEdit(slotProps.scope)"-->
<!-- > </el-text-->
<!-- >-->
<!-- &lt;!&ndash; <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>&ndash;&gt;-->
<!-- </template>-->
<!-- </tablecmt>-->
</el-tab-pane>
<el-tab-pane label="待配送" name="second">
<!-- <tablecmt-->
<!-- :columnList="columnList"-->
<!-- :tableData="data"-->
<!-- :loading="loading"-->
<!-- @inputTxt="inputsc"-->
<!-- @timeCheck="timesc"-->
<!-- @btnCheck="btnsc"-->
<!-- @selectCheck="selectsc"-->
<!-- @selection="selectionsc"-->
<!-- >-->
<!-- <template #default="slotProps">-->
<!-- <el-text size="small" @click="printOrder(slotProps.scope.row)"> </el-text>-->
<!-- <el-text size="small" @click="editsolt(slotProps.scope)"> </el-text>-->
<!-- <el-text size="small" @click="editmap(slotProps.scope)"> </el-text>-->
<!-- <el-text-->
<!-- size="small"-->
<!-- v-if="-->
<!-- slotProps.scope.row.deliveryStatusName !== '已完成' ||-->
<!-- slotProps.scope.row.deliveryStatus !== '3'-->
<!-- "-->
<!-- @click="handleEdit(slotProps.scope)"-->
<!-- > </el-text-->
<!-- >-->
<!-- &lt;!&ndash; <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>&ndash;&gt;-->
<!-- </template>-->
<!-- </tablecmt>-->
</el-tab-pane>
<el-tab-pane label="配送中" name="third">
<!-- <tablecmt-->
<!-- :columnList="columnList"-->
<!-- :tableData="data"-->
<!-- :loading="loading"-->
<!-- @inputTxt="inputsc"-->
<!-- @timeCheck="timesc"-->
<!-- @btnCheck="btnsc"-->
<!-- @selectCheck="selectsc"-->
<!-- @selection="selectionsc"-->
<!-- >-->
<!-- <template #default="slotProps">-->
<!-- <el-text size="small" @click="printOrder(slotProps.scope.row)"> </el-text>-->
<!-- <el-text size="small" @click="editsolt(slotProps.scope)"> </el-text>-->
<!-- <el-text size="small" @click="editmap(slotProps.scope)"> </el-text>-->
<!-- <el-text-->
<!-- size="small"-->
<!-- v-if="-->
<!-- slotProps.scope.row.deliveryStatusName !== '已完成' ||-->
<!-- slotProps.scope.row.deliveryStatus !== '3'-->
<!-- "-->
<!-- @click="handleEdit(slotProps.scope)"-->
<!-- > </el-text-->
<!-- >-->
<!-- &lt;!&ndash; <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>&ndash;&gt;-->
<!-- </template>-->
<!-- </tablecmt>-->
</el-tab-pane>
<el-tab-pane label="已完成" name="fourth"> </el-tab-pane> <el-tab-pane label="已完成" name="fourth"> </el-tab-pane>
</el-tabs> </el-tabs>
<tablecmt <tablecmt
@ -223,7 +142,12 @@
<el-text size="small" @click="printOrder(slotProps.scope.row)"> </el-text> <el-text size="small" @click="printOrder(slotProps.scope.row)"> </el-text>
<el-text size="small" @click="editsolt(slotProps.scope)"> </el-text> <el-text size="small" @click="editsolt(slotProps.scope)"> </el-text>
<el-text size="small" @click="editmap(slotProps.scope)"> </el-text> <el-text size="small" @click="editmap(slotProps.scope)"> </el-text>
<el-text size="small" v-if="slotProps.scope.row.deliveryStatus != 3" @click="CancelDelivery(slotProps.scope)">取消配送</el-text> <el-text
size="small"
v-if="slotProps.scope.row.deliveryStatus != 3"
@click="CancelDelivery(slotProps.scope)"
>取消配送</el-text
>
<el-text <el-text
size="small" size="small"
v-if=" v-if="
@ -236,37 +160,6 @@
<!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>--> <!-- <el-button size="small" @click="costadd(slotProps.scope)"> </el-button>-->
</template> </template>
</tablecmt> </tablecmt>
<!-- 列表模块 -->
<!-- <el-table ref="table" v-loading="loading"-->
<!-- @selection-change="selectionChange"-->
<!-- :data="data"-->
<!-- :height="height"-->
<!-- style="width: 100%"-->
<!-- :border="option.border">-->
<!--&lt;!&ndash; <el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>&ndash;&gt;-->
<!-- <el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>-->
<!--&lt;!&ndash; <el-table-column v-if="option.index" label="#" type="index" width="50" align="center">&ndash;&gt;-->
<!--&lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- <template v-for="(item,index) in option.column">-->
<!-- &lt;!&ndash; table字段 &ndash;&gt;-->
<!-- <el-table-column v-if="item.hide!==true"-->
<!-- :prop="item.prop"-->
<!-- :label="item.label"-->
<!-- :width="item.width"-->
<!-- :key="index">-->
<!-- </el-table-column>-->
<!-- </template>-->
<!-- &lt;!&ndash; 操作栏模块 &ndash;&gt;-->
<!-- <el-table-column prop="menu" label="操作" :width="220" align="center">-->
<!-- <template #="{row}">-->
<!--&lt;!&ndash; <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>&ndash;&gt;-->
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleViewBlank(row)">查看</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleViewBlank(row)">查看地图</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
</el-row> </el-row>
</div> </div>
<el-row class="el-fy"> <el-row class="el-fy">
@ -418,7 +311,7 @@ import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
import print from '@/utils/print'; import print from '@/utils/print';
import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading'; import { getBillLadingExport } from '@/api/distribution/distrilbutionBillLading';
import { downloadXls } from '@/utils/util'; import { downloadXls } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus';
export default { export default {
data() { data() {
return { return {
@ -834,6 +727,7 @@ export default {
// this.query = {}; // this.query = {};
switch (tab.props.name) { switch (tab.props.name) {
case 'first': case 'first':
this.query.deliveryStatus = '';
break; break;
case 'second': case 'second':
// //
@ -955,43 +849,36 @@ export default {
}); });
}, },
// //
CancelDelivery(scope){ CancelDelivery(scope) {
console.log(scope, 'scope');
console.log(scope,'scope');
let data = { let data = {
deliveryId: scope.row.id, deliveryId: scope.row.id,
} };
ElMessageBox.confirm( ElMessageBox.confirm('是否取消配送?', 'Warning', {
'是否取消配送?', confirmButtonText: '确定',
'Warning', cancelButtonText: '取消',
{ type: 'warning',
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
this.loading = true;///
$_cancelDelivery(data).then(res=>{
console.log(res,'取消带配送');
if(res.data.code == 200){
ElMessage({
message: res.data.msg,
type: 'success',
})
this.onLoad(this.page);
}
// this.loading = false;///
}) })
}) .then(() => {
.catch(() => { this.loading = true; ///
$_cancelDelivery(data).then(res => {
}).finally(()=>{ console.log(res, '取消带配送');
this.loading = false;/// if (res.data.code == 200) {
}) ElMessage({
}, message: res.data.msg,
type: 'success',
});
this.onLoad(this.page);
}
// this.loading = false;///
});
})
.catch(() => {})
.finally(() => {
this.loading = false; ///
});
},
textbox(e, index, a) { textbox(e, index, a) {
if (a === 6) { if (a === 6) {
this.feeList[index + 1] = e; this.feeList[index + 1] = e;

1084
src/views/distribution/inventory/BookingNote.vue

File diff suppressed because it is too large Load Diff

606
src/views/distribution/inventory/CreateOrder.vue

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-loading="details.loadingObj.submitLoadingBtn">
<basic-container> <basic-container>
<el-divider style="font-size: 28px">货物托运单</el-divider> <el-divider style="font-size: 28px">货物托运单</el-divider>
<el-form <el-form
@ -41,6 +41,7 @@
</div> </div>
<el-date-picker <el-date-picker
v-model="query.openOrderDate" v-model="query.openOrderDate"
:readonly="$route.query.type !== 'add'"
prefix-icon="Calendar" prefix-icon="Calendar"
type="datetime" type="datetime"
placeholder="创建时间" placeholder="创建时间"
@ -51,7 +52,11 @@
<!-- 第一排 --> <!-- 第一排 -->
<div class="table-row mt15 border-top"> <div class="table-row mt15 border-top">
<el-form-item label="发站仓:" prop="departureWarehouseName" class="el-times"> <el-form-item label="发站仓:" prop="departureWarehouseName" class="el-times">
<el-input disabled v-model="query.departureWarehouseName" placeholder="货号"></el-input> <el-input
disabled
v-model="query['departureWarehouseName']"
placeholder="发站仓"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="到站:" prop="destination"> <el-form-item label="到站:" prop="destination">
@ -75,10 +80,10 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="目的仓:" class="el-times" prop="destinationWarehouseName"> <el-form-item label="目的仓:" class="el-times" prop="queryDestinationWarehouseName">
<el-select <el-select
class="w100" class="w100"
v-model="query.destinationWarehouseId" v-model="query.queryDestinationWarehouseName"
filterable filterable
remote remote
reserve-keyword reserve-keyword
@ -97,7 +102,7 @@
</el-form-item> </el-form-item>
<el-form-item label="货号:" prop="goodsCode"> <el-form-item label="货号:" prop="goodsCode">
<el-input v-model="query.goodsCode" placeholder="货号"></el-input> <el-input v-model="query.goodsCode" readonly placeholder="货号"></el-input>
</el-form-item> </el-form-item>
</div> </div>
@ -130,7 +135,7 @@
<el-row> <el-row>
<el-form-item label="发货单位:" prop="shipper"> <el-form-item label="发货单位:" prop="shipper">
<SelectBox <SelectBox
:input="handleFindClientInfo('shipper')" :input="() => handleFindClientInfo('shipper', 1)"
v-model="query.shipper" v-model="query.shipper"
placeholder="发货单位" placeholder="发货单位"
ref="shipper" ref="shipper"
@ -151,7 +156,7 @@
<el-form-item label="发货人:" prop="shipperName"> <el-form-item label="发货人:" prop="shipperName">
<SelectBox <SelectBox
:input="handleFindClientInfo('shipper')" :input="() => handleFindClientInfo('shipper')"
v-model="query.shipperName" v-model="query.shipperName"
placeholder="发货人" placeholder="发货人"
ref="shipperName" ref="shipperName"
@ -174,7 +179,7 @@
<el-row> <el-row>
<el-form-item label="联系电话:" prop="shipperMobile"> <el-form-item label="联系电话:" prop="shipperMobile">
<SelectBox <SelectBox
:input="handleFindClientInfo('shipper')" :input="() => handleFindClientInfo('shipper')"
v-model="query.shipperMobile" v-model="query.shipperMobile"
placeholder="联系电话" placeholder="联系电话"
ref="shipperMobile" ref="shipperMobile"
@ -207,7 +212,7 @@
<el-row> <el-row>
<el-form-item label="发货单位:" prop="consignee"> <el-form-item label="发货单位:" prop="consignee">
<SelectBox <SelectBox
:input="handleFindClientInfo('consignee')" :input="() => handleFindClientInfo('consignee', 1)"
v-model="query.consignee" v-model="query.consignee"
placeholder="收货人" placeholder="收货人"
ref="consignee" ref="consignee"
@ -228,7 +233,7 @@
<el-form-item label="收货人:" prop="consigneeName"> <el-form-item label="收货人:" prop="consigneeName">
<SelectBox <SelectBox
:input="handleFindClientInfo('consignee')" :input="() => handleFindClientInfo('consignee')"
v-model="query.consigneeName" v-model="query.consigneeName"
placeholder="收货人" placeholder="收货人"
ref="consigneeName" ref="consigneeName"
@ -251,7 +256,7 @@
<el-row> <el-row>
<el-form-item label="联系电话:" prop="consigneeMobile"> <el-form-item label="联系电话:" prop="consigneeMobile">
<SelectBox <SelectBox
:input="handleFindClientInfo('consignee')" :input="() => handleFindClientInfo('consignee')"
v-model="query.consigneeMobile" v-model="query.consigneeMobile"
placeholder="联系电话" placeholder="联系电话"
ref="consigneeMobile" ref="consigneeMobile"
@ -390,6 +395,7 @@
<el-form-item label="运费小计:" label-width="fit-content" class="el-times"> <el-form-item label="运费小计:" label-width="fit-content" class="el-times">
<el-input-number <el-input-number
:controls="false" :controls="false"
@change="handlePayWay"
v-model="item.subtotalFreight" v-model="item.subtotalFreight"
controls-position="right" controls-position="right"
:precision="2" :precision="2"
@ -529,85 +535,16 @@
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form>
</div>
</div>
</div>
<!-- 付款方式 -->
<div class="border-left">
<div style="flex: 1">
<div class="table-row-title" style="margin-bottom: 10px">
<div class="table-row-title-item">付款方式</div>
</div>
<div>
<el-form label-width="fit-content" :rules="details.rules">
<el-row> <el-row>
<el-form-item label="支付方式:"> <el-form-item label="安装费:">
<el-select v-model="query.payType" class="m-2" placeholder="支付方式">
<el-option
v-for="item in query.payTypeList || []"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="付款方式:" prop="payWay">
<el-select v-model="query.payWay" class="m-2" placeholder="付款方式">
<el-option
v-for="item in query.payWayList || []"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label="现付:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.xianPay"
></el-input-number>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="到付:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.daoPay"
></el-input-number>
</el-form-item>
<el-form-item label="月结:">
<el-input-number <el-input-number
:controls="false" :controls="false"
controls-position="right" controls-position="right"
:precision="2" :precision="2"
:min="0" :min="0"
:step="0.1" :step="0.1"
v-model="query.yuePay" v-model="query.installFee"
></el-input-number>
</el-form-item>
<el-form-item label="回付:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.huiPay"
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-row> </el-row>
@ -615,6 +552,91 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 付款方式 -->
<div class="border-left">
<div style="flex: 1">
<div class="table-row-title" style="margin-bottom: 10px">
<div class="table-row-title-item">付款方式</div>
</div>
<div>
<el-row>
<el-form-item label-width="fit-content" label="支付方式:">
<el-select v-model="query.payType" class="m-2" placeholder="支付方式">
<el-option
v-for="item in query.payTypeList || []"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label-width="fit-content" label="付款方式:" prop="payWay">
<el-select
v-model="query.payWay"
class="m-2"
@change="handlePayWay"
placeholder="付款方式"
>
<el-option
v-for="item in query.payWayList || []"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select>
</el-form-item>
<el-form-item label-width="fit-content" label="现付:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.xianPay"
></el-input-number>
</el-form-item>
</el-row>
<el-row>
<el-form-item label-width="fit-content" label="到付:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.daoPay"
></el-input-number>
</el-form-item>
<el-form-item label-width="fit-content" label="月结:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.yuePay"
></el-input-number>
</el-form-item>
<el-form-item label-width="fit-content" label="回付:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.huiPay"
></el-input-number>
</el-form-item>
</el-row>
</div>
</div>
</div>
</div> </div>
<!-- 计价方式行 --> <!-- 计价方式行 -->
@ -732,29 +754,64 @@
width="80%" width="80%"
v-model="details.popUpShow.columnListVisited" v-model="details.popUpShow.columnListVisited"
> >
<!-- 列表模块 --> <div style="display: flex">
<tablecmt <el-tabs
:columnList="details.columnList" v-model="details.orderStatus"
:tableData="data" tab-position="left"
:loading="loadingObj.list" style="height: 100%; width: fit-content; flex: none"
@inputTxt="inputsc" class="demo-tabs"
@timeCheck="timesc" @tab-click="handleClickAll"
@btnCheck="btnsc" >
@selectCheck="selectsc" <el-tab-pane name="haveData" label="有数据"></el-tab-pane>
@selection="selectionChange" <el-tab-pane name="notHaveData" label="无数据"></el-tab-pane>
> </el-tabs>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> <div class="overflow">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)"> <el-row>
包明细 <div class="avue-crud__header">
</el-button> <!-- 头部左侧按钮模块 -->
</template> <div class="avue-crud__left"></div>
</template> <!-- 头部右侧按钮模块 -->
</tablecmt> <div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="init" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
</div>
</div>
</el-row>
<!-- 表格 -->
<!-- 列表模块 -->
<tablecmt
:columnList="details.columnList"
:tableData="
details.orderStatus === 'haveData' ? details.haveDataData : details.notHaveDataData
"
:loading="
details.orderStatus === 'haveData'
? details.loadingObj.haveDataList
: details.loadingObj.notHaveDataList
"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
包明细
</el-button>
</template>
</template>
</tablecmt>
</div>
</div>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-pagination <el-pagination
align="right" align="right"
class="mt10"
background background
@size-change="sizeChange" @size-change="sizeChange"
@current-change="currentChange" @current-change="currentChange"
@ -765,11 +822,31 @@
:total="page.total" :total="page.total"
> >
</el-pagination> </el-pagination>
<span slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="ddd"> </el-button>--> <div class="flex-c-c mt10">
<el-button type="primary" @click="handleChoose"> </el-button>
<el-button @click="details.popUpShow.columnListVisited = false"> </el-button> <el-button @click="details.popUpShow.columnListVisited = false"> </el-button>
</span> <el-button type="primary" @click="handleChoose"> </el-button>
</div>
</el-dialog>
<!-- 选取订单 -->
<el-dialog
title="提示"
:center="true"
:align-center="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
:visible.sync="details.popUpShow.titleVisited"
width="30%"
v-model="details.popUpShow.titleVisited"
>
<div style="text-align: center">是否继续开单</div>
<div class="flex-c-c mt20">
<el-button icon="CircleClose" @click="back"> </el-button>
<el-button type="primary" icon="CircleCheck" @click="handleRepetition"> </el-button>
<el-button type="primary" icon="Printer" @click="handlePrint"> </el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -794,14 +871,16 @@ import {
downloadXls, downloadXls,
computeNumber, computeNumber,
deepClone, deepClone,
isNumer, isNumber,
setNodeHeight, setNodeHeight,
getWinHeight, getWinHeight,
debounce,
getObjType,
} from '@/utils/util'; } from '@/utils/util';
import { columnList, packageListColumnList } from '@/option/waybill/TemporaryStorageList'; import { columnList, packageListColumnList } from '@/option/waybill/TemporaryStorageList';
import { getopenOrderAdvancePageList } from '@/api/waybill/TemporaryStorageList'; import { getopenOrderAdvancePageList } from '@/api/waybill/TemporaryStorageList';
import { getLazyTreeAll } from '@/api/base/region'; import { getLazyTreeAll } from '@/api/base/region';
import { ElMessage } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import type { FormInstance, FormRules } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { import {
@ -845,13 +924,16 @@ const details = reactive<any>({
/** 发站仓名称 */ /** 发站仓名称 */
departureWarehouseName: '', departureWarehouseName: '',
/** 到站 */ /** 到站 */
destination: '', destination: [],
/** 货号 */
'-totalNum': 0,
/** 订单自编号 */ /** 订单自编号 */
orderCode: '', orderCode: '',
/** 目的站名称 */ /** 目的站名称 */
destinationWarehouseName: '', destinationWarehouseName: '',
/** 目的仓Id */ /** 目的仓Id */
destinationWarehouseId: '', destinationWarehouseId: '',
queryDestinationWarehouseName: '',
/** 货物号 */ /** 货物号 */
goodsCode: '', goodsCode: '',
/** 发货单位id */ /** 发货单位id */
@ -890,6 +972,8 @@ const details = reactive<any>({
otherFee: 0, otherFee: 0,
/** 保价费 */ /** 保价费 */
insuranceFee: 0, insuranceFee: 0,
/** 安装费 */
installFee: 0,
/** 申明价值 */ /** 申明价值 */
claimingValue: 0, claimingValue: 0,
/** 支付方式 */ /** 支付方式 */
@ -1175,7 +1259,7 @@ const details = reactive<any>({
}, },
], ],
/** 目的站名称 */ /** 目的站名称 */
destinationWarehouseName: [ queryDestinationWarehouseName: [
{ {
required: true, required: true,
message: '请选择目的仓', message: '请选择目的仓',
@ -1235,7 +1319,7 @@ const details = reactive<any>({
{ {
required: true, required: true,
message: '请选择付款方式', message: '请选择付款方式',
trigger: ['change', 'blur'], trigger: ['change'],
}, },
], ],
/** 送货方式 */ /** 送货方式 */
@ -1258,10 +1342,14 @@ const details = reactive<any>({
/** 列表 */ /** 列表 */
columnList, columnList,
/** 列表数据 */ /** 列表数据 */
data: [], haveDataData: [],
notHaveDataData: [],
/** 页面loading */ /** 页面loading */
loadingObj: { loadingObj: {
loading: false, loading: false,
/** 列表加载loading */
haveDataList: false,
notHaveDataList: false,
/** 配载信息loading */ /** 配载信息loading */
stowageLoading: false, stowageLoading: false,
/** 收货方 */ /** 收货方 */
@ -1281,8 +1369,9 @@ const details = reactive<any>({
}, },
/** 弹出层显示 */ /** 弹出层显示 */
popUpShow: { popUpShow: {
/** 包明细 */ /** 订单选择 */
columnListVisited: false, columnListVisited: false,
titleVisited: false,
}, },
/** 列表Dom节点 */ /** 列表Dom节点 */
listNode: '', listNode: '',
@ -1292,6 +1381,8 @@ const details = reactive<any>({
deepCloneGoodsList: [], deepCloneGoodsList: [],
/** 提交数据 */ /** 提交数据 */
submitData: {}, submitData: {},
/** tab标签有无数据 */
orderStatus: 'haveData',
}); });
const info = ref<any>({}); const info = ref<any>({});
@ -1332,10 +1423,53 @@ console.log('permission :>> ', permission);
onMounted(() => {}); onMounted(() => {});
// ,
const handleTranslationLocation = () => {
//
const _location = details.query.destination;
console.log('_location :>> ', _location);
let _arr = [];
//
for (const iterator of details.regionOptione) {
let isBreak = false;
if (iterator.label === _location) {
_arr = [iterator.value];
isBreak = true;
} else if (getObjType(iterator.children) === 'array') {
for (const item of iterator.children) {
if (item.label === _location) {
_arr = [iterator.value, item.value];
isBreak = true;
break;
} else if (getObjType(item.children) === 'array') {
for (const value of item.children) {
if (value.label === _location) {
_arr = [iterator.value, item.value, value.value];
isBreak = true;
break;
}
}
}
}
if (isBreak) break;
}
if (isBreak) break;
}
details.query.destination = _arr;
};
// //
getLazyTreeAll().then(res => { getLazyTreeAll().then(res => {
if (res.data.success) { if (res.data.success) {
details.regionOptione = res.data.data; details.regionOptione = res.data.data;
if (details.query.destination) handleTranslationLocation();
} }
}); });
@ -1362,7 +1496,7 @@ const onLoad = async (idsArr = []) => {
console.log('val[valKey] :>> ', val[valKey]); console.log('val[valKey] :>> ', val[valKey]);
const _item = Number(val[valKey]); const _item = Number(val[valKey]);
// //
if (isNumer(_item)) { if (isNumber(_item)) {
val[valKey] = _item; val[valKey] = _item;
} }
} }
@ -1384,6 +1518,7 @@ const onLoad = async (idsArr = []) => {
} else { } else {
details.query.payWay = data.payWayList.find(val => val.dictValue === '到付').dictKey || '2'; details.query.payWay = data.payWayList.find(val => val.dictValue === '到付').dictKey || '2';
} }
details.query.transportType = '1';
// instance.proxy.$forceUpdate(); // instance.proxy.$forceUpdate();
}; };
@ -1399,7 +1534,32 @@ const initPageInfo = async () => {
details.query = { ...data, ...data.warehouseWaybill }; details.query = { ...data, ...data.warehouseWaybill };
delete details.query.warehouseWaybill; delete details.query.warehouseWaybill;
details.query.queryDestinationWarehouseName = details.query.destinationWarehouseName;
console.log('data :>> ', data);
details.query.openOrderDate = data.warehouseWaybill.createTime;
details.query.orderCode = data.warehouseWaybill.orderNo; details.query.orderCode = data.warehouseWaybill.orderNo;
details.query.transportType = '1';
details.query.receipt = data.warehouseWaybill.receipt
? data.warehouseWaybill.receipt.split(',')
: [];
details.query.xianPay = isNumber(data.warehouseWaybill.xpay)
? Number(data.warehouseWaybill.xpay)
: data.warehouseWaybill.xpay;
details.query.huiPay = isNumber(data.warehouseWaybill.hpay)
? Number(data.warehouseWaybill.hpay)
: data.warehouseWaybill.hpay;
details.query.yuePay = isNumber(data.warehouseWaybill.ypay)
? Number(data.warehouseWaybill.ypay)
: data.warehouseWaybill.ypay;
details.query.daoPay = isNumber(data.warehouseWaybill.dpay)
? Number(data.warehouseWaybill.dpay)
: data.warehouseWaybill.dpay;
//
if (details.regionOptione.length !== 0) handleTranslationLocation();
console.log('details.query :>> ', details.query);
// goodsList
if (data.warehouseWaybill.detailList.length === 0) if (data.warehouseWaybill.detailList.length === 0)
details.goodsList = [ details.goodsList = [
{ {
@ -1423,7 +1583,6 @@ const initPageInfo = async () => {
}, },
]; ];
else { else {
console.log('111 :>> ', 111);
info.value.maxNum = 0; info.value.maxNum = 0;
details.deepCloneGoodsList = []; details.deepCloneGoodsList = [];
details.goodsList = data.warehouseWaybill.detailList.map(val => { details.goodsList = data.warehouseWaybill.detailList.map(val => {
@ -1440,11 +1599,9 @@ const initPageInfo = async () => {
// //
info.value.maxNum += val.num; info.value.maxNum += val.num;
console.log('val :>> ', val);
details.deepCloneGoodsList.push({ ...val }); details.deepCloneGoodsList.push({ ...val });
return val; return val;
}); });
console.log('details.deepCloneGoodsList :>> ', details.deepCloneGoodsList);
} }
} }
}; };
@ -1511,21 +1668,42 @@ const handleAdd = () => {
/** 请求订单数据 */ /** 请求订单数据 */
const initOrderList = async (params = {}) => { const initOrderList = async (params = {}) => {
const status = details.orderStatus;
try { try {
if (status === 'haveData') details.loadingObj.haveDataList = true;
else details.loadingObj.notHaveDataList = true;
details.form.freezeStatus = '0'; details.form.freezeStatus = '0';
params.hasPackage = status === 'haveData' ? 1 : 0;
const res = await getopenOrderAdvancePageList(details.page, { ...details.form, ...params }); const res = await getopenOrderAdvancePageList(details.page, { ...details.form, ...params });
// //
console.log('res :>> ', res); console.log('res :>> ', res);
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
if (status === 'haveData') details.haveDataData = data.records;
else details.notHaveDataData = data.records;
details.data = data.records; details.data = data.records;
details.page.total = data.total; details.page.total = data.total;
} catch (error) { } catch (error) {
console.log('error :>> ', error);
} finally { } finally {
// loading
if (status === 'haveData') details.loadingObj.haveDataList = false;
else details.loadingObj.notHaveDataList = false;
return null; return null;
} }
}; };
const init = (params = {}) => {
details.page.pageNum = 1;
details.page.total = 0;
initOrderList(params);
};
/** 开启订单列表 */ /** 开启订单列表 */
const handleChooseOrder = async () => { const handleChooseOrder = async () => {
try { try {
@ -1533,11 +1711,11 @@ const handleChooseOrder = async () => {
// loading // loading
details.loadingObj.loading = true; details.loadingObj.loading = true;
await initOrderList(); await init();
nextTick(() => { nextTick(() => {
const _node = document.querySelector('.el-dialog-columnList .maboxhi'); const _node = document.querySelector('.el-dialog-columnList .maboxhi');
setNodeHeight(_node, '600px'); setNodeHeight(_node, '60vh');
}); });
// return res.data; // return res.data;
@ -1572,6 +1750,7 @@ const handleChoose = () => {
// //
onLoad(ids); onLoad(ids);
details.popUpShow.columnListVisited = false; details.popUpShow.columnListVisited = false;
details.popUpShow.titleVisited = false;
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
} finally { } finally {
@ -1581,7 +1760,7 @@ const handleChoose = () => {
/** 表格表头输入框搜索 */ /** 表格表头输入框搜索 */
const inputsc = (index, row) => { const inputsc = (index, row) => {
details.query[row.prop] = index; details.query[row.prop] = index;
initOrderList(details.page); init();
}; };
/** 表格表头时间选择 */ /** 表格表头时间选择 */
@ -1593,7 +1772,7 @@ const timesc = (index, row) => {
if (!index) { if (!index) {
delete details.query[row.prop]; delete details.query[row.prop];
} }
initOrderList(details.page); init();
}; };
/** 表格表头输入框搜索 */ /** 表格表头输入框搜索 */
@ -1607,7 +1786,7 @@ const selectsc = (index, row) => {
details.query['certificateType'] = index; details.query['certificateType'] = index;
if (!index) delete details.query['certificateType']; if (!index) delete details.query['certificateType'];
} }
initOrderList(details.page); init();
}; };
/** 表格表头复选框选择 */ /** 表格表头复选框选择 */
@ -1618,13 +1797,13 @@ const selectionChange = (list: any) => {
/** 每页数量改变执行的回调 */ /** 每页数量改变执行的回调 */
const sizeChange = (pageSize: number) => { const sizeChange = (pageSize: number) => {
details.page.pageSize = pageSize; details.page.pageSize = pageSize;
initOrderList(details.page); init();
}; };
/** 页码改变执行的回调 */ /** 页码改变执行的回调 */
const currentChange = current => { const currentChange = current => {
details.page.pageNum = current; details.page.pageNum = current;
initOrderList(details.page); init();
}; };
/** 查看包明细 */ /** 查看包明细 */
@ -1644,10 +1823,8 @@ const handleRemove = (index: number) => {
}; };
/** 查询目的仓 */ /** 查询目的仓 */
let _ant1 = null;
const remoteMethod = val => { const remoteMethod = val => {
if (_ant1) clearTimeout(_ant1); debounce(async () => {
_ant1 = setTimeout(async () => {
if (val) { if (val) {
try { try {
details.loadingObj.loading = true; details.loadingObj.loading = true;
@ -1660,15 +1837,16 @@ const remoteMethod = val => {
details.loadingObj.loading = false; details.loadingObj.loading = false;
} }
} }
clearTimeout(_ant1); }, 500)();
}, 1000);
}; };
/** 目的仓选择时给目的仓名称赋值 */ /** 目的仓选择时给目的仓名称赋值 */
const destinationWarehouseNameChange = val => { const destinationWarehouseNameChange = val => {
details.query.destinationWarehouseName = details.options.find( console.log('val :>> ', val);
value => value.warehouseId === val const _item = details.options.find(value => value.warehouseId === val);
).warehouseName; details.query.destinationWarehouseName = _item.warehouseName;
details.query.destinationWarehouseId = _item.warehouseId;
details.query.queryDestinationWarehouseName = details.query.destinationWarehouseName;
}; };
/** 计算行合计 */ /** 计算行合计 */
@ -1680,47 +1858,47 @@ const handleComputed = (row: any) => {
else if (row.chargeType === 3) else if (row.chargeType === 3)
row.subtotalFreight = computeNumber(row.weight, '*', row.price).result; row.subtotalFreight = computeNumber(row.weight, '*', row.price).result;
// row.subtotalFreight = 1; // row.subtotalFreight = 1;
handlePayWay();
}; };
let _ant = null;
/** 查询客户信息 */ /** 查询客户信息 */
const handleFindClientInfo = type => { const handleFindClientInfo = async (type, isClearId) => {
if (_ant) clearTimeout(_ant); try {
_ant = setTimeout(async () => { // id
try { if (isClearId) {
details.loadingObj.consignerLoading = true; type === 'consignee' ? (details.query.consigneeId = '') : (details.query.shipperId = '');
console.log('details.query :>> ', details.query);
/** 发货人搜索信息 */
let shipperQuery = {
clientName: details.query.shipper,
linkMan: details.query.shipperName,
linkPhone: details.query.shipperMobile,
};
/** 寄货人搜索信息 */
let consignerQuery = {
clientName: details.query.consignee,
linkMan: details.query.consigneeName,
linkPhone: details.query.consigneeMobile,
};
const submitData = type === 'consignee' ? consignerQuery : shipperQuery;
const res = await postOpenOrderFindClientInfo(submitData);
const { code, data } = res.data;
if (code !== 200) return;
if (type === 'consignee') {
details.consignerOptions = data || [];
} else {
details.shipperOptions = data || [];
}
} catch (error) {
} finally {
details.loadingObj.consignerLoading = false;
} }
clearTimeout(_ant);
}, 1000); details.loadingObj.consignerLoading = true;
/** 发货人搜索信息 */
let shipperQuery = {
clientName: details.query.shipper,
linkMan: details.query.shipperName,
linkPhone: details.query.shipperMobile,
};
/** 寄货人搜索信息 */
let consignerQuery = {
clientName: details.query.consignee,
linkMan: details.query.consigneeName,
linkPhone: details.query.consigneeMobile,
};
const submitData = type === 'consignee' ? consignerQuery : shipperQuery;
const res = await postOpenOrderFindClientInfo(submitData);
const { code, data } = res.data;
if (code !== 200) return;
if (type === 'consignee') {
details.consignerOptions = data || [];
} else {
details.shipperOptions = data || [];
}
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.consignerLoading = false;
}
}; };
/** 客户选择 */ /** 客户选择 */
@ -1745,6 +1923,14 @@ const handleChooseConsigner = (column, prop, order) => {
consigneeNodeList.forEach(val => val.value.handleClose()); consigneeNodeList.forEach(val => val.value.handleClose());
}; };
/** 切换tabBar */
const handleClickAll = e => {
console.log('e :>> ', e);
const _name = e.props.name;
details.orderStatus = _name;
initOnLoad();
};
/** 返回上一个页面 */ /** 返回上一个页面 */
function back() { function back() {
useStores.commit('DEL_TAG_CURRENT'); useStores.commit('DEL_TAG_CURRENT');
@ -1812,6 +1998,28 @@ const handleDetectionPayWay = () => {
return content; return content;
}; };
const handlePayWay = () => {
const payType = Number(details.query.payWay);
const enumPayType = {
1: 'xianPay',
2: 'daoPay',
3: 'yuePay',
4: 'huiPay',
};
for (const key in enumPayType) {
const value = enumPayType[key];
details.query[value] = 0;
}
console.log('Object.keys(enumPayType) :>> ', Object.keys(enumPayType));
const _item = enumPayType[payType];
if (_item) {
details.query[_item] = details.totalObj.totalFreight;
}
};
/** 提交 */ /** 提交 */
const handleSubmit = (formEl: FormInstance | undefined) => { const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
@ -1824,7 +2032,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
// //
const _flag = details.goodsList.every(val => { const _flag = details.goodsList.every(val => {
console.log('val :>> ', val); console.log('val :>> ', val);
if (!val.goodsName || !isNumer(val.num) || val.num === 0) return false; if (!val.goodsName || !isNumber(val.num) || val.num === 0) return false;
return true; return true;
}); });
@ -1846,11 +2054,15 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
removeList: [], removeList: [],
}; };
submitData.customerTrain = details.query.trainNumber;
const { destination } = submitData; const { destination } = submitData;
console.log('destination :>> ', destination);
if (destination.length === 1) { if (destination.length === 1) {
return ElMessage({ message: '请选择正确到站地址', type: 'warning' }); return ElMessage({ message: '请选择正确到站地址', type: 'warning' });
} }
// //
const _findeLocation = details.regionOptione const _findeLocation = details.regionOptione
.find(val => val.value === destination[0]) .find(val => val.value === destination[0])
@ -1937,12 +2149,45 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
// //
details.submitData = submitData; details.submitData = submitData;
res = await postUpdateWaybill(submitData); const response = await postUpdateWaybillVerify(submitData);
if (response.data.code !== 200) return;
if (!response.data.data) return ElMessage.warning('没有更改的数据');
// console.log(
// 'response.data.data.replaceAll :>> ',
// response.data.data.replaceAll(';', '</ br>')
// );
ElMessageBox.alert(response.data.data.replaceAll(';', ' <br /> '), '被更改数据', {
// if you want to disable its autofocus
// autofocus: false,
dangerouslyUseHTMLString: true,
confirmButtonText: '确认',
callback: async (action: Action) => {
try {
details.loadingObj.submitLoadingBtn = true;
const res = await postUpdateWaybill(submitData);
const { code, msg } = res.data;
if (code !== 200) return;
if (msg) ElMessage.success(msg);
back();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.submitLoadingBtn = false;
}
},
});
} }
const { code, msg } = res.data; const { code, msg } = res.data;
if (code !== 200) return; if (code !== 200) return;
if (msg) ElMessage.success(msg); if (msg) ElMessage.success(msg);
back();
// ,
if (details.pageInfo.type === 'add') details.popUpShow.titleVisited = true;
console.log('res :>> ', res); console.log('res :>> ', res);
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
@ -1956,6 +2201,11 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
}); });
}; };
/** 重复开单 */
const handleRepetition = () => {
handleChooseOrder();
};
watch( watch(
$route, $route,
() => { () => {
@ -2146,6 +2396,11 @@ $borderColor: #172e60;
margin-top: 15px; margin-top: 15px;
} }
.mt20 {
margin-top: 20px;
color: var(--el-color-primary);
}
.red { .red {
color: var(--token-simulation-red-base-62); color: var(--token-simulation-red-base-62);
} }
@ -2153,4 +2408,13 @@ $borderColor: #172e60;
:deep(.el-divider__text.is-center) { :deep(.el-divider__text.is-center) {
font-size: 28px; font-size: 28px;
} }
.overflow {
overflow: hidden;
}
:deep(.el-form-item__label) {
color: var(--el-color-primary);
font-weight: bold;
}
</style> </style>

106
src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue

@ -44,7 +44,7 @@
reserve-keyword reserve-keyword
placeholder="节点" placeholder="节点"
@change="val => destinationWarehouseNameChange(val, index)" @change="val => destinationWarehouseNameChange(val, index)"
:remote-method="value => debounce(() => remoteMethod(value), 1000)" :remote-method="remoteMethod"
:loading="details.loadingObj.nodeLoading" :loading="details.loadingObj.nodeLoading"
:disabled="index === 0 || index === nodeInfoData.length - 1" :disabled="index === 0 || index === nodeInfoData.length - 1"
clearable clearable
@ -91,7 +91,7 @@
reserve-keyword reserve-keyword
placeholder="输入车牌号" placeholder="输入车牌号"
@change="handleCarChange" @change="handleCarChange"
:remote-method="value => debounce(() => remoteMethodCar(value), 1000)" :remote-method="remoteMethodCar"
clearable clearable
:loading="details.loadingObj.nodeLoading" :loading="details.loadingObj.nodeLoading"
> >
@ -123,7 +123,7 @@
@change="handleNameChange" @change="handleNameChange"
reserve-keyword reserve-keyword
placeholder="输入司机名称" placeholder="输入司机名称"
:remote-method="value => debounce(() => remoteMethodDriver(value), 1000)" :remote-method="remoteMethodDriver"
clearable clearable
:loading="details.loadingObj.nodeLoading" :loading="details.loadingObj.nodeLoading"
> >
@ -189,7 +189,7 @@
@change="handleCarrierChange" @change="handleCarrierChange"
reserve-keyword reserve-keyword
placeholder="输入承运商名称" placeholder="输入承运商名称"
:remote-method="value => debounce(() => remoteMethodCarrier(value), 1000)" :remote-method="remoteMethodCarrier"
clearable clearable
:loading="details.loadingObj.nodeLoading" :loading="details.loadingObj.nodeLoading"
> >
@ -763,42 +763,44 @@ const getTime = dat => {
}; };
/** 搜索节点 */ /** 搜索节点 */
const remoteMethod = async val => { const remoteMethod = val =>
details.loadingObj.nodeLoading = true; debounce(async () => {
console.log('11231 :>> ', 11231);
try { details.loadingObj.nodeLoading = true;
// if (!val) return;
const res = await postFindBillladingClientByName({ clientName: val }); try {
const { code, data } = res.data; // if (!val) return;
if (code !== 200) return; const res = await postFindBillladingClientByName({ clientName: val });
const { code, data } = res.data;
details.options = data || []; if (code !== 200) return;
} catch (error) {
console.log('error :>> ', error); details.options = data || [];
} finally { } catch (error) {
details.loadingObj.nodeLoading = false; console.log('error :>> ', error);
} } finally {
}; details.loadingObj.nodeLoading = false;
}
}, 500)();
remoteMethod(''); remoteMethod('');
/** 查询车辆信息 */ /** 查询车辆信息 */
const remoteMethodCar = async val => { const remoteMethodCar = val =>
details.loadingObj.nodeLoading = true; debounce(async () => {
details.loadingObj.nodeLoading = true;
try {
// if (!val) return; try {
// if (!val) return;
const res = await postFindCarListByName({ carNumber: val });
const { code, data } = res.data; const res = await postFindCarListByName({ carNumber: val });
if (code !== 200) return; const { code, data } = res.data;
details.carListByName = data || []; if (code !== 200) return;
} catch (error) { details.carListByName = data || [];
console.log('error :>> ', error); } catch (error) {
} finally { console.log('error :>> ', error);
details.loadingObj.nodeLoading = false; } finally {
} details.loadingObj.nodeLoading = false;
}; }
}, 500)();
remoteMethodCar(''); remoteMethodCar('');
/** 车辆改变 */ /** 车辆改变 */
@ -810,14 +812,15 @@ const handleCarChange = (type: number) => {
}; };
/** 查询司机信息 */ /** 查询司机信息 */
const remoteMethodDriver = async val => { const remoteMethodDriver = val =>
// if (!val) return; debounce(async () => {
// if (!val) return;
const res = await postFindDriverListByName({ driverName: val }); const res = await postFindDriverListByName({ driverName: val });
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.driverListByName = data || []; details.driverListByName = data || [];
}; }, 500)();
// //
remoteMethodDriver(''); remoteMethodDriver('');
@ -834,14 +837,15 @@ const handleNameChange = () => {
}; };
/** 查询承运商 */ /** 查询承运商 */
const remoteMethodCarrier = async val => { const remoteMethodCarrier = val =>
// if (!val) return; debounce(async () => {
// if (!val) return;
const res = await postFindCarrierByName({ carrierName: val }); const res = await postFindCarrierByName({ carrierName: val });
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.carrierNameList = data || []; details.carrierNameList = data || [];
}; }, 500)();
// //
remoteMethodCarrier(''); remoteMethodCarrier('');

324
src/views/waybill/CreateZeroOrder.vue

@ -400,7 +400,7 @@
<div style="margin-right: 10px; width: 55%; flex: none; zoom: 0.9"> <div style="margin-right: 10px; width: 55%; flex: none; zoom: 0.9">
<div style="flex: 1"> <div style="flex: 1">
<div class="table-row-title" style="margin-bottom: 10px"> <div class="table-row-title" style="margin-bottom: 10px">
<div class="table-row-title-item"> <div class="table-row-title-item fwb">
合计费用 合计费用
<span class="red">{{ totalCost }}</span> <span class="red">{{ totalCost }}</span>
</div> </div>
@ -513,6 +513,19 @@
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row>
<el-form-item label="安装费:">
<el-input-number
:controls="false"
controls-position="right"
:precision="2"
:min="0"
:step="0.1"
v-model="query.installFee"
></el-input-number>
</el-form-item>
</el-row>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -522,7 +535,7 @@
<div style="zoom: 0.9" class="border-left"> <div style="zoom: 0.9" class="border-left">
<div style="flex: 1"> <div style="flex: 1">
<div class="table-row-title" style="margin-bottom: 10px"> <div class="table-row-title" style="margin-bottom: 10px">
<div class="table-row-title-item">付款方式</div> <div class="table-row-title-item fwb">付款方式</div>
</div> </div>
<div> <div>
<el-row> <el-row>
@ -612,7 +625,7 @@
<div style="width: 10%; flex: none; zoom: 0.9"> <div style="width: 10%; flex: none; zoom: 0.9">
<div style="flex: 1"> <div style="flex: 1">
<div class="table-row-title" style="margin-bottom: 10px"> <div class="table-row-title" style="margin-bottom: 10px">
<div class="table-row-title-item">代收款</div> <div class="table-row-title-item fwb">代收款</div>
</div> </div>
<div> <div>
<el-form label-width="fit-content" :rules="details.rules"> <el-form label-width="fit-content" :rules="details.rules">
@ -691,7 +704,13 @@
</el-form-item> </el-form-item>
<el-form-item label="回单要求:" label-width="fit-content" class="el-times"> <el-form-item label="回单要求:" label-width="fit-content" class="el-times">
<el-select v-model="query.receipt" class="m-2" placeholder="回单要求"> <el-select
v-model="query.receipt"
class="m-2"
filterable
multiple
placeholder="回单要求"
>
<el-option <el-option
v-for="item in details.info.receiptList" v-for="item in details.info.receiptList"
:key="item.dictValue" :key="item.dictValue"
@ -750,7 +769,7 @@ import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, computeNumber } from '@/utils/util'; import { downloadXls, computeNumber } from '@/utils/util';
import { getLazyTreeAll } from '@/api/base/region'; import { getLazyTreeAll } from '@/api/base/region';
import { ElMessage } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import type { FormInstance, FormRules } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
@ -762,7 +781,10 @@ import {
postOpenOrderOpenZeroWaybillInfo, postOpenOrderOpenZeroWaybillInfo,
postOpenOrderOpenZeroWaybill, postOpenOrderOpenZeroWaybill,
postFindWaybillDetail, postFindWaybillDetail,
postUpdateWaybillVerify,
postUpdateWaybill,
} from '@/api/distribution/CreateOrder.js'; } from '@/api/distribution/CreateOrder.js';
import { isNumber, getObjType } from '@/utils/util.js';
// vue // vue
const instance = getCurrentInstance(); const instance = getCurrentInstance();
@ -780,7 +802,7 @@ const $route = useRoute();
const details = reactive<any>({ const details = reactive<any>({
/** 请求的数据 */ /** 请求的数据 */
info: {}, info: {},
/** 表格搜索条件 */ /** 表 */
query: { query: {
/** 品牌 */ /** 品牌 */
brand: '', brand: '',
@ -840,6 +862,8 @@ const details = reactive<any>({
otherFee: 0, otherFee: 0,
/** 保价费 */ /** 保价费 */
insuranceFee: 0, insuranceFee: 0,
/** 安装费 */
installFee: 0,
/** 申明价值 */ /** 申明价值 */
claimingValue: 0, claimingValue: 0,
/** 支付方式 */ /** 支付方式 */
@ -1251,6 +1275,10 @@ const details = reactive<any>({
form: {}, form: {},
/** 页面数据 */ /** 页面数据 */
pageInfo: {}, pageInfo: {},
/** 修改 -- 深拷贝goodsList, 区别:新增 / 删除 / 修改 */
deepCloneGoodsList: [],
/** 提交数据 */
submitData: {},
}); });
const { query, data, drawerShow, page, loadingObj } = toRefs(details); const { query, data, drawerShow, page, loadingObj } = toRefs(details);
@ -1287,6 +1315,49 @@ const shipperNodeList = [shipper, shipperName, shipperMobile];
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList'])); const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission); console.log('permission :>> ', permission);
// ,
const handleTranslationLocation = () => {
//
const _location = details.query.destination;
console.log('_location :>> ', _location);
let _arr = [];
//
for (const iterator of details.regionOptione) {
let isBreak = false;
if (iterator.label === _location) {
_arr = [iterator.value];
isBreak = true;
} else if (getObjType(iterator.children) === 'array') {
for (const item of iterator.children) {
if (item.label === _location) {
_arr = [iterator.value, item.value];
isBreak = true;
break;
} else if (getObjType(item.children) === 'array') {
for (const val of item.children) {
console.log('val.label :>> ', val.label);
if (val.label === _location) {
console.log('val :>> ', val);
_arr = [iterator.value, item.value, val.value];
isBreak = true;
break;
}
}
if (isBreak) break;
}
}
}
if (isBreak) break;
}
details.query.destination = _arr;
console.log('details.query :>> ', details.query);
};
onMounted(() => {}); onMounted(() => {});
const initPageInfo = async () => { const initPageInfo = async () => {
@ -1300,10 +1371,35 @@ const initPageInfo = async () => {
if (code !== 200) return; if (code !== 200) return;
details.query = { ...data, ...data.warehouseWaybill }; details.query = { ...data, ...data.warehouseWaybill };
details.info = { ...data }; details.info = data;
delete details.query.warehouseWaybill; delete details.query.warehouseWaybill;
details.query.queryDestinationWarehouseName = details.query.destinationWarehouseName;
console.log('data :>> ', data);
details.query.openOrderDate = data.warehouseWaybill.createTime;
details.query.orderCode = data.warehouseWaybill.orderNo; details.query.orderCode = data.warehouseWaybill.orderNo;
if (data.warehouseWaybill.detailList.length === 0) { details.query.transportType = '1';
details.query.receipt = data.warehouseWaybill.receipt
? data.warehouseWaybill.receipt.split(',')
: [];
details.query.xianPay = isNumber(data.warehouseWaybill.xpay)
? Number(data.warehouseWaybill.xpay)
: data.warehouseWaybill.xpay;
details.query.huiPay = isNumber(data.warehouseWaybill.hpay)
? Number(data.warehouseWaybill.hpay)
: data.warehouseWaybill.hpay;
details.query.yuePay = isNumber(data.warehouseWaybill.ypay)
? Number(data.warehouseWaybill.ypay)
: data.warehouseWaybill.ypay;
details.query.daoPay = isNumber(data.warehouseWaybill.dpay)
? Number(data.warehouseWaybill.dpay)
: data.warehouseWaybill.dpay;
//
if (details.regionOptione.length !== 0) handleTranslationLocation();
console.log('details.query :>> ', details.query);
// goodsList
if (data.warehouseWaybill.detailList.length === 0)
details.goodsList = [ details.goodsList = [
{ {
index: 0, index: 0,
@ -1325,9 +1421,8 @@ const initPageInfo = async () => {
subtotalFreight: 0, subtotalFreight: 0,
}, },
]; ];
} else { else {
console.log('111 :>> ', 111); details.deepCloneGoodsList = [];
details.goodsListIds = [];
details.goodsList = data.warehouseWaybill.detailList.map(val => { details.goodsList = data.warehouseWaybill.detailList.map(val => {
val.num = Number(val.num); val.num = Number(val.num);
val.volume = Number(val.volume); val.volume = Number(val.volume);
@ -1335,17 +1430,15 @@ const initPageInfo = async () => {
val.price = Number(val.price); val.price = Number(val.price);
val.subtotalFreight = Number(val.subtotalFreight); val.subtotalFreight = Number(val.subtotalFreight);
details.goodsListIds.push(val.id);
val.goodsName = val.productName; val.goodsName = val.productName;
// //
if (!val.subtotalFreight) handleComputed(val); if (!val.subtotalFreight) handleComputed(val);
// //
console.log('val :>> ', val); details.deepCloneGoodsList.push({ ...val });
return val; return val;
}); });
console.log('details.goodsListIds :>> ', details.goodsListIds);
} }
} }
}; };
@ -1353,6 +1446,8 @@ const initPageInfo = async () => {
getLazyTreeAll().then(res => { getLazyTreeAll().then(res => {
if (res.data.success) { if (res.data.success) {
details.regionOptione = res.data.data; details.regionOptione = res.data.data;
if (details.query.destination) handleTranslationLocation();
} }
}); });
@ -1375,6 +1470,7 @@ const onLoad = async () => {
details.query.payWay = details.query.payWay =
details.info.payWayList.find(val => val.dictValue === '到付').dictKey || '2'; details.info.payWayList.find(val => val.dictValue === '到付').dictKey || '2';
} }
details.query.transportType = '1';
}; };
/** 新增 */ /** 新增 */
@ -1548,6 +1644,62 @@ const back = () => {
$router.back(); $router.back();
}; };
/** 检测支付金额 */
const handleDetectionPayWay = () => {
const minNum = 0;
const payType = Number(details.query.payWay);
let content = '';
switch (payType) {
//
case 1:
if (Number(details.query.xianPay) <= minNum) content = '请输入大于0的现付金额';
break;
//
case 2:
if (Number(details.query.daoPay) <= minNum) content = '请输入大于0的到付金额';
break;
//
case 3:
if (Number(details.query.yuePay) <= minNum) content = '请输入大于0的月结金额';
break;
//
case 4:
if (Number(details.query.huiPay) <= minNum) content = '请输入大于0的回付金额';
break;
default:
break;
}
return content;
};
const handlePayWay = () => {
const payType = Number(details.query.payWay);
const enumPayType = {
1: 'xianPay',
2: 'daoPay',
3: 'yuePay',
4: 'huiPay',
};
for (const key in enumPayType) {
const value = enumPayType[key];
details.query[value] = 0;
}
console.log('Object.keys(enumPayType) :>> ', Object.keys(enumPayType));
const _item = enumPayType[payType];
if (_item) {
details.query[_item] = details.totalObj.totalFreight;
}
};
/** 提交 */ /** 提交 */
const handleSubmit = (formEl: FormInstance | undefined) => { const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
@ -1560,8 +1712,12 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
advanceIds: details.info.advanceIds, advanceIds: details.info.advanceIds,
...details.totalObj, ...details.totalObj,
huilaiPay: 1, huilaiPay: 1,
addList: [],
removeList: [],
}; };
submitData.customerTrain = details.query.trainNumber;
const { destination } = submitData; const { destination } = submitData;
console.log('destination :>> ', destination); console.log('destination :>> ', destination);
if (destination.length === 1) { if (destination.length === 1) {
@ -1578,11 +1734,112 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
val => val.value === destination[2] val => val.value === destination[2]
).label; ).label;
} }
let numFlag = false;
for (const iterator of details.goodsList) {
if (iterator.subtotalFreight <= 0 || !iterator.subtotalFreight) {
numFlag = true;
break;
}
}
if (numFlag) return ElMessage.warning('小计费用存在异常');
const _content = handleDetectionPayWay();
if (_content) return ElMessage.warning(_content);
submitData.goodsName = submitData.waybillDetailList.map(val => val.goodsName).join(','); submitData.goodsName = submitData.waybillDetailList.map(val => val.goodsName).join(',');
// -- 2 let res: any = {};
submitData.waybillType = 2; //
console.log('submitData :>> ', submitData); if (details.pageInfo.type !== 'edit') {
const res = await postOpenOrderOpenZeroWaybill(submitData); submitData.addList = submitData.goodsList;
submitData.removeList = [];
delete submitData.goodsList;
if (typeof submitData.receipt === 'object')
submitData.receipt = submitData.receipt.join(',');
console.log('submitData :>> ', submitData);
//
details.submitData = submitData;
// -- 2
submitData.waybillType = 2;
console.log('submitData :>> ', submitData);
res = await postOpenOrderOpenWaybill(submitData);
} else {
submitData.waybillId = details.pageInfo.id;
const oldGoodsList = [...details.deepCloneGoodsList];
for (let iterator of details.goodsList) {
// Id updateType: 1; 2
if (iterator.id) {
//
// ,
const _item = oldGoodsList.splice(
oldGoodsList.findIndex(val => val.id === iterator.id),
1
);
//
let _flag = false;
for (const key in iterator) {
_flag = iterator[key] !== _item[key];
// 退
if (_flag) break;
}
if (_flag) submitData.addList.push({ ...iterator, updateType: 2 });
} else {
submitData.addList.push({ ...iterator, updateType: 1 });
}
}
submitData.removeList = oldGoodsList;
delete submitData.goodsList;
submitData.waybillType = 1;
if (typeof submitData.receipt === 'object')
submitData.receipt = submitData.receipt.join(',');
console.log('submitData :>> ', submitData);
//
details.submitData = submitData;
const response = await postUpdateWaybillVerify(submitData);
if (response.data.code !== 200) return;
if (!response.data.data) return ElMessage.warning('没有更改的数据');
ElMessageBox.alert(response.data.data.replaceAll(';', ' <br /> '), '被更改数据', {
// if you want to disable its autofocus
// autofocus: false,
dangerouslyUseHTMLString: true,
confirmButtonText: '确认',
callback: async (action: Action) => {
try {
details.loadingObj.submitLoadingBtn = true;
const res = await postUpdateWaybill(submitData);
const { code, msg } = res.data;
if (code !== 200) return;
if (msg) ElMessage.success(msg);
back();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.submitLoadingBtn = false;
}
},
});
}
if (res.data.code !== 200) return; if (res.data.code !== 200) return;
ElMessage({ ElMessage({
message: '开单成功', message: '开单成功',
@ -1772,15 +2029,6 @@ $borderColor: #172e60;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
&::before {
content: '';
display: block;
width: 2px;
height: 25px;
background-color: var(--el-color-primary);
margin-right: 10px;
}
} }
// //
@ -1812,4 +2060,26 @@ $borderColor: #172e60;
:deep(.el-divider__text.is-center) { :deep(.el-divider__text.is-center) {
font-size: 28px; font-size: 28px;
} }
:deep(.el-form-item__label) {
color: var(--el-color-primary);
font-weight: bold;
}
.fwb {
display: flex;
align-items: center;
font-weight: bold;
color: var(--el-color-danger) !important;
position: relative;
&::before {
content: '';
margin-right: 10px;
display: block;
width: 2px;
height: 1rem;
background: #f00;
}
}
</style> </style>

178
src/views/waybill/TemporaryStorageList.vue

@ -39,64 +39,91 @@
</el-form> </el-form>
</el-row> </el-row>
<!-- 控件模块 --> <div style="display: flex">
<el-row> <el-tabs
<div class="avue-crud__header"> v-model="details.orderStatus"
<!-- 头部左侧按钮模块 --> tab-position="left"
<div class="avue-crud__left"> style="height: 100%; width: fit-content; flex: none"
<el-button type="primary" icon="el-icon-plus" @click="handleCreateOrder" class="demo-tabs"
>订单转运单 @tab-click="handleClickAll"
</el-button> >
<el-button type="primary" icon="Edit" @click="editClientInfo">修改客户信息</el-button> <el-tab-pane name="haveData" label="有数据"></el-tab-pane>
<el-button type="primary" icon="Delete" @click="handleDelete">删除</el-button> <el-tab-pane name="notHaveData" label="无数据"></el-tab-pane>
<el-button type="primary" icon="Plus" @click="handleOpenAddTagDlog">开标签</el-button> </el-tabs>
<el-button type="primary" icon="Upload" @click="details.popUpShow.UploadBatch = true">
批量开标签导入 <div class="overflow">
</el-button> <el-row>
<el-button <div class="avue-crud__header">
type="primary" <!-- 头部左侧按钮模块 -->
icon="Upload" <div class="avue-crud__left">
@click=" <el-button type="primary" icon="el-icon-plus" @click="handleCreateOrder"
() => { >订单转运单
details.popUpShow.UploadPackageDelivery = true; </el-button>
details.ouPaiChooseType = 0; <el-button type="primary" icon="Edit" @click="editClientInfo"
} >修改客户信息</el-button
" >
> <el-button type="primary" icon="Delete" @click="handleDelete">删除</el-button>
欧派数据导入 <el-button type="primary" icon="Plus" @click="handleOpenAddTagDlog"
</el-button> >开标签</el-button
>
<el-button type="primary" icon="Rank" @click="handleFreeze">冻结</el-button> <el-button
</div> type="primary"
<!-- 头部右侧按钮模块 --> icon="Upload"
<div class="avue-crud__right"> @click="details.popUpShow.UploadBatch = true"
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button> >
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button> 批量开标签导入
<el-button icon="Search" @click="searchHide" circle></el-button> </el-button>
</div> <el-button
type="primary"
icon="Upload"
@click="
() => {
details.popUpShow.UploadPackageDelivery = true;
details.ouPaiChooseType = 0;
}
"
>
欧派数据导入
</el-button>
<el-button type="primary" icon="Rank" @click="handleFreeze">冻结</el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChange" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
</div>
</div>
</el-row>
<!-- 表格 -->
<!-- 列表模块 -->
<tablecmt
:columnList="details.columnList"
:tableData="
details.orderStatus === 'haveData' ? details.haveDataData : details.notHaveDataData
"
:loading="
details.orderStatus === 'haveData'
? loadingObj.haveDataList
: loadingObj.notHaveDataList
"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
包明细
</el-button>
</template>
</template>
</tablecmt>
</div> </div>
</el-row> </div>
<!-- 表格 -->
<!-- 列表模块 -->
<tablecmt
:columnList="details.columnList"
:tableData="data"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
包明细
</el-button>
</template>
</template>
</tablecmt>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-row class="el-fy"> <el-row class="el-fy">
@ -477,7 +504,8 @@ const details = reactive<any>({
/** 列表 */ /** 列表 */
columnList, columnList,
/** 列表数据 */ /** 列表数据 */
data: [], haveDataData: [],
notHaveDataData: [],
/** 包明细表头 */ /** 包明细表头 */
packageListColumnList, packageListColumnList,
/** 包明细数据 */ /** 包明细数据 */
@ -485,7 +513,8 @@ const details = reactive<any>({
/** 页面loading */ /** 页面loading */
loadingObj: { loadingObj: {
/** 列表加载loading */ /** 列表加载loading */
list: false, haveDataList: false,
notHaveDataList: false,
packageListLoading: false, packageListLoading: false,
/** 开标签 */ /** 开标签 */
addTagLoading: false, addTagLoading: false,
@ -742,6 +771,8 @@ const details = reactive<any>({
addTagForm: {}, addTagForm: {},
/** 开标签的必填项 */ /** 开标签的必填项 */
addTagFormRules: {}, addTagFormRules: {},
/** tab标签有无数据 */
orderStatus: 'haveData',
}); });
const handleRules = () => { const handleRules = () => {
@ -796,30 +827,40 @@ onMounted(() => {
}); });
/** 请求页面数据 */ /** 请求页面数据 */
const onLoad = async (params = {}) => { const onLoad = async (params = {} as any) => {
const status = details.orderStatus;
try { try {
// loading // loading
details.loadingObj.list = true; details.loadingObj.list = true;
console.log('status :>> ', status);
if (status === 'haveData') details.loadingObj.haveDataList = true;
else details.loadingObj.notHaveDataList = true;
details.query.freezeStatus = '0'; details.query.freezeStatus = '0';
params.hasPackage = status === 'haveData' ? 1 : 0;
// //
const res = await getopenOrderAdvancePageList(details.page, { ...details.query, ...params }); const res = await getopenOrderAdvancePageList(details.page, { ...details.query, ...params });
console.log('res :>> ', res); console.log('res :>> ', res);
const { code, data } = res.data; const { code, data } = res.data;
if (code !== 200) return; if (code !== 200) return;
details.data = data.records; if (status === 'haveData') details.haveDataData = data.records;
else details.notHaveDataData = data.records;
details.page.total = data.total; details.page.total = data.total;
return res.data; return res.data;
} catch (error) { } catch (error) {
} finally { } finally {
// loading // loading
details.loadingObj.list = false; if (status === 'haveData') details.loadingObj.haveDataList = false;
else details.loadingObj.notHaveDataList = false;
} }
}; };
const initOnLoad = (params = {}) => { const initOnLoad = (params = {}) => {
details.page.pageNum = 1; details.page.pageNum = 1;
details.page.total = 0;
onLoad(params); onLoad(params);
}; };
@ -973,6 +1014,7 @@ const handleCreateOrder = () => {
query: { query: {
name: `开单`, name: `开单`,
ids: JSON.stringify(details.selectionList.map(item => item.id)), ids: JSON.stringify(details.selectionList.map(item => item.id)),
type: 'add',
}, },
}); });
}; };
@ -998,6 +1040,14 @@ const editClientInfo = () => {
}); });
}; };
/** 切换tabBar */
const handleClickAll = e => {
console.log('e :>> ', e);
const _name = e.props.name;
details.orderStatus = _name;
initOnLoad();
};
/** 批量删除 */ /** 批量删除 */
const handleDelete = () => { const handleDelete = () => {
if (details.selectionList.length === 0) { if (details.selectionList.length === 0) {
@ -1282,4 +1332,8 @@ const handleOpenAddTagDlog = () => {
) { ) {
--el-color-danger: #f00; --el-color-danger: #f00;
} }
.overflow {
overflow: hidden;
}
</style> </style>

4
src/views/waybill/WaybillOrderList.vue

@ -470,7 +470,7 @@ const handleShowPackageOrderList = ({ row }) => {
* @params(_type) 开启或关闭 * @params(_type) 开启或关闭
*/ */
const handleFullScrean = (_type: 'open' | 'close', _name: string) => { const handleFullScrean = (_type: 'open' | 'close', _name: string) => {
let _node = ''; let _node: Element;
if (_name) _node = document.querySelector(`.${_name} .maboxhi`); if (_name) _node = document.querySelector(`.${_name} .maboxhi`);
switch (_name) { switch (_name) {
@ -571,7 +571,7 @@ const handleGoWaybillDetails = ({ row }) => {
console.log('row :>> ', row); console.log('row :>> ', row);
$router.push({ $router.push({
path: '/distribution/inventory/BookingNote', path: '/distribution/inventory/BookingNote',
query: { name: `查看 -- 【${row.waybillNo}`, waybillNo: row.waybillNo }, query: { name: `查看 -- 【${row.waybillNo}`, waybillNo: row.waybillNo, id: row.id },
}); });
}; };
</script> </script>

Loading…
Cancel
Save