Browse Source

开单录单新增字段

dev
qb 4 months ago
parent
commit
3ef7446265
  1. 10
      src/option/finance/WaybillAudit.js
  2. 12
      src/option/waybill/WaybillOrderList.js
  3. 49
      src/views/distribution/inventory/CreateOrder.vue
  4. 51
      src/views/waybill/CreateZeroOrder.vue
  5. 4
      src/views/waybill/WaybillOrderList.vue

10
src/option/finance/WaybillAudit.js

@ -580,6 +580,16 @@ export const columnList = [
sortable: true, sortable: true,
head: false, head: false,
}, },
{
prop: 'completeDestination',
label: '到站全称',
type: 2,
values: '',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'destinationWarehouseName', prop: 'destinationWarehouseName',
label: '目的仓', label: '目的仓',

12
src/option/waybill/WaybillOrderList.js

@ -60,7 +60,7 @@ export const columnList = [
label: '运单状态', label: '运单状态',
type: 3, type: 3,
values: '', values: '',
width: '100', width: '120',
checkarr: [ checkarr: [
{ label: '未入库', value: '0' }, { label: '未入库', value: '0' },
{ label: '部分入库', value: '10' }, { label: '部分入库', value: '10' },
@ -198,6 +198,16 @@ export const columnList = [
fixed: false, fixed: false,
sortable: true, sortable: true,
}, },
{
prop: 'completeDestination',
label: '到站全称',
type: 2,
values: '',
width: '120',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'goodsName', prop: 'goodsName',
label: '货物名称', label: '货物名称',

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

@ -3717,6 +3717,27 @@ const handleComputedPlanPrice = submitData => {
} }
}; };
const getTranslationArr = codeArr => {
const _nameArr = [];
let _item = {};
_nameArr[0] = details.regionOptione.find(val => val.value === codeArr[0]);
_nameArr[1] = _nameArr[0].children.find(val => val.value === codeArr[1]);
if (codeArr.length === 2) {
_item = _nameArr[1];
} else {
_nameArr[2] = _nameArr[1].children.find(val => val.value === codeArr[2]);
_item = _nameArr[2];
}
return {
locationItem: _item,
nameArr: _nameArr,
};
};
/** 提交 */ /** 提交 */
const handleSubmit = (formEl: FormInstance | undefined) => { const handleSubmit = (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
@ -3785,33 +3806,19 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
} }
// //
const _findeLocation = details.regionOptione const { locationItem: _itemDestination, nameArr: dest_nameArr } =
.find(val => val.value === destination[0]) getTranslationArr(destination);
.children.find(val => val.value === destination[1]);
let _item: any = {}; submitData.destination = _itemDestination.label;
if (destination.length === 2) { submitData.destinationCode = _itemDestination.value;
_item = _findeLocation; submitData.completeDestination = dest_nameArr.map(val => val.label).join('/');
} else {
_item = _findeLocation.children.find(val => val.value === destination[2]);
}
submitData.destination = _item.label;
submitData.destinationCode = _item.value;
// //
const _findeDeparture = details.regionOptione const { locationItem: _itemDeparture, nameArr: de_nameArr } = getTranslationArr(departure);
.find(val => val.value === departure[0])
.children.find(val => val.value === departure[1]);
let _itemDeparture: any = {};
if (departure.length === 2) {
_itemDeparture = _findeDeparture;
} else {
_itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]);
}
submitData.departure = _itemDeparture.label; submitData.departure = _itemDeparture.label;
submitData.departureCode = _itemDeparture.value; submitData.departureCode = _itemDeparture.value;
submitData.completeDeparture = de_nameArr.map(val => val.label).join('/');
console.log('submitData :>> ', submitData); console.log('submitData :>> ', submitData);

51
src/views/waybill/CreateZeroOrder.vue

@ -2884,6 +2884,27 @@ const handleComputedPlanPrice = submitData => {
} }
}; };
const getTranslationArr = codeArr => {
const _nameArr = [];
let _item = {};
_nameArr[0] = details.regionOptione.find(val => val.value === codeArr[0]);
_nameArr[1] = _nameArr[0].children.find(val => val.value === codeArr[1]);
if (codeArr.length === 2) {
_item = _nameArr[1];
} else {
_nameArr[2] = _nameArr[1].children.find(val => val.value === codeArr[2]);
_item = _nameArr[2];
}
return {
locationItem: _item,
nameArr: _nameArr,
};
};
/** 提交 */ /** 提交 */
const handleSubmit = async (formEl: FormInstance | undefined) => { const handleSubmit = async (formEl: FormInstance | undefined) => {
await nextTick(); await nextTick();
@ -2956,34 +2977,20 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
return ElMessage({ message: '请选择正确发站地址', type: 'warning' }); return ElMessage({ message: '请选择正确发站地址', type: 'warning' });
// //
const _findeLocation = details.regionOptione const { locationItem: _itemDestination, nameArr: dest_nameArr } =
.find(val => val.value === destination[0]) getTranslationArr(destination);
.children.find(val => val.value === destination[1]);
let _item: any = {};
if (destination.length === 2) {
_item = _findeLocation;
} else {
_item = _findeLocation.children.find(val => val.value === destination[2]);
}
submitData.destination = _item.label; submitData.destination = _itemDestination.label;
submitData.destinationCode = _item.value; submitData.destinationCode = _itemDestination.value;
submitData.completeDestination = dest_nameArr.map(val => val.label).join('/');
// //
const _findeDeparture = details.regionOptione const { locationItem: _itemDeparture, nameArr: de_nameArr } =
.find(val => val.value === departure[0]) getTranslationArr(departure);
.children.find(val => val.value === departure[1]);
let _itemDeparture: any = {};
if (departure.length === 2) {
_itemDeparture = _findeDeparture;
} else {
_itemDeparture = _findeDeparture.children.find(val => val.value === departure[2]);
}
submitData.departure = _itemDeparture.label; submitData.departure = _itemDeparture.label;
submitData.departureCode = _itemDeparture.value; submitData.departureCode = _itemDeparture.value;
submitData.completeDeparture = de_nameArr.map(val => val.label).join('/');
// let numFlag = false; // let numFlag = false;

4
src/views/waybill/WaybillOrderList.vue

@ -190,7 +190,7 @@
background background
@size-change="sizeChange" @size-change="sizeChange"
@current-change="currentChange" @current-change="currentChange"
:current-page="page.currentPage" :current-page="page.pageNum"
:page-sizes="[30, 50, 80, 120]" :page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize" :page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@ -572,7 +572,7 @@ const searchChange = () => {
/** 清空表单 */ /** 清空表单 */
const searchReset = () => { const searchReset = () => {
details.query = {}; details.query = {};
details.page.currentPage = 1; details.page.pageNum = 1;
handleClearTableQuery(details.columnList); handleClearTableQuery(details.columnList);
onLoad(details.page); onLoad(details.page);
}; };

Loading…
Cancel
Save