1/10 上货页面优化

20240912_adapter
wangwei 6 months ago
parent c8d660071c
commit cbbe33b91d

@ -218,12 +218,7 @@
</el-row>
</div>
</el-row>
</el-card>
</el-form>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="单据详情" v-if="viewCodeVisible">
<codeDetailPanel
<newCreateCodeDetail
:idQuery="orderFormData"
:curAction="curAction"
:refreshPanel="refreshCodesPanel"
@ -233,8 +228,27 @@
@clearBillNo="clearBillNo"
@getOrderData="getOrderData"
@getCount="getCount"
></codeDetailPanel>
</el-tab-pane>
></newCreateCodeDetail>
</el-card>
</el-form>
<!--<el-tabs type="border-card" style="margin: 15px">-->
<!-- <el-tab-pane label="单据详情" v-if="viewCodeVisible">-->
<!-- <codeDetailPanel-->
<!-- :idQuery="orderFormData"-->
<!-- :curAction="curAction"-->
<!-- :refreshPanel="refreshCodesPanel"-->
<!-- :viewType="viewType"-->
<!-- :status="orderStatus"-->
<!-- v-if="isCodeDetailAlive"-->
<!-- @clearBillNo="clearBillNo"-->
<!-- @getOrderData="getOrderData"-->
<!-- @getCount="getCount"-->
<!-- ></codeDetailPanel>-->
<!-- </el-tab-pane>-->
<el-tab-pane label="扫码明细" v-if="viewCodeDetailVisible">
<codesPanel
@getCodeArray="handleCodeArray"
@ -247,7 +261,7 @@
:selectUnitTitle="selectUnitTitle"
></codesPanel>
</el-tab-pane>
</el-tabs>
<!--</el-tabs>-->
<el-dialog
title="选入草稿单据"
@ -318,6 +332,7 @@ import {deleteCodesTempByCodes} from '@/api/inout/order'
import codesPanel from '@/views/collect/PanelCreateCodes'
import codeDetailPanel from '@/views/collect/PanelCreateCodeDetail'
import SelectCollectOrderEndDialog from '@/views/collect/SelectCollectOrderEndDialog'
import newCreateCodeDetail from "./newCreateCodeDetail"
import A from '../../plugins/KeyScaner'
import {findByInvUser, getBusTypeList} from '@/api/basic/busType'
@ -630,7 +645,8 @@ export default {
selectRlDialog,
dialogInvProduct,
chooseDraftOrderDialog,
SelectCollectOrderEndDialog
SelectCollectOrderEndDialog,
newCreateCodeDetail
},
methods: {
changePlace(val) {

@ -261,6 +261,7 @@ export default {
}
}
//
this.filterQuery.codeList = []
this.filterQuery.billNo = this.orderData.billNo
this.verifyCode(this.filterQuery)
// this.getInputFocus()

@ -51,35 +51,39 @@
<!-- <p>产品名称</p> <p style="font-size: 20px;background-color: #e1f3fb;font-weight: bold;">{{ info.coName }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>层级标识</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.nameCode }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>包装规格</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.spec }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>计量单位</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.measname }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>实际数量</p><p style="font-size: 16px;color: red;font-weight: bold;">{{ info.reCount }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>扫码数量</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.count }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" v-if="info.batchNo != null">-->
<!-- <p>批次号</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.batchNo }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" v-if="info.productDate != null">-->
<!-- <p>生产日期</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;"> <span>{{ convertDateFun(info.productDate) }}</span></p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" v-if="info.expireDate != null">-->
<!-- <p>失效日期</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;"> <span>{{ convertDateFun(info.expireDate) }}</span></p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>计量单位</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.measname }}</p>-->
<!-- </div>-->
<!-- <div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >-->
<!-- <p>层级标识</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.nameCode }}</p>-->
<!-- </div>-->
<!-- &lt;!&ndash;<div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >&ndash;&gt;-->
<!-- &lt;!&ndash; <p>实际数量</p><p style="font-size: 16px;color: red;font-weight: bold;">{{ info.reCount }}</p>&ndash;&gt;-->
<!-- &lt;!&ndash;</div>&ndash;&gt;-->
<!-- &lt;!&ndash;<div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >&ndash;&gt;-->
<!-- &lt;!&ndash; <p>包装规格</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.spec }}</p>&ndash;&gt;-->
<!-- &lt;!&ndash;</div>&ndash;&gt;-->
<!-- &lt;!&ndash;<div style="display: flex; justify-content: space-between; align-items: center; height: 26px; /* 约为 200px 的 1/3 */" >&ndash;&gt;-->
<!-- &lt;!&ndash; <p>使用单位</p><p style="font-size: 16px;background-color: #e1f3fb;font-weight: bold;">{{ info.measureUnit }}</p>&ndash;&gt;-->
<!-- &lt;!&ndash;</div> v-if="curAction.mainAction=='WareHouseIn' && curAction.corpType==2"&ndash;&gt;-->
<!-- <div style="flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 20px;" >-->
<!-- <span><h1 :style="{ 'font-size': '45px', 'color': '#F56C6C' }">{{ info.reCount }}</h1></span>-->
<!-- </div>-->
<!-- <div style="flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 20px;" v-if="curAction.mainAction=='WareHouseIn' && curAction.corpType==2">-->
<!-- <el-button type="primary" style="position: absolute; bottom: 20px; right: 20px;" @click.native="saveChange(info)" v-if="info.index == selectedIndex" @click.stop="true"></el-button>-->
<!-- <el-button type="primary" style="position: absolute; bottom: 20px;right: 100px;" @click.native="rowChange(info)" v-if="info.index != selectedIndex" @click.stop="true"></el-button>-->
@ -88,12 +92,14 @@
<!-- </el-card>-->
<!-- </el-col>-->
<!--</el-row>-->
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import {getDetailCodes, updateBizProduct, updateCodeProduct} from "@/api/inout/orderDetailCode";
import { getCheckDetailCodes, getDetailCodes, updateBizProduct, updateCodeProduct } from '@/api/inout/orderDetailCode'
export default {
name: "IoCreateOrderCodeDetail",
@ -220,5 +226,8 @@ export default {
</script>
<style scoped>
.scan-count-item .el-descriptions__content {
float: right;
color: red;
}
</style>

@ -0,0 +1,224 @@
<template>
<div>
<el-row :gutter="30">
<el-col :span="15" style="border: 1px solid #e3dfe1; padding:15px; height: 700px; margin-left: 20px;">
<h2 style="font-weight: bold;">上货信息</h2>
<div v-for="(item, index) in detailList" :key="index" class="product-info">
<div class="info-item">
<p>产品通用名: {{ item.coName }}</p>
<p>规格: {{ item.bzgg }}</p>
<p>产品标识: {{ item.nameCode }}</p>
<p>批次号: {{ item.batchNo }}</p>
</div>
<div class="count-items">
<p>扫码数量: <span class="scan-count">{{ item.count }}</span></p>
<p>实际数量: <span class="actual-count">{{ item.reCount }}/ {{ item.measname }}</span></p>
</div>
</div>
</el-col>
<el-col :span="8" style="border: 1px solid #e3dfe1; margin-left: 20px; padding: 15px;height: 700px;">
<h2 style="font-weight: bold;">扫码队列({{codeArray.length}})</h2>
<!--<el-divider></el-divider>-->
<div style=" border-top: 1px solid #ccc;">
<el-table v-loading="loading" :data="codeArray" style="width: 100%;margin-top: 20px" max-height="350"
ref="multipleTable">
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column
label="追溯码"
prop="code"
show-overflow-tooltip
></el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import { getCheckDetailCodes, getDetailCodes, updateBizProduct, updateCodeProduct } from '@/api/inout/orderDetailCode'
import { errorCodeList } from '@/api/inout/order'
export default {
name: "newCreateCodeDetail",
props: {
idQuery: {
type: Object,
required: true,
},
viewType: {
type: Object,
required: true,
},
curAction: {
type: Object,
required: true,
},
status: {
type: Object,
required: true,
},
},
data() {
return {
convertDateFun: convertDate,
loading: false,
query: {
orderId: null,
code: "",
corpOrderId: "",
},
detailList: [],
total: 0,
selectRlVisible: false,
dialogTableVisible: false,
editCodeVisible: false,
orderDetail:null,
codeArray:[]
}
},
watch: {
"curAction": {
handler(newVal, oldVal) {
},
immediate: true
}
},
methods: {
getOrderDetails() {
this.loading = true;
this.query.orderId = this.idQuery.billNo;
getDetailCodes(this.query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
if (this.detailList.length > 0 && this.status == false){
this.orderDetail = this.detailList[0]
this.$emit('getOrderData', this.orderDetail)
}
this.$emit('clearBillNo', this.detailList.length > 0? false : true);
let count = 0;
if (this.detailList && this.detailList.length > 0) {
this.detailList.forEach(item => {
count += item.reCount;
});
this.$emit('getCount', count);
}
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (this.viewType == 3 && !row.checkSuccess) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
saveChange(row) {
if (row.batchNo == '') {
row.batchNo = null;
}
updateCodeProduct(row)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
this.refreshPanel();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
rowChange(val) {
this.currentRow = val;
if (this.currentRow.batchNo == '')
this.currentRow.batchNo = null;
this.selectedIndex = val.index;
},
getCodeList() {
this.loading = true;
this.query.orderId = this.idQuery.billNo
errorCodeList(this.query) //
.then((response) => {
this.codeArray = response.data.list || [];
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
},
created() {
if (this.idQuery.billNo != null)
this.getOrderDetails();
this.getCodeList()
},
}
</script>
<style scoped>
.product-info {
display: flex;
justify-content: space-between;
border-top: 1px solid #ccc;
align-items: center;
padding: 10px;
margin-bottom: 10px;
}
.info-item {
flex: 1;
}
.count-items {
flex: 0 0 auto; /* This ensures that count items do not grow or shrink */
}
.count-item {
margin: 0; /* Remove default margin */
}
.scan-count {
color: red;
font-size: 26px;
}
.actual-count {
color: green;
font-size: 24px;
}
</style>
Loading…
Cancel
Save