Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

fix_bug_pro20231227
qb 1 year ago
parent
commit
43d8e13564
  1. 4
      src/page/index/index.vue
  2. 13
      src/router/views/index.js
  3. 87
      src/views/aftersales/VueTemp.vue
  4. 542
      src/views/aftersales/VueTempAdd.vue
  5. 6
      src/views/distribution/checkInventoryTask/createTask.vue
  6. 14
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  7. 14
      src/views/distribution/deliverylist/distributionDeliveryListmar.vue

4
src/page/index/index.vue

@ -15,9 +15,9 @@
<!-- 主体视图层 -->
<div id="avue-view" v-show="!isSearch" v-if="isRefresh">
<router-view #="{ Component }">
<keep-alive>
<!-- <keep-alive> -->
<component :is="Component" />
</keep-alive>
<!-- </keep-alive> -->
</router-view>
</div>
</div>

13
src/router/views/index.js

@ -1160,7 +1160,18 @@ export default [
},
],
},
{
path: '/aftersales/VueTempAdd',
component: Layout,
redirect: '/aftersales/VueTempAdd',
children: [
{
path: '/aftersales/VueTempAdd',
name: '工单新增',
component: () => import('@/views/aftersales/VueTempAdd.vue'),
},
],
},
// {
// path: '/distribution/turndelivery/devtmp',
// component: Layout,

87
src/views/aftersales/VueTemp.vue

