From 444a83f76b62a19a83796c8f5a5af1e875a3be63 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 11 12月 2024 10:50:38 +0800
Subject: [PATCH] 22
---
LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue | 953 +++++++++++++++++++++++++++-------------------------------
1 files changed, 447 insertions(+), 506 deletions(-)
diff --git a/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue b/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
index 57ab0b1..2f92f0e 100644
--- a/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
+++ b/LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
@@ -1,524 +1,465 @@
<template>
- <view class="overflow" style="padding-bottom: 150rpx">
- <cu-custom bgColor="bg-white" :isBack="true">
- <block slot="backText">
- </block>
- <block slot="content">鐗╂枡瑙g粦</block>
- </cu-custom>
- <u-form labelPosition="left" label-width="180rpx" :model="warehouse" ref="warehouseRef">
- <u-row class="border_bottom margin_top10rpx padding_left25rpx" style="background-color: #fff;">
- <u-col span="12">
- <u-form-item label="瀹瑰櫒缂栧彿:" prop="containerCode" required class="uFormItem">
- <u-input v-model.trim="warehouse.containerCode" @confirm="getContainerData(1)"
- :disabled="kwbhAllowed" placeholder="璇峰綍鍏ユ垨鎵爜" class="width" :focus="curFoucus">
- </u-input>
- </u-form-item>
- </u-col>
- </u-row>
- <u-row class="border_bottom margin_top10rpx padding_left25rpx" style="background-color: #fff;"
- v-if="warehouse.containerCode">
- <u-col span="12">
- <u-form-item label="鐗╂枡璺熻釜鐮�:" class="uFormItem">
- <u-input v-model="warehouse.snCode" ref="materialRef" placeholder="璇锋壂鐮佸綍鍏�"
- @focus="warehouse.snCode = ''" @confirm="getContainerData"
- style="font-weight: bolder;margin-left: 15rpx;" class="width padding_left25rpx">
- </u-input>
- </u-form-item>
- </u-col>
- </u-row>
-
- </u-form>
- <!-- 鍒楄〃 -->
- <view class="margin_top10rpx">
- <u-swipe-action :show="item.show" :index="eindex" v-for="(item, eindex) in singlist" :key="eindex"
- :options="options" @click="longpress" @open="open" @close="close" class="margin_bottom10rpx">
- <view class="item u-border-bottom">
- <!-- 姝ゅ眰wrap鍦ㄦ涓哄繀鍐欑殑锛屽惁鍒欏彲鑳戒細鍑虹幇鏍囬瀹氫綅閿欒 -->
- <view class="title-wrap">
- <!-- -->
- <view :class="item.checked ? 'bg_item' : ''"
- class="fontSize32rpx width margin_auto background_fff padding10 relative box_sizing transition">
- <u-row>
- <u-col span="12" class="flex align-center">
- <u-checkbox v-model="item.checked" size="50rpx"></u-checkbox>
- <view class="flex justify-center align-center"
- style="background-color: #f18202;color: #fff;border-radius: 50vh;width: 40rpx;height: 40rpx;">
- {{ eindex + 1 }}
- </view>
- <text class="color_f18202 padding_left10rpx">
- {{ item.materialCode }}({{ item.materialName }})
- </text>
- </u-col>
- </u-row>
- <u-row>
- <u-col span="8">
- <text class="color_80 padding_left25rpx">
- 璐ㄦ鐘舵�侊細{{ item.qcStatusName }}
- </text>
- </u-col>
- <u-col span="4">
- <text class="color_80">
- 鎵规锛歿{ item.batch }}
- </text>
- </u-col>
- </u-row>
- <u-row>
- <u-col span="8">
- <text class="color_80 padding_left25rpx">
- </text>
- </u-col>
- <u-col span="4">
- <text class="color_f18202">
- 鏁伴噺锛歿{ item.quantity }}
- </text>
- </u-col>
- </u-row>
- </view>
- </view>
- </view>
- </u-swipe-action>
- </view>
- <modal-code :rescode='rescode' :resmessage='resmessage' ref="resmodal" />
- <u-popup v-model="detailshow" border-radius="14" @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>
- </u-popup>
- <button-modal :empTytowerShow='true' cleaningTitle="閲嶇疆" garmenTitle='鐗╂枡瑙g粦' @submit='submit' @reset='back' />
+ <view class="overflow" style="padding-bottom: 150rpx">
+ <cu-custom bgColor="bg-white" :isBack="true">
+ <block slot="backText"> </block>
+ <block slot="content">鏁村寘鏌ョ湅</block>
+ </cu-custom>
+ <u-form
+ labelPosition="left"
+ label-width="250rpx"
+ :model="warehouse"
+ ref="warehouseRef"
+ >
+ <u-row
+ class="border_bottom margin_top10rpx padding_left25rpx"
+ style="background-color: #fff"
+ >
+ <u-col span="12">
+ <u-form-item
+ label="鍖呰鍙�/閮ㄤ欢鏉$爜:"
+ prop="upi"
+ required
+ class="uFormItem"
+ >
+ <u-input
+ v-model.trim="warehouse.upi"
+ @focus="warehouse.upi = ''"
+ @confirm="getContainerData(1)"
+ placeholder="璇峰綍鍏ユ垨鎵爜"
+ class="width"
+ :focus="curFoucus"
+ >
+ </u-input>
+ </u-form-item>
+ </u-col>
+ </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-input
+ v-model="warehouse.upi"
+ ref="materialRef"
+ placeholder="璇锋壂鐮佸綍鍏�"
+ @focus="warehouse.upi = ''"
+ @confirm="getContainerData"
+ style="font-weight: bolder; margin-left: 15rpx"
+ class="width padding_left25rpx"
+ >
+ </u-input>
+ </u-form-item>
+ </u-col>
+ </u-row> -->
+ </u-form>
+
+ <!-- 鍒楄〃 -->
+ <view class="margin_top10rpx">
+ <u-swipe-action
+ :show="item.show"
+ :index="eindex"
+ v-for="(item, eindex) in singlist"
+ :key="eindex"
+ :options="options"
+ @click="longpress"
+ @open="open"
+ @close="close"
+ class="margin_bottom10rpx"
+ >
+ <view class="item u-border-bottom">
+ <!-- 姝ゅ眰wrap鍦ㄦ涓哄繀鍐欑殑锛屽惁鍒欏彲鑳戒細鍑虹幇鏍囬瀹氫綅閿欒 -->
+ <view class="title-wrap">
+ <view
+ :class="item.checked ? 'bg_item' : ''"
+ class="fontSize32rpx width margin_auto background_fff padding10 relative box_sizing transition"
+ >
+ <u-row>
+ <u-col span="12" class="flex align-center">
+ <!-- <u-checkbox v-model="item.checked" size="50rpx"></u-checkbox> -->
+ <view
+ class="flex justify-center align-center"
+ style="
+ background-color: #f18202;
+ color: #fff;
+ border-radius: 50vh;
+ width: 40rpx;
+ height: 40rpx;
+ "
+ >
+ {{ eindex + 1 }}
+ </view>
+ <text class="color_f18202 padding_left10rpx">
+ {{ item.upi }}
+ </text>
+ </u-col>
+ </u-row>
+ <u-row>
+ <u-col span="12">
+ <text class="color_80 padding_left25rpx">
+ 閮ㄤ欢鍚嶇О锛� {{ item.detailName }}
+ </text>
+ </u-col>
+ </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="12">
+ <text class="color_80 padding_left25rpx">
+ 鏉愭枡锛歿{ item.info18 }}
+ </text>
+ </u-col>
+ </u-row>
- </view>
+ <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="12">
+ <text class="color_80 padding_left25rpx">
+ 鏉夸欢鐘舵�侊細{{ getEnumName(item.upiStatus) }}
+ </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="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>
+ </view>
+ </view>
+ </u-swipe-action>
+ </view>
+ <modal-code :rescode="rescode" :resmessage="resmessage" ref="resmodal" />
+ <u-popup
+ v-model="detailshow"
+ border-radius="14"
+ @close="detailshow = false"
+ mode="bottom"
+ >
+ <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
+ :subShow="true"
+ garmenTitle="閲嶇疆"
+ @submit="rest"
+ @reset="rest"
+ />
+ </view>
</template>
<script>
-import { getContainerMaterial, unbindOrder } from '@/api/putIn/untie.js'
-import BluePrint from '@/pages/print/bluePrint.js'
-import ButtonModal from '../../components/buttonModal.vue'
-import ModalCode from '../../components/ModalCode.vue'
-import { getAttrValue } from '@/utils/tool.js'
-import { getContainDetail, onlyUpdateDutyCycle, getBhbMaterialList } from '../../api/putIn/artificial.js'
+import { getContainerMaterial, unbindOrder } from "@/api/putIn/untie.js";
+import BluePrint from "@/pages/print/bluePrint.js";
+import ButtonModal from "../../components/buttonModal.vue";
+import ModalCode from "../../components/ModalCode.vue";
+import { getAttrValue } from "@/utils/tool.js";
+import {
+ getContainDetail,
+ onlyUpdateDutyCycle,
+ getBhbMaterialList,
+ getenumDataList,
+} from "../../api/putIn/artificial.js";
export default {
- data() {
- return {
- operator: '',
- warehouse: {
- containerCode: '',
- materialCode: '',
- dutyCycle: '',
- gridNumber: 1,
- useNumber: 0,
- exitNumber: 0
- },
- singlist: [
- // {}
- ], //璇︽儏鍒楄〃
- ordersId: 0, //褰撳墠瀹瑰櫒缁戝畾鐨勪笂鏋跺崟
- rescode: 0,
- resmessage: '',
- options: [{
- text: '鎵撳嵃',
- style: {
- backgroundColor: '#fc9f35'
- }
- }
- ],
- detailshow: false,
- materlist: {},
- curFoucus: true,
- timer: null,
- timerSm: null,
- detailableZb: false,
- detailable: false,
- gridFocus: false,
- gridable: true,
- kwbhAllowed: false
- }
+ data() {
+ return {
+ operator: "",
+ warehouse: {
+ upi: "",
+ materialCode: "",
+ dutyCycle: "",
+ gridNumber: 1,
+ useNumber: 0,
+ exitNumber: 0,
+ },
+ singlist: [
+ // {}
+ ], //璇︽儏鍒楄〃
+ ordersId: 0, //褰撳墠瀹瑰櫒缁戝畾鐨勪笂鏋跺崟
+ rescode: 0,
+ resmessage: "",
+ options: [
+ {
+ text: "璇︽儏",
+ style: {
+ backgroundColor: "#fc9f35",
+ },
+ },
+ ],
+ detailshow: false,
+ materlist: {},
+ curFoucus: true,
+ timer: null,
+ timerSm: null,
+ detailableZb: false,
+ detailable: false,
+ gridFocus: false,
+ gridable: true,
+ kwbhAllowed: false,
+ enumList: [],
+ areaCodeEnum: [],
+ };
+ },
+ components: {
+ ButtonModal,
+ ModalCode,
+ },
+ created() {
+ getenumDataList({
+ EnumName: "UpiStatusEnum",
+ }).then((res) => {
+ this.enumList = res.result || [];
+ });
- },
- components: {
- ButtonModal,
- ModalCode
- },
- onLoad() {
- this.operator = JSON.parse(uni.getStorageSync('userInfo')).name
- },
- watch: {
- containerCode(val) {
- if (!val) {
- this.detailable = false;
- this.detailableZb = false;
- this.warehouse.exitNumber = 0
- }
- }
- },
- methods: {
- // 濡傛灉鎵撳紑涓�涓殑鏃跺�欙紝涓嶉渶瑕佸叧闂叾浠栵紝鍒欐棤闇�瀹炵幇鏈柟娉�
- open(index) {
- // 鍏堝皢姝e湪琚搷浣滅殑swipeAction鏍囪涓烘墦寮�鐘舵�侊紝鍚﹀垯鐢变簬props鐨勭壒鎬ч檺鍒讹紝
- // 鍘熸湰涓�'false'锛屽啀娆¤缃负'false'浼氭棤鏁�
- this.singlist[index].show = true;
- this.singlist.map((val, idx) => {
- if (index != idx) this.singlist[idx].show = false;
- })
- },
- close(index) {
- this.singlist[index].show = false;
- },
- //鐗╂枡璇︽儏
- longpress(index, eindex) {
- 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
- }
+ getenumDataList({
+ EnumName: "AreaCodeEnum",
+ }).then((res) => {
+ this.areaCodeEnum = res.result || [];
+ });
- 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)
- },
- containerBlur() {
- if (this.warehouse.containerCode == '' || 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
- }
+ },
+ onLoad() {
+ this.operator = JSON.parse(uni.getStorageSync("userInfo")).name;
+ },
+ mounted() {},
- 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锛氱墿鏂欒В缁�
- containerCode: this.warehouse.containerCode,
- 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) {
+ 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 : "";
+ },
+ // 濡傛灉鎵撳紑涓�涓殑鏃跺�欙紝涓嶉渶瑕佸叧闂叾浠栵紝鍒欐棤闇�瀹炵幇鏈柟娉�
+ open(index) {
+ // 鍏堝皢姝e湪琚搷浣滅殑swipeAction鏍囪涓烘墦寮�鐘舵�侊紝鍚﹀垯鐢变簬props鐨勭壒鎬ч檺鍒讹紝
+ // 鍘熸湰涓�'false'锛屽啀娆¤缃负'false'浼氭棤鏁�
+ this.singlist[index].show = true;
+ this.singlist.map((val, idx) => {
+ if (index != idx) this.singlist[idx].show = false;
+ });
+ },
+ close(index) {
+ this.singlist[index].show = false;
+ },
+ //鐗╂枡璇︽儏
+ longpress(index, eindex) {
+ this.materlist = this.singlist[index];
+ this.detailshow = true;
+ },
- }
- })
- });
- },
- rest() {
- },
- //妫�鏌ュ鍣ㄦ爡鏍兼暟
- checkGrid() {
- },
- //鑾峰彇瀹瑰櫒鐨勪俊鎭�
- getContainerData(param) {
- if (this.warehouse.containerCode == '') {
- uni.showToast({
- title: '璇锋壂瀹瑰櫒缂栧彿',
- icon: 'none',
- duration: 2000
- });
- return
- }
- // this.kwbhAllowed = false;
- getBhbMaterialList({
- 'containerCode': this.warehouse.containerCode,
- 'SNCode': this.warehouse.snCode
- }).then(res => {
- // //debugger
- const result = res.result;
- if (Array.isArray(result) && result.length == 0) {
- uni.showToast({
- title: '鏁版嵁涓嶅瓨鍦�',
- icon: 'none',
- duration: 2000
- });
- 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.snCode == item.snCode);
- // if (index == -1) {
-
- // this.singlist.unshift({
- // ...item
- // })
- // }
- // });
- })
- },
- onlyUpdateDutyCycleClick() {
- this.$refs.warehouseRef.setRules(this.warehouseRules)
- this.$refs.warehouseRef.validate(valid => {
- if (valid) {
- //璇锋眰鍙傛暟
- let params = {
- wareContainerCode: this.warehouse.containerCode,
- 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.containerCode
- this.rescode = res.code
- this.resmessage = res.message
- this.$refs.resmodal.show = true
- this.rest()
- })
- } else if (res.cancel) {
+ rest() {
+ this.warehouse.upi = "";
+ this.warehouse.upi = "";
+ this.singlist = [];
+ },
+ //妫�鏌ュ鍣ㄦ爡鏍兼暟
+ checkGrid() {},
+ //鑾峰彇瀹瑰櫒鐨勪俊鎭�
+ getContainerData(param) {
+ if (!this.warehouse.upi) {
+ uni.showToast({
+ title: "璇锋壂鍖呰鍙�",
+ icon: "none",
+ duration: 2000,
+ });
+ return;
+ }
+ getBhbMaterialList({
+ upi: this.warehouse.upi,
+ }).then((res) => {
+ const result = res.result;
+ if (Array.isArray(result) && result.length == 0) {
+ uni.showToast({
+ title: "娌℃湁鏌ュ埌鏁版嵁",
+ icon: "none",
+ duration: 5000,
+ });
+ this.singlist = [];
+ return;
+ }
+ this.singlist = result;
+ });
+ },
- }
- })
- });
- }
- })
- },
- 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.containerCode = ''
- }
- },
- unmounted() {
- if (this.timer) {
- clearTimeout(this.timer)
- this.timer = null
- }
- },
-}
+ //鍏ㄩ儴鍙栨秷
+ back() {
+ this.ordersId = 0;
+ this.singlist = [];
+ this.$refs.warehouseRef.resetFields();
+ this.warehouse.upi = "";
+ },
+ },
+};
</script>
<style lang="scss">
.content {
- height: 500rpx;
- overflow-y: scroll;
- width: 100%;
- padding: 15rpx;
- box-sizing: border-box;
+ height: 500rpx;
+ overflow-y: scroll;
+ width: 100%;
+ padding: 15rpx;
+ box-sizing: border-box;
- .content-item {
- padding: 15rpx;
- background-color: #fff;
- margin-bottom: 15rpx;
- border-radius: 8rpx;
- font-size: 32rpx;
- }
+ .content-item {
+ padding: 15rpx;
+ background-color: #fff;
+ margin-bottom: 15rpx;
+ border-radius: 8rpx;
+ font-size: 32rpx;
+ }
}
.bg_item {
- background: #FFEBCD !important;
+ background: #ffebcd !important;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3