Browse Source

修复干线部分bug

dev-xx
qb 12 months ago
parent
commit
971f9e1660
  1. 12
      src/api/distribution/truckLoadingDetails.js
  2. 134
      src/views/distribution/artery/AddVehicleStowage.vue
  3. 21
      src/views/distribution/artery/truckLoadingDetails.vue
  4. 9
      src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue

12
src/api/distribution/truckLoadingDetails.js

@ -76,3 +76,15 @@ export const postSignLoadScanByIds = (data = {}) => {
data,
});
};
/**
* 导出
*/
export const postLoadingDetailExport = (data = {}) => {
return request({
url: '/api/logpm-trunkline/carsLoad/loadingDetailExport',
method: 'post',
data,
responseType: 'blob',
});
};

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

@ -278,54 +278,57 @@
<!-- 搜索区域 -->
<div v-h5uShow="!search">
<el-form
:inline="true"
label-width="80px"
:model="details.oldQuery"
class="el-fr-d"
>
<div class="fo-fl">
<!-- <el-form-item label="订单号" class="el-times">
<el-input v-model.trim="query.orderCode" clearable></el-input>
</el-form-item>
<el-form-item label="目的网点" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="到站" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="目标品类" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="备注" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-input></el-input>
</el-form-item> -->
<el-form-item label="开单时间" class="el-times">
<!-- <el-input v-model="query.stockupArea" placeholder="请输入备货区"></el-input>-->
<el-date-picker
v-model="stockupDate"
type="daterange"
unlink-panels
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
clearable
/>
</el-form-item>
<!-- <el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="initOriginWarehouseOrder()"
> </el-button
>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item> -->
</div>
<el-form inline label-width="80px" :model="details.oldQuery" class="el-fr-d">
<!-- <el-form-item label="订单号" class="el-times">
<el-input v-model.trim="query.orderCode" clearable></el-input>
</el-form-item>
<el-form-item label="目的网点" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="到站" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="目标品类" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="备注" class="el-times">
<el-input></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-input></el-input>
</el-form-item> -->
<el-form-item label="开单时间" class="el-times">
<el-date-picker
v-model="query.enterTime"
type="daterange"
unlink-panels
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
clearable
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="入库时间" class="el-times">
<el-date-picker
v-model="query.openTime"
type="daterange"
unlink-panels
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
clearable
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"
> </el-button
>
<el-button icon="el-icon-delete" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
@ -885,6 +888,15 @@ const initOriginWarehouseOrder = debounce(async (params = {}) => {
...details.query,
...params,
};
for (const key in submitData) {
const value = submitData[key];
if (!value && value !== false && value !== 0) delete submitData[key];
}
delete submit.enterTime;
delete submit.openTime;
if (Number(details.pageType) === 2) submitData.loadId = details.loadId;
if (submitData.orderCodes.length === 0) delete submitData.orderCodes;
const res = await postFindAllOrderList(submitData);
@ -1102,14 +1114,38 @@ const destinationWarehouseNameChange = (val, index) => {
/** 搜索 */
const searchChange = () => {
console.log('details.query.enterTime :>> ', details.query.enterTime);
console.log('details.query.openTime :>> ', details.query.openTime);
if (details.query.enterTime && details.query.enterTime.length > 0) {
details.query.enterTimeStartStr = details.query.enterTime[0];
details.query.enterTimeEndStr = details.query.enterTime[1];
} else {
delete details.query.enterTimeStartStr;
delete details.query.enterTimeEndStr;
}
if (details.query.openTime && details.query.openTime.length > 0) {
details.query.openTimeStartStr = details.query.openTime[0];
details.query.openTimeEndStr = details.query.openTime[1];
} else {
delete details.query.openTimeStartStr;
delete details.query.openTimeEndStr;
}
console.log('details.query :>> ', details.query);
initOriginWarehouseOrder();
};
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.pageNum = 1;
for (let i = 0; i < details.columnList.length; i++) {
const value = details.columnList[i];
value.values = '';
}
initOriginWarehouseOrder();
};

21
src/views/distribution/artery/truckLoadingDetails.vue

@ -66,6 +66,7 @@
<el-button type="primary" icon="Delete" @click="handleBatchRemove">删除</el-button>
<el-button type="primary" icon="Printer" @click="handleBatchBarcode">二维码</el-button>
<el-button type="primary" icon="Download" @click="handleExport">导出</el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -212,6 +213,7 @@ import {
postBatchTransferUnload,
postRemoveCarsLoadScan,
postSignLoadScanByIds,
postLoadingDetailExport,
} from '@/api/distribution/truckLoadingDetails';
import { getShowAdvancePackgeCode } from '@/api/waybill/orderPackageListDetails';
/** 获取字典 */
@ -1157,6 +1159,25 @@ const handleBatchSigin = async () => {
});
};
const handleExport = async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postLoadingDetailExport({ loadId: $route.query.loadId });
const { status, data } = res;
console.log('status :>> ', status);
if (status !== 200) return;
downloadXls(data, $route.query.name);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
};
watch(
$route,
(newVal, oldVal) => {

9
src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue

@ -108,7 +108,7 @@
:controls="false"
:precision="0"
:min="0"
:max="slotProps.scope.row.totalCount"
:max="slotProps.scope.row.totalCount - slotProps.scope.row.stockCount"
/>
</template>
@ -690,6 +690,13 @@ export default {
val => val.dictKey == data.chargeType
).dictValue;
this.data = data.waybillList;
for (let i = 0; i < this.data.length; i++) {
const value = this.data[i];
value.realNum = value.realNum ? value.realNum : value.totalCount - value.stockCount;
}
this.inputsc('', { prop: 'aaa' });
} catch (error) {
console.log('error :>> ', error);

Loading…
Cancel
Save