@ -807,8 +807,9 @@ import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataW
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { columnList, recordList } from '@/option/aftersales/vueTvemp.js';
import { processRowProperty } from '@/utils/util';
import { useRouter } from 'vue-router';
import dayjs from 'dayjs';
import { join } from 'lodash';
const $router = useRouter();
const currentPage = ref(1); //
const pageSize = ref(30); //
const total = ref(0); //
@ -1405,6 +1406,7 @@ function updateDictionary(targetArray, dictionaryType) {
}
//
const AddInfo = () => {
$router.push('/aftersales/VueTempAdd');
Indexform.value = {}; //
IndexException.value = [];
DiscoveringNodes.value = [];
@ -1438,61 +1440,29 @@ const ConfirmForm = () => {
FromDisabled.value = false; //
let processorEntityList = [];
const matchingObjects = warehouseData.value.filter(obj =>
Indexform.value.processor.includes(obj.value)
);
let name = matchingObjects.map(item => item.label);
name = name.join(',');
const matchingObjectsT = warehouseData.value.filter(obj =>
Indexform.value.duty.includes(obj.value)
);
let nameS = matchingObjectsT.map(item => item.label);
nameS = nameS.join(',');
//
let ProcessingParty = {
businessName: name,
businessId: Indexform.value.processor.join(','),
conditions: 1,
typesOf: 2,
};
processorEntityList.push(ProcessingParty);
Indexform.value.processor.forEach(item => {
let found = warehouseData.value.find(element => element.value == item.toString());
processorEntityList.push({
businessName: found ? found.label : '',
businessId: item,
conditions: 1,
typesOf: 2,
});
});
//
let ResponsibleParty = {
businessName: nameS,
businessId: Indexform.value.duty.join(','),
conditions: 1,
typesOf: 1,
};
let a = [
{
value: '1',
label: '张三',
},
{
value: '2',
label: '张四',
},
{
value: '3',
label: '张五',
},
{
value: '4',
label: '张六',
},
];
let Tc = [2, 4];
Tc.forEach(item => {
console.log(item, '责任方');
Indexform.value.duty.forEach(item => {
let found = warehouseData.value.find(element => element.value == item.toString());
processorEntityList.push({
businessName: nameS,
businessName: found ? found.label : '',
businessId: item,
conditions: 1,
typesOf: 1,
});
});
processorEntityList.push(ResponsibleParty);
// processorEntityList.push(ResponsibleParty);
console.log(processorEntityList, 'processorEntityList');
let DataSubmit = { ...Indexform.value }; //
DataSubmit.processorEntityList = processorEntityList;
@ -1502,16 +1472,16 @@ const ConfirmForm = () => {
console.log(warehouseData.value, 'warehouseData.value');
Indexdialog.value = false; //
// $_submit(DataSubmit).then(res => {
// if (res.data.code == 200) {
// ElMessage({
// message: res.data.msg,
// type: 'success',
// });
// Indexform.value = {}; //
// IndexTable();
// }
// });
$_submit(DataSubmit).then(res => {
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
Indexform.value = {}; //
IndexTable();
}
});
};
//
const searchHide = () => {
@ -1982,7 +1952,6 @@ const changeProcessingResults = val => {
}
}
.el_clzr {
margin-top: 24px;
padding: 0 18px;
padding-left: 8px;

542
src/views/aftersales/VueTempAdd.vue

@ -0,0 +1,542 @@
<template>
<el-divider content-position="left"> <span>工单新增</span>
</el-divider>
<el-form :model="Indexform" label-width="100px" class="IndexFrom" ref="IndexForm">
<el-form-item label="异常类型">
<el-select
v-model="Indexform.workOrderType"
clearable
placeholder="选择工单异常类型"
@change="abnormalChange"
>
<el-option
v-for="item in IndexException"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发现节点">
<el-select
v-model="Indexform.discoveryNode"
clearable
placeholder="选择发现节点"
@change="DiscoveringNodesChange"
>
<el-option
v-for="item in DiscoveringNodes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="异常工单号">
<el-input v-model="Indexform.workOrderNumber" placeholder="请输入异常工单号" clearable />
</el-form-item>
<!-- 必填 -->
<el-form-item label="运单号">
<el-input v-model="Indexform.waybillNumber" placeholder="请输入云单号" clearable />
</el-form-item>
<el-form-item label="少货件数" v-if="StateType || SelectType == 2">
<el-input @input="ShortageTtems" v-model="Indexform.number" placeholder="请输入少货件数" clearable />
</el-form-item>
<el-form-item label="窜货件数" v-if="StateType || SelectType == 3">
<el-input v-model="Indexform.number" placeholder="请输入窜货件数" clearable />
</el-form-item>
<el-form-item
label="包条码"
v-if="SelectType == 1 || SelectType == 2 || SelectType == 3 || StateType"
>
<el-input
v-model="Indexform.packageCode"
placeholder="请输入包条码,多个用逗号隔开"
clearable
/>
</el-form-item>
<!-- 必填 -->
<el-form-item label="订单自编号">
<el-input v-model="Indexform.orderCode" placeholder="请输入订单自编号" clearable />
</el-form-item>
<el-form-item
label="车次号"
v-if="groundlineSet || groundlineType == 1 || groundlineType == 3 || groundlineType == 4"
>
<el-input
v-model="Indexform.trainNumber"
placeholder="请输入车次号(干线卸车环节)"
clearable
/>
</el-form-item>
<!-- 必填 -->
<el-form-item label="一级品">
<el-input v-model="Indexform.first" placeholder="请输入一级品类" clearable />
</el-form-item>
<!-- 必填 -->
<el-form-item label="二级品">
<el-input v-model="Indexform.secondary" placeholder="请输入二级品类" clearable />
</el-form-item>
<el-form-item label="车辆路线">
<el-input
v-model="Indexform.vehicleRoute"
placeholder="请输入车辆路线车次号(通过车次号自动带出车辆路线)"
clearable
/>
</el-form-item>
<el-form-item label="送货时间">
<el-date-picker
v-model="Indexform.deliverGoodsTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择送货时间"
/>
</el-form-item>
<el-form-item
label="发现时间"
v-if="groundlineSet || groundlineType == 2 || groundlineType == 3 || groundlineType == 4"
>
<el-date-picker
v-model="Indexform.discoveryTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择发现时间"
/>
</el-form-item>
<el-form-item
label="配送时间"
v-if="groundlineSet || groundlineType == 3 || groundlineType == 4"
>
<el-date-picker
v-model="Indexform.deliveryTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择入库"
/>
</el-form-item>
<el-form-item label="入库时间" v-if="groundlineSet || groundlineType == 2">
<el-date-picker
v-model="Indexform.warehousingTime"
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择入库"
/>
</el-form-item>
<!-- 必填 -->
<el-form-item label="运单商场">
<el-input v-model="Indexform.waybillMall" placeholder="请输入运单商场" clearable />
</el-form-item>
<el-form-item
label="配送司机"
v-if="groundlineSet || groundlineType == 3 || groundlineType == 4"
>
<el-select
v-model="Indexform.deliveryDriver"
filterable
default-first-option
:reserve-keyword="false"
placeholder="请输入配送司机"
>
<el-option
v-for="item in DeliveryDriver"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 必填 -->
<el-form-item label="异常问题描述">
<el-input v-model="Indexform.problemDescription" placeholder="请输入异常问题" clearable />
</el-form-item>
<el-form-item
label="责任人"
v-if="groundlineSet || groundlineType == 2 || groundlineType == 3 || groundlineType == 4"
>
<el-input
v-model="Indexform.personResponsible"
:disabled="FromDisabled"
placeholder="请输入责任人"
clearable
/>
</el-form-item>
<el-form-item label="备注信息">
<el-input v-model="Indexform.remarks" placeholder="请输入备注" clearable />
</el-form-item>
</el-form>
<!-- 必填 -->
<div class="el_clzr">
<el-form-item class="investigate" label="调查经过">
<el-input v-model="Indexform.remarks" placeholder="请输入调查经过" clearable :rows="2"
type="textarea"/>
</el-form-item>
<el-form-item label="处理方">
<el-select v-model="Indexform.processor" clearable filterable multiple placeholder="请选择处理方">
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 必填 -->
<el-form-item label="责任方">
<el-select v-model="Indexform.duty" clearable filterable multiple placeholder="请选择责任方">
<el-option
v-for="item in warehouseData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</div>
<div class="Transport_damage_photos" v-if="SelectType == 1 || SelectType == 3 || StateType">
<span class="title">运损照片</span>
<el-upload
v-model="Indexform.packageImage"
list-type="picture-card"
:on-preview="pictureList"
:on-remove="ImgListRemove"
:action="doubledCount"
:on-success="ImgSuccess"
:before-upload="beforeAvatarUpload"
:headers="headers"
multiple
drag
>
<el-icon><Plus /></el-icon>
</el-upload>
<el-dialog v-model="dialogVisible">
<img w-full :src="dialogImageUrl" alt="图片" />
</el-dialog>
</div>
<div class="dialog-footer">
<el-button @click="Indexdialog = false">取消</el-button>
<el-button type="primary" @click="ConfirmForm"> 提交 </el-button>
</div>
<!-- 少货件数大于3 -->
</template>
<script setup>
import { ElMessage } from 'element-plus';
import { ElMessageBox } from 'element-plus';
import { useRouter } from 'vue-router';
import { getDictionaryBiz } from '@/api/system/dict'; //
import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //
import { $_getList, $_submit, $_getDetail, $_remove } from '@/api/aftersales/aftersalesWorkOrder';
import { ref, reactive, toRefs, computed, onMounted, nextTick } from 'vue';
import { getToken } from '@/utils/auth';
const Indexform = ref({}); //
const IndexException = ref([]); //
const DiscoveringNodes = ref([]); //
const warehouseData = ref([]); //
const SelectType = ref(null); //
const StateType = ref(true); //
const dialogImageUrl = ref(null); //
const dialogVisible = ref(null); //
const groundlineSet = ref(true); //线
const groundlineType = ref(null); //线
const DeliveryDriver = ref([
{
value: '0',
label: '兰溪',
},
{
value: '1',
label: '李华',
},
{
value: '2',
label: '唐飞',
},
]);
//
const fileList = ref([]);
//
function updateDictionary(targetArray, dictionaryType) {
getDictionaryBiz(dictionaryType).then(res => {
console.log(res, '字典');
res.data.data.forEach(item => {
targetArray.push({
value: item.dictKey,
label: item.dictValue,
});
});
});
}
// TOKEN
const headers = computed(() => {
return { 'Blade-Auth': 'Bearer ' + getToken() };
});
//
const doubledCount = computed(() => {
return '/api/blade-resource/oss/endpoint/put-file';
});
//
const ImgSuccess= (response, uploadFile) => {
if (response.success === true) {
console.log(response);
fileList.value.push({
name: response.data.originalName,
url: response.data.link,
})
console.log(fileList.value,'图片列表');
}
};
//
const beforeAvatarUpload = rawFile => {
if (rawFile.type !== 'image/png') {
ElMessage.error('图片格式只能为image/png!');
return false;
} else if (rawFile.size / 1024 / 1024 > 2) {
ElMessage.error('图片大小不能大于2MB!');
return false;
}
return true;
};
//
const pictureList=(val)=>{
console.log(val,'图片列表');
}
//
const ImgListRemove=(val)=>{
console.log(val,'移除图片');
}
//
const handle = () => {
getDeptWarehouse().then(res => {
res.data.data.forEach(item => {
console.log(item);
warehouseData.value.push({
value: item.id,
label: item.name,
});
});
});
};
const onLoad = () => {
updateDictionary(IndexException.value, 'pc_work_order'); //
updateDictionary(DiscoveringNodes.value, 'pc_discovery_node'); //
handle(); //
};
onLoad(); //
//
const abnormalChange = val => {
console.log(val,'异常事件类型');
console.log(StateType.value);
StateType.value = false;
if (val == 1 || val == 2 || val == 3) {
SelectType.value = val;
} else {
StateType.value = true;
}
};
//
const DiscoveringNodesChange = val => {
groundlineSet.value = false; //线b
if (val == 1 || val == 2 || val == 3 || val == 4 || val == 5) {
groundlineType.value = val; //线
} else {
groundlineSet.value = true; //
}
};
//
const handleRemove = (uploadFile, uploadFiles) => {
console.log(uploadFile, uploadFiles);
};
const handlePictureCardPreview = uploadFile => {
dialogImageUrl.value = uploadFile.url;
dialogVisible.value = true;
};
//
const ConfirmForm = () => {
//
Indexform.value.deliveryDriver = DeliveryDriver.value.find(
item => item.value == Indexform.value.deliveryDriver
).label;
console.log(Indexform.value.deliveryDriver); //
let processorEntityList = [];
//
Indexform.value.processor.forEach(item => {
let found = warehouseData.value.find(element => element.value == item.toString());
processorEntityList.push({
businessName: found ? found.label : '',
businessId: item,
conditions: 1,
typesOf: 2,
});
});
//
Indexform.value.duty.forEach(item => {
let found = warehouseData.value.find(element => element.value == item.toString());
processorEntityList.push({
businessName: found ? found.label : '',
businessId: item,
conditions: 1,
typesOf: 1,
});
});
let DataSubmit = { ...Indexform.value }; //
DataSubmit.processorEntityList = processorEntityList;
delete DataSubmit.duty, //
delete DataSubmit.processor; //
console.log(DataSubmit, '处理好的数据');
//
// $_submit(DataSubmit).then(res => {
// if (res.data.code == 200) {
// ElMessage({
// message: res.data.msg,
// type: 'success',
// });
// Indexform.value = {}; //
// IndexTable();
// }
// });
};
//
const ShortageTtems=(val)=>{
const pattern = /\s+/g;
const result = val.replace(pattern, '');
console.log(result); // "33"
Indexform.value.number=result
}
</script>
<style scoped lang="scss">
.IndexFrom {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.el-form-item {
height: 46px;
display: flex;
align-items: center;
margin: 0;
margin-bottom: 18px;
flex: 1 0 30%;
:deep(.el-form-item__label){
width: 100px !important;
}
}
:deep(.el-form-item__content) {
height: 100%;
width: 70% !important;
flex: none;
.el-input {
height: 100% !important;
display: flex;
align-items: center;
}
}
.el-input__wrapper {
height: 32px !important;
}
:deep(.el-input) {
width: 100% !important;
}
:deep(.el-input__wrapper) {
height: 30px !important;
}
:deep(.el-select) {
width: 100%;
}
:deep(.el-form-item__label) {
margin-left: 20px;
}
}
.el_clzr {
margin-top: 40px;
:deep(.el-select) {
width: 100%;
}
:deep(.el-input) {
height: 38px;
}
:deep(.el-form-item__label) {
margin-left: 20px;
font-size: 14px;
width: 100px !important;
}
.el-form-item {
margin: 0;
margin-bottom: 34px;
}
:deep(.el-input__wrapper){
height: 35px !important;
}
:deep(.el-form-item__content) {
height: 100%;
width: 90% !important;
flex: none;
.el-input {
height: 100% !important;
display: flex;
align-items: center;
}
}
}
.Transport_damage_photos{
padding: 0 15px;
.title{
display: block;
margin-bottom: 10px;
font-size: 14px;
}
}
.dialog-footer{
width: 100%;
display: flex;
justify-content: flex-end;
padding: 0 10px;
box-sizing: border-box;
padding-right: 36px;
}
.investigate{
:deep(.el-form-item__content){
width: 90% !important;
box-sizing: border-box;
}
}
</style>

6
src/views/distribution/checkInventoryTask/createTask.vue

@ -2292,15 +2292,11 @@ const TcChenge = (event, val) => {
console.log(event,'event');
if(event){
if (event.length==2 ) {//
data.startTime = event[0];
data.endTime = event[1];
delete data.inventoryDate;
delete data.inventoryDate;
}
}
console.log(DiskStatus.value, 'DiskStatus.value');
if (DiskStatus.value) {
data.questStatus = 1;

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

@ -34,6 +34,7 @@
<el-select
v-model="query.driverName"
filterable
clearable
placeholder="请输入司机名称"
:loading="loading"
>
@ -50,6 +51,7 @@
<el-select
v-model="query.vehicleName"
filterable
clearable
placeholder="请输入司机名称"
:loading="loading"
>
@ -752,10 +754,10 @@ export default {
},
getvehicleData() {
return new Promise((rv, rev) => {
getVehicleList(1, 10, '').then(res => {
getVehicleList().then(res => {
const data = res.data.data;
let po = [];
data.records.forEach(item => {
data.forEach(item => {
let a = {
dictKey: item.id,
dictValue: item.vehicleNub,
@ -764,16 +766,16 @@ export default {
});
this.vehicleData = po;
console.log('^^^^^^^^^^^^^^^^', res.data.data);
rv(res.data.data.records);
rv(res.data.data);
});
});
},
getDriverData() {
return new Promise((rv, rev) => {
getDriverList(1, 10, '').then(res => {
getDriverList().then(res => {
const data = res.data.data;
let po = [];
data.records.forEach(item => {
data.forEach(item => {
let a = {
dictKey: item.id,
dictValue: item.name,
@ -782,7 +784,7 @@ export default {
});
this.driverData = po;
console.log('===============>', res.data.data);
rv(res.data.data.records);
rv(res.data.data);
});
});
},

14
src/views/distribution/deliverylist/distributionDeliveryListmar.vue

@ -645,11 +645,11 @@ export default {
},
getvehicleData() {
return new Promise((rv, rev) => {
getVehicleList(1, 10, '').then(res => {
getVehicleList().then(res => {
const data = res.data.data;
if (!data.records) return
if (!data) return
let po = [];
data.records.forEach(item => {
data.forEach(item => {
let a = {
dictKey: item.id,
dictValue: item.vehicleNub,
@ -658,16 +658,16 @@ export default {
});
this.vehicleData = po;
console.log('^^^^^^^^^^^^^^^^', res.data.data);
rv(res.data.data.records);
rv(res.data.data);
});
});
},
getDriverData() {
return new Promise((rv, rev) => {
getDriverList(1, 10, '').then(res => {
getDriverList().then(res => {
const data = res.data.data;
let po = [];
data.records.forEach(item => {
data.forEach(item => {
let a = {
dictKey: item.id,
dictValue: item.name,
@ -676,7 +676,7 @@ export default {
});
this.driverData = po;
console.log('===============>', res.data.data);
rv(res.data.data.records);
rv(res.data.data);
});
});
},

Loading…
Cancel
Save