From 319080c3fcf38097717f483892ec8993882b3131 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期五, 06 三月 2026 08:16:46 +0800
Subject: [PATCH] 拣货过程中的出库库存匹配
---
pages/phyz/AGV/emptyOut.vue | 2
pages/phyz/inStock/inStock.vue | 4
pages/phyz/wrkMast/waitPakin.vue | 2
pages/phyz/comOrder/checkOut.vue | 2
pages/phyz/processOrder/orderCheck2.vue | 4
pages/AGV/StaUnBind.vue | 2
pages/check/checkOrderItem.vue | 14
pages/outbound/ModifyTaskBind.vue | 2
pages/phyz/waitOrder/waitOrderOut.vue | 4
pages/phyz/comOrder/orderIn.vue | 2
pages/phyz/bcp/bcpDbOrderV2.vue | 2
pages/listing/upper.vue | 526 +++---
pages/listing/unPakin.vue | 575 +++---
main.js | 8
pages/phyz/AGV/AGVPakin2.vue | 4
pages/listing/matnrPalletising.vue | 267 +-
pages/phyz/wrkMast/DBList.vue | 2
pages/phyz/orderOut/orderCheck.vue | 2
pages/outbound/fastPicking.vue | 154 +
pages/phyz/orderOut/orderCheck_2.vue | 2
pages/phyz/wrkMast/wrkMast.vue | 2
pages/AGV/AGVStaBind.vue | 6
pages/phyz/stationManage/pickAgain.vue | 4
pages/phyz/AGV/AGVPakin3.vue | 4
pages/phyz/processOrder/orderCheck.vue | 2
pages/rece/other.vue | 6
pages/listing/itemSelect.vue | 2
pages/phyz/AGV/emptyPakin.vue | 2
pages/phyz/stationManage/confirmProcessed.vue | 4
pages/phyz/AGV/AGVPakin.vue | 4
pages/listing/disc.vue | 574 +++---
pages/listing/labour.vue | 406 ++--
pages/phyz/checkLocDetl/locDetlList.vue | 2
pages/phyz/bcp/bcpOrder.vue | 2
pages/phyz/order/orderCar.vue | 2
pages/phyz/backStock/backStocksOrder.vue | 2
pages/check/firstCheck.vue | 14
pages/AGV/BindAndInTask.vue | 6
pages/outbound/PickItemDetl.vue | 10
pages/phyz/order/pakinOrderSelect.vue | 2
pages/phyz/processOrder/processList.vue | 2
pages/mat/matSelected.vue | 2
pages/phyz/stationManage/stationDetl.vue | 4
pages/phyz/bcp/bcpOrder_xs.vue | 2
pages/phyz/bcp/orderCar_xs.vue | 2
pages/phyz/processOrder/processOrder.vue | 4
pages/inspect/bad.vue | 4
pages/phyz/wrkMast/wrkDetl.vue | 6
pages/outbound/wavePickItem.vue | 39
pages/phyz/comOrder/orderCar.vue | 2
pages/phyz/mat/matSelected.vue | 2
pages/check/TempCheck.vue | 14
pages/inspect/check.vue | 518 +++---
pages/phyz/waitOrder/waitOrderIn.vue | 6
pages/phyz/bcp/bcpDbOrder.vue | 2
pages/phyz/checkLocDetl/locDetlList2.vue | 2
pages/phyz/order/pakinOrderSelectV2.vue | 2
pages/rece/standard.vue | 678 ++++----
pages/phyz/bcp/orderCar.vue | 2
pages/AGV/StartInTask.vue | 2
common/format.js | 23
pages/listing/untie.vue | 458 +++---
pages/inspect/report.vue | 2
pages/phyz/stationManage/stationManage.vue | 4
checkOrder.vue | 2
65 files changed, 2,255 insertions(+), 2,165 deletions(-)
diff --git a/checkOrder.vue b/checkOrder.vue
index f6f093b..f7b3d96 100644
--- a/checkOrder.vue
+++ b/checkOrder.vue
@@ -38,7 +38,7 @@
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">搴撳瓨鏁伴噺:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">搴撳瓨鏁伴噺:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
<view class="content">
<text class="text-gray">鐩樼偣鏁伴噺:<text class="text-black ">{{item.checkQty}}</text></text>
diff --git a/common/format.js b/common/format.js
new file mode 100644
index 0000000..6d46b1e
--- /dev/null
+++ b/common/format.js
@@ -0,0 +1,23 @@
+/**
+ * 鍓嶇鏁伴噺鏄剧ず锛氱粺涓�淇濈暀2浣嶅皬鏁帮紙浠呭睍绀猴紝鍚庣涓嶅彉锛�
+ * @param {*} value 鏁伴噺
+ * @returns {string} 鏍煎紡鍖栦负涓や綅灏忔暟鐨勫瓧绗︿覆
+ */
+export function formatQty(value) {
+ if (value == null || value === '') return '0.00'
+ const n = Number(value)
+ if (Number.isNaN(n)) return '0.00'
+ if (n < 0) return '0.00'
+ return n.toFixed(2)
+}
+
+/**
+ * 杈撳叆妗嗗け鐒︽椂鐢細灏嗘暟閲忚浆涓轰繚鐣�2浣嶅皬鏁扮殑鏁板瓧锛堢敤浜� v-model 缁戝畾锛�
+ */
+export function formatQtyToNumber(value) {
+ if (value == null || value === '') return 0
+ const n = Number(value)
+ if (Number.isNaN(n)) return 0
+ if (n < 0) return 0
+ return parseFloat(n.toFixed(2))
+}
diff --git a/main.js b/main.js
index 27d56ae..fbd559f 100644
--- a/main.js
+++ b/main.js
@@ -15,6 +15,11 @@
Vue.config.productionTip = false
import '@/common/bluetooth.js';
+import { formatQty, formatQtyToNumber } from '@/common/format.js';
+// 鍓嶇鏁伴噺缁熶竴2浣嶅皬鏁板睍绀猴紙浠呭睍绀猴紝鍚庣涓嶅彉锛�
+Vue.prototype.$formatQty = formatQty;
+Vue.prototype.$formatQtyToNumber = formatQtyToNumber;
+Vue.filter('qty', formatQty);
//鍏ㄥ眬鏁版嵁鐘舵�佺鐞� vuex
import store from '@/store/index.js';
Vue.prototype.$store = store;
@@ -63,10 +68,13 @@
// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createI18n } from 'vue-i18n'
+import { formatQty, formatQtyToNumber } from '@/common/format.js'
const i18n = createI18n(i18nConfig)
export function createApp() {
const app = createSSRApp(App)
app.use(i18n)
+ app.config.globalProperties.$formatQty = formatQty
+ app.config.globalProperties.$formatQtyToNumber = formatQtyToNumber
return {
app
}
diff --git a/pages/AGV/AGVStaBind.vue b/pages/AGV/AGVStaBind.vue
index 98b034a..30e0078 100644
--- a/pages/AGV/AGVStaBind.vue
+++ b/pages/AGV/AGVStaBind.vue
@@ -2,8 +2,8 @@
<view class="has-foot">
<form>
<view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒缂栧彿</view>
- <input placeholder="璇锋壂瀹瑰櫒缂栧彿" v-model="container"></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container"></input>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
@@ -171,7 +171,7 @@
async confirm() {
if(this.container === '' || this.container ===null){
uni.showToast({
- title: "瀹瑰櫒鐮佷笉鑳戒负绌�",
+ title: "鏂欑鐮佷笉鑳戒负绌�",
icon: "none",
})
return ;
diff --git a/pages/AGV/BindAndInTask.vue b/pages/AGV/BindAndInTask.vue
index eeb06ff..4197bf0 100644
--- a/pages/AGV/BindAndInTask.vue
+++ b/pages/AGV/BindAndInTask.vue
@@ -7,8 +7,8 @@
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
<view class="cu-form-group ">
- <view class="title">瀹瑰櫒鐮�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄧ爜" v-model="container" ></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container" ></input>
<text class='cuIcon-search text-blue' @click="getList"></text>
</view>
<view class="cu-form-group">
@@ -205,7 +205,7 @@
}
if(this.container === '' || this.container ===null){
uni.showToast({
- title: "瀹瑰櫒鐮佷笉鑳戒负绌�",
+ title: "鏂欑鐮佷笉鑳戒负绌�",
icon: "none",
})
return ;
diff --git a/pages/AGV/StaUnBind.vue b/pages/AGV/StaUnBind.vue
index 1d0b407..7944fa9 100644
--- a/pages/AGV/StaUnBind.vue
+++ b/pages/AGV/StaUnBind.vue
@@ -8,7 +8,7 @@
</view>
</form>
<view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">瀹瑰櫒鐮�:{{container}}</view>
+ <view class="text-blue">鏂欑鐮�:{{container}}</view>
</view>
diff --git a/pages/AGV/StartInTask.vue b/pages/AGV/StartInTask.vue
index d43db9e..f5ac3f2 100644
--- a/pages/AGV/StartInTask.vue
+++ b/pages/AGV/StartInTask.vue
@@ -15,7 +15,7 @@
</view>
</form>
<view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">瀹瑰櫒鐮�:{{container}}</view>
+ <view class="text-blue">鏂欑鐮�:{{container}}</view>
</view>
diff --git a/pages/check/TempCheck.vue b/pages/check/TempCheck.vue
index c190306..5c4cd1c 100644
--- a/pages/check/TempCheck.vue
+++ b/pages/check/TempCheck.vue
@@ -2,8 +2,8 @@
<view class="has-foot">
<form>
<view class="cu-form-group" v-show="!isconfirm">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="barcode" focus></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode" focus></input>
<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
@@ -53,7 +53,7 @@
</view>
<view class="cu-item" v-if="check.checkType === 0">
<view class="content">
- <text class="text-gray">鏂欑搴撳瓨鏁�:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">鏂欑搴撳瓨鏁�:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -62,7 +62,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle"></text>瀹炵洏鏁�:
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.checkQty"
- :step='0.000001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -112,7 +112,7 @@
</view>
<view class="cu-item" v-if="check.checkType === 0">
<view class="content">
- <text class="text-gray">搴撳瓨鏁�:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">搴撳瓨鏁�:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -137,7 +137,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle"></text>瀹炵洏鏁�:
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.checkQty"
- :step='0.000001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -338,7 +338,7 @@
let that = this
if (that.barcode === '' || that.barcode === null) {
uni.showToast({
- title: "瀹瑰櫒鍙蜂负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "error",
})
return;
diff --git a/pages/check/checkOrderItem.vue b/pages/check/checkOrderItem.vue
index d54c728..56cade9 100644
--- a/pages/check/checkOrderItem.vue
+++ b/pages/check/checkOrderItem.vue
@@ -6,8 +6,8 @@
<!-- <text class='cuIcon-add text-blue' @click="returnPage"></text> -->
</view>
<view class="cu-form-group" v-show="!isconfirm">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="barcode" focus></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode" focus></input>
<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
@@ -50,7 +50,7 @@
</view>
<view class="cu-item" v-if="check.checkType === 0">
<view class="content">
- <text class="text-gray">鏂欑搴撳瓨鏁�:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">鏂欑搴撳瓨鏁�:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -59,7 +59,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle"></text>瀹炵洏鏁�:
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.checkQty"
- :step='0.000001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -109,7 +109,7 @@
</view>
<view class="cu-item" v-if="check.checkType === 0">
<view class="content">
- <text class="text-gray">搴撳瓨鏁�:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">搴撳瓨鏁�:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -126,7 +126,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle"></text>瀹炵洏鏁�:
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.checkQty"
- :step='0.000001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -313,7 +313,7 @@
let that = this
if (that.barcode === '' || that.barcode === null) {
uni.showToast({
- title: "瀹瑰櫒鍙蜂负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "error",
})
return;
diff --git a/pages/check/firstCheck.vue b/pages/check/firstCheck.vue
index 1c66536..532600a 100644
--- a/pages/check/firstCheck.vue
+++ b/pages/check/firstCheck.vue
@@ -2,8 +2,8 @@
<view class="has-foot">
<form>
<view class="cu-form-group" v-show="!isconfirm">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="barcode" focus></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode" focus></input>
<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
@@ -46,7 +46,7 @@
</view>
<view class="cu-item" v-if="check.checkType === 0">
<view class="content">
- <text class="text-gray">鏂欑搴撳瓨鏁�:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">鏂欑搴撳瓨鏁�:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -55,7 +55,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle"></text>瀹炵洏鏁�:
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.checkQty"
- :step='0.000001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -105,7 +105,7 @@
</view>
<view class="cu-item" v-if="check.checkType === 0">
<view class="content">
- <text class="text-gray">搴撳瓨鏁�:<text class="text-black ">{{item.anfme}}</text></text>
+ <text class="text-gray">搴撳瓨鏁�:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -122,7 +122,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle"></text>瀹炵洏鏁�:
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.checkQty"
- :step='0.000001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -312,7 +312,7 @@
let that = this
if (that.barcode === '' || that.barcode === null) {
uni.showToast({
- title: "瀹瑰櫒鍙蜂负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "error",
})
return;
diff --git a/pages/inspect/bad.vue b/pages/inspect/bad.vue
index 6ed6fe4..8ccfcf8 100644
--- a/pages/inspect/bad.vue
+++ b/pages/inspect/bad.vue
@@ -78,8 +78,8 @@
<view class="content">
<view class="cu-form-group padding-lr-0">
<view class="title text-blue">鏁伴噺:</view>
- <input class="text-right" type="number" placeholder="璇疯緭鍏ユ暟閲�" v-model="item.receiptQty"
- focus></input>
+ <input class="text-right" type="number" step="1" placeholder="璇疯緭鍏ユ暟閲�" v-model="item.receiptQty"
+ @blur="item.receiptQty = $formatQtyToNumber(item.receiptQty)" focus></input>
</view>
</view>
</view>
diff --git a/pages/inspect/check.vue b/pages/inspect/check.vue
index f3f1bbb..02182a2 100644
--- a/pages/inspect/check.vue
+++ b/pages/inspect/check.vue
@@ -1,259 +1,261 @@
-<template>
- <view class="has-foot">
- <form>
- <view class="cu-form-group margin-top">
- <view class="title">璐ㄦ鍗�</view>
- <input placeholder="璇锋壂鎻忚川妫�鍗�" v-model="isptCode" focus></input>
- <text class='cuIcon-search text-blue' @click="search"></text>
- </view>
-
- <view class="cu-form-group ">
- <view class="title">鐗╂枡鐮�</view>
- <input placeholder="璇锋壂鎻忕墿鏂欑爜" v-model="barcode"></input>
- <text class='cuIcon-search text-blue' @click="scrollTo"></text>
- </view>
- </form>
-
- <view class="padding-lr margin-top-sm">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-list det menu sm-border margin-bottom-sm " :class="[item.matnrCode===barcode&&'act']"
- :ref="item.matnrCode+'ref'">
-
- <view class="cu-bar bg-white solid-bottom ">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- {{`${item.maktx}`}}
- </view>
- </view>
- <view class="action">
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟�:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.splrName}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.splrBatch}}</text>
- </view>
- </view>
-
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鏀惰揣鏁伴噺: <text class="text-grey ">{{item.rcptQty}}</text></text>
- </view>
-
- <view class="content">
- <text class="text-black">閫佽揣鏁伴噺: <text class="text-grey ">{{item.dlyQty}}</text></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">鍚堟牸鏁伴噺:</view>
- <input type="number" placeholder="璇疯緭鍏ュ悎鏍兼暟閲�" v-model="item.safeQty"></input>
- </view>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">涓嶅悎鏍兼暟閲�:</view>
- <input type="number" placeholder="璇疯緭鍏ヤ笉鍚堟牸鏁伴噺" v-model="item.disQty"></input>
- </view>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">璐ㄦ缁撹:</view>
-
- <uni-data-select placement='top' v-model="item.isptResult" :localdata="range"
- placeholder="璇疯緭鍏ヨ川妫�缁撹"></uni-data-select>
- </view>
- </view>
- </view>
-
- <view class="cu-form-group align-start">
- <view class="title text-blue">澶囨敞</view>
- <textarea v-model="item.memo" placeholder="璇疯緭鍏ュ娉�"></textarea>
- </view>
-
- <!-- <view class="cu-form-group">
- <uni-file-picker limit="9" title="鐓х墖"></uni-file-picker>
- </view> -->
-
-
- </view>
- </block>
- </view>
- <view class="cu-bar btn-group foot">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" @click="confirm">鎻愪氦</button>
- </view>
-
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- isptCode: '',
- list: [],
- range: [{
- value: '1',
- text: '鍚堟牸'
- }, {
- value: '2',
- text: '涓嶅悎鏍�'
- }, {
- value: '3',
- text: '寰呭畾'
- }, {
- value: '4',
- text: '閮ㄥ垎鍚堟牸'
- }],
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- },
- mounted() {},
- methods: {
- async search() {
- const {
- code,
- data,
- msg
- } = await request('/inspect/query', {
- isptCode: this.isptCode,
- })
- if (code === 200) {
- this.list = data
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
-
-
- },
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.barcode = ''
- },
- scrollTo() {
- const ref = this.$refs[`${this.barcode}ref`][0];
- uni.pageScrollTo({
- scrollTop: ref.$el.offsetTop,
- duration: 300
- })
- },
- async confirm() {
- const {
- code,
- data,
- msg
- } = await request('/inspect/check/update', this.list)
- if (code === 200) {
- uni.showToast({
- title: '璐ㄦ鎴愬姛'
- })
- this.list = []
- this.barcode = ''
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- })
- }
-
-
-
- },
-
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .act {
- border: 1px solid #e54d42;
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
-
- .uni-file-picker {
- width: 100%;
- margin-bottom: 10px;
- }
-
- .uni-select__selector {
- z-index: 999;
- }
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group margin-top">
+ <view class="title">璐ㄦ鍗�</view>
+ <input placeholder="璇锋壂鎻忚川妫�鍗�" v-model="isptCode" focus></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+
+ <view class="cu-form-group ">
+ <view class="title">鐗╂枡鐮�</view>
+ <input placeholder="璇锋壂鎻忕墿鏂欑爜" v-model="barcode"></input>
+ <text class='cuIcon-search text-blue' @click="scrollTo"></text>
+ </view>
+ </form>
+
+ <view class="padding-lr margin-top-sm">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-list det menu sm-border margin-bottom-sm " :class="[item.matnrCode===barcode&&'act']"
+ :ref="item.matnrCode+'ref'">
+
+ <view class="cu-bar bg-white solid-bottom ">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ {{`${item.maktx}`}}
+ </view>
+ </view>
+ <view class="action">
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">渚涘簲鍟�:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.splrName}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.splrBatch}}</text>
+ </view>
+ </view>
+
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鏀惰揣鏁伴噺: <text class="text-grey ">{{item.rcptQty}}</text></text>
+ </view>
+
+ <view class="content">
+ <text class="text-black">閫佽揣鏁伴噺: <text class="text-grey ">{{item.dlyQty}}</text></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">鍚堟牸鏁伴噺:</view>
+ <input type="number" step="1" placeholder="璇疯緭鍏ュ悎鏍兼暟閲�" v-model="item.safeQty"
+ @blur="item.safeQty = $formatQtyToNumber(item.safeQty)"></input>
+ </view>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">涓嶅悎鏍兼暟閲�:</view>
+ <input type="number" step="1" placeholder="璇疯緭鍏ヤ笉鍚堟牸鏁伴噺" v-model="item.disQty"
+ @blur="item.disQty = $formatQtyToNumber(item.disQty)"></input>
+ </view>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">璐ㄦ缁撹:</view>
+
+ <uni-data-select placement='top' v-model="item.isptResult" :localdata="range"
+ placeholder="璇疯緭鍏ヨ川妫�缁撹"></uni-data-select>
+ </view>
+ </view>
+ </view>
+
+ <view class="cu-form-group align-start">
+ <view class="title text-blue">澶囨敞</view>
+ <textarea v-model="item.memo" placeholder="璇疯緭鍏ュ娉�"></textarea>
+ </view>
+
+ <!-- <view class="cu-form-group">
+ <uni-file-picker limit="9" title="鐓х墖"></uni-file-picker>
+ </view> -->
+
+
+ </view>
+ </block>
+ </view>
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" @click="confirm">鎻愪氦</button>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ isptCode: '',
+ list: [],
+ range: [{
+ value: '1',
+ text: '鍚堟牸'
+ }, {
+ value: '2',
+ text: '涓嶅悎鏍�'
+ }, {
+ value: '3',
+ text: '寰呭畾'
+ }, {
+ value: '4',
+ text: '閮ㄥ垎鍚堟牸'
+ }],
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ },
+ mounted() {},
+ methods: {
+ async search() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/inspect/query', {
+ isptCode: this.isptCode,
+ })
+ if (code === 200) {
+ this.list = data
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
+
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.barcode = ''
+ },
+ scrollTo() {
+ const ref = this.$refs[`${this.barcode}ref`][0];
+ uni.pageScrollTo({
+ scrollTop: ref.$el.offsetTop,
+ duration: 300
+ })
+ },
+ async confirm() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/inspect/check/update', this.list)
+ if (code === 200) {
+ uni.showToast({
+ title: '璐ㄦ鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+
+
+
+ },
+
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .act {
+ border: 1px solid #e54d42;
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
+
+ .uni-file-picker {
+ width: 100%;
+ margin-bottom: 10px;
+ }
+
+ .uni-select__selector {
+ z-index: 999;
+ }
</style>
\ No newline at end of file
diff --git a/pages/inspect/report.vue b/pages/inspect/report.vue
index 9b144b1..2e6389d 100644
--- a/pages/inspect/report.vue
+++ b/pages/inspect/report.vue
@@ -33,7 +33,7 @@
<text class="text-black">閲囪喘鍗曚綅: <text class="text-grey ">{{item.purUnit}}</text></text>
</view>
<view class="content">
- <text class="text-black">閲囪喘鏁伴噺: <text class="text-grey ">{{item.purQty}}</text></text>
+ <text class="text-black">閲囪喘鏁伴噺: <text class="text-grey ">{{ $formatQty(item.purQty) }}</text></text>
</view>
</view>
diff --git a/pages/listing/disc.vue b/pages/listing/disc.vue
index c3ce28c..649b2ea 100644
--- a/pages/listing/disc.vue
+++ b/pages/listing/disc.vue
@@ -1,153 +1,153 @@
-<template>
- <view class="has-foot">
- <form>
- <view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="container" focus></input>
- <text class='cuIcon-search text-blue' @click="getList"></text>
- </view>
- <view class="cu-form-group">
- <view class="title">鐗╂枡鏍囩</view>
- <input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode"></input>
- <text class='cuIcon-search text-blue' @click="search"></text>
- </view>
- </form>
-
- <view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
- <view class="text-blue">缁勭洏鎬绘暟:{{allCount}}</view>
- </view>
-
- <view class="padding-lr margin-top-sm">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-list det menu sm-border margin-bottom-sm "
- :ref="item.trackCode+'ref'">
- <view class="cu-bar bg-white solid-bottom ">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- {{`${item.maktx}`}}
- </view>
- </view>
- <view class="action" v-if="!isconfirm">
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鐗╂枡鏉$爜:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.trackCode}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.splrBatch}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鎵规:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.batch}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">鏀惰揣鏁伴噺: <text class="text-grey ">{{item.anfme}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">宸蹭笂鏋舵暟閲�: <text
- class="text-grey ">{{item.workQty + item.qty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鍙粍鐩樻暟閲�: <text
- class="text-grey ">{{item.anfme - item.workQty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue"><text
- class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺:
- </view>
- <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty"
- :step='0.000001'></uni-number-box>
- </view>
- </view>
- </view>
- </view>
- </block>
- </view>
- <view class="cu-bar btn-group foot">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">缁勭洏</button>
- </view>
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- container: '',
- megreQty: '',
- list: [],
- range: [],
- repeatClick: false,
- isconfirm: false,
- max: 99999999,
-
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- allCount() {
- return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
- }
- },
- mounted() {},
- methods: {
- async search() {
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group margin-top">
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container" focus></input>
+ <text class='cuIcon-search text-blue' @click="getList"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">鐗╂枡鏍囩</view>
+ <input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode"></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ </form>
+
+ <view class="flex solid-bottom padding-sm justify-between">
+ <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
+ <view class="text-blue">缁勭洏鎬绘暟:{{allCount}}</view>
+ </view>
+
+ <view class="padding-lr margin-top-sm">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-list det menu sm-border margin-bottom-sm "
+ :ref="item.trackCode+'ref'">
+ <view class="cu-bar bg-white solid-bottom ">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ {{`${item.maktx}`}}
+ </view>
+ </view>
+ <view class="action" v-if="!isconfirm">
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鐗╂枡鏉$爜:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.trackCode}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.splrBatch}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">搴撳瓨鎵规:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.batch}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">鏀惰揣鏁伴噺: <text class="text-grey ">{{item.anfme}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">宸蹭笂鏋舵暟閲�: <text
+ class="text-grey ">{{item.workQty + item.qty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鍙粍鐩樻暟閲�: <text
+ class="text-grey ">{{item.anfme - item.workQty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue"><text
+ class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺:
+ </view>
+ <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty"
+ :step="1" :decimal="2"></uni-number-box>
+ </view>
+ </view>
+ </view>
+ </view>
+ </block>
+ </view>
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">缁勭洏</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ container: '',
+ megreQty: '',
+ list: [],
+ range: [],
+ repeatClick: false,
+ isconfirm: false,
+ max: 99999999,
+
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ allCount() {
+ return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
+ }
+ },
+ mounted() {},
+ methods: {
+ async search() {
if (this.barcode == undefined || this.barcode == '') {
uni.showToast({
icon: "none",
@@ -155,147 +155,147 @@
})
return
}
- this.getDet();
- },
- async getDet() {
- const {
- code,
- data,
- msg
- } = await request('/asnOrderItem/trackCode', {
- code: this.barcode,
- }, "post")
- if (code === 200) {
- for (var i = 0; i < data.length; i++) {
- data[i].receiptQty =1;
- data[i].selected = false;
- }
- this.list = data
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- },
+ this.getDet();
+ },
+ async getDet() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/asnOrderItem/trackCode', {
+ code: this.barcode,
+ }, "post")
+ if (code === 200) {
+ for (var i = 0; i < data.length; i++) {
+ data[i].receiptQty =1;
+ data[i].selected = false;
+ }
+ this.list = data
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ },
async getList() {
if (this.container == undefined || this.container == '') {
uni.showToast({
icon: "none",
- title: '瀹瑰櫒鍙蜂笉鑳戒负绌猴紒锛�'
+ title: '鏂欑鐮佷笉鑳戒负绌猴紒锛�'
})
return
- }
- const {
- code,
- data,
- msg
- } = await request('/asnOrderItem/container', {
- barcode: this.container
- })
- if (code === 200) {
- this.list = data
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- scrollTo() {
- const ref = this.$refs[`${this.barcode}ref`][0];
- uni.pageScrollTo({
- scrollTop: ref.$el.offsetTop,
- duration: 300
- })
- },
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.barcode = ''
- },
- next() {
- if (this.list.length) {
- this.isconfirm = true
- } else {
- uni.showToast({
- icon: "none",
- title: '鏈�夌墿鏂欐爣绛�'
- })
- }
- },
- prev() {
- this.isconfirm = false
- },
- async confirm() {
- this.repeatClick = true
- const newArr = this.list.map(item => {
- return {
- ...item,
- anfme: item.anfme === null ? 0 : +item.anfme,
- };
- });
-
- const {
- code,
- data,
- msg
- } = await request('/waitPakin/merge', {
- items: newArr,
- barcode: this.container,
- })
- if (code === 200) {
- uni.showToast({
- title: '缁勭洏鎴愬姛'
- })
- this.list = []
- this.barcode = ''
- this.container = ''
- this.isconfirm = false
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- this.repeatClick = false
- },
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .act {
- border: 1px solid #e54d42;
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
+ }
+ const {
+ code,
+ data,
+ msg
+ } = await request('/asnOrderItem/container', {
+ barcode: this.container
+ })
+ if (code === 200) {
+ this.list = data
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ },
+ scrollTo() {
+ const ref = this.$refs[`${this.barcode}ref`][0];
+ uni.pageScrollTo({
+ scrollTop: ref.$el.offsetTop,
+ duration: 300
+ })
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.barcode = ''
+ },
+ next() {
+ if (this.list.length) {
+ this.isconfirm = true
+ } else {
+ uni.showToast({
+ icon: "none",
+ title: '鏈�夌墿鏂欐爣绛�'
+ })
+ }
+ },
+ prev() {
+ this.isconfirm = false
+ },
+ async confirm() {
+ this.repeatClick = true
+ const newArr = this.list.map(item => {
+ return {
+ ...item,
+ anfme: item.anfme === null ? 0 : +item.anfme,
+ };
+ });
+
+ const {
+ code,
+ data,
+ msg
+ } = await request('/waitPakin/merge', {
+ items: newArr,
+ barcode: this.container,
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: '缁勭洏鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ this.container = ''
+ this.isconfirm = false
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ this.repeatClick = false
+ },
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .act {
+ border: 1px solid #e54d42;
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
</style>
\ No newline at end of file
diff --git a/pages/listing/itemSelect.vue b/pages/listing/itemSelect.vue
index 20e7d72..f9bc65d 100644
--- a/pages/listing/itemSelect.vue
+++ b/pages/listing/itemSelect.vue
@@ -39,6 +39,7 @@
<text class="text-grey ">{{item.splrBatch}}</text>
</view>
</view>
+ <!-- 鐜板搧绁ㄥ彿宸叉敞閲�
<view class="cu-item">
<view class="content">
<text class="text-black">鐜板搧绁ㄥ彿:</text>
@@ -47,6 +48,7 @@
<text class="text-grey ">{{item.extendFields.crushNo}}</text>
</view>
</view>
+ -->
<view class="cu-item">
<view class="content">
<text class="text-black">璐ㄦ鐘舵��:</text>
diff --git a/pages/listing/labour.vue b/pages/listing/labour.vue
index 1d2925b..0e6d01f 100644
--- a/pages/listing/labour.vue
+++ b/pages/listing/labour.vue
@@ -1,204 +1,204 @@
-<template>
- <view class="has-foot">
- <form>
- <view class="cu-form-group ">
- <view class="title">瀹瑰櫒鐮�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄧ爜" v-model="container"></input>
- <text class='cuIcon-search text-blue' @click="search"></text>
- </view>
- <view class="cu-form-group">
- <view class="title">搴撲綅鐮�</view>
- <input placeholder="璇锋壂鎻忓簱浣嶇爜" v-model="locCode"></input>
- </view>
- </form>
- <view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- 缂栫爜:{{`${item.matnrCode}`}}
- </view>
- </view>
-
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鍚嶇О:</text>
- <text class="text-grey ">{{item.maktx}}</text>
- </view>
-
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鎵规:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.batch}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鏁伴噺:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.anfme}}</text>
- </view>
- </view>
-
- </block>
- </view>
-
-
- <view class="cu-bar btn-group foot">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" @click="confirm">涓婃灦</button>
- </view>
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- asnCode: '',
- locCode: '',
- container: '',
- list: [],
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- },
- mounted() {},
- methods: {
- async search() {
- const {
- code,
- data,
- msg
- } = await request('/stock/operate/list', {
- barcode: this.container,
- })
- if (code === 200) {
- // const find = this.list.find(el => el.id === data.id);
- // !find &&
- this.list = data
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- })
- }
- },
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.matnrCode = ''
- this.locCode = ''
- },
-
- async confirm() {
- if (this.locCode === '' || this.locCode === null) {
- uni.showToast({
- title: '璇疯緭鍏ュ簱浣�',
- icon: "none",
- })
- return ;
- }
- if (this.container === '' || this.container === null) {
- uni.showToast({
- title: '璇疯緭鍏ユ枡绠辩爜',
- icon: "none",
- })
- return ;
- }
- const {
- code,
- data,
- msg
- } = await request('/stock/operate', {
- itemList: this.list,
- locCode: this.locCode,
- barcode: this.container,
-
- })
- if (code === 200) {
- uni.showToast({
- title: '涓婃灦鎴愬姛'
- })
- this.list = []
- this.locCode = ''
- this.container = ''
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- })
- }
-
-
-
- },
-
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
-
- .uni-file-picker {
- width: 100%;
- margin-bottom: 10px;
- }
-
- .uni-select__selector {
- z-index: 999;
- }
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group ">
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container"></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">搴撲綅鐮�</view>
+ <input placeholder="璇锋壂鎻忓簱浣嶇爜" v-model="locCode"></input>
+ </view>
+ </form>
+ <view class="cu-list det menu sm-border padding">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ 缂栫爜:{{`${item.matnrCode}`}}
+ </view>
+ </view>
+
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鍚嶇О:</text>
+ <text class="text-grey ">{{item.maktx}}</text>
+ </view>
+
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鎵规:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.batch}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鏁伴噺:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{ $formatQty(item.anfme) }}</text>
+ </view>
+ </view>
+
+ </block>
+ </view>
+
+
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" @click="confirm">涓婃灦</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ asnCode: '',
+ locCode: '',
+ container: '',
+ list: [],
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ },
+ mounted() {},
+ methods: {
+ async search() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/stock/operate/list', {
+ barcode: this.container,
+ })
+ if (code === 200) {
+ // const find = this.list.find(el => el.id === data.id);
+ // !find &&
+ this.list = data
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.matnrCode = ''
+ this.locCode = ''
+ },
+
+ async confirm() {
+ if (this.locCode === '' || this.locCode === null) {
+ uni.showToast({
+ title: '璇疯緭鍏ュ簱浣�',
+ icon: "none",
+ })
+ return ;
+ }
+ if (this.container === '' || this.container === null) {
+ uni.showToast({
+ title: '璇疯緭鍏ユ枡绠辩爜',
+ icon: "none",
+ })
+ return ;
+ }
+ const {
+ code,
+ data,
+ msg
+ } = await request('/stock/operate', {
+ itemList: this.list,
+ locCode: this.locCode,
+ barcode: this.container,
+
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: '涓婃灦鎴愬姛'
+ })
+ this.list = []
+ this.locCode = ''
+ this.container = ''
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+
+
+
+ },
+
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
+
+ .uni-file-picker {
+ width: 100%;
+ margin-bottom: 10px;
+ }
+
+ .uni-select__selector {
+ z-index: 999;
+ }
</style>
\ No newline at end of file
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index b73cfda..7a402d2 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -3,8 +3,8 @@
<view>
<form>
<view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="container" focus></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container" focus></input>
<text class='cuIcon-search text-blue' @click="getList"></text>
</view>
<view class="cu-form-group">
@@ -25,43 +25,42 @@
</view>
</form>
<view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">鐗╂枡鎬荤被锛歿{list.length}}</view>
+ <view class="text-blue">鐗╂枡鎬荤被锛歿{listByMaterial.length}}</view>
+ <!-- 鍗婄锛氱瓑鏈夐渶瑕佹椂鍐嶅惎鐢�
<view class="content">
<uni-data-checkbox mode="button" multiple v-model="isHalf" :localdata="boxs"></uni-data-checkbox>
</view>
+ -->
<view class="text-blue">缁勭洏鎬绘暟锛歿{allCount}}</view>
</view>
</view>
<view class="padding-lr margin-top-sm">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-list det menu sm-border margin-bottom-sm " :class="[item.trackCode===barcode&&'act']"
- :ref="item.trackCode+'ref'">
+ <block v-for="(group, gIndex) in listByMaterial" :key="gIndex">
+ <view class="cu-list det menu sm-border margin-bottom-sm "
+ :ref="(group[0] && group[0].trackCode)+'ref'">
<view class="cu-bar bg-white solid-bottom ">
<view class="action">
<view class="index">
- {{index+1}}
+ {{gIndex+1}}
</view>
<view class="text-blue">
缂栫爜锛�
- {{`${item.matnrCode}`}}
+ {{group[0] && group[0].matnrCode}}
</view>
</view>
<view class="action" v-if="!isconfirm">
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ <text @click="removeGroup(group)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
</view>
</view>
<view class="cu-item">
<view class="content">
<text class="text-black">鐗╂枡缂栫爜锛�</text>
- <text class="text-grey ">{{item.maktx}}</text>
+ <text class="text-grey ">{{group[0] && group[0].maktx}}</text>
</view>
</view>
- <view class="cu-item">
+ <view class="cu-item" v-for="(line, lIdx) in group" :key="'asn-'+lIdx">
<view class="content">
- <text class="text-black">鍗曞彿锛�</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
+ <text class="text-black">鍗曞彿 :{{ line.asnCode }} ({{ $formatQty(line.availablePalletQty != null ? line.availablePalletQty : (line.anfme - line.workQty - line.qty)) }})</text>
</view>
</view>
<view class="cu-item">
@@ -69,40 +68,31 @@
<text class="text-black">渚涘簲鍟嗘壒娆★細</text>
</view>
<view class="action">
- <text class="text-grey ">{{item.splrBatch}}</text>
- </view>
- </view>
-<!-- <view class="cu-item">-->
-<!-- <view class="content">-->
-<!-- <text class="text-black">绁ㄥ彿锛�<text class="text-grey ">{{item.crushNo}}</text></text>-->
-<!-- </view>-->
-<!-- </view>-->
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鍗曚綅锛� <text class="text-grey ">{{item.stockUnit}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">鏀惰揣鏁伴噺锛� <text class="text-grey ">{{item.anfme}}</text></text>
+ <text class="text-grey ">{{group[0] && group[0].splrBatch}}</text>
</view>
</view>
<view class="cu-item">
- <view class="content" v-if="item.asnCode">
- <text class="text-black">鍙粍鐩樻暟閲忥細<text
- class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
+ <view class="content">
+ <text class="text-black">搴撳瓨鍗曚綅锛� <text class="text-grey ">{{group[0] && group[0].stockUnit}}</text></text>
</view>
<view class="content">
- <text class="text-black">宸蹭笂鏋舵暟閲忥細 <text
- class="text-grey ">{{item.workQty + item.qty}}</text></text>
+ <text class="text-black">鏀惰揣鏁伴噺锛� <text class="text-grey ">{{ $formatQty(groupSumAnfme(group)) }}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鍙粍鐩樻暟閲忥細<text class="text-grey ">{{ $formatQty(groupSumAvailable(group)) }}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">宸蹭笂鏋舵暟閲忥細 <text class="text-grey ">{{ $formatQty(groupSumPutaway(group)) }}</text></text>
</view>
</view>
<view class="cu-item">
<view class="content">
<view class="cu-form-group padding-lr-0">
- <view class="title text-blue"><text
- class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺锛�
- </view>
- <uni-number-box style="width: 70%;" :min="0" :max="max" :decimal="6" :step="1"
- v-model="item.receiptQty"></uni-number-box>
+ <view class="title text-blue"><text class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺锛�</view>
+ <uni-number-box style="width: 70%;" :min="0" :max="getGroupAvailableMax(group)" :decimal="2" :step="1"
+ :value="groupSumReceiptQty(group)" @input="setGroupReceiptQty(group, $event)"></uni-number-box>
</view>
</view>
</view>
@@ -150,12 +140,34 @@
},
computed: {
...mapState('user', ['dynamicFields']),
+ // 缁勭洏鎬绘暟锛氬琛屾椂鏁伴噺鍙犲姞锛堜笉鍚學MS鍗曞彿銆佺浉鍚岀墿鏂欏悇鍗犱竴琛岋紝姝ゅ涓哄悇琛屽垪鐨勭粍鐩樻暟閲忎箣鍜岋級
allCount() {
- return this.list.reduce((acc, row) => +(row.anfme + acc).toFixed(2), 0) || 0
+ return this.list.reduce((acc, row) => +(+(row.receiptQty || 0) + acc).toFixed(2), 0) || 0
+ },
+ // 鎸夌墿鏂欏悎骞讹細鐩稿悓鐗╂枡锛堢紪鐮�+鎵规+鍚嶇О锛夊悎骞朵负涓�涓ā鍧楋紝鍗曞彿鍦ㄦā鍧楀唴澶氳鏄剧ず
+ listByMaterial() {
+ const key = (item) => [item.matnrCode, item.splrBatch || '', item.maktx || ''].join('\t')
+ const map = new Map()
+ this.list.forEach(item => {
+ const k = key(item)
+ if (!map.has(k)) map.set(k, [])
+ map.get(k).push(item)
+ })
+ return Array.from(map.values())
}
},
mounted() {},
methods: {
+ // 鍗曡鍙粍鐩樹笂闄愶細璁″垝 - 宸茬粍鎵� - 宸蹭笂鏋讹紝涓嶈兘瓒呰繃璇ュ�硷紙涓庡悗绔竴鑷达級
+ getItemAvailableMax(item) {
+ if (!item) return this.max;
+ const avail = item.availablePalletQty != null && item.availablePalletQty !== undefined
+ ? item.availablePalletQty
+ : (Number(item.anfme || 0) - Number(item.workQty || 0) - Number(item.qty || 0));
+ const num = Number(avail);
+ if (isNaN(num) || num < 0) return 0;
+ return Math.min(num, this.max);
+ },
onMatnrCodeInput(e) {
// 鎵爜杈撳叆鏃惰嚜鍔ㄨЕ鍙戞煡璇�
if (e.detail && e.detail.value && e.detail.value.trim() !== '') {
@@ -265,11 +277,15 @@
return;
}
for (var i = 0; i < data.length; i++) {
- // 璁$畻鍙粍鐩樻暟閲� = 鎬绘暟閲� - 宸叉墽琛屾暟閲� - 宸叉敹璐ф暟閲�
- let anfme = data[i].anfme || 0;
- let workQty = data[i].workQty || 0;
- let qty = data[i].qty || 0;
- data[i].receiptQty = anfme - workQty - qty;
+ // 浼樺厛浣跨敤鎺ュ彛杩斿洖鐨勫彲缁勭洏鏁伴噺锛坥rder/add 鏀规暟閲忓悗 = 璁″垝 - 宸茬粍鎵� - 宸蹭笂鏋讹級锛屽惁鍒欐湰鍦拌绠�
+ if (data[i].availablePalletQty != null && data[i].availablePalletQty !== undefined) {
+ data[i].receiptQty = data[i].availablePalletQty;
+ } else {
+ let anfme = data[i].anfme || 0;
+ let workQty = data[i].workQty || 0;
+ let qty = data[i].qty || 0;
+ data[i].receiptQty = anfme - workQty - qty;
+ }
// 纭繚鍙粍鐩樻暟閲忎笉涓鸿礋鏁�
if (data[i].receiptQty < 0) {
data[i].receiptQty = 0;
@@ -294,7 +310,7 @@
let that = this
if (this.container === '' || this.container === null) {
uni.showToast({
- title: "瀹瑰櫒鐮佷负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "none",
position: 'top'
})
@@ -325,66 +341,30 @@
}
},
showBackData(data) {
- // 杩藉姞鏂扮墿鏂欏埌鍒楄〃锛屾牴鎹墿鏂欑紪鐮佸拰璺熻釜鐮佺粍鍚堝幓閲�
- let addedCount = 0;
- let skippedCount = 0;
- data.forEach(item => {
- // 妫�鏌ユ槸鍚﹀凡瀛樺湪鐩稿悓鐨勭墿鏂�
- const exists = this.list.some(existingItem => {
- // 浼樺厛妫�鏌ョ墿鏂欑紪鐮侊紝濡傛灉鐗╂枡缂栫爜涓嶅悓锛岃涓烘槸涓嶅悓鐗╂枡锛屽厑璁告坊鍔�
- if (existingItem.matnrCode && item.matnrCode) {
- // 涓や釜閮芥湁鐗╂枡缂栫爜锛屽鏋滀笉鍚屽垯鍏佽娣诲姞
- if (existingItem.matnrCode !== item.matnrCode) {
- return false; // 鐗╂枡缂栫爜涓嶅悓锛屼笉瀛樺湪锛屽厑璁告坊鍔�
- }
- // 鐗╂枡缂栫爜鐩稿悓锛岀户缁鏌ュ叾浠栧瓧娈�
- } else if (existingItem.matnrCode || item.matnrCode) {
- // 涓�涓湁涓�涓病鏈夌墿鏂欑紪鐮侊紝璁や负鏄笉鍚岀墿鏂欙紝鍏佽娣诲姞
- return false;
- }
- // 涓や釜閮芥病鏈夌墿鏂欑紪鐮侊紝缁х画妫�鏌ュ叾浠栧瓧娈�
- // 濡傛灉涓や釜閮芥湁id涓旂浉鍚岋紝璁や负鏄悓涓�鐗╂枡
- if (existingItem.id && item.id && existingItem.id === item.id) {
- return true;
- }
- // 鐗╂枡缂栫爜鐩稿悓锛堟垨閮戒负绌猴級锛屾鏌ヨ窡韪爜锛堝鏋滄湁璺熻釜鐮侊紝璺熻釜鐮佷笉鍚屽垯鍏佽娣诲姞锛�
- if (existingItem.trackCode && item.trackCode) {
- // 閮芥湁璺熻釜鐮侊紝璺熻釜鐮佺浉鍚屽垯璁や负鏄悓涓�鐗╂枡
- return existingItem.trackCode === item.trackCode;
- }
- // 鐗╂枡缂栫爜鐩稿悓锛屾鏌MS鍗曞彿锛堝鏋滄湁鍗曞彿锛屽崟鍙蜂笉鍚屽垯鍏佽娣诲姞锛�
- if (existingItem.asnCode && item.asnCode) {
- // 閮芥湁WMS鍗曞彿锛屽崟鍙风浉鍚屽垯璁や负鏄悓涓�鐗╂枡
- return existingItem.asnCode === item.asnCode;
- }
- // 鐗╂枡缂栫爜鐩稿悓锛屼絾閮芥病鏈夎窡韪爜鍜學MS鍗曞彿锛堥兘鏄粠鐗╂枡淇℃伅琛ㄨ幏鍙栫殑锛夛紝璁や负鏄悓涓�鐗╂枡
- if (existingItem.matnrCode === item.matnrCode &&
- !existingItem.trackCode && !item.trackCode &&
- !existingItem.asnCode && !item.asnCode) {
- return true;
- }
- // 鐗╂枡缂栫爜鐩稿悓锛屼絾涓�涓病鏈夎窡韪爜/ASN锛屽彟涓�涓湁锛岃涓烘槸涓嶅悓鐗╂枡锛屽厑璁告坊鍔�
- // 鎴栬�呬袱涓兘娌℃湁鐗╂枡缂栫爜涓旀病鏈夊叾浠栧敮涓�鏍囪瘑锛屼篃鍏佽娣诲姞锛堝彲鑳芥槸涓嶅悓鐗╂枡锛�
+ // 鍚屼竴缁勬墭妗嗗唴鍏佽涓嶅悓WMS鍗曞彿銆佺浉鍚岀墿鏂欏琛屽叡瀛橈紝鏁伴噺鍙犲姞缁勬墭锛涘崟鍙锋寜琛屾樉绀猴紱鎻愪氦鏃朵粛鎸夋瘡鏉℃槑缁嗗彂閫侊紝鍚庣鍙傛暟涓嶅彉
+ // 鍒ゅ畾涓哄悓涓�琛岋紙闇�鏇挎崲锛夛細鍚屼竴鍗曞彿+鍚屼竴鏄庣粏锛坕d 鎴� 鐗╂枡+璺熻釜鐮� 涓�鑷达級
+ const isSameItem = (existingItem, item) => {
+ if (existingItem.matnrCode && item.matnrCode) {
+ if (existingItem.matnrCode !== item.matnrCode) return false;
+ } else if (existingItem.matnrCode || item.matnrCode) {
return false;
- });
- if (!exists) {
- this.list.push(item);
- addedCount++;
- } else {
- skippedCount++;
}
+ if (existingItem.id && item.id && existingItem.id === item.id) return true;
+ if (existingItem.trackCode && item.trackCode) return existingItem.trackCode === item.trackCode;
+ if (existingItem.asnCode && item.asnCode) return existingItem.asnCode === item.asnCode;
+ if (existingItem.matnrCode === item.matnrCode && !existingItem.trackCode && !item.trackCode && !existingItem.asnCode && !item.asnCode) return true;
+ return false;
+ };
+ let addedCount = 0;
+ data.forEach(item => {
+ const existingIndex = this.list.findIndex(existingItem => isSameItem(existingItem, item));
+ if (existingIndex >= 0) {
+ this.list.splice(existingIndex, 1);
+ }
+ this.list.push(item);
+ addedCount++;
});
- // 濡傛灉鎵�鏈夌墿鏂欓兘宸插瓨鍦紝鎻愮ず鐢ㄦ埛
- if (addedCount === 0 && skippedCount > 0) {
- uni.showToast({
- title: "璇ョ墿鏂欏凡娣诲姞锛岃鎵弿鍏朵粬鐗╂枡",
- icon: "none",
- position: 'top',
- duration: 1500
- });
- } else if (addedCount > 0) {
- // 鎴愬姛娣诲姞鐗╂枡鍚庯紝寤惰繜娓呯┖鐗╂枡缂栫爜杈撳叆妗嗭紝鏂逛究杩炵画鎵弿涓嶅悓鐗╂枡
- // 寤惰繜300ms娓呯┖锛岃鐢ㄦ埛鍙互蹇�熻繛缁壂鎻忎笉鍚岀殑鐗╂枡
+ if (addedCount > 0) {
setTimeout(() => {
this.matnrCode = '';
}, 300);
@@ -411,6 +391,40 @@
remove(index) {
this.list.splice(index, 1);
},
+ removeGroup(group) {
+ this.list = this.list.filter(x => !group.includes(x));
+ },
+ groupSumAnfme(group) {
+ return group.reduce((acc, row) => acc + (Number(row.anfme) || 0), 0);
+ },
+ groupSumAvailable(group) {
+ return group.reduce((acc, row) => {
+ const v = row.availablePalletQty != null ? row.availablePalletQty : (Number(row.anfme) || 0) - (Number(row.workQty) || 0) - (Number(row.qty) || 0);
+ return acc + v;
+ }, 0);
+ },
+ groupSumPutaway(group) {
+ return group.reduce((acc, row) => acc + (Number(row.workQty) || 0) + (Number(row.qty) || 0), 0);
+ },
+ groupSumReceiptQty(group) {
+ return group.reduce((acc, row) => acc + (Number(row.receiptQty) || 0), 0);
+ },
+ getGroupAvailableMax(group) {
+ return group.reduce((acc, row) => acc + this.getItemAvailableMax(row), 0);
+ },
+ // 灏嗙粍鐩樻�绘暟閲忔寜鍙粍鐩樹笂闄愬垎閰嶅埌鍚勫崟鍙疯锛堝厛婊¤冻鍓嶄竴琛岋紝鍐嶅線鍚庯級
+ setGroupReceiptQty(group, total) {
+ let val = total;
+ if (val && typeof val === 'object' && val.detail != null && val.detail.value !== undefined) val = val.detail.value;
+ let remaining = Number(val) || 0;
+ if (remaining < 0) remaining = 0;
+ group.forEach(line => {
+ const maxLine = this.getItemAvailableMax(line);
+ const assign = Math.min(maxLine, remaining);
+ this.$set(line, 'receiptQty', assign);
+ remaining -= assign;
+ });
+ },
clear() {
this.list = []
this.barcode = ''
@@ -434,7 +448,7 @@
async confirm() {
if (this.container === '' || this.container === null) {
uni.showToast({
- title: "瀹瑰櫒鐮佷负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "none",
position: 'top'
})
@@ -448,27 +462,23 @@
})
return;
}
- // 鏍¢獙鎵�鏈夌墿鏂欑殑缁勭洏鏁伴噺涓嶈兘涓虹┖銆佷笉鑳戒负0
- for (let i = 0; i < this.list.length; i++) {
- const item = this.list[i];
- if (item.receiptQty === null || item.receiptQty === undefined || item.receiptQty === '' || item.receiptQty === 0) {
- uni.showToast({
- title: `绗�${i + 1}涓墿鏂欙紙${item.matnrCode || item.maktx || '鏈煡'}锛夌殑缁勭洏鏁伴噺涓嶈兘涓虹┖鎴�0`,
- icon: "none",
- position: 'top',
- duration: 3000
- })
- return;
- }
- }
- this.repeatClick = true
- const newArr = this.list.map(item => {
- return {
+ // 缁勭洏鏁伴噺鎸夆�滃厛婊¤冻鍓嶄竴鍗曞彿鈥濆垎閰嶅悗锛屽彲鑳芥湁鐨勫崟鍙疯鍒嗗埌 0锛涘彧鎻愪氦鏁伴噺>0 鐨勬槑缁嗭紝閬垮厤鎶ラ敊
+ const newArr = this.list
+ .filter(item => (Number(item.receiptQty) || 0) > 0)
+ .map(item => ({
...item,
anfme: item.anfme === null ? 0 : +item.anfme,
- };
- });
-
+ }));
+ if (newArr.length === 0) {
+ uni.showToast({
+ title: '缁勭洏鏁伴噺涓嶈兘涓虹┖鎴�0',
+ icon: "none",
+ position: 'top',
+ duration: 3000
+ })
+ return;
+ }
+ this.repeatClick = true
const {
code,
data,
@@ -480,14 +490,17 @@
})
if (code === 200) {
uni.showToast({
- title: '缁勭洏鎴愬姛'
+ title: this.isHalf ? '缁勭洏鎴愬姛锛屽彲缁х画鎵悓涓�鏂欑鐮佽拷鍔�' : '缁勭洏鎴愬姛'
})
this.list = []
this.barcode = ''
- this.container = ''
- this.asnCode = ''
- this.matnrCode = ''
this.isconfirm = false
+ // 鍗婄鏃朵繚鐣欐枡绠辩爜锛屼究浜庣户缁壂鍚屼竴绠辩爜杩藉姞缁勬墭
+ if (!this.isHalf) {
+ this.container = ''
+ this.asnCode = ''
+ this.matnrCode = ''
+ }
} else {
uni.showToast({
title: msg,
diff --git a/pages/listing/unPakin.vue b/pages/listing/unPakin.vue
index f54eee1..eeadfe1 100644
--- a/pages/listing/unPakin.vue
+++ b/pages/listing/unPakin.vue
@@ -1,286 +1,293 @@
-<template>
- <view class="has-foot">
- <view>
- <form>
- <view class="cu-form-group ">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="container" focus></input>
- <text class='cuIcon-search text-blue' @click="getList"></text>
- </view>
- <view class="cu-form-group">
- <view class="title">缂栫爜</view>
- <input placeholder="璇锋壂鎻忕粍鎵樻。缂栫爜" v-model="pkCode"></input>
- <text class='cuIcon-search text-blue' @click="getList"></text>
- </view>
- </form>
- <view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
- <view class="text-blue">缁勭洏鎬绘暟:{{allCount}}</view>
- </view>
- </view>
- <view class="padding-lr margin-top-sm">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-list det menu sm-border margin-bottom-sm " :class="[item.trackCode===barcode&&'act']"
- :ref="item.trackCode+'ref'">
- <view class="cu-bar bg-white solid-bottom ">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- 缂栫爜:
- {{`${item.matnrCode}`}}
- </view>
- </view>
- <view class="action" v-if="!isconfirm">
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鐗╂枡缂栫爜:</text>
- <text class="text-grey ">{{item.maktx}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鎵规:</text>
- <text class="text-grey ">{{item.batch}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">璐ㄦ鐘舵��:</text>
- <text class="text-grey ">{{item.isptResult$}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
- </view>
- </view>
- <view class="cu-item">
-
- <view class="content">
- <text class="text-black">宸茬粍鎵樻暟: <text class="text-grey ">{{item.anfme}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">宸叉墽琛屾暟閲�: <text class="text-grey ">{{item.workQty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鍙В缁戞暟閲�: <text
- class="text-grey ">{{item.anfme - item.workQty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue"><text
- class="text-red text-xl vertical-middle">*</text>瑙g粦鏁伴噺:
- </view>
- <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty"
- :step='0.000001'></uni-number-box>
- </view>
- </view>
- </view>
- </view>
- </block>
- </view>
- <view class="cu-bar btn-group foot">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">瑙g粦</button>
- </view>
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- container: '',
- megreQty: '',
- list: [],
- range: [],
- asnCode: '',
- repeatClick: false,
- isconfirm: false,
- matnrCode: '',
- max: 99999999,
- pkCode: '',
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- allCount() {
- return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
- }
- },
- mounted() {},
- methods: {
- async search() {
- const find = this.list.find(el => el.trackCode === this.barcode);
- find ? this.scrollTo() : this.getDet();
-
- },
- async getDet() {
- const {
- code,
- data,
- msg
- } = await request('/asnOrderItem/trackCode', {
- matnrCode: this.matnrCode,
- asnCode: this.asnCode
- }, "post")
- if (code === 200) {
- for (var i = 0; i < data.length; i++) {
- data[i].receiptQty = 0;
- data[i].selected = false;
- }
- this.list = data
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- async getList() {
- const {
- code,
- data,
- msg
- } = await request('/asnOrderItem/container', {
- barcode: this.container,
- code: this.pkCode,
- type: 'unbind'
- })
- if (code === 200) {
- for (var i = 0; i < data.length; i++) {
- data[i].receiptQty = 0;
- }
- this.list = data
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- scrollTo() {
- const ref = this.$refs[`${this.barcode}ref`][0];
- uni.pageScrollTo({
- scrollTop: ref.$el.offsetTop,
- duration: 300
- })
- },
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.barcode = ''
- },
- next() {
- if (this.list.length) {
- this.isconfirm = true
- } else {
- uni.showToast({
- icon: "none",
- title: '鏈�夌墿鏂欐爣绛�'
- })
- }
- },
- prev() {
- this.isconfirm = false
- },
- async confirm() {
- this.repeatClick = true
- const newArr = this.list.map(item => {
-
- return {
+<template>
+ <view class="has-foot">
+ <view>
+ <form>
+ <view class="cu-form-group ">
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container" focus></input>
+ <text class='cuIcon-search text-blue' @click="getList"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">缂栫爜</view>
+ <input placeholder="璇锋壂鎻忕粍鎵樻。缂栫爜" v-model="pkCode"></input>
+ <text class='cuIcon-search text-blue' @click="getList"></text>
+ </view>
+ </form>
+ <view class="flex solid-bottom padding-sm justify-between">
+ <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
+ <view class="text-blue">缁勭洏鎬绘暟:{{allCount}}</view>
+ </view>
+ </view>
+ <view class="padding-lr margin-top-sm">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-list det menu sm-border margin-bottom-sm " :class="[item.trackCode===barcode&&'act']"
+ :ref="item.trackCode+'ref'">
+ <view class="cu-bar bg-white solid-bottom ">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ 缂栫爜:
+ {{`${item.matnrCode}`}}
+ </view>
+ </view>
+ <view class="action" v-if="!isconfirm">
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鐗╂枡缂栫爜:</text>
+ <text class="text-grey ">{{item.maktx}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鎵规:</text>
+ <text class="text-grey ">{{item.batch}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">璐ㄦ鐘舵��:</text>
+ <text class="text-grey ">{{item.isptResult$}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+
+ <view class="content">
+ <text class="text-black">宸茬粍鎵樻暟: <text class="text-grey ">{{item.anfme}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">宸叉墽琛屾暟閲�: <text class="text-grey ">{{item.workQty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鍙В缁戞暟閲�: <text
+ class="text-grey ">{{item.anfme - item.workQty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue"><text
+ class="text-red text-xl vertical-middle">*</text>瑙g粦鏁伴噺:
+ </view>
+ <uni-number-box style="width: 70%;" :max="unbindMax(item)" v-model="item.receiptQty"
+ :step="1" :decimal="2"></uni-number-box>
+ </view>
+ </view>
+ </view>
+ </view>
+ </block>
+ </view>
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">瑙g粦</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ container: '',
+ megreQty: '',
+ list: [],
+ range: [],
+ asnCode: '',
+ repeatClick: false,
+ isconfirm: false,
+ matnrCode: '',
+ pkCode: '',
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ allCount() {
+ return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
+ }
+ },
+ mounted() {},
+ methods: {
+ /** 鍗曡瑙g粦鏁伴噺涓婇檺 = 宸茬粍鎵樻暟 - 宸叉墽琛屾暟閲忥紙鍙В缁戞暟閲忥級 */
+ unbindMax(item) {
+ const anfme = item.anfme != null ? Number(item.anfme) : 0;
+ const workQty = item.workQty != null ? Number(item.workQty) : 0;
+ return Math.max(0, anfme - workQty);
+ },
+ async search() {
+ const find = this.list.find(el => el.trackCode === this.barcode);
+ find ? this.scrollTo() : this.getDet();
+
+ },
+ async getDet() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/asnOrderItem/trackCode', {
+ matnrCode: this.matnrCode,
+ asnCode: this.asnCode
+ }, "post")
+ if (code === 200) {
+ for (var i = 0; i < data.length; i++) {
+ data[i].receiptQty = 0;
+ data[i].selected = false;
+ }
+ this.list = data
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ },
+ async getList() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/asnOrderItem/container', {
+ barcode: this.container,
+ code: this.pkCode,
+ type: 'unbind'
+ })
+ if (code === 200) {
+ for (var i = 0; i < data.length; i++) {
+ data[i].receiptQty = 0;
+ }
+ this.list = data
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ },
+ scrollTo() {
+ const ref = this.$refs[`${this.barcode}ref`][0];
+ uni.pageScrollTo({
+ scrollTop: ref.$el.offsetTop,
+ duration: 300
+ })
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.barcode = ''
+ },
+ next() {
+ if (this.list.length) {
+ this.isconfirm = true
+ } else {
+ uni.showToast({
+ icon: "none",
+ title: '鏈�夌墿鏂欐爣绛�'
+ })
+ }
+ },
+ prev() {
+ this.isconfirm = false
+ },
+ async confirm() {
+ this.repeatClick = true
+ const newArr = this.list.map(item => {
+ const maxQty = this.unbindMax(item)
+ const receiptQty = Math.min(maxQty, (item.receiptQty != null ? Number(item.receiptQty) : 0))
+ return {
...item,
- extendFields: {},
- anfme: item.anfme === null ? 0 : +item.anfme,
- };
- });
-
- const {
- code,
- data,
- msg
- } = await request('/waitPakin/unbind', {
- items: newArr,
- barcode: this.container,
- })
- if (code === 200) {
- uni.showToast({
- title: '瑙g粦鎴愬姛'
- })
- this.list = []
- this.barcode = ''
- this.container = ''
- this.isconfirm = false
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- this.repeatClick = false
- },
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .act {
- border: 1px solid #e54d42;
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
+ extendFields: {},
+ anfme: item.anfme === null ? 0 : +item.anfme,
+ receiptQty: receiptQty <= 0 ? 0 : receiptQty,
+ };
+ });
+
+ const {
+ code,
+ data,
+ msg
+ } = await request('/waitPakin/unbind', {
+ items: newArr,
+ barcode: this.container,
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: '瑙g粦鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ this.container = ''
+ this.isconfirm = false
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ this.repeatClick = false
+ },
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .act {
+ border: 1px solid #e54d42;
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
</style>
\ No newline at end of file
diff --git a/pages/listing/untie.vue b/pages/listing/untie.vue
index b00f8ad..56a5d4b 100644
--- a/pages/listing/untie.vue
+++ b/pages/listing/untie.vue
@@ -1,230 +1,230 @@
-<template>
- <view class="has-foot">
- <form>
- <view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="container" focus></input>
- <text class='cuIcon-search text-blue' </text>
- </view>
-
- <view class="cu-form-group ">
- <view class="title">鐗╂枡鏍囩</view>
- <input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode"></input>
- <text class='cuIcon-search text-blue' @click="search"></text>
- </view>
- </form>
-
- <!-- <view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
- <view class="text-blue">鐗╂枡鎬绘暟:{{allCount}}</view>
- </view> -->
-
- <view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- {{`${item.maktx}`}}
- </view>
- </view>
- <view class="action" v-if="!isconfirm">
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.splrBatch}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鎵规:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.batch}}</text>
- </view>
- </view>
-
-
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
- </view>
-
- <!-- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">鏀惰揣鏁伴噺:</view>
- <input type="number" placeholder="璇疯緭鍏ユ敹璐ф暟閲�" v-model="item.receiptQty"></input>
- </view>
- </view> -->
- </view>
-
-
- </block>
- </view>
-
-
- <view class="cu-bar btn-group foot">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" @click="confirm">瑙g粦</button>
- </view>
-
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- container: '',
- list: [],
- range: [],
- isconfirm: false
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- allCount() {
- return this.list.reduce((acc, row) => +row.qty + acc, 0) || 0
- }
- },
- mounted() {},
- methods: {
- async search() {
- const {
- code,
- data,
- msg
- } = await request('/asnOrderItem/trackCode/' + this.barcode, {}, "get")
- if (code === 200) {
- const find = this.list.find(el => el.id === data.id);
- !find && this.list.push(data)
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- },
- scrollTo() {
- const ref = this.$refs[`${this.barcode}ref`][0];
- uni.pageScrollTo({
- scrollTop: ref.$el.offsetTop,
- duration: 300
- })
- },
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.barcode = ''
- },
- next() {
- if (this.list.length) {
- this.isconfirm = true
- } else {
- uni.showToast({
- icon: "none",
- title: '鏈�夌墿鏂欐爣绛�'
- })
- }
- },
- prev() {
- this.isconfirm = false
- },
- async confirm() {
- const {
- code,
- data,
- msg
- } = await request('/waitPakin/unbind', {
- items: this.list,
- barcode: this.container
- })
- if (code === 200) {
- uni.showToast({
- title: '瑙g粦鎴愬姛'
- })
- this.list = []
- this.barcode = ''
- this.isconfirm = false
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
-
-
- },
-
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group margin-top">
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="container" focus></input>
+ <text class='cuIcon-search text-blue' </text>
+ </view>
+
+ <view class="cu-form-group ">
+ <view class="title">鐗╂枡鏍囩</view>
+ <input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode"></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ </form>
+
+ <!-- <view class="flex solid-bottom padding-sm justify-between">
+ <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
+ <view class="text-blue">鐗╂枡鎬绘暟:{{allCount}}</view>
+ </view> -->
+
+ <view class="cu-list det menu sm-border padding">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ {{`${item.maktx}`}}
+ </view>
+ </view>
+ <view class="action" v-if="!isconfirm">
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.splrBatch}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">搴撳瓨鎵规:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.batch}}</text>
+ </view>
+ </view>
+
+
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
+ </view>
+
+ <!-- <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">鏀惰揣鏁伴噺:</view>
+ <input type="number" placeholder="璇疯緭鍏ユ敹璐ф暟閲�" v-model="item.receiptQty"></input>
+ </view>
+ </view> -->
+ </view>
+
+
+ </block>
+ </view>
+
+
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" @click="confirm">瑙g粦</button>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ container: '',
+ list: [],
+ range: [],
+ isconfirm: false
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ allCount() {
+ return this.list.reduce((acc, row) => +row.qty + acc, 0) || 0
+ }
+ },
+ mounted() {},
+ methods: {
+ async search() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/asnOrderItem/trackCode/' + this.barcode, {}, "get")
+ if (code === 200) {
+ const find = this.list.find(el => el.id === data.id);
+ !find && this.list.push(data)
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ },
+ scrollTo() {
+ const ref = this.$refs[`${this.barcode}ref`][0];
+ uni.pageScrollTo({
+ scrollTop: ref.$el.offsetTop,
+ duration: 300
+ })
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.barcode = ''
+ },
+ next() {
+ if (this.list.length) {
+ this.isconfirm = true
+ } else {
+ uni.showToast({
+ icon: "none",
+ title: '鏈�夌墿鏂欐爣绛�'
+ })
+ }
+ },
+ prev() {
+ this.isconfirm = false
+ },
+ async confirm() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/waitPakin/unbind', {
+ items: this.list,
+ barcode: this.container
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: '瑙g粦鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ this.isconfirm = false
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
+
+ },
+
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
</style>
\ No newline at end of file
diff --git a/pages/listing/upper.vue b/pages/listing/upper.vue
index c2ddaab..d21ae9d 100644
--- a/pages/listing/upper.vue
+++ b/pages/listing/upper.vue
@@ -1,264 +1,264 @@
-<template>
- <view class="has-foot">
- <form>
- <view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒缂栧彿</view>
- <input placeholder="璇锋壂瀹瑰櫒缂栧彿" v-model="barcode"></input>
- <text class='cuIcon-search text-blue' @click="search"></text>
- </view>
-
- <view class="cu-form-group ">
- <view class="title">鐩爣搴撳尯</view>
- <input placeholder="璇锋壂鎻忕洰鏍囧簱鍖�" v-model="areaName" ></input>
- </view>
-
- <view class="cu-form-group ">
- <view class="title">鐩爣搴撲綅</view>
- <input placeholder="璇烽�夋嫨鐩爣搴撲綅" v-model="curCode"></input>
- <text class='cu-btn bg-red tj' @click="open">鎺ㄨ崘</text>
- </view>
- </form>
-
-
-
- <view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- {{`${item.maktx}`}}
- </view>
- </view>
- <!-- <view class="action" >
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
- </view> -->
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey">{{item.splrBatch}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鎵规:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.batch}}</text>
- </view>
- </view>
-
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鏀惰揣鏁伴噺:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.anfme}}</text>
- </view>
- </view>
-
- </block>
- </view>
-
-
- <view class="cu-bar btn-group foot">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" @click="confirm">涓婃灦</button>
- </view>
-
- <uni-popup ref="popup" class="cu-popup">
- <view class="popup-content">
- <view class="head">
- <text>鎺ㄨ崘</text>
- <text class='cuIcon-close text-red close' @click="close"></text>
- </view>
-
- <div class="body">
- <view class="cu-list grid col-3 no-border">
- <view class="item" v-for="el in range">
- <view class="cu-btn round sm" :class="[el===curCode?'bg-blue':'line-blue']"
- @click="itemChange(el)">{{el}}</view>
- </view>
- </view>
- </div>
-
- <view class="cu-bar btn-group ">
- <button class="cu-btn bg-blue shadow-blur" @click="popupSubmit">鎻愪氦</button>
- </view>
- </view>
- </uni-popup>
-
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- areaName: '',
- locCode: '',
- container: '',
- list: [],
- range: [],
- curCode: ''
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- },
- mounted() {},
- methods: {
- async search() {
- const {
- code,
- data,
- msg
- } = await request(`/task/stock/${this.barcode}`)
- if (code === 200) {
- this.list = data.taskItems;
- this.range = data.locArea.locs.map(el => el.code)
- this.curCode = this.range[0]
- this.areaName = data.locArea.areaName
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- })
- }
- },
-
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.range = []
- this.curCode = ''
- this.areaName = ''
- this.barcode = ''
- },
-
- open() {
- this.$refs.popup.open()
- },
-
- close() {
- this.$refs.popup.close()
- },
-
- popupSubmit() {
- this.$refs.popup.close()
- },
- itemChange(el) {
- this.curCode = el
- },
-
- async confirm() {
- const {
- code,
- data,
- msg
- } = await request(`/task/public/${this.barcode}`
- // , {
- // curCode: this.curCode,
- // barcode: this.barcode
- // },
- )
- if (code === 200) {
- uni.showToast({
- title: '涓婃灦鎴愬姛'
- })
- this.clear()
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- })
- }
-
-
-
- },
-
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
-
- .uni-file-picker {
- width: 100%;
- margin-bottom: 10px;
- }
-
- .uni-select__selector {
- z-index: 999;
- }
-
- .tj {
- height: auto;
- padding: 6px 8px;
- display: inline-block;
- border-radius: 6px;
- }
-
- .item {
- display: flex;
- justify-content: center;
- }
-
- .item .cu-btn {
- font-size: 26upx;
- }
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group margin-top">
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode"></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+
+ <view class="cu-form-group ">
+ <view class="title">鐩爣搴撳尯</view>
+ <input placeholder="璇锋壂鎻忕洰鏍囧簱鍖�" v-model="areaName" ></input>
+ </view>
+
+ <view class="cu-form-group ">
+ <view class="title">鐩爣搴撲綅</view>
+ <input placeholder="璇烽�夋嫨鐩爣搴撲綅" v-model="curCode"></input>
+ <text class='cu-btn bg-red tj' @click="open">鎺ㄨ崘</text>
+ </view>
+ </form>
+
+
+
+ <view class="cu-list det menu sm-border padding">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ {{`${item.maktx}`}}
+ </view>
+ </view>
+ <!-- <view class="action" >
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view> -->
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey">{{item.splrBatch}}</text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">搴撳瓨鎵规:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.batch}}</text>
+ </view>
+ </view>
+
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鏀惰揣鏁伴噺:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.anfme}}</text>
+ </view>
+ </view>
+
+ </block>
+ </view>
+
+
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" @click="confirm">涓婃灦</button>
+ </view>
+
+ <uni-popup ref="popup" class="cu-popup">
+ <view class="popup-content">
+ <view class="head">
+ <text>鎺ㄨ崘</text>
+ <text class='cuIcon-close text-red close' @click="close"></text>
+ </view>
+
+ <div class="body">
+ <view class="cu-list grid col-3 no-border">
+ <view class="item" v-for="el in range">
+ <view class="cu-btn round sm" :class="[el===curCode?'bg-blue':'line-blue']"
+ @click="itemChange(el)">{{el}}</view>
+ </view>
+ </view>
+ </div>
+
+ <view class="cu-bar btn-group ">
+ <button class="cu-btn bg-blue shadow-blur" @click="popupSubmit">鎻愪氦</button>
+ </view>
+ </view>
+ </uni-popup>
+
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ areaName: '',
+ locCode: '',
+ container: '',
+ list: [],
+ range: [],
+ curCode: ''
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ },
+ mounted() {},
+ methods: {
+ async search() {
+ const {
+ code,
+ data,
+ msg
+ } = await request(`/task/stock/${this.barcode}`)
+ if (code === 200) {
+ this.list = data.taskItems;
+ this.range = data.locArea.locs.map(el => el.code)
+ this.curCode = this.range[0]
+ this.areaName = data.locArea.areaName
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+ },
+
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.range = []
+ this.curCode = ''
+ this.areaName = ''
+ this.barcode = ''
+ },
+
+ open() {
+ this.$refs.popup.open()
+ },
+
+ close() {
+ this.$refs.popup.close()
+ },
+
+ popupSubmit() {
+ this.$refs.popup.close()
+ },
+ itemChange(el) {
+ this.curCode = el
+ },
+
+ async confirm() {
+ const {
+ code,
+ data,
+ msg
+ } = await request(`/task/public/${this.barcode}`
+ // , {
+ // curCode: this.curCode,
+ // barcode: this.barcode
+ // },
+ )
+ if (code === 200) {
+ uni.showToast({
+ title: '涓婃灦鎴愬姛'
+ })
+ this.clear()
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+
+
+
+ },
+
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
+
+ .uni-file-picker {
+ width: 100%;
+ margin-bottom: 10px;
+ }
+
+ .uni-select__selector {
+ z-index: 999;
+ }
+
+ .tj {
+ height: auto;
+ padding: 6px 8px;
+ display: inline-block;
+ border-radius: 6px;
+ }
+
+ .item {
+ display: flex;
+ justify-content: center;
+ }
+
+ .item .cu-btn {
+ font-size: 26upx;
+ }
</style>
\ No newline at end of file
diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue
index 59b15e7..8abe37d 100644
--- a/pages/mat/matSelected.vue
+++ b/pages/mat/matSelected.vue
@@ -24,7 +24,7 @@
<view class="form-item">
<view class="form-item-desc"><text>鏁伴噺</text></view>
<view class="form-item-content">
- <uni-number-box :value="mat.anfme" :max="99999999" :step='0.000001' color="#747474" @change="changeValue" />
+ <uni-number-box :value="mat.anfme" :max="99999999" :step="1" :decimal="2" color="#747474" @change="changeValue" />
</view>
</view>
</view>
diff --git a/pages/outbound/ModifyTaskBind.vue b/pages/outbound/ModifyTaskBind.vue
index b46a2b3..f297bac 100644
--- a/pages/outbound/ModifyTaskBind.vue
+++ b/pages/outbound/ModifyTaskBind.vue
@@ -25,7 +25,7 @@
<text class="text-gray">鍝佺鐮侊細<text>{{item.matnrCode}}</text></text>
</view>
<view class="content">
- <text class="text-gray">鍝佺被鏁伴噺锛�<text>{{item.anfme}}</text></text>
+ <text class="text-gray">鍝佺被鏁伴噺锛�<text>{{ $formatQty(item.anfme) }}</text></text>
</view>
</view>
<view class="cu-item">
diff --git a/pages/outbound/PickItemDetl.vue b/pages/outbound/PickItemDetl.vue
index 79cc1f6..d49e708 100644
--- a/pages/outbound/PickItemDetl.vue
+++ b/pages/outbound/PickItemDetl.vue
@@ -3,12 +3,12 @@
<view class="cu-list det menu sm-border">
<view class="cu-item">
<view class="content">
- <text class="text-gray">璁㈠崟鍙凤細<text class="text-black ">{{orderDetl.poCode}}</text></text>
+ <text class="text-gray">鍗曟嵁鍐呯爜锛�<text class="text-black ">{{orderDetl.poCode}}</text></text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">瀹瑰櫒鍙凤細<text class="text-black ">{{orderDetl.barcode}}</text></text>
+ <text class="text-gray">鏂欑鐮侊細<text class="text-black ">{{orderDetl.barcode}}</text></text>
</view>
</view>
<form>
@@ -52,7 +52,7 @@
<view class="title text-blue"><text class="text-red text-xl vertical-middle">*</text>鎷o細
</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item2.anfme"
- :step='0.00001'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
</view>
@@ -120,7 +120,7 @@
let that = this
if (that.barcode === '' || that.barcode === null) {
uni.showToast({
- title: "瀹瑰櫒鍙蜂负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "error",
})
return;
@@ -222,7 +222,7 @@
let that = this
if (that.barcode === '' || that.barcode === null) {
uni.showToast({
- title: "瀹瑰櫒鍙蜂负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "error",
})
return;
diff --git a/pages/outbound/fastPicking.vue b/pages/outbound/fastPicking.vue
index 1c79f53..bb7df78 100644
--- a/pages/outbound/fastPicking.vue
+++ b/pages/outbound/fastPicking.vue
@@ -2,8 +2,8 @@
<view class="has-foot">
<form>
<view class="cu-form-group" v-show="!isconfirm">
- <view class="title">瀹瑰櫒鐮�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄧ爜" v-model="barcode" focus @input="onBarcodeInput"></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode" focus @input="onBarcodeInput"></input>
<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
</view>
@@ -16,56 +16,57 @@
<view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
- <view :style="clickItem === index ?itemStyle : {}" class="cu-list det menu " >
-
-
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <!-- 鎸夊嚭搴撳崟鍒嗘ā鍧楋細涓や釜鍑哄簱鍗曞悓鐗╂枡鏃舵樉绀轰袱涓ā鍧� -->
+ <block v-for="(module, mIndex) in list" :key="'m' + mIndex">
+ <view class="cu-bar bg-blue solid-bottom margin-top-sm padding-sm">
<view class="action">
- <view class="index">
- {{index+1}}
+ <text class="text-white">鍑哄簱鍗� {{ mIndex + 1 }}锛歿{ module.orderCode || '鈥�' }}</text>
+ </view>
+ </view>
+ <block v-for="(item, index) in (module.items || [module])" :key="'i' + mIndex + '_' + index">
+ <view :style="clickItem === (mIndex + '_' + index) ? itemStyle : {}" class="cu-list det menu">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">{{ index + 1 }}</view>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">缂栫爜:<text class="text-black ">{{ item.matnrCode }}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍑哄簱鍗�:<text class="text-black ">{{ item.sourceCode || module.orderCode }}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鎵规:<text class="text-black ">{{ item.batch }}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">搴撳瓨鍗曚綅:<text class="text-black ">{{ item.unit }}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">璁″垝鍒嗘嫞鏁伴噺:<text class="text-black ">{{ $formatQty(item.anfme) }}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content2">
+ <text class="text-gray">鏈鍒嗘嫞鏁伴噺:</text>
+ <input type="number" step="1" :value="$formatQty((item.qty != null && item.qty > 0) ? item.qty : (item.anfme != null ? item.anfme : 0))" disabled=""></input>
+ </view>
</view>
</view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">缂栫爜:<text class="text-black ">{{item.matnrCode}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鍑哄簱鍗�:<text class="text-black ">{{item.sourceCode}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鎵规:<text class="text-black ">{{item.batch}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">搴撳瓨鍗曚綅:<text class="text-black ">{{item.unit}}</text></text>
- </view>
-
- </view>
-
-
- <view class="cu-item">
-
- <view class="content">
- <text class="text-gray">璁″垝鍒嗘嫞鏁伴噺:<text class="text-black ">{{item.anfme}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content2">
- <text class="text-gray">鏈鍒嗘嫞鏁伴噺:</text>
- <input type="number" v-model="item.anfme" disabled=""></input>
- </view>
-
- </view>
- </view>
+ </block>
</block>
+ <view v-if="list.length === 0 && allPickedDone" class="padding text-center text-gray">
+ <text>鍏ㄩ儴鎷h揣宸插畬鎴愶紝鐐瑰嚮銆屾彁浜ょ‘璁ゃ�嶇敓鎴愭嫞璐у叆搴撳崟</text>
+ </view>
</view>
@@ -110,7 +111,8 @@
},
repeatClick: false,
searchTimer: null, // 闃叉姈瀹氭椂鍣�
- isClearing: false // 鏍囪鏄惁姝e湪娓呯┖
+ isClearing: false, // 鏍囪鏄惁姝e湪娓呯┖
+ allPickedDone: false // 鍏ㄩ儴鎷e畬锛堜粎鏄剧ず鈥滄彁浜ょ‘璁も�濈敓鎴愭嫞璐у叆搴撳崟锛�
}
},
computed: {
@@ -120,7 +122,7 @@
}
},
watch: {
- // 鐩戝惉瀹瑰櫒鐮佸彉鍖栵紝鑷姩鏌ヨ
+ // 鐩戝惉鏂欑鐮佸彉鍖栵紝鑷姩鏌ヨ
barcode(newVal, oldVal) {
// 濡傛灉姝e湪娓呯┖锛屼笉瑙﹀彂鏌ヨ
if (this.isClearing) {
@@ -130,13 +132,13 @@
if (this.searchTimer) {
clearTimeout(this.searchTimer);
}
- // 濡傛灉瀹瑰櫒鐮佷笉涓虹┖锛屽欢杩�300ms鍚庤嚜鍔ㄦ煡璇紙闃叉姈澶勭悊锛�
+ // 濡傛灉鏂欑鐮佷笉涓虹┖锛屽欢杩�300ms鍚庤嚜鍔ㄦ煡璇紙闃叉姈澶勭悊锛�
if (newVal && newVal.trim() !== '') {
this.searchTimer = setTimeout(() => {
this.search();
}, 300);
} else {
- // 瀹瑰櫒鐮佷负绌烘椂锛屾竻绌哄垪琛�
+ // 鏂欑鐮佷负绌烘椂锛屾竻绌哄垪琛�
this.list = [];
}
}
@@ -162,25 +164,45 @@
},
async search() {
this.list = []
+ this.allPickedDone = false
if(this.barcode === '' || this.barcode ===null || this.barcode.trim() === ''){
return ;
}
- const {
- code,
- data,
- msg
- } = await request('/outStockTaskItem/'+this.barcode,{}, 'get')
- if (code === 200) {
- if (Object.keys(data).length === 0){
+ const res = await request('/outStockTaskItem/'+this.barcode,{}, 'get')
+ const code = res.code
+ const msg = res.msg
+ // 鎺ュ彛鍙兘杩斿洖 data 鍖呰9锛屼篃鍙兘 taskItems/orders/list 鍦ㄩ《灞�
+ const data = res.data != null ? res.data : res
+ if (code === 200) {
+ // 鍚屼竴绠辩爜鍙兘瀵瑰簲澶氫釜鍑哄簱鍗曪細浼樺厛鐢� orders 鍒嗘ā鍧楀睍绀哄鏉★紝鍚﹀垯鐢� list/taskItems 灞曞钩涓轰竴鏉℃ā鍧�
+ const orders = (data && data.orders) ? data.orders : null
+ const flatList = (data && data.list) ? data.list : (data && data.taskItems) ? data.taskItems : null
+ if (orders && orders.length > 0) {
+ this.list = orders
+ } else if (Array.isArray(data)) {
+ this.list = data.length ? [{ orderCode: '-', items: data }] : []
+ } else if (flatList && Array.isArray(flatList) && flatList.length > 0) {
+ this.list = [{ orderCode: '-', items: flatList }]
+ } else {
+ this.list = []
+ }
+ if (this.list.length === 0 && !(data && data.orders && data.orders.length === 0 && (data.msg === '鍏ㄩ儴鎷h揣宸插畬鎴�' || res.msg === '鍏ㄩ儴鎷h揣宸插畬鎴�'))) {
uni.showToast({
- title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
+ title: (data && data.msg) ? data.msg : (res.msg || "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�"),
icon: "none",
position: 'top'
})
}
- this.list.push(...data)
+ if (data && (data.msg === '鍏ㄩ儴鎷h揣宸插畬鎴�' || res.msg === '鍏ㄩ儴鎷h揣宸插畬鎴�' || (orders && orders.length === 0 && data.taskItems && data.taskItems.length > 0))) {
+ this.allPickedDone = true
+ uni.showToast({ title: '鍏ㄩ儴鎷h揣宸插畬鎴愶紝鍙偣鍑绘彁浜ょ‘璁ょ敓鎴愭嫞璐у叆搴撳崟', icon: 'none', duration: 2500 })
+ } else {
+ this.allPickedDone = false
+ }
}else if(code == 401){
+ this.list = []
+ this.allPickedDone = false
setTimeout(() => {
uni.removeStorageSync('token');
uni.reLaunch({
@@ -188,8 +210,11 @@
});
}, 1000);
}else {
+ // 鏈煡璇㈠埌寰呯‘璁や换鍔$瓑閿欒鏃舵竻绌哄垪琛紝閬垮厤宸茬‘璁�(200)鐨勪换鍔″啀娆″睍绀�
+ this.list = []
+ this.allPickedDone = false
uni.showToast({
- title: msg,
+ title: msg || '鏈煡璇㈠埌寰呯‘璁や换鍔★紝璇风瓑寰呮柊浠诲姟鎵ц瀹屾垚鍚庡啀鎵�',
icon: "none",
position: 'top'
})
@@ -201,12 +226,12 @@
let that = this
if(that.barcode === '' || that.barcode === null){
uni.showToast({
- title: "瀹瑰櫒鍙蜂负绌�",
+ title: "鏂欑鐮佷负绌�",
icon: "error",
})
return ;
}
- if(that.list === [] || that.list.length === 0){
+ if ((that.list === [] || that.list.length === 0) && !that.allPickedDone) {
uni.showToast({
title: "鎷h揣鏄庣粏涓虹┖",
icon: "error",
@@ -262,6 +287,7 @@
this.isClearing = true;
this.list = [];
this.barcode = '';
+ this.allPickedDone = false;
// 娓呯┖鍚庨噸缃爣璁帮紝鍏佽涓嬫鎵弿
this.$nextTick(() => {
this.isClearing = false;
diff --git a/pages/outbound/wavePickItem.vue b/pages/outbound/wavePickItem.vue
index 4134459..49a4b53 100644
--- a/pages/outbound/wavePickItem.vue
+++ b/pages/outbound/wavePickItem.vue
@@ -6,8 +6,8 @@
<text class="text-black ">{{wave.code}}</text>
</view> -->
<view class="cu-form-group" v-show="!isconfirm">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="barcode" focus></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode" focus></input>
<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
@@ -21,30 +21,31 @@
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">鍑哄簱鍗曞彿锛�<text class="text-black ">{{item2.orderCode}}</text></text>
+ <text class="text-gray">鍑哄簱鍗曞彿锛�<text class="text-black ">{{getOrderCode(item2)}}</text></text>
+ <text class="cu-tag sm bg-orange margin-left-sm" v-if="isAppendable(item2)">鍙拷鍔�</text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">DO鍗曞彿锛�<text class="text-black ">{{item2.poCode}}</text></text>
+ <text class="text-gray">鍗曟嵁鍐呯爜锛�<text class="text-black ">{{getPoCode(item2)}}</text></text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">鍝佺鍙风爜锛�<text class="text-black ">{{item2.matnrCode}}</text></text>
+ <text class="text-gray">鍝佺鍙风爜锛�<text class="text-black ">{{getMatnrCode(item2)}}</text></text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">鍝佺鍚嶇О锛�<text class="text-black ">{{item2.maktx}}</text></text>
+ <text class="text-gray">鍝佺鍚嶇О锛�<text class="text-black ">{{getMaktx(item2)}}</text></text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">闇�姹傛暟閲忥細<text class="text-black ">{{item2.anfme}}</text></text>
+ <text class="text-gray">闇�姹傛暟閲忥細<text class="text-black ">{{getAnfme(item2)}}</text></text>
</view>
<view class="content">
- <text class="text-gray">宸叉嫞鏁伴噺锛�<text class="text-black ">{{item2.qty}}</text></text>
+ <text class="text-gray">宸叉嫞鏁伴噺锛�<text class="text-black ">{{getQty(item2)}}</text></text>
</view>
</view>
</view>
@@ -101,18 +102,24 @@
this.search()
},
methods: {
+ getOrderCode(item) { return item && item.orderItem ? item.orderItem.orderCode : (item && item.orderCode) || '-' },
+ getPoCode(item) { return item && item.orderItem ? item.orderItem.poCode : (item && item.poCode) || '-' },
+ getMatnrCode(item) { return item && item.orderItem ? item.orderItem.matnrCode : (item && item.matnrCode) || '-' },
+ getMaktx(item) { return item && item.orderItem ? item.orderItem.maktx : (item && item.maktx) || '-' },
+ getAnfme(item) { return item && item.orderItem ? item.orderItem.anfme : (item && item.anfme) != null ? item.anfme : '-' },
+ getQty(item) { return item && item.orderItem ? item.orderItem.qty : (item && item.qty) != null ? item.qty : '-' },
+ isAppendable(item) { return item && item.appendable === true },
//鐐瑰嚮浜嬩欢
clickTaskItem(index) {
let that = this
+ const row = that.list[index]
+ const orderDetl = (row && row.orderItem) ? { ...row.orderItem, barcode: that.barcode } : { ...row, barcode: that.barcode }
uni.navigateTo({
url: "./PickItemDetl",
// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
success: function(res) {
res.eventChannel.emit('pickItemDetl', {
- data: {
- ...that.list[index],
- barcode: that.barcode,
- }
+ data: orderDetl
})
}
});
@@ -139,14 +146,15 @@
barcode: this.barcode
})
if (code === 200) {
- if (Object.keys(data).length === 0) {
+ const rawList = (data && data.list) ? data.list : (Array.isArray(data) ? data : [])
+ if (rawList.length === 0) {
uni.showToast({
title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
icon: "none",
position: 'top'
})
}
- that.list.push(...data)
+ that.list = rawList
console.log(that.list);
} else if (code == 401) {
@@ -175,6 +183,7 @@
})
return;
}
+ const containerWaveDtos = that.list.map(i => (i && i.orderItem) ? i.orderItem : i)
this.repeatClick = true
const {
code,
@@ -182,7 +191,7 @@
msg
} = await request('/saveWavePick', {
container: that.barcode,
- containerWaveDtos: that.list
+ containerWaveDtos
})
if (code === 200) {
uni.showToast({
diff --git a/pages/phyz/AGV/AGVPakin.vue b/pages/phyz/AGV/AGVPakin.vue
index ea319d6..07f8300 100644
--- a/pages/phyz/AGV/AGVPakin.vue
+++ b/pages/phyz/AGV/AGVPakin.vue
@@ -75,7 +75,7 @@
</view> -->
<view class="list-left-item">
<view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
+ <view class="left-item">{{ $formatQty(item.anfme) }}</view>
</view>
</view>
<view class="list-right">
@@ -117,7 +117,7 @@
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
diff --git a/pages/phyz/AGV/AGVPakin2.vue b/pages/phyz/AGV/AGVPakin2.vue
index fb8499c..9b1990b 100644
--- a/pages/phyz/AGV/AGVPakin2.vue
+++ b/pages/phyz/AGV/AGVPakin2.vue
@@ -75,7 +75,7 @@
</view> -->
<view class="list-left-item">
<view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
+ <view class="left-item">{{ $formatQty(item.anfme) }}</view>
</view>
</view>
<view class="list-right">
@@ -117,7 +117,7 @@
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
diff --git a/pages/phyz/AGV/AGVPakin3.vue b/pages/phyz/AGV/AGVPakin3.vue
index f1ba94c..5dbb58e 100644
--- a/pages/phyz/AGV/AGVPakin3.vue
+++ b/pages/phyz/AGV/AGVPakin3.vue
@@ -68,7 +68,7 @@
</view>
<view class="list-left-item">
<view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
+ <view class="left-item">{{ $formatQty(item.anfme) }}</view>
</view>
</view>
<view class="list-right">
@@ -105,7 +105,7 @@
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
diff --git a/pages/phyz/AGV/emptyOut.vue b/pages/phyz/AGV/emptyOut.vue
index b332125..8554d22 100644
--- a/pages/phyz/AGV/emptyOut.vue
+++ b/pages/phyz/AGV/emptyOut.vue
@@ -84,7 +84,7 @@
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
diff --git a/pages/phyz/AGV/emptyPakin.vue b/pages/phyz/AGV/emptyPakin.vue
index 85553be..6107148 100644
--- a/pages/phyz/AGV/emptyPakin.vue
+++ b/pages/phyz/AGV/emptyPakin.vue
@@ -79,7 +79,7 @@
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
<view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
diff --git a/pages/phyz/backStock/backStocksOrder.vue b/pages/phyz/backStock/backStocksOrder.vue
index 8480cd6..5f6f0a9 100644
--- a/pages/phyz/backStock/backStocksOrder.vue
+++ b/pages/phyz/backStock/backStocksOrder.vue
@@ -39,7 +39,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/bcp/bcpDbOrder.vue b/pages/phyz/bcp/bcpDbOrder.vue
index d7a2820..8cce740 100644
--- a/pages/phyz/bcp/bcpDbOrder.vue
+++ b/pages/phyz/bcp/bcpDbOrder.vue
@@ -39,7 +39,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/bcp/bcpDbOrderV2.vue b/pages/phyz/bcp/bcpDbOrderV2.vue
index 58adfa0..b9f241a 100644
--- a/pages/phyz/bcp/bcpDbOrderV2.vue
+++ b/pages/phyz/bcp/bcpDbOrderV2.vue
@@ -39,7 +39,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/bcp/bcpOrder.vue b/pages/phyz/bcp/bcpOrder.vue
index 00c7b03..c5e3546 100644
--- a/pages/phyz/bcp/bcpOrder.vue
+++ b/pages/phyz/bcp/bcpOrder.vue
@@ -46,7 +46,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/bcp/bcpOrder_xs.vue b/pages/phyz/bcp/bcpOrder_xs.vue
index 1947029..4168337 100644
--- a/pages/phyz/bcp/bcpOrder_xs.vue
+++ b/pages/phyz/bcp/bcpOrder_xs.vue
@@ -46,7 +46,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/bcp/orderCar.vue b/pages/phyz/bcp/orderCar.vue
index 336ded6..0c9fce5 100644
--- a/pages/phyz/bcp/orderCar.vue
+++ b/pages/phyz/bcp/orderCar.vue
@@ -28,7 +28,7 @@
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
<!-- <view class="popup-item-left">鍏ュ簱鏁伴噺:</view> -->
- <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" /></view>
+ <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" /></view>
</view>
<!-- <view class="popup-item">
diff --git a/pages/phyz/bcp/orderCar_xs.vue b/pages/phyz/bcp/orderCar_xs.vue
index 77b3a2c..0a612b1 100644
--- a/pages/phyz/bcp/orderCar_xs.vue
+++ b/pages/phyz/bcp/orderCar_xs.vue
@@ -28,7 +28,7 @@
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
<!-- <view class="popup-item-left">鍏ュ簱鏁伴噺:</view> -->
- <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" /></view>
+ <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" /></view>
</view>
<!-- <view class="popup-item">
diff --git a/pages/phyz/checkLocDetl/locDetlList.vue b/pages/phyz/checkLocDetl/locDetlList.vue
index 090c931..b423903 100644
--- a/pages/phyz/checkLocDetl/locDetlList.vue
+++ b/pages/phyz/checkLocDetl/locDetlList.vue
@@ -41,7 +41,7 @@
<uni-combox style="height: 20px;" :candidates="processSts$List" placeholder="璇烽�夋嫨宸ュ簭" v-model="processSts$"></uni-combox>
</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="remove()">绉婚櫎</view>
diff --git a/pages/phyz/checkLocDetl/locDetlList2.vue b/pages/phyz/checkLocDetl/locDetlList2.vue
index 2b89d45..fe85d71 100644
--- a/pages/phyz/checkLocDetl/locDetlList2.vue
+++ b/pages/phyz/checkLocDetl/locDetlList2.vue
@@ -41,7 +41,7 @@
<uni-combox style="height: 20px;" :candidates="processSts$List" placeholder="璇烽�夋嫨宸ュ簭" v-model="processSts$"></uni-combox>
</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="remove()">绉婚櫎</view>
diff --git a/pages/phyz/comOrder/checkOut.vue b/pages/phyz/comOrder/checkOut.vue
index 00a7570..f7246a6 100644
--- a/pages/phyz/comOrder/checkOut.vue
+++ b/pages/phyz/comOrder/checkOut.vue
@@ -40,7 +40,7 @@
<view class="title">鍑哄簱鏁伴噺</view>
<view class="popup-item">
<view>
- <uni-number-box :value="data.anfme" :step='0.000001' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
+ <uni-number-box :value="data.anfme" :step="1" :decimal="2" :min="0" :max="maxCount" color="#747474" @change="changeValue" />
</view>
</view>
diff --git a/pages/phyz/comOrder/orderCar.vue b/pages/phyz/comOrder/orderCar.vue
index 2aee0c7..4494a57 100644
--- a/pages/phyz/comOrder/orderCar.vue
+++ b/pages/phyz/comOrder/orderCar.vue
@@ -26,7 +26,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="remove()">绉婚櫎鐗╂枡</view>
diff --git a/pages/phyz/comOrder/orderIn.vue b/pages/phyz/comOrder/orderIn.vue
index 4948a3c..3319e29 100644
--- a/pages/phyz/comOrder/orderIn.vue
+++ b/pages/phyz/comOrder/orderIn.vue
@@ -46,7 +46,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/inStock/inStock.vue b/pages/phyz/inStock/inStock.vue
index ce7b76b..a2d61bd 100644
--- a/pages/phyz/inStock/inStock.vue
+++ b/pages/phyz/inStock/inStock.vue
@@ -2,8 +2,8 @@
<view class="has-foot">
<form>
<view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒缂栧彿</view>
- <input placeholder="璇锋壂瀹瑰櫒缂栧彿" v-model="barcode"></input>
+ <view class="title">鏂欑鐮�</view>
+ <input placeholder="璇锋壂鎻忔枡绠辩爜" v-model="barcode"></input>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
<view class="cu-form-group margin-bottom">
diff --git a/pages/phyz/mat/matSelected.vue b/pages/phyz/mat/matSelected.vue
index c282d78..a4774e8 100644
--- a/pages/phyz/mat/matSelected.vue
+++ b/pages/phyz/mat/matSelected.vue
@@ -32,7 +32,7 @@
<view class="form-item">
<view class="form-item-desc"><text>鏁伴噺</text></view>
<view class="form-item-content">
- <uni-number-box :value="mat.count" :max="99999999" :step='0.000001' color="#747474" @change="changeValue" />
+ <uni-number-box :value="mat.count" :max="99999999" :step="1" :decimal="2" color="#747474" @change="changeValue" />
</view>
</view>
</view>
diff --git a/pages/phyz/order/orderCar.vue b/pages/phyz/order/orderCar.vue
index 336ded6..0c9fce5 100644
--- a/pages/phyz/order/orderCar.vue
+++ b/pages/phyz/order/orderCar.vue
@@ -28,7 +28,7 @@
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
<!-- <view class="popup-item-left">鍏ュ簱鏁伴噺:</view> -->
- <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" /></view>
+ <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" /></view>
</view>
<!-- <view class="popup-item">
diff --git a/pages/phyz/order/pakinOrderSelect.vue b/pages/phyz/order/pakinOrderSelect.vue
index c98bee0..7ef685a 100644
--- a/pages/phyz/order/pakinOrderSelect.vue
+++ b/pages/phyz/order/pakinOrderSelect.vue
@@ -48,7 +48,7 @@
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
<!-- <view class="popup-item-left">鍏ュ簱鏁伴噺:</view> -->
- <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" /></view>
+ <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" /></view>
</view>
<!-- <view class="popup-item">
diff --git a/pages/phyz/order/pakinOrderSelectV2.vue b/pages/phyz/order/pakinOrderSelectV2.vue
index 9a27464..567fc09 100644
--- a/pages/phyz/order/pakinOrderSelectV2.vue
+++ b/pages/phyz/order/pakinOrderSelectV2.vue
@@ -48,7 +48,7 @@
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
<!-- <view class="popup-item-left">鍏ュ簱鏁伴噺:</view> -->
- <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" /></view>
+ <view class="popup-item-right" style="border: none;"><uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" /></view>
</view>
<!-- <view class="popup-item">
diff --git a/pages/phyz/orderOut/orderCheck.vue b/pages/phyz/orderOut/orderCheck.vue
index eab51cc..c57fb28 100644
--- a/pages/phyz/orderOut/orderCheck.vue
+++ b/pages/phyz/orderOut/orderCheck.vue
@@ -40,7 +40,7 @@
<view class="title">鍑哄簱鏁伴噺</view>
<view class="popup-item">
<view>
- <uni-number-box :value="data.anfme" :step='0.000001' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
+ <uni-number-box :value="data.anfme" :step="1" :decimal="2" :min="0" :max="maxCount" color="#747474" @change="changeValue" />
</view>
</view>
diff --git a/pages/phyz/orderOut/orderCheck_2.vue b/pages/phyz/orderOut/orderCheck_2.vue
index 54adfbb..ff43952 100644
--- a/pages/phyz/orderOut/orderCheck_2.vue
+++ b/pages/phyz/orderOut/orderCheck_2.vue
@@ -41,7 +41,7 @@
<view class="title">鍑哄簱鏁伴噺</view>
<view class="popup-item">
<view>
- <uni-number-box :value="data.anfme" :step='0.000001' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
+ <uni-number-box :value="data.anfme" :step="1" :decimal="2" :min="0" :max="maxCount" color="#747474" @change="changeValue" />
</view>
</view>
diff --git a/pages/phyz/processOrder/orderCheck.vue b/pages/phyz/processOrder/orderCheck.vue
index 87ae92d..ca9859c 100644
--- a/pages/phyz/processOrder/orderCheck.vue
+++ b/pages/phyz/processOrder/orderCheck.vue
@@ -40,7 +40,7 @@
<view class="title">鍑哄簱鏁伴噺</view>
<view class="popup-item">
<view>
- <uni-number-box :value="data.anfme" :step='0.000001' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
+ <uni-number-box :value="data.anfme" :step="1" :decimal="2" :min="0" :max="maxCount" color="#747474" @change="changeValue" />
</view>
</view>
diff --git a/pages/phyz/processOrder/orderCheck2.vue b/pages/phyz/processOrder/orderCheck2.vue
index 3bbdcfc..6cb995b 100644
--- a/pages/phyz/processOrder/orderCheck2.vue
+++ b/pages/phyz/processOrder/orderCheck2.vue
@@ -12,7 +12,7 @@
<view>宸ュ簭锛歿{data.processSts$}}</view>
<view>搴撳瓨鏁伴噺锛歿{count}}</view>
<view class="detl-threeCode" style="display: flex;padding: 32rpx 0;align-items: center;font-size: 24px;">
- <view>鍑哄簱鏁伴噺锛歿{data.anfme}}</view>
+ <view>鍑哄簱鏁伴噺锛歿{ $formatQty(data.anfme) }}</view>
<view style="margin-left: 50rpx;" @click="revise()">
<uni-icons type="compose" size="30" color="#fff"></uni-icons>
</view>
@@ -40,7 +40,7 @@
<view class="title">鍑哄簱鏁伴噺</view>
<view class="popup-item">
<view>
- <uni-number-box :value="data.anfme" :step='0.000001' :min="0" :max="count" color="#747474" @change="changeValue" />
+ <uni-number-box :value="data.anfme" :step="1" :decimal="2" :min="0" :max="count" color="#747474" @change="changeValue" />
</view>
</view>
diff --git a/pages/phyz/processOrder/processList.vue b/pages/phyz/processOrder/processList.vue
index a3fd4f7..1637216 100644
--- a/pages/phyz/processOrder/processList.vue
+++ b/pages/phyz/processOrder/processList.vue
@@ -16,7 +16,7 @@
<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
<view>搴撲綅鐘舵�侊細{{orderDetl.locSts$}}</view>
<view>宸ュ簭锛歿{orderDetl.processSts$}}</view>
- <view>搴撳瓨鏁伴噺锛歿{orderDetl.anfme}}</view>
+ <view>搴撳瓨鏁伴噺锛歿{ $formatQty(orderDetl.anfme) }}</view>
</view>
<view class="out-btn" @click="pakoutPrive(orderDetl)">
<view>鍑哄簱</view>
diff --git a/pages/phyz/processOrder/processOrder.vue b/pages/phyz/processOrder/processOrder.vue
index 1b8006e..68d205e 100644
--- a/pages/phyz/processOrder/processOrder.vue
+++ b/pages/phyz/processOrder/processOrder.vue
@@ -18,9 +18,9 @@
<view>缂栧彿锛歿{orderDetl.matnr}}</view>
<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
<view>绫诲瀷锛歿{orderDetl.brand}}</view>
- <view>璁㈠崟鏁伴噺锛歿{orderDetl.anfme}}</view>
+ <view>璁㈠崟鏁伴噺锛歿{ $formatQty(orderDetl.anfme) }}</view>
<view>寰呭姞宸ワ細{{orderDetl.stock}}</view>
- <view>宸插姞宸ワ細{{orderDetl.qty}}</view>
+ <view>宸插姞宸ワ細{{ $formatQty(orderDetl.qty) }}</view>
</view>
<view class="list-right" @click="goToLocDetl(orderDetl)">
<uni-icons type="right" size="25" color="#fff"></uni-icons>
diff --git a/pages/phyz/stationManage/confirmProcessed.vue b/pages/phyz/stationManage/confirmProcessed.vue
index 5e69136..2722d8b 100644
--- a/pages/phyz/stationManage/confirmProcessed.vue
+++ b/pages/phyz/stationManage/confirmProcessed.vue
@@ -15,7 +15,7 @@
<!-- <view>搴撲綅鐘舵�侊細{{orderDetl.locSts$}}</view> -->
<view>婧愬嚭搴撴暟閲忥細{{orderDetl.maxCount}}</view>
<view class="detl-threeCode" style="display: flex;padding: 32rpx 0;align-items: center;font-size: 24px;">
- <view>鍔犲伐鏁伴噺锛歿{orderDetl.anfme}}</view>
+ <view>鍔犲伐鏁伴噺锛歿{ $formatQty(orderDetl.anfme) }}</view>
<view style="margin-left: 50rpx;" @click="revise(orderDetl)">
<uni-icons type="compose" size="30" color="#fff"></uni-icons>
</view>
@@ -45,7 +45,7 @@
<view class="title">鍑哄簱鏁伴噺</view>
<view class="popup-item">
<view>
- <uni-number-box :value="data.anfme" :step='0.000001' :min="0" :max="maxCount" color="#747474" @change="changeValue" />
+ <uni-number-box :value="data.anfme" :step="1" :decimal="2" :min="0" :max="maxCount" color="#747474" @change="changeValue" />
</view>
</view>
diff --git a/pages/phyz/stationManage/pickAgain.vue b/pages/phyz/stationManage/pickAgain.vue
index 0eab053..ba2f17a 100644
--- a/pages/phyz/stationManage/pickAgain.vue
+++ b/pages/phyz/stationManage/pickAgain.vue
@@ -6,7 +6,7 @@
<view>涓诲崟鍙凤細{{orderDetl.orderNo}}</view>
<view>缂栧彿锛歿{orderDetl.matnr}}</view>
<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
- <view>搴撳瓨鏁伴噺锛歿{orderDetl.anfme}}</view>
+ <view>搴撳瓨鏁伴噺锛歿{ $formatQty(orderDetl.anfme) }}</view>
<view>璁㈠崟鍙嚭鏁伴噺锛歿{orderDetl.stock}}</view>
<view>宸叉嫞鏁伴噺锛歿{orderDetl.pickedAnfme}}</view>
<view>鎷f枡鏁伴噺锛歿{orderDetl.count}}</view>
@@ -25,7 +25,7 @@
<!-- 鏍囬 -->
<view class="title">鎷f枡鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="maxCount" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="maxCount" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/stationManage/stationDetl.vue b/pages/phyz/stationManage/stationDetl.vue
index 01a5687..181748a 100644
--- a/pages/phyz/stationManage/stationDetl.vue
+++ b/pages/phyz/stationManage/stationDetl.vue
@@ -39,7 +39,7 @@
<view>鍟嗗搧缂栫爜:{{wrkDetl.matnr}}</view>
<view>閿�鍞鍗曞彿:{{wrkDetl.threeCode ? wrkDetl.threeCode : ' --'}}</view>
<view>鑷敱椤�:{{wrkDetl.deadTime ? wrkDetl.deadTime : ' --'}}</view>
- <view>浣滀笟鏁伴噺:{{wrkDetl.anfme}}</view>
+ <view>浣滀笟鏁伴噺:{{ $formatQty(wrkDetl.anfme) }}</view>
</view>
</view>
@@ -54,7 +54,7 @@
<view>閿�鍞鍗曞彿:{{waitPakin.threeCode ? waitPakin.threeCode : ' --'}}</view>
<view>鑷敱椤�:{{waitPakin.deadTime ? waitPakin.deadTime : ' --'}}</view>
<view>鐘舵��:{{waitPakin.ioStatus$}}</view>
- <view>鍏ュ簱鏁伴噺:{{waitPakin.anfme}}</view>
+ <view>鍏ュ簱鏁伴噺:{{ $formatQty(waitPakin.anfme) }}</view>
</view>
</view>
diff --git a/pages/phyz/stationManage/stationManage.vue b/pages/phyz/stationManage/stationManage.vue
index 592f50d..7fe9d06 100644
--- a/pages/phyz/stationManage/stationManage.vue
+++ b/pages/phyz/stationManage/stationManage.vue
@@ -48,7 +48,7 @@
<view>鐗╂枡鍚嶇О锛歿{wrkMast.maktx}}</view>
<view>鎵瑰彿锛歿{wrkMast.batch}}</view>
<view>瑙勬牸锛歿{wrkMast.specs}}</view>
- <view>鏁伴噺锛歿{wrkMast.anfme}}</view>
+ <view>鏁伴噺锛歿{ $formatQty(wrkMast.anfme) }}</view>
</view>
</view>
@@ -58,7 +58,7 @@
<view>鐗╂枡鍚嶇О锛歿{wrkMast.maktx}}</view>
<view>鎵瑰彿锛歿{wrkMast.batch}}</view>
<view>瑙勬牸锛歿{wrkMast.specs}}</view>
- <view>鏁伴噺锛歿{wrkMast.anfme}}</view>
+ <view>鏁伴噺锛歿{ $formatQty(wrkMast.anfme) }}</view>
</view>
</view>
diff --git a/pages/phyz/waitOrder/waitOrderIn.vue b/pages/phyz/waitOrder/waitOrderIn.vue
index 5585a1c..681b97a 100644
--- a/pages/phyz/waitOrder/waitOrderIn.vue
+++ b/pages/phyz/waitOrder/waitOrderIn.vue
@@ -18,8 +18,8 @@
<view>缂栧彿锛歿{orderDetl.matnr}}</view>
<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
<view>绫诲瀷锛歿{orderDetl.brand}}</view>
- <view>鎬绘暟閲忥細{{orderDetl.anfme}}</view>
- <view>宸插叆鏁伴噺锛歿{orderDetl.qty}}</view>
+ <view>鎬绘暟閲忥細{{ $formatQty(orderDetl.anfme) }}</view>
+ <view>宸插叆鏁伴噺锛歿{ $formatQty(orderDetl.qty) }}</view>
</view>
<view class="list-right" @click="addItem(index)">
<uni-icons type="folder-add" size="25" color="#fff"></uni-icons>
@@ -46,7 +46,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/waitOrder/waitOrderOut.vue b/pages/phyz/waitOrder/waitOrderOut.vue
index b79743f..b59e4fc 100644
--- a/pages/phyz/waitOrder/waitOrderOut.vue
+++ b/pages/phyz/waitOrder/waitOrderOut.vue
@@ -18,9 +18,9 @@
<view>缂栧彿锛歿{orderDetl.matnr}}</view>
<view>鍚嶇О锛歿{orderDetl.maktx}}</view>
<view>绫诲瀷锛歿{orderDetl.brand}}</view>
- <view>璁㈠崟鏁伴噺锛歿{orderDetl.anfme}}</view>
+ <view>璁㈠崟鏁伴噺锛歿{ $formatQty(orderDetl.anfme) }}</view>
<view>搴撳瓨鏁伴噺锛歿{orderDetl.stock}}</view>
- <view>宸插嚭鏁伴噺锛歿{orderDetl.qty}}</view>
+ <view>宸插嚭鏁伴噺锛歿{ $formatQty(orderDetl.qty) }}</view>
</view>
<view class="list-right" @click="goToLocDetl(orderDetl)">
<uni-icons type="right" size="25" color="#fff"></uni-icons>
diff --git a/pages/phyz/wrkMast/DBList.vue b/pages/phyz/wrkMast/DBList.vue
index b95b776..6448840 100644
--- a/pages/phyz/wrkMast/DBList.vue
+++ b/pages/phyz/wrkMast/DBList.vue
@@ -39,7 +39,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/phyz/wrkMast/waitPakin.vue b/pages/phyz/wrkMast/waitPakin.vue
index d12aad3..360d08c 100644
--- a/pages/phyz/wrkMast/waitPakin.vue
+++ b/pages/phyz/wrkMast/waitPakin.vue
@@ -17,7 +17,7 @@
<view>鍟嗗搧缂栫爜锛歿{item.matnr}}</view>
<view>鍟嗗搧鍚嶇О锛歿{item.maktx}}</view>
<view>鍗曟嵁缂栧彿锛歿{item.orderNo}}</view>
- <view>鏁伴噺锛歿{item.anfme}}</view>
+ <view>鏁伴噺锛歿{ $formatQty(item.anfme) }}</view>
<!-- <view class="card-id">{{i + 1}}</view> -->
<view class="card-status-1" v-if="item.ioStatus == 'N'">寰呭叆搴�</view>
<view class="card-status-2" v-if="item.ioStatus == 'Y'">鍏ュ簱涓�</view>
diff --git a/pages/phyz/wrkMast/wrkDetl.vue b/pages/phyz/wrkMast/wrkDetl.vue
index 56495a6..8d55c46 100644
--- a/pages/phyz/wrkMast/wrkDetl.vue
+++ b/pages/phyz/wrkMast/wrkDetl.vue
@@ -11,9 +11,9 @@
<view>鍚嶇О锛歿{item.maktx}}</view>
<view>瑙勬牸锛歿{item.specs}}</view>
<view>鎵瑰彿锛歿{item.batch}}</view>
- <view class="list-anfme">鏁伴噺锛歿{item.anfme}}</view>
- <view class="list-qty-1" v-if="item.anfme > item.qty">浣滀笟鏁伴噺锛歿{item.qty}}</view>
- <view class="list-qty-2" v-if="item.anfme <= item.qty">浣滀笟鏁伴噺锛歿{item.qty}}</view>
+ <view class="list-anfme">鏁伴噺锛歿{ $formatQty(item.anfme) }}</view>
+ <view class="list-qty-1" v-if="item.anfme > item.qty">浣滀笟鏁伴噺锛歿{ $formatQty(item.qty) }}</view>
+ <view class="list-qty-2" v-if="item.anfme <= item.qty">浣滀笟鏁伴噺锛歿{ $formatQty(item.qty) }}</view>
</view>
</view>
<view style="height: 100rpx;"></view>
diff --git a/pages/phyz/wrkMast/wrkMast.vue b/pages/phyz/wrkMast/wrkMast.vue
index 43efc71..a69dd9f 100644
--- a/pages/phyz/wrkMast/wrkMast.vue
+++ b/pages/phyz/wrkMast/wrkMast.vue
@@ -38,7 +38,7 @@
<!-- 鏍囬 -->
<view class="title">鍏ュ簱鏁伴噺</view>
<view class="popup-item">
- <uni-number-box :value="count" :step='0.000001' :max="9999999" color="#747474" @change="changeValue" />
+ <uni-number-box :value="count" :step="1" :decimal="2" :max="9999999" color="#747474" @change="changeValue" />
</view>
<view class="btn">
<view class="btn-left" @click="addClose">鍙栨秷</view>
diff --git a/pages/rece/other.vue b/pages/rece/other.vue
index ea7e8cd..149035a 100644
--- a/pages/rece/other.vue
+++ b/pages/rece/other.vue
@@ -84,11 +84,11 @@
</view>
<view class="cu-item">
<view class="content">
- <text class="black">璁″垝鏀惰揣鏁伴噺:<text class="text-grey ">{{item.anfme}}</text></text>
+ <text class="black">璁″垝鏀惰揣鏁伴噺:<text class="text-grey ">{{ $formatQty(item.anfme) }}</text></text>
</view>
<view class="content">
- <text class="black">宸叉敹璐ф暟閲�:<text class="text-grey ">{{item.qty}}</text></text>
+ <text class="black">宸叉敹璐ф暟閲�:<text class="text-grey ">{{ $formatQty(item.qty) }}</text></text>
</view>
</view>
<view class="cu-item">
@@ -97,7 +97,7 @@
<view class="title text-blue"><text
class="text-red text-xl vertical-middle">*</text>鏀惰揣鏁伴噺:</view>
<uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty"
- :step='1'></uni-number-box>
+ :step="1" :decimal="2"></uni-number-box>
</view>
</view>
<view class="content" v-else>
diff --git a/pages/rece/standard.vue b/pages/rece/standard.vue
index 3d6731d..fc26ef1 100644
--- a/pages/rece/standard.vue
+++ b/pages/rece/standard.vue
@@ -1,340 +1,340 @@
-<template>
- <view class="has-foot">
- <form>
- <view class="cu-form-group" v-show="!isconfirm">
- <view class="title">鐗╂枡鏍囩</view>
- <input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode" @input="search()" focus></input>
- <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
- <text class='cuIcon-search text-blue' @click="search"></text>
- </view>
-
- </form>
-
- <view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- <view class="text-blue">
- {{`${item.maktx}`}}
- </view>
- </view>
- <view class="action" v-if="!isconfirm">
- <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">ASN:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
- </view>
- </view>
-
- <!-- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey ">{{item.splrBatch}}</text>
- </view>
- </view> -->
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">鏈�澶у簱瀛�: <text class="text-grey ">{{item.maxQty}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">瀹炴椂搴撳瓨: <text class="text-grey ">{{item.stockQty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">閲囪喘鍗曚綅:<text class="text-grey ">{{item.purUnit}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-blue">璁″垝鏀惰揣鏁伴噺:<text class="text-grey ">{{item.anfme}}</text></text>
- </view>
- <view class="content">
- <text class="text-black">宸叉敹鏁伴噺:<text class="text-grey ">{{item.qty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content" v-if="!isconfirm">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">鏀惰揣鏁伴噺:</view>
- <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty" :step='1'></uni-number-box>
- </view>
- </view>
- <view class="content" v-else>
- <text class="text-black">鏀惰揣鏁伴噺:<text class="text-grey ">{{item.receiptQty}}</text></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content" v-if="!isconfirm">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">渚涘簲鍟嗘壒娆�:</view>
- <input type="number" placeholder="璇疯緭鍏ヤ緵搴斿晢鎵规" v-model="item.splrBatch"></input>
- </view>
- </view>
- <view class="content" v-else>
- <text class="text-black">渚涘簲鍟嗘壒娆�:<text class="text-grey ">{{item.splrBatch}}</text></text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content" v-if="!isconfirm">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">鐢熶骇鏃ユ湡:</view>
- <picker mode="date" v-model="item.prodTime" @change="DateChange($event,item)"
- placeholder="璇疯緭鍏ョ敓浜ф棩鏈�">
- <view class="picker text-left">
- {{item.prodTime|| '璇烽�夋嫨鏃ユ湡'}}
- </view>
- </picker>
- </view>
- </view>
- <view class="content" v-else>
- <text class="text-black">鐢熶骇鏃ユ湡:<text class="text-grey ">{{item.prodTime}}</text></text>
- </view>
- </view>
-
-
- <view class="cu-item grid col-1" v-if="!isconfirm">
- <view v-for="el in dynamicFields" :key="el.id">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue">{{el.fieldsAlise}}:</view>
- <input :placeholder='`璇疯緭鍏�${el.fieldsAlise}`' v-model="item[el.fields]"></input>
- </view>
- </view>
- </view>
-
-
- <view class="cu-item grid col-2" v-if="isconfirm">
- <view class="item" v-for="el in dynamicFields" :key="el.id">
- <text class="text-black">{{el.fieldsAlise}}:
- <text class="text-grey ">{{item[el.fields]}}</text></text>
- </view>
-
- </view>
- </block>
- </view>
-
-
- <view class="text-blue text-right padding-lr" v-show="isconfirm">
- 鏈鏀惰揣鎬绘暟閲�:{{allCount}}
- </view>
-
- <view class="cu-form-group " v-show="isconfirm">
- <view class="title">鏀惰揣鍖�</view>
- <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
- @change="selChange"></uni-data-select>
- </view>
-
- <view class="cu-bar btn-group foot" v-show="!isconfirm">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" @click="next">涓嬩竴姝�</button>
- </view>
-
- <view class="cu-bar btn-group foot" v-show="isconfirm">
- <button class="cu-btn text-blue line-blue shadow" @click="prev">涓婁竴姝�</button>
- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鎻愪氦鏀惰揣</button>
- </view>
-
- </view>
-</template>
-
-<script>
- import {
- request
- } from '../../common/request.js'
- import {
- mapState,
- mapMutations,
- mapActions,
- mapGetters
- } from 'vuex';
- export default {
- data() {
- return {
- barcode: '',
- whAreaId: '',
- list: [],
- range: [],
- isconfirm: false,
- repeatClick: false,
- max: 99999999
- }
- },
- computed: {
- ...mapState('user', ['dynamicFields']),
- allCount() {
- return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
- }
- },
- mounted() {
- this.getRece()
- },
- methods: {
- async search() {
- const {
- code,
- data,
- msg
- } = await request('/orders/' + this.barcode, {}, "get")
- if (code === 200) {
- if (Object.keys(data).length === 0) {
- uni.showToast({
- title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
- icon: "none",
- position: 'top'
- })
- }
- this.list.push(...data)
-
- } else if (code == 401) {
- setTimeout(() => {
- uni.removeStorageSync('token');
- uni.reLaunch({
- url: "/pages/login/login"
- });
- }, 1000);
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
-
-
- },
- clearCode() {
- this.barcode = ''
- },
- remove(index) {
- this.list.splice(index, 1);
- },
- clear() {
- this.list = []
- this.barcode = ''
- },
- next() {
- if (this.list.length) {
- this.isconfirm = true
- } else {
- uni.showToast({
- icon: "none",
- title: '鏈�夌墿鏂欐爣绛�'
- })
- }
- },
- prev() {
- this.isconfirm = false
- },
- selChange(val) {
- uni.setStorageSync('whAreaId', val)
- },
- async confirm() {
- const newArr = this.list.map(item => {
- return {
- ...item,
- receiptQty: item.receiptQty === null ? 0 : +item.receiptQty
- };
- });
- if (this.whAreaId === '') {
- uni.showToast({
- icon: "none",
- title: '璇烽�夋嫨鏀惰揣鍖�'
- })
- } else {
- this.repeatClick = true
- const {
- code,
- data,
- msg
- } = await request('/orders/confirm', {
- receipts: newArr,
- whAreaId: this.whAreaId
- })
- if (code === 200) {
- uni.showToast({
- title: '鏀惰揣鎴愬姛'
- })
- this.list = []
- this.barcode = ''
- this.isconfirm = false
- } else {
- uni.showToast({
- title: msg,
- icon: "none",
- position: 'top'
- })
- }
- this.repeatClick = false
- }
- },
- async getRece() {
- const {
- code,
- data,
- msg
- } = await request('/areas/receipt', {}, 'get')
- if (code === 200) {
- this.range = data.map(item => ({
- value: item.id,
- text: item.name
- }));
- }
- },
- DateChange(e, item) {
- item.prodTime = e.detail.value
- }
- }
- }
-</script>
-
-<style>
- .index {
- border: 1px solid #e54d42;
- color: #e54d42;
- border-radius: 50%;
- display: block;
- width: 50rpx;
- height: 50rpx;
- line-height: 48rpx;
- text-align: center;
- margin-right: 20rpx;
- font-size: 30rpx;
- }
-
- .text-blue {
- color: #0081ff !important;
-
- }
-
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group" v-show="!isconfirm">
+ <view class="title">鐗╂枡鏍囩</view>
+ <input placeholder="璇锋壂鎻忕墿鏂欐爣绛�" v-model="barcode" @input="search()" focus></input>
+ <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+
+ </form>
+
+ <view class="cu-list det menu sm-border padding">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ {{`${item.maktx}`}}
+ </view>
+ </view>
+ <view class="action" v-if="!isconfirm">
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+
+ <!-- <view class="cu-item">
+ <view class="content">
+ <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.splrBatch}}</text>
+ </view>
+ </view> -->
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鏈�澶у簱瀛�: <text class="text-grey ">{{item.maxQty}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">瀹炴椂搴撳瓨: <text class="text-grey ">{{item.stockQty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">骞冲彴琛屽彿: <text class="text-grey ">{{item.platformId}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">閲囪喘鍗曚綅:<text class="text-grey ">{{item.purUnit}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-blue">璁″垝鏀惰揣鏁伴噺:<text class="text-grey ">{{item.anfme}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-black">宸叉敹鏁伴噺:<text class="text-grey ">{{item.qty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content" v-if="!isconfirm">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">鏀惰揣鏁伴噺:</view>
+ <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty" :step="1" :decimal="2"></uni-number-box>
+ </view>
+ </view>
+ <view class="content" v-else>
+ <text class="text-black">鏀惰揣鏁伴噺:<text class="text-grey ">{{item.receiptQty}}</text></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content" v-if="!isconfirm">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">渚涘簲鍟嗘壒娆�:</view>
+ <input type="number" placeholder="璇疯緭鍏ヤ緵搴斿晢鎵规" v-model="item.splrBatch"></input>
+ </view>
+ </view>
+ <view class="content" v-else>
+ <text class="text-black">渚涘簲鍟嗘壒娆�:<text class="text-grey ">{{item.splrBatch}}</text></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content" v-if="!isconfirm">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">鐢熶骇鏃ユ湡:</view>
+ <picker mode="date" v-model="item.prodTime" @change="DateChange($event,item)"
+ placeholder="璇疯緭鍏ョ敓浜ф棩鏈�">
+ <view class="picker text-left">
+ {{item.prodTime|| '璇烽�夋嫨鏃ユ湡'}}
+ </view>
+ </picker>
+ </view>
+ </view>
+ <view class="content" v-else>
+ <text class="text-black">鐢熶骇鏃ユ湡:<text class="text-grey ">{{item.prodTime}}</text></text>
+ </view>
+ </view>
+
+
+ <view class="cu-item grid col-1" v-if="!isconfirm">
+ <view v-for="el in dynamicFields" :key="el.id">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue">{{el.fieldsAlise}}:</view>
+ <input :placeholder='`璇疯緭鍏�${el.fieldsAlise}`' v-model="item[el.fields]"></input>
+ </view>
+ </view>
+ </view>
+
+
+ <view class="cu-item grid col-2" v-if="isconfirm">
+ <view class="item" v-for="el in dynamicFields" :key="el.id">
+ <text class="text-black">{{el.fieldsAlise}}:
+ <text class="text-grey ">{{item[el.fields]}}</text></text>
+ </view>
+
+ </view>
+ </block>
+ </view>
+
+
+ <view class="text-blue text-right padding-lr" v-show="isconfirm">
+ 鏈鏀惰揣鎬绘暟閲�:{{allCount}}
+ </view>
+
+ <view class="cu-form-group " v-show="isconfirm">
+ <view class="title">鏀惰揣鍖�</view>
+ <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
+ @change="selChange"></uni-data-select>
+ </view>
+
+ <view class="cu-bar btn-group foot" v-show="!isconfirm">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" @click="next">涓嬩竴姝�</button>
+ </view>
+
+ <view class="cu-bar btn-group foot" v-show="isconfirm">
+ <button class="cu-btn text-blue line-blue shadow" @click="prev">涓婁竴姝�</button>
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鎻愪氦鏀惰揣</button>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ whAreaId: '',
+ list: [],
+ range: [],
+ isconfirm: false,
+ repeatClick: false,
+ max: 99999999
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ allCount() {
+ return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
+ }
+ },
+ mounted() {
+ this.getRece()
+ },
+ methods: {
+ async search() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/orders/' + this.barcode, {}, "get")
+ if (code === 200) {
+ if (Object.keys(data).length === 0) {
+ uni.showToast({
+ title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
+ icon: "none",
+ position: 'top'
+ })
+ }
+ this.list.push(...data)
+
+ } else if (code == 401) {
+ setTimeout(() => {
+ uni.removeStorageSync('token');
+ uni.reLaunch({
+ url: "/pages/login/login"
+ });
+ }, 1000);
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
+
+ },
+ clearCode() {
+ this.barcode = ''
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.barcode = ''
+ },
+ next() {
+ if (this.list.length) {
+ this.isconfirm = true
+ } else {
+ uni.showToast({
+ icon: "none",
+ title: '鏈�夌墿鏂欐爣绛�'
+ })
+ }
+ },
+ prev() {
+ this.isconfirm = false
+ },
+ selChange(val) {
+ uni.setStorageSync('whAreaId', val)
+ },
+ async confirm() {
+ const newArr = this.list.map(item => {
+ return {
+ ...item,
+ receiptQty: item.receiptQty === null ? 0 : +item.receiptQty
+ };
+ });
+ if (this.whAreaId === '') {
+ uni.showToast({
+ icon: "none",
+ title: '璇烽�夋嫨鏀惰揣鍖�'
+ })
+ } else {
+ this.repeatClick = true
+ const {
+ code,
+ data,
+ msg
+ } = await request('/orders/confirm', {
+ receipts: newArr,
+ whAreaId: this.whAreaId
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: '鏀惰揣鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ this.isconfirm = false
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ this.repeatClick = false
+ }
+ },
+ async getRece() {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/areas/receipt', {}, 'get')
+ if (code === 200) {
+ this.range = data.map(item => ({
+ value: item.id,
+ text: item.name
+ }));
+ }
+ },
+ DateChange(e, item) {
+ item.prodTime = e.detail.value
+ }
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1