Browse Source

修复开单部分bug

dev-xx
qb 1 year ago
parent
commit
a70ef2f05f
  1. 13
      src/api/waybill/orderDetails.js
  2. 4
      src/option/waybill/TemporaryStorageList.js
  3. 18
      src/option/waybill/orderDetails.js
  4. 37
      src/views/distribution/inventory/CreateOrder.vue
  5. 2
      src/views/waybill/CreateZeroOrder.vue
  6. 5
      src/views/waybill/EditCustomerInfo.vue
  7. 11
      src/views/waybill/TemporaryStorageList.vue
  8. 239
      src/views/waybill/orderDetails.vue
  9. 21
      src/views/waybill/orderPackageListDetails.vue

13
src/api/waybill/orderDetails.js

@ -0,0 +1,13 @@
import request from '@/axios';
/**
* 查看订单详情
* @returns
*/
export const postFindListByWaybillId = data => {
return request({
url: '/api/logpm-trunkline/waybillOrder/findListByWaybillId',
method: 'post',
data,
});
};

4
src/option/waybill/TemporaryStorageList.js

@ -208,7 +208,7 @@ export const columnList = [
sortable: true,
},
{
prop: 'totalVolume',
prop: 'createTime',
label: '创建时间',
type: 1,
values: '',
@ -438,7 +438,7 @@ export const packageListColumnList = [
sortable: true,
},
{
prop: 'totalVolume',
prop: 'createTime',
label: '创建时间',
type: 1,
values: '',

18
src/option/waybill/orderDetails.js

@ -16,7 +16,7 @@ export const packageListColumnList = [
fixed: true,
},
{
prop: 'billladingCode',
prop: 'waybillNo',
label: '运单号',
type: 1,
values: '',
@ -27,7 +27,7 @@ export const packageListColumnList = [
head: false,
},
{
prop: 'carNumber',
prop: 'orderCode',
label: '订单自编号',
type: 1,
values: '',
@ -37,17 +37,7 @@ export const packageListColumnList = [
sortable: true,
},
{
prop: 'orderPackageCode',
label: '包条码',
type: 1,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'driverPhone',
prop: 'totalNum',
label: '总件数',
type: 1,
values: '',
@ -57,7 +47,7 @@ export const packageListColumnList = [
sortable: true,
},
{
prop: 'warehouseName',
prop: 'createTime',
label: '创建时间',
type: 1,
values: '',

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

@ -201,7 +201,11 @@
<el-row>
<el-form-item label="发货地址:">
<el-input v-model="query.shipperAddress" placeholder="发货地址"></el-input>
<el-input
v-model="query.shipperAddress"
@change="e => handleRefreshText('shipperAddress', e)"
placeholder="发货地址"
></el-input>
</el-form-item>
</el-row>
</div>
@ -278,7 +282,11 @@
<el-row>
<el-form-item label="发货地址:">
<el-input v-model="query.consigneeAddress" placeholder="发货地址"></el-input>
<el-input
v-model="query.consigneeAddress"
@change="e => handleRefreshText('consigneeAddress', e)"
placeholder="发货地址"
></el-input>
</el-form-item>
</el-row>
</div>
@ -455,6 +463,7 @@
:min="0"
:step="0.1"
v-model="query.deliveryFee"
@input="e => handleRefreshText('deliveryFee', e, 0)"
></el-input-number>
</el-form-item>
@ -466,6 +475,7 @@
:min="0"
:step="0.1"
v-model="query.pickupFee"
@input="e => handleRefreshText('pickupFee', e, 0)"
></el-input-number>
</el-form-item>
@ -477,6 +487,7 @@
:min="0"
:step="0.1"
v-model="query.warehouseManagementFee"
@input="e => handleRefreshText('warehouseManagementFee', e, 0)"
></el-input-number>
</el-form-item>
@ -488,6 +499,7 @@
:min="0"
:step="0.1"
v-model="query.storageFee"
@input="e => handleRefreshText('storageFee', e, 0)"
></el-input-number>
</el-form-item>
</el-row>
@ -501,6 +513,7 @@
:min="0"
:step="0.1"
v-model="query.handlingFee"
@input="e => handleRefreshText('handlingFee', e, 0)"
></el-input-number>
</el-form-item>
<el-form-item label="其它费用:">
@ -511,6 +524,7 @@
:min="0"
:step="0.1"
v-model="query.otherFee"
@input="e => handleRefreshText('otherFee', e, 0)"
></el-input-number>
</el-form-item>
<el-form-item label="保价费:">
@ -1517,14 +1531,17 @@ const onLoad = async (idsArr = []) => {
});
info.value.maxNum = _maxNum;
details.query.goodsCode = '-' + _maxNum;
if (data.defaultPayWay) {
data.payWay = data.defaultPayWay;
} else {
details.query.payWay = data.payWayList.find(val => val.dictValue === '到付').dictKey || '2';
}
details.query.transportType = '1';
details.goodsCode = data['totalNum'];
// details.goodsCode = data['totalNum'];
console.log('details.query', details.query);
console.log('info.value :>> ', info.value);
// // instance.proxy.$forceUpdate();
} catch (error) {
console.log('error :>> ', error);
@ -1871,6 +1888,13 @@ const destinationWarehouseNameChange = val => {
/** 计算行合计 */
const handleComputed = (row: any) => {
// if (!row.price) return;
row.num = row.num || 0;
row.price = row.price || 0;
row.volume = row.volume || 0;
row.weight = row.weight || 0;
console.log('row :>> ', row);
if (row.chargeType === 1) row.subtotalFreight = computeNumber(row.num, '*', row.price).result;
else if (row.chargeType === 2)
row.subtotalFreight = computeNumber(row.volume, '*', row.price).result;
@ -2011,6 +2035,13 @@ const handlePayWay = (number?: number) => {
}
};
const handleRefreshText = (key, value, refreshValue?: string | number) => {
console.log('key :>> ', key);
if (value) return;
query.value[key] = 1;
console.log('query :>> ', query);
};
/** 重置数据 */
const resetForm = (formEl: FormInstance | undefined) => {
console.log('formEl :>> ', formEl);

2
src/views/waybill/CreateZeroOrder.vue

@ -1597,6 +1597,8 @@ const destinationWarehouseNameChange = val => {
/** 计算行合计 */
const handleComputed = (row: any) => {
details.query.goodsCode = '-' + details.totalObj.totalCount;
console.log('details.totalObj.totalCount :>> ', details.totalObj.totalCount);
if (!row.price) return;
if (row.chargeType === 1) row.subtotalFreight = computeNumber(row.num, '*', row.price).result;
else if (row.chargeType === 2)

5
src/views/waybill/EditCustomerInfo.vue

@ -139,7 +139,10 @@ const handleSubmit = () => {
const { code, msg } = res.data;
if (code === 200) {
if (msg) ElMessage({ message: msg, type: 'success' });
$store.commit('DEL_TAG_CURRENT');
$store.commit('EDIT_REFRESHITEM', {
title: 'TemporaryStorageList',
status: true,
});
$router.back();
return;
} else {

11
src/views/waybill/TemporaryStorageList.vue

@ -116,9 +116,7 @@
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
包明细
</el-button>
<el-text @click="handleShowPackageOrderList(slotProps.scope)"> 包明细 </el-text>
</template>
</template>
</tablecmt>
@ -460,7 +458,7 @@ import {
import { getLazyTreeAll } from '@/api/base/region';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls } from '@/utils/util';
import { columnList, packageListColumnList } from '@/option/waybill/TemporaryStorageList';
import { columnList } from '@/option/waybill/TemporaryStorageList';
import { useRouter } from 'vue-router';
import print from '@/utils/print';
import { ElMessage } from 'element-plus';
@ -519,10 +517,6 @@ const details = reactive<any>({
/** 列表数据 */
haveDataData: [],
notHaveDataData: [],
/** 包明细表头 */
packageListColumnList,
/** 包明细数据 */
packageListData: [],
/** 页面loading */
loadingObj: {
/** 列表加载loading */
@ -1220,6 +1214,7 @@ onActivated(() => {
console.log('this.$store :>> ', $store);
if ($store.state.isRefresh.refreshObj.TemporaryStorageList) {
//
details.query = {};
onLoad();
$store.commit('EDIT_REFRESHITEM', { title: 'TemporaryStorageList', status: false });

239
src/views/waybill/orderDetails.vue

@ -110,30 +110,28 @@
</el-row>
<!-- 表格 -->
<el-row>
<!-- 列表模块 -->
<tablecmt
:columnList="details.packageListColumnList"
:tableData="details.packageListData"
:loading="loadingObj.packageListLoading"
@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>
<el-button type="text" @click="handleShowFlowNode(slotProps.scope)">
在库明细
</el-button>
</template>
<!-- 列表模块 -->
<tablecmt
:columnList="details.packageListColumnList"
:tableData="details.data"
:loading="loadingObj.packageListLoading"
@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>
<!-- <el-button type="text" @click="handleShowFlowNode(slotProps.scope)">
在库明细
</el-button> -->
</template>
</tablecmt>
</el-row>
</template>
</tablecmt>
<!-- 分页模块 -->
<el-row class="el-fy">
@ -157,167 +155,6 @@
</div>
</basic-container>
<!-- 修改客户信息 -->
<el-dialog
class="el-dialog-QRCode"
title="修改客户信息"
:visible.sync="details.popUpShow.editClientInfoVisible"
width="780px"
v-model="details.popUpShow.editClientInfoVisible"
>
<div>
<el-divider style="font-size: 28px">修改订单自编号客户信息</el-divider>
</div>
<el-form>
<el-form-item label="客户姓名">
<el-input />
</el-form-item>
<el-form-item label="联系电话">
<el-input />
</el-form-item>
<el-form-item label="用户地址">
<el-input />
</el-form-item>
</el-form>
<template #footer>
<div class="flex-c-c dialog-footer">
<el-button icon="Position" type="primary" @click="printTemplate"> </el-button>
<el-button icon="Refresh" type="primary" @click="printTemplate"> </el-button>
<el-button icon="Close" @click="details.popUpShow.editClientInfoVisible = false">
</el-button>
</div>
</template>
</el-dialog>
<!-- 包内产品 -->
<el-dialog
title="包内产品"
v-model="details.popUpShow.packageDetailColumnListVisited"
width="80%"
:before-close="beforeClose"
append-to-body
:fullscreen="details.fullscreenObj.packageDetailColumnListVisited"
:show-close="false"
class="packageDetailColumnListVisited"
>
<template #header="{ close, titleId, titleClass }">
<div class="my-header flex-c-sb">
<h4 :id="titleId" :class="titleClass">包内产品</h4>
<div class="flex-c-c">
<!-- 全屏显示按钮 -->
<el-button type="text" v-if="!details.fullscreenObj.packageDetailColumnListVisited">
<el-icon class="" @click="handleFullScrean('open', 'packageDetailColumnListVisited')"
><FullScreen
/></el-icon>
</el-button>
<el-button type="text" v-else>
<el-icon class="" @click="handleFullScrean('close', 'packageDetailColumnListVisited')"
><CopyDocument
/></el-icon>
</el-button>
<!-- 弹窗关闭按钮 -->
<el-button type="text">
<el-icon class="" @click="close"><Close /></el-icon>
</el-button>
</div>
</div>
</template>
<tablecmt
:columnList="details.packageDetailColumnList"
:tableData="details.packageDetailData"
:loading="loadingObj.packageListLoading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps"> </template>
</tablecmt>
<!-- 分页模块 -->
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="details.packageListPage.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="details.packageListPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="details.packageListPage.total"
>
</el-pagination>
</el-dialog>
<!-- 流转节点 -->
<el-dialog
title="流转节点"
v-model="details.popUpShow.flowNodeColumnListVisited"
width="80%"
:before-close="beforeClose"
append-to-body
:fullscreen="details.fullscreenObj.flowNodeColumnListVisited"
:show-close="false"
class="flowNodeColumnListVisited"
>
<template #header="{ close, titleId, titleClass }">
<div class="my-header flex-c-sb">
<h4 :id="titleId" :class="titleClass">流转节点</h4>
<div class="flex-c-c">
<!-- 全屏显示按钮 -->
<el-button type="text" v-if="!details.fullscreenObj.flowNodeColumnListVisited">
<el-icon class="" @click="handleFullScrean('open', 'flowNodeColumnListVisited')"
><FullScreen
/></el-icon>
</el-button>
<el-button type="text" v-else>
<el-icon class="" @click="handleFullScrean('close', 'flowNodeColumnListVisited')"
><CopyDocument
/></el-icon>
</el-button>
<!-- 弹窗关闭按钮 -->
<el-button type="text">
<el-icon class="" @click="close"><Close /></el-icon>
</el-button>
</div>
</div>
</template>
<tablecmt
:columnList="details.flowNodeColumnList"
:tableData="details.flowNodeData"
:loading="loadingObj.packageListLoading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps"> </template>
</tablecmt>
<!-- 分页模块 -->
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="details.packageListPage.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="details.packageListPage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="details.packageListPage.total"
>
</el-pagination>
</el-dialog>
<!-- 打印二维码 -->
<el-dialog
class="el-dialog-QRCode"
@ -327,7 +164,7 @@
v-model="details.popUpShow.QRCodeVisible"
>
<div>
<div v-html="html"></div>
<div v-html="details.html"></div>
</div>
<span slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="ddd"> </el-button>-->
@ -353,16 +190,18 @@ import { mapGetters } from 'vuex';
/** 获取字典 */
import { getDictionaryBiz } from '@/api/system/dict';
import { getopenOrderAdvancePageList } from '@/api/waybill/TemporaryStorageList';
import { postFindListByWaybillId } from '@/api/waybill/orderDetails';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { downloadXls, setNodeHeight, getHtmls } from '@/utils/util';
import { packageDetailColumnList, flowNodeColumnList } from '@/option/waybill/orderPackageList';
import { packageListColumnList } from '@/option/waybill/orderDetails';
import { useRouter } from 'vue-router';
import { useRouter, useRoute } from 'vue-router';
import print from '@/utils/print';
import { ElMessage, ElMessageBox } from 'element-plus';
//
const $router = useRouter();
const $route = useRoute();
const details = reactive<any>({
/** 是否开启搜索 */
@ -401,8 +240,6 @@ const details = reactive<any>({
],
/** 时间选择器数据 */
stockupDate: [],
/** 包明细表头 */
packageListColumnList,
/** 包明细数据 */
packageListData: [{}],
/** 包内产品表头 */
@ -413,6 +250,10 @@ const details = reactive<any>({
flowNodeColumnList,
/** 流转节点数据 */
flowNodeData: [{}],
/** 数据 */
data: [],
/** 包明细表头 */
packageListColumnList,
/** 页面loading */
loadingObj: {
/** 列表加载loading */
@ -457,20 +298,8 @@ const details = reactive<any>({
html: '',
});
const {
search,
query,
shortcuts,
stockupDate,
data,
loadingObj,
selectionList,
drawerShow,
page,
trickleLoadingPage,
zeroAdditionalRecordingInfo,
popUpShow,
} = toRefs(details);
const { search, query, shortcuts, stockupDate, loadingObj, selectionList, drawerShow, page } =
toRefs(details);
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
@ -489,7 +318,11 @@ onMounted(() => {
/** 请求页面数据 */
const onLoad = async (page: any, params = {}) => {
//
details.data = await getopenOrderAdvancePageList(page, { ...details.query, ...params });
const response = await postFindListByWaybillId({ waybillId: $route.query.id });
const { code, data } = response.data;
if (code !== 200) return;
details.data = data;
};
onLoad(details.page);

21
src/views/waybill/orderPackageListDetails.vue

@ -2,7 +2,7 @@
<basic-container>
<div class="avue-crud">
<!-- 搜索模块 -->
<el-row v-h5uShow="!search">
<div v-h5uShow="!search">
<!-- 查询模块 -->
<el-form :inline="true" :model="query" class="header_search" label-width="100px">
<el-form-item label="是否入库">
@ -100,7 +100,7 @@
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item>
</el-form>
</el-row>
</div>
<!-- 控件模块 -->
<el-row>
@ -527,23 +527,8 @@ const showdrawer = (_flag?: boolean) => {
/** 是否开启搜索区 */
const searchHide = () => {
function getWinHight() {
var windowHight = 0;
if (document.body.clientHeight && document.documentElement.clientHeight) {
windowHight =
document.body.clientHeight < document.documentElement.clientHeight
? document.body.clientHeight
: document.documentElement.clientHeight;
} else {
}
return document.documentElement.clientHeight;
}
details.search = !details.search;
const timer = setTimeout(() => {
details.listNode.style.height =
getWinHight() - details.listNode.getBoundingClientRect().top - 70 + 'px';
clearTimeout(timer);
}, 10);
setNodeHeight(details.listNode, '', true);
};
/** 表格表头输入框搜索 */

Loading…
Cancel
Save