From c77ccb14bc6540a59bfe298af2c36e2f88c31910 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 13 12月 2024 16:57:18 +0800
Subject: [PATCH] 222
---
LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue | 686 +++++++++++++++++++--------------------------------------
1 files changed, 228 insertions(+), 458 deletions(-)
diff --git a/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue b/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
index d002003..38fb9ea 100644
--- a/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
+++ b/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
@@ -6,7 +6,7 @@
</cu-custom>
<u-form
labelPosition="left"
- label-width="180rpx"
+ label-width="250rpx"
:model="warehouse"
ref="warehouseRef"
>
@@ -16,13 +16,14 @@
>
<u-col span="12">
<u-form-item
- label="鍖呰鍙�:"
- prop="packageCode"
+ label="鍖呰鍙�/閮ㄤ欢鏉$爜:"
+ prop="upi"
required
class="uFormItem"
>
<u-input
- v-model.trim="warehouse.packageCode"
+ v-model.trim="warehouse.upi"
+ @focus="warehouse.upi = ''"
@confirm="getContainerData(1)"
placeholder="璇峰綍鍏ユ垨鎵爜"
class="width"
@@ -32,12 +33,12 @@
</u-form-item>
</u-col>
</u-row>
- <u-row
+ <!-- <u-row
class="border_bottom margin_top10rpx padding_left25rpx"
style="background-color: #fff"
>
<u-col span="12">
- <u-form-item label="鏉夸欢鍙�:" class="uFormItem">
+ <u-form-item label=":" class="uFormItem">
<u-input
v-model="warehouse.upi"
ref="materialRef"
@@ -50,8 +51,9 @@
</u-input>
</u-form-item>
</u-col>
- </u-row>
+ </u-row> -->
</u-form>
+
<!-- 鍒楄〃 -->
<view class="margin_top10rpx">
<u-swipe-action
@@ -72,10 +74,9 @@
:class="item.checked ? 'bg_item' : ''"
class="fontSize32rpx width margin_auto background_fff padding10 relative box_sizing transition"
>
- <!-- 閮ㄤ欢鍚嶇О upi銆佹潗鏂欍�佸昂瀵革紝浣嶇疆銆佹澘浠剁姸鎬� -->
<u-row>
<u-col span="12" class="flex align-center">
- <u-checkbox v-model="item.checked" size="50rpx"></u-checkbox>
+ <!-- <u-checkbox v-model="item.checked" size="50rpx"></u-checkbox> -->
<view
class="flex justify-center align-center"
style="
@@ -93,34 +94,77 @@
</text>
</u-col>
</u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ <text class="color_80"> 娆″簭锛歿{ item.shelf }} </text>
+ </text>
+ </u-col>
+ </u-row>
<u-row>
- <u-col span="8">
+ <u-col span="12">
<text class="color_80 padding_left25rpx">
閮ㄤ欢鍚嶇О锛� {{ item.detailName }}
</text>
</u-col>
- <u-col span="4">
- <text class="color_80"> 浣嶇疆锛歿{ item.location }} </text>
+ </u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ 浣嶇疆锛歿{ getAreaCodeEnumName(item.areaCode) }}
+ </text>
</u-col>
</u-row>
<u-row>
- <u-col span="8">
+ <u-col span="12">
<text class="color_80 padding_left25rpx">
鏉愭枡锛歿{ item.info18 }}
</text>
</u-col>
- <u-col span="4">
- <text class="color_80"> 灏哄锛歿{ item.info16 }} </text>
+ </u-row>
+
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ <text class="color_80"> 灏哄锛歿{ item.info16 }} </text>
+ </text>
</u-col>
</u-row>
<u-row>
- <u-col span="8">
+ <u-col span="12">
<text class="color_80 padding_left25rpx">
- 鏉夸欢鐘舵�侊細{{ item.upiStatus }}
+ 鏉夸欢鐘舵�侊細{{ getEnumName(item.upiStatus) }}
</text>
</u-col>
- <u-col span="4">
- <text class="color_80"> 娆″簭锛歿{ item.shelf }} </text>
+ </u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ 鏍囪锛歿{ getUpiFlagEnumName(item.upiFlag) }}
+ </text>
+ </u-col>
+ </u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ <text class="color_80"> 鐢熶骇鍗曞彿锛歿{ item.info5 }} </text>
+ </text>
+ </u-col>
+ </u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ <text class="color_80">
+ 鍖呰缂栧彿锛歿{ item.packageCode }}</text
+ >
+ </text>
+ </u-col>
+ </u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ <text class="color_80"> 鎵规鍙凤細{{ item.planNo }}</text>
+ </text>
</u-col>
</u-row>
</view>
@@ -135,48 +179,127 @@
@close="detailshow = false"
mode="bottom"
>
- <!-- <view class="pop "> -->
- <h2 class="text_align_center padding_bottom18 padding15">鐗╂枡淇℃伅</h2>
- <view class="line flex justify-between">
- <text class="text-gray">鐗╂枡缂栧彿</text>
- <text>{{ this.materlist.materialCode }}</text>
- </view>
- <view class="line flex justify-between">
- <text class="text-gray">鐗╂枡鍚嶇О</text>
- <text>{{ this.materlist.materialName }}</text>
- </view>
- <view class="line flex justify-between">
- <text class="text-gray">鐗╂枡灏忕被</text>
- <text>{{ this.materlist.materialTypeName }}</text>
- </view>
- <view class="line flex justify-between">
- <text class="text-gray">鎵规</text>
- <text>{{ this.materlist.batchNo }}</text>
- </view>
- <view class="line flex justify-between">
- <text class="text-gray">鐗╂枡瑙勬牸</text>
- <text>{{ this.materlist.specificationModel }}</text>
- </view>
- <view class="line flex justify-between">
- <text class="text-gray">鏁伴噺</text>
- <text>{{ this.materlist.unBindQuantity }}</text>
- </view>
- <!-- </view> -->
- <view class="margin_top140rpx">
- <button-modal
- :subShow="true"
- garmenTitle="鎵撳嵃"
- @submit="init"
- @reset="rest"
- />
- </view>
+ <h2 class="text_align_center padding_bottom18 padding15">淇℃伅</h2>
+ <div style="height: 400px; overflow-y: auto; padding: 0 15rpx">
+ <view class="line flex justify-between">
+ <text class="text-gray">璁㈠崟鍙�</text>
+ <text>{{ materlist.orderId }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">闀�</text>
+ <text>{{ materlist.length }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">瀹�</text>
+ <text>{{ materlist.width }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鍘�</text>
+ <text>{{ materlist.thk }}</text>
+ </view>
+ <!-- <view class="line flex justify-between">
+ <text class="text-gray">琛屽彿</text>
+ <text>{{ materlist.lineNumber }}</text>
+ </view> -->
+ <!-- <view class="line flex justify-between">
+ <text class="text-gray">閮ㄤ欢绾圭悊</text>
+ <text>{{ materlist.Matgrid }}</text>
+ </view> -->
+ <!-- <view class="line flex justify-between">
+ <text class="text-gray">鎵撳瓟璁惧缂栧彿</text>
+ <text>{{ materlist.DRNum }}</text>
+ </view> -->
+
+ <!-- <view class="line flex justify-between">
+ <text class="text-gray">閿垏鍥惧彿</text>
+ <text>{{ materlist.materialIndex }}</text>
+ </view> -->
+
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰X鍧愭爣</text>
+ <text>{{ materlist.machineXCenter }}</text>
+ </view>
+
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰Y鍧愭爣</text>
+ <text>{{ materlist.machineYCenter }}</text>
+ </view>
+
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰Z鍧愭爣</text>
+ <text>{{ materlist.machineZCenter }}</text>
+ </view>
+ <!-- <view class="line flex justify-between">
+ <text class="text-gray">杞悜瑙掑害</text>
+ <text>{{ materlist.rotation }}</text>
+ </view> -->
+ <view class="line flex justify-between">
+ <text class="text-gray">灞傛暟</text>
+ <text>{{ materlist.sequence }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">閿�鍞悎鍚屽崟鍙�</text>
+ <text>{{ materlist.info4 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鐢熶骇鍗曞彿</text>
+ <text>{{ materlist.info5 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">绗嚑鍖�</text>
+ <text>{{ materlist.info6 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">缁忛攢搴楀悕绉�</text>
+ <text>{{ materlist.info7 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">浜у搧鍚嶇О</text>
+ <text>{{ materlist.info8 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰缂栫爜</text>
+ <text>{{ materlist.info9 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">瀹㈡埛鍚嶇О</text>
+ <text>{{ materlist.info10 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鑷彁鎴栧彂璐�</text>
+ <text>{{ materlist.info11 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰閮ㄤ欢鎬绘暟閲�</text>
+ <text>{{ materlist.info12 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰闈㈢Н</text>
+ <text>{{ materlist.info13 }}</text>
+ </view>
+ <!-- <view class="line flex justify-between">
+ <text class="text-gray">閮ㄤ欢鍚嶇О</text>
+ <text>{{ materlist.info14 }}</text>
+ </view> -->
+ <view class="line flex justify-between">
+ <text class="text-gray">閮ㄤ欢鏁伴噺</text>
+ <text>{{ materlist.info15 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">閮ㄤ欢灏哄</text>
+ <text>{{ materlist.info16 }}</text>
+ </view>
+ <view class="line flex justify-between">
+ <text class="text-gray">鍖呰鏈烘鎵嬫棆杞�</text>
+ <text>{{ materlist.info17 }}</text>
+ </view>
+ </div>
</u-popup>
<button-modal
- :empTytowerShow="true"
- cleaningTitle="閲嶇疆"
- garmenTitle="鐗╂枡瑙g粦"
- @submit="submit"
- @reset="back"
+ :subShow="true"
+ garmenTitle="閲嶇疆"
+ @submit="rest"
+ @reset="rest"
/>
</view>
</template>
@@ -197,7 +320,7 @@
return {
operator: "",
warehouse: {
- packageCode: "",
+ upi: "",
materialCode: "",
dutyCycle: "",
gridNumber: 1,
@@ -212,7 +335,7 @@
resmessage: "",
options: [
{
- text: "鎵撳嵃",
+ text: "璇︽儏",
style: {
backgroundColor: "#fc9f35",
},
@@ -228,24 +351,51 @@
gridFocus: false,
gridable: true,
kwbhAllowed: false,
+ enumList: [],
+ areaCodeEnum: [],
+ upiFlagEnum: [],
};
},
components: {
ButtonModal,
ModalCode,
},
- onLoad() {
- this.operator = JSON.parse(uni.getStorageSync("userInfo")).name;
- },
- mounted() {
+ created() {
getenumDataList({
EnumName: "UpiStatusEnum",
}).then((res) => {
- this.singlist = res.data.result || [];
+ this.enumList = res.result || [];
});
+
+ getenumDataList({
+ EnumName: "AreaCodeEnum",
+ }).then((res) => {
+ this.areaCodeEnum = res.result || [];
+ });
+ getenumDataList({
+ EnumName: "UpiFlagEnum",
+ }).then((res) => {
+ this.upiFlagEnum = res.result || [];
+ });
},
+ onLoad() {
+ this.operator = JSON.parse(uni.getStorageSync("userInfo")).name;
+ },
+ mounted() {},
methods: {
+ getEnumName(value) {
+ const name = this.enumList.find((item) => item.value === value);
+ return name ? name.name : "";
+ },
+ getAreaCodeEnumName(value) {
+ const name = this.areaCodeEnum.find((item) => item.value === value);
+ return name ? name.name : "";
+ },
+ getUpiFlagEnumName(value) {
+ const name = this.upiFlagEnum.find((item) => item.value === value);
+ return name ? name.name : "";
+ },
// 濡傛灉鎵撳紑涓�涓殑鏃跺�欙紝涓嶉渶瑕佸叧闂叾浠栵紝鍒欐棤闇�瀹炵幇鏈柟娉�
open(index) {
// 鍏堝皢姝e湪琚搷浣滅殑swipeAction鏍囪涓烘墦寮�鐘舵�侊紝鍚﹀垯鐢变簬props鐨勭壒鎬ч檺鍒讹紝
@@ -263,428 +413,48 @@
this.materlist = this.singlist[index];
this.detailshow = true;
},
- //鏍囩閲嶆柊鎵撳嵃
- init() {
- const arr = ["materialCode", "unBindQuantity"];
- const arrzw = ["鐗╂枡缂栧彿", "鏈瑙g粦鏁伴噺"];
- let isAllow = "";
- Object.keys(this.materlist).forEach((item) => {
- if (arr.includes(item)) {
- if (!this.materlist[item]) {
- isAllow = arr.indexOf(item);
- // this.rescode = 400
- // this.resmessage = `${arrzw[isAllow]}涓虹┖锛屼笉鑳界户缁墦鍗癭
- // this.resmessage = `${item}涓虹┖锛屼笉鑳界户缁墦鍗癭
- // this.$refs.resmodal.show = true
- return;
- }
- }
- });
- if (isAllow != "") {
- this.detailshow = false;
- this.rescode = 400;
- this.resmessage = `${arrzw[isAllow]}涓虹┖锛屼笉鑳界户缁墦鍗癭;
- this.$refs.resmodal.show = true;
- return;
- }
- if (
- this.materlist.unBindQuantity <= 0 ||
- this.materlist.unBindQuantity > this.materlist.quantity
- ) {
- this.detailshow = false;
- this.rescode = 400;
- this.resmessage = `鏁伴噺涓嶇鍚堣鑼冿紝涓嶈兘缁х画鎵撳嵃`;
- this.$refs.resmodal.show = true;
- return;
- }
- if (!this.materlist.specificationModel) {
- this.materlist.specificationModel = "";
- }
- let ptintContext = [
- {
- type: "text",
- x: 0,
- y: 0,
- text: "",
- size: 2,
- rotate: 0,
- bold: 0,
- underline: false,
- reverse: false,
- },
- {
- type: "text",
- x: 0,
- y: 0,
- text: "",
- size: 2,
- rotate: 0,
- bold: 0,
- underline: false,
- reverse: false,
- },
- {
- type: "text",
- x: 0,
- y: 0,
- text: "",
- size: 2,
- rotate: 0,
- bold: 0,
- underline: false,
- reverse: false,
- },
- /* 浠ヤ笂绌烘暟鎹紝涓洪槻姝涪鍖呮椂鎵撳嵃涓嶆甯� */
- { type: "line", x1: 3, y1: 3, x2: 565, y2: 3, width: 2 },
- { type: "line", x1: 3, y1: 3, x2: 3, y2: 345, width: 2 },
- { type: "line", x1: 3, y1: 345, x2: 565, y2: 345, width: 2 },
- { type: "line", x1: 565, y1: 345, x2: 565, y2: 3, width: 2 },
- {
- type: "text",
- x: 80,
- y: 15,
- text: "鐗ч噹姹借溅瑁呭(姝︽眽)鏈夐檺鍏徃",
- size: 3,
- rotate: 0,
- bold: 1,
- underline: false,
- reverse: false,
- },
- { type: "line", x1: 3, y1: 60, x2: 565, y2: 60, width: 2 },
- {
- type: "text",
- x: 10,
- y: 75,
- text: `鐗╂枡缂栧彿: ${this.materlist.materialCode}`,
- size: 2,
- rotate: 0,
- bold: 1,
- underline: false,
- reverse: false,
- },
- { type: "line", x1: 3, y1: 110, x2: 380, y2: 110, width: 2 },
- {
- type: "text",
- x: 10,
- y: 125,
- text: `鐗╂枡鍚嶇О: ${this.materlist.materialTypeName || ""}`,
- size: 2,
- rotate: 0,
- bold: 1,
- underline: false,
- reverse: false,
- },
- { type: "line", x1: 3, y1: 160, x2: 380, y2: 160, width: 2 },
- {
- type: "text",
- x: 10,
- y: 175,
- text: `鎵规: ${this.materlist.batchNo}`,
- size: 2,
- rotate: 0,
- bold: 1,
- underline: false,
- reverse: false,
- },
- { type: "line", x1: 3, y1: 210, x2: 565, y2: 210, width: 2 },
- { type: "line", x1: 380, y1: 60, x2: 380, y2: 210, width: 2 },
- {
- type: "qr",
- x: 410,
- y: 72,
- text: `PARTS NUMBER: ${this.materlist.materialCode},SAP: ${
- this.materlist.sap_Location || ""
- },BOXNUM: ${this.materlist.boxNo || ""},LOT NO: ${
- this.materlist.batchNo
- },QUANTITY: ${this.materlist.unBindQuantity}`,
- width: 3,
- level: 1,
- },
- {
- type: "text",
- x: 10,
- y: 225,
- text: `瑙勬牸鍨嬪彿: ${
- this.materlist.specificationModel.length > 32
- ? this.materlist.specificationModel.substr(0, 32)
- : this.materlist.specificationModel
- }`,
- size: 2,
- rotate: 0,
- bold: 1,
- underline: false,
- reverse: false,
- },
- { type: "line", x1: 3, y1: 260, x2: 565, y2: 260, width: 2 },
- {
- type: "text",
- x: 120,
- y: 290,
- text: "MAKINO J(CHINA) CO.LTD",
- size: 3,
- rotate: 0,
- bold: 1,
- underline: false,
- reverse: false,
- },
- ];
- console.log(ptintContext);
- BluePrint.print(this.$store, ptintContext)
- .then(() => {
- // 鍏抽棴寮规 骞舵仮澶嶆粦鍔ㄥ潡
- this.detailshow = false;
- this.addForm.code = this.materlist.materlist;
- this.addForm.name = this.materlist.materialName;
- this.addForm.batchNo = this.materlist.batchNo;
- this.addForm.specificationModel = this.materlist.specificationModel;
- addPrintRecord(this.addForm).then((res) => {
- console.log(res);
- });
- uni.showToast({
- title: "鎵撳嵃鎴愬姛",
- duration: 2000,
- });
- })
- .catch((err) => {
- // uni.showToast({
- // title:'鎵撳嵃澶辫触',
- // duration: 2000
- // })
- });
- },
- materialBlur() {
- clearTimeout(this.timerSm);
- this.timerSm = null;
- if (this.warehouse.materialCode == "") {
- return;
- }
- this.timer = setTimeout(() => {
- //澶氭瑙﹀彂bug 寤惰繜bug
- //鍒ゆ柇褰撳墠鐗╂枡鏄惁鍦ㄧ洏鐐瑰垪琛ㄤ腑
- const index = this.singlist.findIndex(
- (item) =>
- item.materialCode == this.warehouse.materialCode &&
- item.batchNo == lotNo
- );
- if (index > -1) {
- this.singlist[index].checked = 1;
- this.singlist.unshift(...this.singlist.splice(index, 1));
- return;
- } else {
- clearTimeout(this.timer);
- this.timer = null;
- this.containerBlur();
- }
- }, 100);
+ rest() {
+ this.warehouse.upi = "";
+ this.warehouse.upi = "";
+ this.singlist = [];
},
- containerBlur() {
- if (
- this.warehouse.packageCode == "" ||
- this.warehouse.materialCode == ""
- ) {
- return;
- }
- getContainerMaterial(this.warehouse).then((res) => {
- if (res.data == null || res.data.length == 0) {
- this.rescode = 400;
- this.resmessage = "鏆傛棤鏁版嵁";
- this.$refs.resmodal.show = true;
- return;
- }
- this.warehouse.dutyCycle = res.data[0].dutyCycle || 0;
- //缁欐墍鏈夌殑鏉愭枡涓�涓湭閫変腑鐨勭姸鎬�
- res.data.map((item) => {
- (item.checked = true), (item.unBindQuantity = "");
- });
- this.singlist.unshift(...res.data);
- this.ordersId = res.data[0].ordersId;
- });
- },
- //瑙g粦鏁伴噺澶辩劍浜嬩欢
- changeNum(option) {
- //鍒ゆ柇鏄惁鍕鹃�夛紝濡傛灉鍕鹃�変簡锛屽氨瑕佸鏁伴噺鏍¢獙
- if (!option.checked) {
- return;
- }
- if (option.unBindQuantity == "") {
- this.rescode = 400;
- this.resmessage = "瑙g粦鏁伴噺涓嶈兘涓虹┖";
- this.$refs.resmodal.show = true;
- }
-
- if (option.unBindQuantity <= 0) {
- this.rescode = 400;
- this.resmessage = "瑙g粦鏁伴噺蹇呴』澶т簬0";
- this.$refs.resmodal.show = true;
- }
- if (option.unBindQuantity > option.quantity) {
- this.rescode = 400;
- this.resmessage = "瑙g粦鏁伴噺涓嶈兘澶т簬搴撳瓨鏁伴噺";
- this.$refs.resmodal.show = true;
- }
- if (this.detailable) {
- let filterHas = this.singlist.filter(
- (item) => item.unBindQuantity == Number(item.quantity)
- );
- if (filterHas.length > 0) {
- this.warehouse.exitNumber =
- this.warehouse.useNumber - filterHas.length;
- }
- }
- },
- //纭瑙g粦
- submit() {
- const filterArr = this.singlist.filter((item) => item.checked);
- if (filterArr.length <= 0) {
- this.rescode = 400;
- this.resmessage = "璇烽�夋嫨瑙g粦鐨勭墿鏂欙紒";
- this.$refs.resmodal.show = true;
- return;
- }
- //鍒ゆ柇閫変腑鐨勯噷闈㈡槸鍚﹀瓨鍦ㄨВ缁戠殑鏁伴噺涓嶇鍚堣鑼冪殑
- // const index = filterArr.findIndex(item => item.unBindQuantity == '' || item.unBindQuantity <= 0 || item.unBindQuantity > item.quantity)
- // if (index > -1) {
- // this.rescode = 400
- // this.resmessage = '瑙g粦鏁伴噺涓嶇鍚堣姹�'
- // this.$refs.resmodal.show = true
- // return
- // }
- const warehousOrderDetails = filterArr.reduce((curr, item) => {
- curr.push({
- ...item,
- });
- return curr;
- }, []);
- const params = {
- flag: 3, //3锛氱墿鏂欒В缁�
- packageCode: this.warehouse.packageCode,
- orderDetails: warehousOrderDetails,
- };
- uni.showModal({
- title: "瑙g粦",
- content: "鏄惁纭瑙g粦锛�",
- showCancel: true,
- cancelColor: "#333333",
- success: (res) => {
- if (res.confirm) {
- unbindOrder(params).then((res) => {
- this.rescode = 200;
- this.$refs.resmodal.show = true;
- this.resmessage = "瑙g粦鎴愬姛";
- this.back();
- });
- } else if (res.cancel) {
- }
- },
- });
- },
- rest() {},
//妫�鏌ュ鍣ㄦ爡鏍兼暟
checkGrid() {},
//鑾峰彇瀹瑰櫒鐨勪俊鎭�
getContainerData(param) {
- if (param == 1) {
- this.warehouse.upi = "";
- }
- if (this.warehouse.packageCode == "") {
+ if (!this.warehouse.upi) {
uni.showToast({
- title: "璇锋壂瀹瑰櫒缂栧彿",
+ title: "璇锋壂鍖呰鍙�",
icon: "none",
duration: 2000,
});
return;
}
getBhbMaterialList({
- packageCode: this.warehouse.packageCode,
upi: this.warehouse.upi,
}).then((res) => {
- // //debugger
const result = res.result;
if (Array.isArray(result) && result.length == 0) {
uni.showToast({
- title: "鏁版嵁涓嶅瓨鍦�",
+ title: "娌℃湁鏌ュ埌鏁版嵁",
icon: "none",
- duration: 2000,
+ duration: 5000,
});
+ this.singlist = [];
return;
- // this.kwbhAllowed = true
}
- //瀹瑰櫒缂栧彿鍏ュ彛
- // if (param == 1) {
- // }
- if (res.result && res.result.length == 1) {
- res.result[0].checked = true;
- }
- this.singlist = res.result;
-
- //鐗╂枡鍏ュ彛 鏍规嵁id 鍒ゆ柇鐗╂枡鏄惁瀛樺湪
- // res.result.forEach(item => {
- // let index = this.singlist.findIndex(v => v.upi == item.upi);
- // if (index == -1) {
-
- // this.singlist.unshift({
- // ...item
- // })
- // }
- // });
+ this.singlist = result;
});
},
- onlyUpdateDutyCycleClick() {
- this.$refs.warehouseRef.setRules(this.warehouseRules);
- this.$refs.warehouseRef.validate((valid) => {
- if (valid) {
- //璇锋眰鍙傛暟
- let params = {
- warepackageCode: this.warehouse.packageCode,
- dutyCycle: this.warehouse.dutyCycle,
- };
- uni.showModal({
- title: "鎻愮ず",
- content: "鏄惁纭浠呮洿鏂扮┖闂村崰姣旀暟鎹紵",
- showCancel: true,
- cancelColor: "#333333",
- success: (res) => {
- if (res.confirm) {
- onlyUpdateDutyCycle(params).then((res) => {
- this.warhouseTph = this.warehouse.packageCode;
- this.rescode = res.code;
- this.resmessage = res.message;
- this.$refs.resmodal.show = true;
- this.rest();
- });
- } else if (res.cancel) {
- }
- },
- });
- }
- });
- },
- gridBtnClick() {
- this.gridable = !this.gridable;
- if (!this.gridable) {
- this.$nextTick(() => {
- this.gridFocus = true;
- });
- } else {
- this.$nextTick(() => {
- this.gridFocus = false;
- });
- }
- },
+
//鍏ㄩ儴鍙栨秷
back() {
this.ordersId = 0;
this.singlist = [];
this.$refs.warehouseRef.resetFields();
- this.warehouse.packageCode = "";
+ this.warehouse.upi = "";
},
- },
- unmounted() {
- if (this.timer) {
- clearTimeout(this.timer);
- this.timer = null;
- }
},
};
</script>
--
Gitblit v1.9.3