This commit is contained in:
2026-02-04 10:50:06 +08:00
parent a2e7cf5703
commit be41ce6d96
2 changed files with 16 additions and 137 deletions

View File

@@ -2,9 +2,7 @@ import request from '@/utils/request'
// 查询库存单据主列表 // 查询库存单据主列表
export function listBill(data) { export function listBill(data) {
return request({ return request({
// url: '/document/info/bill/groups',
url: '/document/order/wisdom/rk/list', url: '/document/order/wisdom/rk/list',
method: 'get', method: 'get',
params: data params: data
}) })

View File

@@ -25,28 +25,19 @@
</el-form> </el-form>
<!-- @selection-change="printSelectionChange" --> <el-table v-loading="loading" highlight-current-row :data="billList" @row-dblclick="billClick" >
<el-table v-loading="loading" highlight-current-row :data="billList" @row-dblclick="billClick" > <el-table-column label="单据号" align="center" prop="billNo" width="150" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="单据号" align="center" prop="billNoCk" width="150" />
<el-table-column label="库存状态" align="center" > <el-table-column label="库存状态" align="center" >
<template #default="scope"> <template #default="scope">
<span>{{ isChukuFun(scope.row.isChuku) }}</span> <span>{{ isChukuFun(scope.row.isDelivery) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="理货员" align="center" prop="ckLihuoY" /> <el-table-column label="理货员" align="center" prop="operatorName" />
<!-- <el-table-column label="入库类型" align="center" prop="rkTypeName" width="100"/> --> <el-table-column label="出库时间" align="center" prop="operationTime" width="170">
<el-table-column label="出库时间" align="center" prop="lyTime" width="170">
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.lyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.operationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" align="center" width="180">
<template #default="scope">
<el-button link type="primary" @click="delieryReceipt(scope.row.billNo)">生成配送单</el-button>
</template>
</el-table-column> -->
<!-- <el-table-column label="所属仓库" align="center" prop="cangkuName" /> -->
</el-table> </el-table>
<!-- 分页暂时注释掉 --> <!-- 分页暂时注释掉 -->
<!-- <pagination <!-- <pagination
@@ -75,7 +66,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="库存状态" align="center" > <el-table-column label="库存状态" align="center" >
<template #default="scope"> <template #default="scope">
<span>{{ isChukuFun(scope.row.isChuku) }}</span> <span>{{ isChukuFun(scope.row.bizType) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目号" align="center" prop="xmNo" width="150"/> <el-table-column label="项目号" align="center" prop="xmNo" width="150"/>
@@ -86,46 +77,21 @@
<el-table-column label="合同单价" align="center" prop="htDj" /> <el-table-column label="合同单价" align="center" prop="htDj" />
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/> <el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
<el-table-column label="计量单位" align="center" prop="dw" /> <el-table-column label="计量单位" align="center" prop="dw" />
<el-table-column label="实际库数量" align="center" prop="realQty" width="120"/> <el-table-column label="实际库数量" align="center" prop="realQty" width="120"/>
<el-table-column label="库位码" align="center" prop="pcode" width="120"/> <el-table-column label="库位码" align="center" prop="pcode" width="120"/>
<el-table-column label="托盘码" align="center" prop="trayCode" /> <el-table-column label="托盘码" align="center" prop="trayCode" />
<el-table-column label="身份码" align="center" prop="entityId" width="200"/> <el-table-column label="身份码" align="center" prop="entityId" width="200"/>
<el-table-column label="库类型" align="center" prop="rkTypeName" width="150"/> <el-table-column label="库类型" align="center" prop="operationTypeName" width="150"/>
<el-table-column label="物资类型" align="center" prop="wlTypeName" width="120"/> <el-table-column label="物资类型" align="center" prop="wlTypeName" width="120"/>
<el-table-column label="所属仓库" align="center" prop="cangkuName" width="150"/> <el-table-column label="所属仓库" align="center" prop="cangkuName" width="150"/>
<el-table-column label="入库时间" align="center" prop="rkTime" width="200"> <el-table-column label="操作时间" align="center" prop="operationTime" width="200">
<template #default="scope">
<span>{{ parseTime(scope.row.rkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="还料时间" align="center" prop="returnTime" width="200">
<template #default="scope">
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column> -->
<el-table-column label="出库时间" align="center" prop="lyTime" width="200">
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.lyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.lyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="库龄" align="center" prop="stockAge" /> --> <!-- <el-table-column label="库龄" align="center" prop="stockAge" /> -->
<el-table-column label="理货员" align="center" prop="lihuoYName" /> <el-table-column label="理货员" align="center" prop="lihuoYName" />
<!-- <el-table-column label="现场图片" align="center" v-if="isExamine==1">
<template #default="scope">
<el-image :src="scope.row.scenePhotoUrl" style="width:50px;height: 50px;"
:zoom-rate="1.2"
:max-scale="7"
:min-scale="0.2"
:preview-src-list="srcList"
show-progress
:initial-index="4"
:preview-teleported="true"
@click="preview(scope.row.scenePhotoUrl)"/>
</template>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="remark" width="200"/> <el-table-column label="备注" align="center" prop="remark" width="200"/>
<!-- fixed="right" -->
</el-table> </el-table>
</el-splitter-panel> </el-splitter-panel>
@@ -285,18 +251,10 @@
</template> </template>
<script setup name="outWarehouse"> <script setup name="outWarehouse">
// wisdomDelStock
import {listBill,listStock,calculate,addDelivery} from "@/api/outWarehouse/outWarehouse"; import {listBill,listStock,calculate,addDelivery} from "@/api/outWarehouse/outWarehouse";
import { listType } from "@/api/document/type" import { listType } from "@/api/document/type"
// import { getToken } from "@/utils/auth";
// import {warehousingDict} from "@/api/information/warehousingtype"; //入库类型
// import {materialtypeDict} from "@/api/information/materialtype"; //物资类型
// import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
import {listUser} from "@/api/system/user"; //理货员 import {listUser} from "@/api/system/user"; //理货员
// import {getKwList} from "@/api/information/pcdedetail"; //库位下拉数据
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
// import { onMounted, onUnmounted } from "vue";
// import AMapLoader from "@amap/amap-jsapi-loader";
// let map = null; // let map = null;
@@ -324,29 +282,16 @@
// }); // });
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const billList = ref([]); //单据列表
const stockList = ref([]); //明细列表
const loading = ref(true);
const detailLoading = ref(false); //加载列表详情 const detailLoading = ref(false); //加载列表详情
const showSearch = ref(true); const showSearch = ref(true);
const total = ref(0); //单据 const total = ref(0); //单据
const detailTotal = ref(0); //明细
const printList = ref([]) //要打印的数据列表
const rkTime = ref([])
const isExamine = ref(0) //是否需要开启审核 1开启0不开启
const srcList = ref([])
const personList = ref([]); //理货员下拉数据 const personList = ref([]); //理货员下拉数据
const carTypeList = ref([]) //推荐车型下拉数据 const carTypeList = ref([]) //推荐车型下拉数据
// const itemList = ref([])
// const fileList = ref([])
const dialogPicDetailVisible = ref(false) const dialogPicDetailVisible = ref(false)
const multiple = ref(true) const multiple = ref(true)
@@ -363,9 +308,6 @@
}, },
queryParams: { queryParams: {
// keyword:"",
// pageNum: 1,
// pageSize: 10,
}, },
detailQueryParams:{ detailQueryParams:{
@@ -397,7 +339,6 @@
const { queryParams,detailQueryParams,delieryData,rules } = toRefs(data); const { queryParams,detailQueryParams,delieryData,rules } = toRefs(data);
//生成配送单弹框 //生成配送单弹框
function delieryReceipt(){ function delieryReceipt(){
dialogPicDetailVisible.value = true dialogPicDetailVisible.value = true
//理货员下拉数据 //理货员下拉数据
listUser().then(response=>{ listUser().then(response=>{
@@ -412,96 +353,38 @@
//双击单据,查询明细 //双击单据,查询明细
function billClick(row){ function billClick(row){
//console.log(row) stockList.value = row.recordList
// return
if(row.billNoCk){
detailLoading.value = true;
// detailQueryParams.value.id = row.id
// detailQueryParams.value.billNoCk = row.billNoCk
// detailList()
let detailList = row.detailList
for(let i=0;i<detailList.length;i++){
detailList[i].deliveryTon = (Number(detailList[i].weightKg) * Number(detailList[i].realQty)).toFixed(3);
detailList[i].goodsSize = (Number(detailList[i].volumeM3) * Number(detailList[i].realQty)).toFixed(3);
}
stockList.value = detailList
// detailTotal.value = response.total;
detailLoading.value = false;
}
}
//查询明细列表数据方法(不查了改成从数据里直接取了)
function detailList(){
listStock(detailQueryParams.value).then(response => {
// console.log(response)
// return
for(let i=0;i<response.rows.length;i++){
response.rows[i].deliveryTon = (Number(response.rows[i].weightKg) * Number(response.rows[i].realQty)).toFixed(3);
response.rows[i].goodsSize = (Number(response.rows[i].volumeM3) * Number(response.rows[i].realQty)).toFixed(3);
}
stockList.value = response.rows
detailTotal.value = response.total;
detailLoading.value = false;
});
} }
function isChukuFun(isChuku){ function isChukuFun(isChuku){
// scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中") // scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中")
return "已出库" return "已出库"
} }
const stockList = ref([]); //明细列表
const billList = ref([]); //单据列表
function preview(url){ const loading = ref(true);
srcList.value = [url]
}
/** 查询库存单据主列表 */ /** 查询库存单据主列表 */
function getList() { function getList() {
loading.value = true; loading.value = true;
// console.log(333333)
listBill(queryParams.value).then(response => { listBill(queryParams.value).then(response => {
// console.log(response)
billList.value = response.data; billList.value = response.data;
// total.value = response.total;
loading.value = false; loading.value = false;
}); });
} }
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
if(rkTime.value && rkTime.value.length>0){
queryParams.value.startTime = rkTime.value[0]
queryParams.value.endTime = rkTime.value[1]
}else{
queryParams.value.startTime = ""
queryParams.value.endTime = ""
}
queryParams.value.pageNum = 1; queryParams.value.pageNum = 1;
if(printList.value.length>0){
queryParams.value.ids = printList.value.map( item => item.id )
}
// console.log(queryParams.value)
getList(); getList();
} }
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery() { function resetQuery() {
proxy.resetForm("queryRef"); proxy.resetForm("queryRef");
rkTime.value = []
// queryParams.value.startTime = ""
// queryParams.value.endTime = ""
handleQuery(); handleQuery();
} }
// 多选框选中数据 // 多选框选中数据
function handleSelectionChange(selection) { function handleSelectionChange(selection) {
// console.log(selection)
delieryData.value.deliveryTon = 0 delieryData.value.deliveryTon = 0
delieryData.value.goodsSize = 0 delieryData.value.goodsSize = 0
if(selection.length>0){ if(selection.length>0){
@@ -525,9 +408,7 @@
delieryData.value.deliveryTon = delieryData.value.deliveryTon.toFixed(3) / 1000 delieryData.value.deliveryTon = delieryData.value.deliveryTon.toFixed(3) / 1000
delieryData.value.goodsSize = delieryData.value.goodsSize.toFixed(3) delieryData.value.goodsSize = delieryData.value.goodsSize.toFixed(3)
// this.ids = selection.map(item => item.id) multiple.value = !selection.length
// single.value = selection.length!==1
multiple.value = !selection.length
} }
//根据重量、体积、公里数计算车型、费用 //根据重量、体积、公里数计算车型、费用