From 3a1e23d5e5945523b15fec6b7fad9d0d3ae231ee Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期三, 03 九月 2025 09:27:42 +0800
Subject: [PATCH] 生产补料增加筛选,库位查询增加组织
---
H5/Js/Scbl.js | 107 +++++++++++++++++++++++++++++++++++
H5/Kwcx.aspx | 5 +
H5/Scbl.aspx | 57 ++++++++++++++++++
3 files changed, 165 insertions(+), 4 deletions(-)
diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js
index b4d5fa7..0f63308 100644
--- a/H5/Js/Scbl.js
+++ b/H5/Js/Scbl.js
@@ -16,10 +16,20 @@
barcode: "",
ItemBlDetail:[],
modeInfo: [],
+ queryInfo: { dateTime: "", lineNo: "", lineName: "" },
active: 0,
show: false,
+ show1:false,
actions: [],
+ actions1: [],
ItemDetail: [],
+ minDate: new Date(new Date().getFullYear() - 1, 0, 1), // 杩囧幓涓�骞�
+ maxDate: new Date(new Date().getFullYear() + 1, 11, 31), // 鏈潵涓�骞�
+ showScDatePicker: false,
+ tempDate: new Date(),
+ showDatePicker: false,
+ ItemBarKw: [],
+ currentIndex: -1,
}
},
mounted() {
@@ -32,16 +42,72 @@
selectType = this.type == "bl" ? selectType = "鐢熶骇琛ユ枡" : selectType = "鐢熶骇瓒呴";
},
methods: {
+ handleRowClick(item, index) {
+ if (this.isLoading) {
+ return;
+ }
+
+ // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵��
+ this.currentIndex = -1;
+
+ // 璁剧疆褰撳墠閫変腑琛�
+ this.currentIndex = index;
+ this.selItem = {
+ itemid: item.itemId,
+ index: index
+ };
+
+ console.log('褰撳墠閫変腑椤�:', this.selItem); // 璋冭瘯鐢�
+
+ this.GetBarKwByItem();
+ },
+ GetBarKwByItem() {
+
+ var that = this;
+ that.isLoading = true;
+ that.AxiosHttp("post", 'Womdaa/GetBarKwByItem', {
+ itemId: that.selItem.itemid,
+ userName: that.userInfo.loginAccount
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.ItemBarKw = json.data.tbBillList;
+ }
+ else {
+ that.$toast.fail(json.message);
+ that.$playSound('error');
+ that.ItemBarKw = [];
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$playSound('error');
+ console.log(error);
+ that.ItemBarKw = [];
+ });
+ },
+ formatDate(date) {
+ const d = new Date(date);
+ console.log(d);
+ return `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`;
+ },
+ onDateConfirm(date) {
+ this.queryInfo.dateTime = this.formatDate(date);
+ this.showDatePicker = false;
+ },
getInfo() {
this.show = true;
var that = this;
that.isLoading = true;
-
-
that.AxiosHttp("post", 'MesItemBl/GetSCBLBillNo', {
type: selectType,
+ dateTime: that.queryInfo.dateTime,
+ lineNo: that.queryInfo.lineNo
}, false)
.then(function (res) {
var json = res;
@@ -75,6 +141,11 @@
//this.$toast(item.name);
},
+ onSelect1(actions1) {
+ this.queryInfo.lineNo = actions1.lineNo;
+ this.show1 = false;
+ this.queryInfo.lineName = actions1.name;
+ },
GetMesItemBlDetailByBillNo() {
var that = this;
that.isLoading = true;
@@ -87,7 +158,11 @@
if (json.status == 0) {
that.ItemDetail = json.data.tbBillList;
that.daa001 = json.data.tbBillList.daa001;
+ console.log(json.data.tbBillList.daa001);
+ console.log(json.data.tbBillList.items);
that.$refs.barcode.focus();
+ that.currentIndex = -1;
+ that.ItemBarKw = [];
}
else {
that.$toast.fail(json.message);
@@ -108,6 +183,34 @@
that.ItemBlDetail = [];
});
},
+ getLineInfo() {
+ var that = this;
+ that.show1 = true;
+ that.actions = [];
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesItemBl/GetLineInfo', {
+ selectLine: that.selectLine
+ }, false)
+ .then(function (res) {
+ var json = res;
+ console.log(json);
+ if (json.status == 0 && json.data.tbLineInfo.length > 0) {
+ that.actions1 = json.data.tbLineInfo.map(item => ({
+ name: item.lineName,
+ lineNo: item.lineNo
+ }));
+ } else {
+ that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�");
+ that.$playSound('error');
+ }
+ that.isLoading = false;
+ })
+ .catch(function () {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.$playSound('error');
+ });
+ },
getBarcode() {
// 娣诲姞闃叉姈鍒ゆ柇
if (this.isLoading) {
diff --git a/H5/Kwcx.aspx b/H5/Kwcx.aspx
index fcf6628..7fc7ddf 100644
--- a/H5/Kwcx.aspx
+++ b/H5/Kwcx.aspx
@@ -3,6 +3,11 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
+ <van-notice-bar
+ :scrollable="false"
+ :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')"
+ class="org-info"
+ /></van-notice-bar>
<div class="content-wrapper">
<van-nav-bar
title="搴撲綅鏌ヨ"
diff --git a/H5/Scbl.aspx b/H5/Scbl.aspx
index 198c377..7587138 100644
--- a/H5/Scbl.aspx
+++ b/H5/Scbl.aspx
@@ -8,6 +8,11 @@
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
+ <van-notice-bar
+ :scrollable="false"
+ :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')"
+ class="org-info"
+ /></van-notice-bar>
<van-nav-bar
:title="type=='cl'?'鐢熶骇瓒呴':'鐢熶骇琛ユ枡'"
left-text="杩斿洖"
@@ -16,6 +21,32 @@
></van-nav-bar>
<div class="content-wrapper">
<van-cell-group>
+ <van-field
+ v-model="queryInfo.dateTime"
+ label="鍗曟嵁鏃ユ湡"
+ clearable
+ placeholder="璇烽�夋嫨鏃ユ湡"
+ readonly
+ @click="showDatePicker = true">
+ </van-field>
+ <van-popup v-model="showDatePicker" position="bottom">
+ <van-datetime-picker
+ type="date"
+ v-model="tempDate"
+ :min-date="minDate"
+ :max-date="maxDate"
+ @confirm="onDateConfirm"
+ @cancel="showDatePicker = false" />
+ </van-popup>
+ <van-field
+ v-model="queryInfo.lineName"
+ label="鐢熶骇绾垮埆"
+ clearable
+ placeholder="璇烽�夋嫨鐢熶骇绾垮埆">
+ <template #button>
+ <van-button size="small" type="info" plain @click="getLineInfo">閫夋嫨</van-button>
+ </template>
+ </van-field>
<van-field
ref="billNo"
value=""
@@ -78,7 +109,9 @@
<van-col span="3">寰呮壂</van-col>
<van-col span="5">鎺ㄨ崘搴撲綅</van-col>
</van-row>
- <van-row v-for="(itm,index) in ItemDetail.items" :key="index">
+ <van-row v-for="(itm,index) in ItemDetail.items" :key="index"
+ :style="{ background: currentIndex === index ? '#87CEEB' : '' }"
+ @click.native="handleRowClick(itm, index)">
<van-col span="8" class="text-left padding-left">
<div class="blue-text">{{itm.itemNo}}</div>
<div>{{itm.itemName}}</div>
@@ -90,6 +123,25 @@
<van-col span="5">{{itm.recoKw}}</van-col>
</van-row>
</van-tab>
+
+ <van-tab title="搴撲綅鍒楄〃" class="mySolid font">
+ <van-row>
+ <van-col span="10" class="text-left padding-left">鏉$爜缂栧彿</van-col>
+ <van-col span="5" class="text-left padding-left">搴撲綅</van-col>
+ <van-col span="4">鏁伴噺</van-col>
+ <van-col span="5">浠撳簱</van-col>
+ </van-row>
+ <van-row v-for="(itm,index) in ItemBarKw" :key="index">
+ <van-col span="10" class="text-left padding-left">
+ <div class="blue-text">{{itm.iteM_BARCODE}}</div>
+ </van-col>
+ <van-col span="5" class="text-left padding-left">
+ <div>{{itm.depoT_SECTIONS_CODE}}</div>
+ </van-col>
+ <van-col span="4" class="blue-text">{{itm.quantity}}</van-col>
+ <van-col span="5" >{{itm.depot_name}}</van-col>
+ </van-row>
+ </van-tab>
<van-tab title="宸叉壂鐗╂枡" class="mySolid font">
<van-row>
@@ -113,6 +165,7 @@
</van-tabs>
<van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
+ <van-action-sheet v-model="show1" :actions="actions1" @select="onSelect1"></van-action-sheet>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
@@ -120,5 +173,5 @@
<%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Scbl.js?<%=1231811111 %>"></script>
+ <script src="Js/Scbl.js?<%=1231887111 %>"></script>
</asp:Content>
--
Gitblit v1.9.3