Browse Source

修复部分干线bug

dev-xx
qb 10 months ago
parent
commit
204e78f124
  1. 2
      src/option/distribution/addVehicleStowage.js
  2. 8
      src/views/basicdata/ConfigureBillingAndWarehousing/list.vue
  3. 58
      src/views/distribution/artery/VehicleStowageDetails.vue
  4. 97
      src/views/distribution/inventory/distrilbutionBillLadingList.vue

2
src/option/distribution/addVehicleStowage.js

@ -597,7 +597,7 @@ export const detailsColumnList = [
{
prop: 'waybillNo',
label: '运单号',
type: 2,
type: 13,
values: '',
width: '130',
checkarr: [],

8
src/views/basicdata/ConfigureBillingAndWarehousing/list.vue

@ -149,16 +149,16 @@
</el-form-item>
<el-form-item
label="物料"
label="仓库"
prop="warehouse"
:rules="[{ required: true, message: '请选择物料', trigger: ['blur', 'change'] }]"
:rules="[{ required: true, message: '请选择仓库', trigger: ['blur', 'change'] }]"
>
<el-select
class="w100"
v-model="details.form.warehouse"
filterable
clearable
placeholder="请选择品类"
placeholder="请选择仓库"
style="width: 240px"
:loading="loadingObj.loading"
@change="handleChangeWareHouse"
@ -204,7 +204,7 @@ import dayjs from 'dayjs';
import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { downloadXls, setNodeHeight, debounce ,deepClone} from '@/utils/util';
import { downloadXls, setNodeHeight, debounce, deepClone } from '@/utils/util';
import { columnList } from '@/option/basicdata/ConfigureBillingAndWarehousing';
import {
postPageList,

58
src/views/distribution/artery/VehicleStowageDetails.vue

@ -131,9 +131,7 @@
</div>
</el-divider>
<!-- 运单池 && 调度池 -->
<!-- 列表模块 -->
<!-- 运单信息 -->
<div v-h5uShow="!search">
<el-form
:inline="true"
@ -181,6 +179,7 @@
v-model="details.type"
tab-position="left"
style="height: 100%; width: fit-content; flex: none"
@tab-click="() => inputsc('', { prop: 'aaa' })"
class="demo-tabs"
>
<el-tab-pane label="实际数据" name="real"></el-tab-pane>
@ -193,7 +192,7 @@
class="w100"
ref="oldColumnListNode"
:columnList="details.detailsColumnList"
:tableData="details.type === 'real' ? details.renderData : details.planData"
:tableData="details.renderData"
:loading="loadingObj.oldListLoading"
@inputTxt="inputsc"
@timeCheck="timesc"
@ -201,6 +200,13 @@
@selection="selectionChange"
:arraySpanMethod="row => arraySpanMethod(row)"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '运单号'">
<el-text @click="() => handleGoWayBillDetail(slotProps.scope)">{{
slotProps.scope.row.waybillNo
}}</el-text>
</template>
</template>
</tablecmt>
</div>
</div>
@ -689,18 +695,12 @@ const initOriginWarehouseOrder = async (params = {}) => {
details.planData = [];
data.carsLoadWaybillInfoList.forEach(val => {
const _arr = [];
details.oldData.push(
...val.carsLoadOrderInfoList.map((item, index) => {
item = { ...val, ...item };
const _planArr: any = { ...val, ...item };
delete item.carsLoadOrderInfoList;
delete item.carsLoadOrderInfoListPlan;
delete _planArr.carsLoadOrderInfoList;
delete _planArr.carsLoadOrderInfoListPlan;
_arr.push(_planArr);
if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoList.length;
else {
@ -713,7 +713,22 @@ const initOriginWarehouseOrder = async (params = {}) => {
})
);
details.planData.push(..._arr);
details.planData.push(
...val.carsLoadOrderInfoListPlan.map((item, index) => {
item = { ...val, ...item };
delete item.carsLoadOrderInfoList;
delete item.carsLoadOrderInfoListPlan;
if (index === 0) item.mergeColumnIndex = val.carsLoadOrderInfoListPlan.length;
else {
item.mergeColumnIndex = 0;
for (let value of mergeColumn) {
item[value] = '';
}
}
return item;
})
);
});
inputsc('', { prop: 'aaa' });
@ -846,11 +861,13 @@ const inputsc = (value, row) => {
details.query[row.prop] = reg;
const nowData = details.type === 'real' ? details.oldData : details.planData;
if (value === '') delete details.query[row.prop];
if (Object.keys(details.query).length === 0) return (details.renderData = details.oldData);
if (Object.keys(details.query).length === 0) return (details.renderData = nowData);
const _data = details.oldData.filter(value => {
const _data = nowData.filter(value => {
let _flag = true;
for (let key in details.query) {
if (!details.query[key].test(value[key])) _flag = false;
@ -917,7 +934,7 @@ const setnewcolum = (newarr, headarr, type) => {
/** 合并行 */
const arraySpanMethod = (row: any) => {
console.log('123 :>> ', 123);
if (details.type === 'plan') return;
// if (details.type === 'plan') return;
const { column } = row;
if (mergeColumn.indexOf(column.property) !== -1) {
@ -975,6 +992,19 @@ const handleCheckTab = e => {
break;
}
};
/** 跳转到运单详情 */
const handleGoWayBillDetail = ({ row }) => {
if (row.waybillNo === '————') return ElMessage.warning('暂无运单号');
$router.push({
path: '/distribution/inventory/BookingNote',
query: {
name: `查看 -- 【${row.waybillNo}`,
waybillNo: row.waybillNo,
id: row.waybillId,
},
});
};
/** 关闭页面 */
const back = () => {

97
src/views/distribution/inventory/distrilbutionBillLadingList.vue

@ -1,5 +1,5 @@
<template>
<basic-container>
<basic-container v-loading="loadingObj.pageLoading">
<div class="avue-crud">
<el-row v-if="!search">
<!-- 查询模块 -->
@ -211,17 +211,7 @@
</el-dialog>
<!-- 打印模块 -->
<el-dialog title="二维码" :visible.sync="isShow" width="70%" v-model="isShow">
<div>
<div v-html="html"></div>
</div>
<span slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="ddd"> </el-button>-->
<el-button type="primary" @click="printTemplate"> </el-button>
<el-button type="primary" @click="isShow = false"> </el-button>
<el-button @click="isShow = false"> </el-button>
</span>
</el-dialog>
<MyPrint v-model="isShow" :isShowExport="false" :html="html" width="70%" />
</div>
</basic-container>
<edittablehead
@ -247,7 +237,6 @@ import {
$_distrilbutionBillLading,
} from '@/api/distribution/distrilbutionBillLading';
import { printBatch } from '@/api/distribution/distributionDeliveryList';
import print from '@/utils/print';
import option from '@/option/distribution/distrilbutionBillLading';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
@ -255,6 +244,7 @@ import { getToken } from '@/utils/auth';
import dayjs from 'dayjs';
import { downloadXls } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus';
import MyPrint from '@/components/MyPrint/MyPrint.vue';
export default {
data() {
return {
@ -634,6 +624,9 @@ export default {
},
},
],
loadingObj: {
pageLoading: false,
},
};
},
mounted() {
@ -839,10 +832,6 @@ export default {
}
}
},
printTemplate() {
// var nodev =document.querySelectorAll('.el-dialog__body');
print();
},
async handleSubmit() {
if (!this.form.id) {
let fei = new Map();
@ -978,41 +967,57 @@ export default {
//
async handlePreview(row) {
console.log('row :>> ', row);
this.html = '';
const res = await printBatch({ ids: row.id, type: 3 });
console.log('res :>> ', res);
const {
data: { code, data },
} = res;
if (code === 200) {
//
data.forEach(item => {
this.html += item.templateHtml;
});
this.isShow = true;
try {
this.loadingObj.pageLoading = true;
console.log('row :>> ', row);
this.html = '';
const res = await printBatch({ ids: row.id, type: 3 });
console.log('res :>> ', res);
const {
data: { code, data },
} = res;
if (code === 200) {
//
data.forEach(item => {
this.html += item.templateHtml;
});
this.isShow = true;
}
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
},
/**
* 批量打印
*/
async printBatchOrder() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.isShow = true;
const res = await printBatch({ ids: Array.from(this.selectionList).join(','), type: 3 });
console.log('res :>> ', res);
const {
data: { code, data },
} = res;
if (code === 200) {
//
this.html = '';
data.forEach(item => {
this.html += item.templateHtml;
});
try {
this.loadingObj.pageLoading = true;
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.isShow = true;
const res = await printBatch({ ids: Array.from(this.selectionList).join(','), type: 3 });
console.log('res :>> ', res);
const {
data: { code, data },
} = res;
if (code === 200) {
//
this.html = '';
data.forEach(item => {
this.html += item.templateHtml;
});
}
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
},

Loading…
Cancel
Save