From 909097fb4e143250de194c928d91cc95a4ed2c5a Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期二, 04 六月 2024 15:26:33 +0800
Subject: [PATCH] 1.生产报工2.外协收发料功能优化
---
pages/scgl/scbg.vue | 1204 ++++++++++++++++++++++-----------------------------------
1 files changed, 467 insertions(+), 737 deletions(-)
diff --git a/pages/scgl/scbg.vue b/pages/scgl/scbg.vue
index 8f7247a..2bebed9 100644
--- a/pages/scgl/scbg.vue
+++ b/pages/scgl/scbg.vue
@@ -3,333 +3,223 @@
<page-nav title="鐢熶骇鎶ュ伐"></page-nav>
- <view v-show="topContent.length===0">
- <div class="sacnBody">
- <div class="scanImg" @click="topScanClick"></div>
- <div class="scanText">璇锋壂鎻忎换鍔℃潯鐮�</div>
- </div>
+ <view class="flex_center" style="margin: 20rpx;">
+
+ <!-- #ifdef H5 -->
+ <u--input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" :placeholder="placeholder"
+ style="width:100%;background-color: #fff;border-radius: 40rpx;" border="surround" suffixIcon="scan"
+ suffixIconStyle="color: #909399;font-size: 22px;" v-model="inputBoxValue"
+ @change="confirmInputBoxValue">
+ <template slot="suffix">
+ <u-icon name="scan" color="#909399" size="24" @click="scanClick"></u-icon>
+ </template>
+ </u--input>
+ <!-- #endif -->
+
+ <!-- #ifdef APP-PLUS -->
+ <u-input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" :placeholder="placeholder"
+ style="width:100%;background-color: #fff;border-radius: 40rpx;" border="surround" suffixIcon="scan"
+ suffixIconStyle="color: #909399;font-size: 22px;" v-model="inputBoxValue"
+ @change="confirmInputBoxValue">
+ <template slot="suffix">
+ <u-icon name="scan" color="#909399" size="24" @click="scanClick"></u-icon>
+ </template>
+ </u-input>
+ <!-- #endif -->
+
+ <view class="flex_center marginLeft20" @click="popupShow=true">
+ <u--text size='16' color='#909399' text="绛涢��"></u--text>
+ <u--image :showLoading="true" src="../../static/img/sift.png" width="20px" height="20px"></u--image>
+ </view>
</view>
- <view v-show="topContent.length!==0">
- <view class="mainContent" :style="{maxHeight:'1260rpx',overflow: 'scroll'}">
- <!-- 鎶ュ伐淇℃伅 -->
- <u-gap height="5" bgColor="#eff0f1"></u-gap>
- <view class="head" style="padding-bottom: 10rpx;">
- <view class="head_block">
- <view class="head_left">
- <view class="head_bar"></view>
- <view class="head_title">
- 鎶ュ伐淇℃伅
- </view>
- </view>
-
- </view>
- <view class="marginTop20 marginLeft20 marginRight20 flex_between">
- <u-radio-group class="flex_column">
-
- <view class="marginBottom20 " v-for="(item,index) in topContent" :key="item.wo_code">
-
- <view class="flex_between">
- <view style="display: flex;">
- <view class="flex_column titleFont">
- <view>宸ュ崟缂栧彿锛�</view>
- <view>浜у搧缂栫爜锛�</view>
- <view>浜у搧鍚嶇О锛�</view>
- <view>浜у搧瑙勬牸锛�</view>
- <view>褰撳墠宸ュ簭锛�</view>
- <view>浠诲姟鏁伴噺锛�</view>
- <view>鏈姤/宸叉姤锛�</view>
- <view>涓嬮亾宸ュ簭锛�</view>
- </view>
- <view class="flex_column contentFont">
- <view>{{item.wo_code}}</view>
- <view>{{item.partnumber}}</view>
- <view>{{item.partname}}</view>
- <view>{{item.partspec.toString().length===0?'/':item.partspec}}</view>
- <view>{{item.stepname}}</view>
- <view>{{item.planqty}}</view>
- <view>{{item.noreportqty}}/{{item.reportqty}}</view>
- <view>{{item.nextstepname?item.nextstepname:'/'}}</view>
- </view>
- </view>
+ <u-alert :title="alertTitle" type="info"></u-alert>
- </view>
+ <!-- 鎶樺彔闈㈡澘 -->
+ <!-- <u-collapse @change="change" @close="close" @open="open"> -->
+ <!-- @change="collapseChange" -->
+ <u-collapse style="max-height: 590px;overflow: auto;">
+ <!-- :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)' -->
+ <u-collapse-item style="position: relative;" :title="item.ordercode" :name='item.ordercode'
+ :value='parseFloat(item.ordergoodqty)+"/"+parseFloat(item.orderqty)'
+ :label="item.children.length===0?'鏈淳鍙�':''" :disabled='item.children.length===0'
+ v-for="item in collapseArr" :key="item.ordercode">
- </view>
- </u-radio-group>
- </view>
+ <view style="position: absolute;width: 200rpx;left: 30rpx;top:34px;font-size: 24rpx;color: #999;">
+ {{item.partname}} {{item.partspec}}
</view>
- <!-- 鎶ュ伐鎿嶄綔 -->
- <u-gap height="10" bgColor="#eff0f1"></u-gap>
- <view class="head marginLeft10 marginRight10" style="padding-bottom: 20rpx;">
- <view class="head_block">
- <view class="head_left">
- <view class="head_bar"></view>
- <view class="head_title">
- 鎶ュ伐鎿嶄綔
- </view>
- </view>
+ <!-- <view style="position: absolute;width: 26%;left: 44%;top:16px;"> -->
+ <view style="position: absolute;width: 120px;left: 44%;top:16px;color:#0659ff"
+ @click="progressClick(item.ordercode)">
+ <!-- {{item.partname}}{{item.partspec}} -->
+ <u-line-progress :percentage="parseFloat((item.ordergoodqty*100/item.orderqty).toFixed(2))"
+ inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress>
+ </view>
+ <!-- <view style="position: absolute;width: 100px;right: 33px; top:13px; ">
+ <view class="" style="display: flex;justify-content: flex-end;">
+ <view style="color: #0659ff;">
+ {{parseFloat(item.ordergoodqty)}}
+ </view>
+ <view>
+ /{{ parseFloat(item.orderqty)}}
+ </view>
</view>
+ </view>
+ -->
+
+
+ <view v-if="radiovalue==='鐢熶骇宸ュ崟'" style="margin:0 0 5px">
<view class="flex_column">
-
- <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;">
- <view style="display: flex;" class="titleFont">
- <view style="color: red;margin-right: 6rpx;">*</view> 璁′欢鏂瑰紡锛�
- </view>
- <u-radio-group v-model="reckway" @change='radioGroupChange'>
- <u-radio shape="circle" label="鐝粍" name="鐝粍" labelSize="16"></u-radio>
- <u-radio shape="circle" label="涓汉" style="margin-left: 20rpx;" name="涓汉" labelSize="16">
- </u-radio>
- </u-radio-group>
+ <view style="display:flex">
+ <view class="titleFont" style="font-size: 14px;">浜у搧缂栫爜锛�</view>
+ <view class="contentFont" style="font-size: 14px;">{{item.partcode}}</view>
</view>
-
-
- <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;"
- v-if="reckway==='鐝粍'">
- <view style="display: flex;" class="titleFont">
- <view style="color: red;margin-right: 6rpx;">*</view> 鐢熶骇鐝粍锛�
- </view>
- <view @click='userGroupSheetClick' class="custominputClass">
- <view v-show='userGroupSheetValue===""' style="color: rgb(192, 196, 204);">璇烽�夋嫨</view>
- <view v-show='userGroupSheetValue!==""' class="ellipsis" style="width: 390rpx;">
- {{userGroupSheetValue}}
- </view>
- <u-icon :name="!userGroupSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon>
+ <view style="display:flex">
+ <view class="titleFont" style="font-size: 14px;">浜у搧鍚嶇О锛�</view>
+ <view class="contentFont" style="font-size: 14px;">{{item.partname}}</view>
+ </view>
+ <view style="display:flex">
+ <view class="titleFont" style="font-size: 14px;">浜у搧瑙勬牸锛�</view>
+ <view class="contentFont" style="font-size: 14px;">{{item.partspec?item.partspec:'/'}}
</view>
</view>
-
-
- <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;">
- <!-- v-if="reckway==='涓汉'" -->
- <view style="display: flex;" class="titleFont">
- <view style="color: red;margin-right: 6rpx;">*</view> 鎶ュ伐浜哄憳锛�
- </view>
- <view @click='operSheetClick' class="custominputClass">
- <view v-show='operSheetValue===""' style="color: rgb(192, 196, 204);">璇烽�夋嫨</view>
- <view v-show='operSheetValue!==""' class="ellipsis" style="width: 390rpx;">
- {{operSheetValue}}
- </view>
-
- <u-icon :name="!operSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon>
- </view>
- </view>
-
-
- <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;">
- <view style="display: flex;" class="titleFont">
- <view style="color: #fff;margin-right: 6rpx;">*</view> 璁惧鍚嶇О锛�
- </view>
- <view @click='epqSheetClick' class="custominputClass">
-
- <view v-show='eqpSheetValue===""' style="color: rgb(192, 196, 204);">璇烽�夋嫨</view>
- <view v-show='eqpSheetValue!==""' class="ellipsis" style="width: 390rpx;">
- {{eqpSheetValue}}
- </view>
-
- <u-icon :name="!eqpSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon>
- </view>
- </view>
-
-
- <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;">
- <view style="color: red;margin-right: 6rpx;">*</view> 鎶ュ伐鏁伴噺锛�
- <view class='inputClass'>
- <u--input placeholder="璇疯緭鍏�" :adjustPosition='false' border="surround" type='number'
- v-model="reportqty">
- </u--input>
- </view>
- </view>
-
</view>
</view>
- <u-gap height="10" bgColor="#eff0f1"></u-gap>
+ <!-- {{item.children}} -->
+ <!-- <u--text class="u-collapse-content"> -->
+ <u-steps :current="-1" inactiveColor='#0659FF' direction="column">
+ <view v-for="(it,ind) in item.children" :key="item.ordercode+it.name+ind"
+ @click="gotoPage(item.ordercode,it.code)" style="display: flex;align-items: center;">
-
- <view class="head marginLeft10 marginRight10" style="padding-bottom: 20rpx;">
- <view class="head_block">
- <view class="head_left">
- <view class="head_bar"></view>
- <view class="head_title">
- 涓嶈壇缁熻
+ <u-steps-item :title="it.code+'/'+it.name+it.spec"></u-steps-item>
+ <view class="" style="width: 100px;">
+ <u-line-progress :percentage="parseFloat((it.goodqty*100/it.planqty).toFixed(2))"
+ inactiveColor="#d1d6f5" height="10" activeColor="#0659ff"></u-line-progress>
+ </view>
+ <view style="width: 30%;text-align: right;">
+ <view class="" style="display: flex;justify-content: flex-end;">
+ <view style="color: #0659ff;">
+ {{parseFloat(it.goodqty)}}
+ </view>
+ <view>
+ /{{ parseFloat(it.planqty)}}
+ </view>
</view>
</view>
-
</view>
- <view class="flex_column ">
+
+ </u-steps>
+ <!-- </u--text> -->
- <u-button type="primary" :plain="true" icon='plus-circle' text="娣诲姞"
- style="width: 90%;margin: 20rpx auto;" @click="add"></u-button>
+ </u-collapse-item>
+
+ </u-collapse>
- <view v-for='(item,index) in ngqtyArr' class="badSheetClass" :key="item.uid">
+ <!-- 寮瑰嚭灞� -->
+ <!-- closeIconPos='top-left' closeOnClickOverlay closeable='true' -->
+ <u-popup :show="popupShow" mode="right" @close="popupClose" @open="popupOpen">
+ <view style="margin: 120px 10px 20px;" class="flex_column">
- <view class="badNumber">{{index+1}}</view>
- <u-icon name="trash" size="20" class="trash" v-if="ngqtyArr.length!==1"
- @click="trashDelete(index)" color="rgb(0, 102, 255)"></u-icon>
-
- <view class="flex_center titleFont" style="margin: 0rpx 20rpx 10rpx;line-height: 56rpx;">
- <view style="color: #fff;margin-right: 6rpx;">*</view> 涓嶈壇鏁伴噺锛�
- <view class='inputClass'>
- <u--input placeholder="璇疯緭鍏�" border="surround" :adjustPosition='false' type='number'
- v-model="item.ngqty"></u--input>
- </view>
-
- </view>
- <view class="flex_center" style="margin: 0rpx 20rpx 10rpx;line-height: 76rpx;">
- <view style="display: flex;" class="titleFont">
- <view style="color: #fff;margin-right: 6rpx;">*</view> 涓嶈壇鍘熷洜锛�
- </view>
- <view @click='badSheetClick(item)' class="custominputClass">
- <view v-show='item.badSheetValue.length===0' style="color: rgb(192, 196, 204);">璇烽�夋嫨
- </view>
- <view v-show='item.badSheetValue.length!==0' class="ellipsis"
- style="width: 390rpx;">
- {{item.badSheetValue}}
- </view>
- <u-icon :name="item.arrowDown?'arrow-down-fill':'arrow-up-fill'"></u-icon>
- </view>
- </view>
-
- <u-divider></u-divider>
-
-
- </view>
-
+ <!-- <view style="display: flex;">
+ <view>
+ 鍗曟嵁绫诲瀷锛�
</view>
+
+ <u-radio-group v-model="radiovalue" placement="column" @change="groupChange"
+ style="margin-top: 4px;">
+ <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist"
+ :key="index+item.name" :label="item.name" iconSize='16' labelSize='16' :name="item.name">
+
+ </u-radio>
+ </u-radio-group>
+ </view> -->
+
+ <view style="margin-top: 20px;display: flex;align-items: center;">
+
+ <view class="">
+ 浜у搧淇℃伅锛�
+ </view>
+ <view class="">
+ <u-button :hairline="true" shape="circle" icon="map" :plain="true"
+ style="width: 100px;height: 26px;" type="primary" text="閫夋嫨浜у搧" @click="chosePart"></u-button>
+ </view>
+
+ </view>
+
+ <view style="display: flex;flex-wrap: wrap;">
+ <u-tag style="width:220rpx;" :text="item.name" v-for="item in tagArr" :key="item.code"
+ :closable="true" :show="item.close" @close="tagClose(item)"></u-tag>
</view>
+ <!-- <view class="head" style="margin-top: 10px;">
+ <view class="head_block" style="height: 80rpx; display: flex;justify-content: space-around;">
+ <u-button :plain='today' style="width: 70px;height: 25px;" @click="dateChange('today')"
+ type="primary" shape="circle" text="浠婃棩">
+ </u-button>
+ <u-button :plain='month' style="width: 70px;height: 25px;" @click="dateChange('month')"
+ type="primary" shape="circle" text="鏈湀">
+ </u-button>
+ <u-button :plain='custom' style="width: 70px;height: 25px;" @click="dateChange('custom')"
+ type="primary" shape="circle" text="鑷畾涔�"></u-button>
+ </view>
+ </view>
+
+ <view v-if="!custom" class="flex_column"
+ style="display: flex;justify-content: space-around;width: 100%;">
+ <view class="" style="display: flex;justify-content: space-evenly;width: 100%;">
+ <view class="titleFont">寮�濮嬫棩鏈�</view>
+ <view class="titleFont">~</view>
+ <view class="titleFont">缁撴潫鏃ユ湡</view>
+ </view>
+
+ <u-button type="info" icon='calendar' iconColor="#0659FF" size="" @click="calendarClick"
+ :text="calendarRange">
+ </u-button>
+ </view> -->
+
+ <!-- <uni-calendar ref="calendar" :range='true' :insert="false" @confirm="calendarConfirm" /> -->
</view>
+ </u-popup>
-
-
-
- <u-gap height="10" bgColor="#eff0f1"></u-gap>
-
-
-
-
- <u-button size="large" :loading="isDisabledSubmitButton" loadingText="姝e湪鎻愪氦,璇风◢绛�..." type="primary"
- @click="submit" text="鎶ュ伐">
- </u-button>
-
-
- <!-- 鐢熶骇鐝粍 -->
- <u-picker v-if="topContent.length!==0" :show="userGroupSheetShow" :columns="userGroupColumns"
- :itemHeight='55' :closeOnClickOverlay='true' @close='userGroupSheetShow=false'
- @confirm='userGroupPickerConfirm' @cancel='userGroupSheetShow=false'>
- </u-picker>
-
- <!-- 璁惧鍚嶇О -->
- <u-picker v-if="topContent.length!==0" :show="eqpSheetShow" :columns="eqpColumns" :itemHeight='55'
- :closeOnClickOverlay='true' @close='eqpSheetShow=false' @confirm='eqpPickerConfirm'
- @cancel='eqpSheetShow=false'>
- </u-picker>
-
-
-
- <!-- 涓嶈壇鍘熷洜 -->
- <u-action-sheet v-if="topContent.length!==0" :actions="badSelectArr" :safeAreaInsetBottom='true'
- :closeOnClickOverlay="true" :closeOnClickAction="true" @close="badSelectClose" :show="badSheetShow"
- @select='badSheetSelect'>
- <view style="min-height: 100rpx;">
- <u-checkbox-group @change="checkboxChange" size='20px' v-model="checkBoxValue" iconPlacement="right"
- placement="column">
- <view v-for="(item,index) in badSelectArr">
- <u-checkbox activeColor="rgb(0, 102, 255)" labelSize='18' :key="item.code+index"
- :name='item.name' :label="item.name">
- </u-checkbox>
- </view>
- </u-checkbox-group>
- </view>
- </u-action-sheet>
-
-
- <!-- 鎶ュ伐浜哄憳 -->
- <u-action-sheet v-if="topContent.length!==0" :actions="userSelectArrAll" :safeAreaInsetBottom='true'
- :closeOnClickOverlay="true" :closeOnClickAction="true" @close="userSheetShow=false"
- :show="userSheetShow" @select='userSheetSelect'>
- <view style="min-height: 100rpx;padding: 20rpx 20rpx 30rpx 20rpx;">
- <u-checkbox-group @change="userCheckboxChange" size='20px' v-model="userCheckBoxValue"
- iconPlacement="right" placement="column">
- <view v-for="(item,index) in userSelectArrAll">
- <u-checkbox activeColor="rgb(0, 102, 255)" labelSize='18' :key="item.code+index"
- :name='item.name' :label="item.name">
- </u-checkbox>
- </view>
- </u-checkbox-group>
- </view>
- </u-action-sheet>
-
- <!-- 鎶ュ伐浜哄憳 -->
- <u-picker v-if="topContent.length!==0" :show="operSheetShow" :columns="operColumns" :itemHeight='55'
- :closeOnClickOverlay='true' @close='operSheetShow=false' @confirm='operPickerConfirm'
- @cancel='operSheetShow=false'>
- </u-picker>
-
-
-
-
-
- </view>
-
-
- <!-- <view v-show="topContent.length!==0" style="position: absolute; bottom: 210rpx;right: 20rpx;">
- <div class="scanImg2" @click="topScanClick"></div>
- </div>
- </view> -->
-
- <!-- 鎮诞鐞� -->
- <!-- <view
- v-show="topContent.length!==0&&!userGroupSheetShow&&!eqpSheetShow&&!operSheetShow&&!badSheetShow"
- @click="topScanClick">
- <drag-ball :x='$DeviceInformation.screenWidth*0.8' :y="$DeviceInformation.screenHeight*0.7"></drag-ball>
- </view> -->
<!-- <scan-code></scan-code> -->
+
+
+ <!-- 鎮诞鐞� -->
+ <view @click="scan2">
+ <drag-ball :x='300' :y="600"></drag-ball>
+ </view>
</view>
</template>
<script>
import {
- MesOrderStepStart,
- PersonPermissions,
- EqpPermissionsPlus,
- GroupsPermissions,
- GroupsPersonPermissions,
- DefectPermissions,
- SavaMesOrderStepReport,
- LabelBarCode
+ ProductionScheduleKanban
} from '../../config/api.js';
- // import scanCode from '@/components/scan-code/scan-code.vue'
export default {
- // components: {
- // scanCode
- // },
onLoad(option) {
- // const _this = this
- // uni.$off('scancodedate') // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
- // uni.$on('scancodedate', function(content) {
- // console.log("鎵弿鍒扮殑鍐呭涓�:", content)
- // // _this.getMesOrderStepStart(content)
+ const _this = this
+ uni.$off('scancodedate') // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
+ uni.$on('scancodedate', function(content) {
+ console.log("鎵弿鍒扮殑鍐呭涓�:", content)
+ _this.getCheckScanDeviceQrCodeData(content)
+ })
- // if (_this.topContent.find(i => i.wo_code + ';' + i.stepcode === content)) {
- // _this.$u.toast('姝ゆ潯鐮佸凡鎵弿锛屽凡鍦ㄥ垪琛ㄤ腑锛�')
- // } else {
- // _this.getMesOrderStepStart(content)
- // }
- // })
+
+ console.log(option, 8)
},
onPullDownRefresh() {
@@ -342,83 +232,63 @@
data() {
return {
- topRightMessageCount: 0,
- isDisabledSubmitButton: false,
-
- formData: {},
-
- reckway: '涓汉', //璁′欢鏂瑰紡 group浠h〃鏄彮缁� person 浠h〃鏄釜浜�
- userGroupSheetValue: '', //鐢熶骇鐝粍涓嬫媺閫変腑鐨勫��
- eqpSheetValue: '', //璁惧鍚嶇О涓嬫媺閫変腑鐨勫��
- userGroupSheetList: [], //鐢熶骇鐝粍涓嬫媺鏁扮粍
- eqpSheetList: [], //璁惧鍚嶇О涓嬫媺鏁扮粍
- userGroupSheetShow: false, //涓婃媺鍒楄〃鏄惁灞曞紑
- eqpSheetShow: false,
- topContent: [
- // {
- // nextstepcode: "GX005",
- // nextstepname: "鍏ュ簱",
- // noputqty: 0,
- // noreportqty: 100,
- // partname: "8504鍏夋満",
- // partnumber: "302",
- // partspec: "/",
- // planqty: 100,
- // reportqty: 0,
- // seq: "1",
- // startqty: 100,
- // stepcode: "GX001",
- // stepdesc: "",
- // stepname: "棰嗘枡",
- // wo_code: "MO-2022-11-0035_1",
- // },
+ topRightMessageCount: '',
+ inputBoxValue: '',
+ alertTitle: '',
+ popupShow: false, //寮瑰嚭灞傛槸鍚︽樉绀�
+ collapseArr: [ //鎶樺彔闈㈡澘鏁版嵁
+ ],
+ collapseArrAll: [], //鎵�鏈�
+ placeholder: '璇疯緭鍏ュ伐鍗曚俊鎭�',
+ radiovalue: '鐢熶骇宸ュ崟', //鍗曟嵁绫诲瀷
+ // SO锛氶攢鍞鍗� MO锛氱敓浜ц鍗� PO锛氱敓浜у伐鍗�
+ radiolist: [{
+ name: '閿�鍞鍗�'
+ },
+ {
+ name: '鐢熶骇璁㈠崟'
+ },
+ {
+ name: '鐢熶骇宸ュ崟'
+ },
],
- reportqty: '', //鎶ュ伐鏁伴噺
+ today: true,
+ month: false,
+ custom: true,
- ngqty: '', //涓嶈壇鏁伴噺
+ // calendarRange: new Date().toISOString().slice(0, 10) + '~' + new Date().toISOString().slice(0,
+ // 10), //绯荤粺褰撳墠鏃ユ湡
+ calendarRange: new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart(
+ 2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10), //褰撴湀鏃ユ湡
- ngqtyArr: [{
- uid: new Date().getTime(),
- ngqty: '',
- badSheetValue: '',
- arrowDown: true //鍚戜笅绠ご
- },
+
+
+ tagArr: [
// {
- // ngqty: '',
- // badSheetValue: '',
- // arrowDown: true //鍚戜笅绠ご
+ // close: true,
+ // name: '鐢垫睜鍖�',
+ // code: '1002'
+ // }, {
+ // close: true,
+ // name: '鐢佃剳',
+ // code: '1003'
+ // }, {
+ // close: true,
+ // name: '8054鍏夋満',
+ // code: '1004'
+ // }, {
+ // close: true,
+ // name: 'G71674鍐查攱鏋�',
+ // code: '1005'
+ // }, {
+ // close: true,
+ // name: '8051鍏夋満',
+ // code: '1006'
// },
- ], //涓嶈壇鏁伴噺銆佷笉鑹師鍥犳暟缁�
+ ], //宸查�変腑鐨勪骇鍝佹爣绛�
-
-
- badSelectArr: [], //涓嶈壇鍘熷洜涓嬫媺鏁扮粍
- badSheetValue: '', //涓嶈壇鍘熷洜閫変腑鍊�
- badSheetShow: false,
- checkBoxValue: [], //涓嶈壇鍘熷洜鏄剧ず鍊�
- operSheetValue: '', //鎿嶄綔浜哄憳閫変腑鍊�
- operSheetShow: false,
- operSheetList: [], //鎿嶄綔浜哄憳鏁扮粍
- userArr: [], //鎶ュ伐浜哄憳淇℃伅鏁扮粍
-
-
- userSelectValue: '', //涓嬫媺閫夐」鍊�
- userSelectArrAll: [], //鎵�鏈変汉鍛樹笅鎷夋暟缁�
- userSelectArr: [
- // {
- // value: '1001',
- // text: '灏忕編1'
- // },
- ], //浜哄憳涓嬫媺鏁扮粍
- userGroupColumns: [], //
- eqpColumns: [], //
- operColumns: [], //
- isAsyncChange: false,
-
- userCheckBoxValue: [],
- userSheetShow: false
}
},
created() {
@@ -427,124 +297,107 @@
mounted() {
this.init()
- // this.getMesOrderStepStart('MO-2024-01-0004_1;102')
-
- this.getSellectAllApi()
+ this.getProductionScheduleKanban()
},
methods: {
init() {
uni.stopPullDownRefresh();
},
- async getSellectAllApi() {
- await this.getGroupsPermissions() //鑾峰彇鐢熶骇鐝粍
- await this.getEqpPermissionsPlus() //鑾峰彇璁惧鍚嶇О
- await this.getDefectPermissions() //鑾峰彇缂洪櫡涓嬫媺
- await this.getPersonPermissions() //鑾峰彇鎿嶄綔浜哄憳
- },
+ gotoPage(p1, p2) {
+ let orderstep = null
-
- //鑾峰彇鐢熶骇鐝粍
- async getGroupsPermissions(wkshopcode) {
-
- const res = await GroupsPermissions()
- if (res.code === '200') {
- // 鏁扮粍瀵硅薄 鏇挎崲瀵硅薄閿悕
- this.userGroupSheetList = res.data.map(({
- usergroupcode,
- usergroupname
- }) => ({
- code: usergroupcode,
- name: usergroupname
- }))
-
- this.userGroupColumns = [this.userGroupSheetList.map(i => i.name)]
+ if (p1) {
+ orderstep = p1 + ';' + p2
+ } else {
+ orderstep = ''
}
- },
- // 鑾峰彇璁惧鍚嶇О
- async getEqpPermissionsPlus() {
- const res = await EqpPermissionsPlus()
- if (res.code === '200') {
- this.eqpSheetList = res.data
- this.eqpColumns = [this.eqpSheetList.map(i => i.name)]
- }
- },
- // 鑾峰彇涓嶈壇鍘熷洜
- async getDefectPermissions(orderstepqrcode) {
- const res = await DefectPermissions()
- if (res.code === '200') {
- this.badSelectArr = res.data
- }
- },
- // 鑾峰彇鎶ュ伐浜哄憳
- async getPersonPermissions() {
- const res = await PersonPermissions()
- if (res.code === '200') {
- // this.operSheetList = res.data
- this.operSheetList = res.data.map(({
- usercode,
- username
- }) => ({
- code: usercode,
- name: username
- }))
- this.operColumns = [this.operSheetList.map(i => i.name)]
- this.userSelectArrAll = this.operSheetList
- }
- },
- // 鏍规嵁鐢熶骇鐝粍鑾峰彇浜哄憳
- async getGroupsPersonPermissions(groupcode) {
- const res = await GroupsPersonPermissions({
- groupcode
+
+ uni.navigateTo({
+ url: './scbg2?orderstep=' + orderstep
})
- if (res.code === '200') {
- this.userCheckBoxValue = []
+ },
- if (res.data[0].usercode_list && res.data[0].usercode_list.length > 0) {
- this.userSelectArrAll.forEach(i => {
+ getCheckboxValue(val) {
+ this.tagArr = []
+ val.forEach(i => {
+ this.tagArr.push({
+ close: true,
+ name: i.split('/')[1].trim(),
+ code: i.split('/')[0].trim()
+ })
+ })
+ },
- if (res.data[0].usercode_list.split(',').includes(i.code)) {
- this.userCheckBoxValue.push(i.name)
- }
-
- })
-
- }
-
- this.operSheetValue = this.userCheckBoxValue.join(',')
-
-
+ // 鎺ュ彛鑾峰彇
+ async getProductionScheduleKanban() {
+ let ordertype = '' // SO锛氶攢鍞鍗� MO锛氱敓浜ц鍗� PO锛氱敓浜у伐鍗�
+ switch (this.radiovalue) {
+ case '鐢熶骇宸ュ崟':
+ this.alertTitle = '宸ュ崟鏁伴噺锛堝叡/涓級'
+ this.placeholder = '璇疯緭鍏ュ伐鍗曚俊鎭�'
+ ordertype = 'PO'
+ break
+ case '鐢熶骇璁㈠崟':
+ this.alertTitle = '鐢熶骇璁㈠崟鏁伴噺锛堝叡/涓級'
+ this.placeholder = '璇疯緭鍏ョ敓浜ц鍗曚俊鎭�'
+ ordertype = 'MO'
+ break
+ case '閿�鍞鍗�':
+ this.alertTitle = '閿�鍞鍗曟暟閲忥紙鍏�/涓級'
+ this.placeholder = '璇疯緭鍏ラ攢鍞鍗曚俊鎭�'
+ ordertype = 'SO'
+ break
}
- },
-
- userSheetSelect() {
-
- },
- userCheckboxChange(val) {
- this.userCheckBoxValue = val.join(',')
- },
-
- //鑾峰彇寮�宸ヤ俊鎭�
- async getMesOrderStepStart(orderstepqrcode) {
const data = {
- OperType: 'ZZ',
- SelectType: '',
- wocode: orderstepqrcode ? orderstepqrcode.split(';')[0] : '',
- stepcode: orderstepqrcode ? orderstepqrcode.split(';')[1] : ''
+ ordertype,
+ partcode: this.tagArr.map(i => i.code).join(','),
+ Ratetime: this.calendarRange,
}
- const res = await MesOrderStepStart(this.global.formatData(data))
- if (res.code === '200' && res.count === 1) {
- this.formData = res.data
- this.topContent.unshift(res.data)
- } else if (res.code === '200' && res.count !== 1) {
- this.$u.toast('姝ゅ伐搴忓凡鎶ュ伐锛�')
- }
+ const {
+ data: res
+ } = await ProductionScheduleKanban(data)
+
+ this.collapseArr = res
+ this.collapseArrAll = res
+ this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
+ 1]
},
- // 鎵爜浜嬩欢
+
+
+ //杈撳叆妗嗗洖杞︾‘璁や簨浠�
+ confirmInputBoxValue(val) {
+ this.collapseArr = this.collapseArrAll.filter((p) => {
+ return p.ordercode.indexOf(val) !== -1
+ })
+
+
+ switch (this.radiovalue) {
+ case '鐢熶骇宸ュ崟':
+ this.alertTitle = '宸ュ崟鏁伴噺锛堝叡/涓級'
+ break
+ case '鐢熶骇璁㈠崟':
+ this.alertTitle = '鐢熶骇璁㈠崟鏁伴噺锛堝叡/涓級'
+ break
+ case '閿�鍞鍗�':
+ this.alertTitle = '閿�鍞鍗曟暟閲忥紙鍏�/涓級'
+ break
+ }
+ this.alertTitle = this.alertTitle.split('/')[0] + this.collapseArr.length + this.alertTitle.split('/')[
+ 1]
+
+ },
+
+ // 鐐瑰嚮鎵爜
+ scanClick() {
+ this.topScanClick()
+ },
+
+ // 鎵爜妗嗙偣鍑�
topScanClick() {
let that = this;
@@ -555,12 +408,36 @@
success: function(res) {
console.log('鏉$爜绫诲瀷锛�' + res.scanType);
console.log('鏉$爜鍐呭锛�' + res.result);
+ that.scanContent = res.result;
- if (that.topContent.find(i => i.wo_code + ';' + i.stepcode === res.result)) {
- that.$u.toast('姝ゆ潯鐮佸凡鎵弿锛屽凡鍦ㄥ垪琛ㄤ腑锛�')
- } else {
- that.getMesOrderStepStart(res.result)
- }
+ that.getCheckScanDeviceQrCodeData(that.scanContent);
+ },
+ complete: function(res) {
+
+ },
+ fail: function(res) {
+ console.log('鏉$爜绫诲瀷锛�' + res.scanType);
+ console.log('鏉$爜鍐呭锛�' + res.result);
+ }
+
+ });
+ },
+
+ scan2() {
+ let that = this;
+
+ uni.scanCode({
+ onlyFromCamera: true,
+ // scanType: ['barCode', 'qrCode'],
+ scanType: ['qrCode'],
+ success: function(res) {
+ console.log('鏉$爜绫诲瀷锛�' + res.scanType);
+ console.log('鏉$爜鍐呭锛�' + res.result);
+ // that.scanContent = res.result;
+
+ uni.navigateTo({
+ url: './scbg2?orderstep=' + res.result
+ })
},
complete: function(res) {
@@ -574,256 +451,110 @@
});
},
- async submit() {
- // 涓嬪崍鍐欑敓浜ф姤宸ユ彁浜�
+ getCheckScanDeviceQrCodeData(code) {
+ this.inputBoxValue = code
+ this.confirmInputBoxValue(this.inputBoxValue)
+ },
- if (this.reckway === '鐝粍' && this.userGroupSheetValue === "") {
- return uni.$u.toast('鐢熶骇鐝粍涓嶈兘涓虹┖锛�')
- }
- if (this.reckway === '涓汉' && this.operSheetValue === "") {
- return uni.$u.toast('鎶ュ伐浜哄憳涓嶈兘涓虹┖锛�')
- }
- if (this.eqpSheetValue === "") {
- return uni.$u.toast('璁惧鍚嶇О涓嶈兘涓虹┖锛�')
- }
- if (this.reportqty === "") {
- return uni.$u.toast('鎶ュ伐鏁伴噺涓嶈兘涓虹┖锛�')
- }
- if (this.reckway === '鐝粍' && this.operSheetValue.length === 0) {
- return uni.$u.toast('鎶ュ伐浜哄憳淇℃伅涓嶈兘涓虹┖锛�')
- }
+ // 寮瑰嚭灞傛敹璧�
+ popupClose() {
+ this.getProductionScheduleKanban()
+ this.popupShow = false
+ },
- let badcode = []
+ // 寮瑰嚭灞傚脊鍑�
+ popupOpen() {
- if (this.badSheetValue.length > 0) {
- this.badSelectArr.forEach(i => {
- if (this.badSheetValue.split(',').includes(i.name)) {
- badcode.push(i.code)
- }
- })
- }
+ },
- let reportuser = []
+ // 閫夋嫨浜у搧
+ chosePart() {
+ let arr = []
+ this.tagArr.forEach(i => {
+ arr.push(i.code + '/' + i.name)
+ })
+ uni.navigateTo({
+ url: '../znfx/chda?param=' + JSON.stringify(arr)
+ });
+ },
- if (this.operSheetValue.length > 0) {
- this.userSelectArrAll.forEach(i => {
- if (this.operSheetValue.split(',').includes(i.name)) {
- reportuser.push(i.code)
- }
- })
- }
-
- // 涓嶈壇鍘熷洜
- const defectlist = []
- //涓嶈壇鏁伴噺
- let ngqtyNumber = 0
-
- this.ngqtyArr.forEach(i => {
- if (i.badSheetValue.toString().length > 0) {
- let codeArr = []
- ngqtyNumber += parseFloat(i.ngqty)
- i.badSheetValue.split(',').forEach(j => {
- codeArr.push(this.badSelectArr.find(i => i.name === j).code)
- })
- defectlist.push({
- badqty: i.ngqty,
- defect_code: codeArr.join(',')
- })
+ // tag鏍囩鍏抽棴
+ tagClose(val) {
+ this.tagArr.forEach((i, j) => {
+ if (i.code === val.code) {
+ i.close = false
+ this.tagArr.splice(j, 1)
}
})
-
-
- if (parseFloat(this.reportqty) + parseFloat(ngqtyNumber) > parseFloat(this.topContent[0]
- .noreportqty)) {
- return uni.$u.toast('鎶ュ伐鏁伴噺鍔犱笉鑹暟閲忎笉鑳藉ぇ浜庢湭鎶ユ暟閲忥紒')
- }
-
-
-
-
- const D = {
- rightcode: '0601',
- partcode: this.topContent[0].partnumber,
- qty: parseFloat(this.reportqty),
- onelabqty: parseFloat(this.reportqty)
- }
- const {
- data: R
- } = await LabelBarCode(D)
-
-
- const data = {
- mesordercode: this.topContent[0].wo_code,
- partcode: this.topContent[0].partnumber,
- stepseq: this.topContent[0].seq,
- stepcode: this.topContent[0].stepcode,
- stepprice: this.topContent[0].stepprice,
-
- eqpcode: this.eqpSheetList.find(i => i.name === this.eqpSheetValue).code,
-
- reckway: this.reckway === '鐝粍' ? 'group' : 'person',
-
- usergroupcode: this.userGroupSheetValue ? this.userGroupSheetList.find(i => i.name === this
- .userGroupSheetValue).code : '', // 鐝粍缂栫爜
- reportuser: this.reckway === '鐝粍' ? reportuser.join(',') : this.userSelectArrAll.find(i => i
- .name === this.operSheetValue).code,
- taskqty: this.topContent[0].planqty,
- startqty: parseFloat(this.reportqty),
- reportqty: parseFloat(this.reportqty),
- inbarcode: R[0].labcode, //鍏ュ簱鏉$爜
- defectlist,
- // defectlist: badcode.length > 0 ? [{
- // defect_code: badcode.join(','),
- // badqty: this.ngqty
- // }] : [],
- remarks: ''
- }
-
- // console.log(JSON.parse(JSON.stringify(data)), 7777)
- this.isDisabledSubmitButton = true
- const res = await SavaMesOrderStepReport(data)
- if (res.code === '200') {
- uni.$u.toast('鎶ュ伐鎴愬姛锛�')
- this.topContent = []
- this.formData = {}
- this.reportqty = ''
- // this.ngqty = ''
- this.reckway = '涓汉'
- this.userGroupSheetValue = ''
- this.eqpSheetValue = ''
-
-
- this.ngqtyArr = [{
- uid: new Date().getTime(),
- ngqty: '',
- badSheetValue: '',
- arrowDown: true //鍚戜笅绠ご
- }]
-
- // this.userGroupSheetList = []
- // this.eqpSheetList = []
- // this.badSelectArr = []
- this.badSheetValue = []
- this.checkBoxValue = []
- this.operSheetValue = ''
- // this.operSheetList = []
- // this.userArr = []
- this.userSelectValue = ''
- // this.userSelectArrAll = []
- // this.userSelectArr = []
- // this.userGroupColumns = []
- // this.eqpColumns = []
- // this.operColumns = []
-
- this.userCheckBoxValue = []
- this.userSheetShow = false
-
-
- this.isDisabledSubmitButton = false
- }
-
-
-
-
-
- },
- userGroupSheetSelect(val) {
- this.userGroupSheetValue = val.name
- this.userGroupSheetShow = false
- },
- userGroupSheetClick() {
- this.userGroupSheetShow = true
- },
- eqpSheetSelect(val) {
- this.eqpSheetValue = val.name
- this.eqpSheetShow = false
- },
- epqSheetClick() {
- this.eqpSheetShow = true
- },
- badSheetSelect(val) {
- // console.log(val,9999999)
- },
- badSheetClick(item) {
- if (!item.ngqty) {
- return uni.$u.toast('璇峰厛濉啓涓嶈壇鏁伴噺锛�')
- }
- item.arrowDown = !item.arrowDown
-
- this.checkBoxValue = item.badSheetValue.split(',')
- this.badSheetShow = true
},
- badSelectClose() {
- let index = this.ngqtyArr.findIndex(i => !i.arrowDown)
+ // 鏃堕棿鑼冨洿鍒囨崲
+ dateChange(val) {
+ if (val === 'today') {
+ this.today = false
+ this.month = true
+ this.custom = true
+ this.calendarRange = new Date().toISOString().slice(0, 10) + '~' + new Date().toISOString().slice(0,
+ 10)
+ } else if (val === 'month') {
+ this.today = true
+ this.month = false
+ this.custom = true
- this.ngqtyArr[index].badSheetValue = this.checkBoxValue.join(',')
- this.ngqtyArr[index].arrowDown = true
+ this.calendarRange = new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart(
+ 2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10)
- this.checkBoxValue = []
- this.badSheetShow = false
- },
-
- checkboxChange(val) {
- this.badSheetValue = val.join(',')
- },
- operSheetClick() {
- if (this.reckway === '涓汉') {
- this.operSheetShow = true
- }
-
- if (this.reckway === '鐝粍') {
- this.userSheetShow = true
+ } else if (val === 'custom') {
+ this.today = true
+ this.month = true
+ this.custom = false
+ this.calendarRange = new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart(
+ 2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10)
}
},
- //鍗曢�夋鍊兼敼鍙樻椂
- radioGroupChange(val) {
- this.userGroupSheetValue = ''
- this.operSheetValue = ''
+
+ // 鏃ュ巻鏃堕棿鐐瑰嚮
+ calendarClick() {
+ this.$refs.calendar.open();
},
- // 娣诲姞
- add() {
-
- if (this.ngqtyArr.find(i => i.badSheetValue === '')) {
- return uni.$u.toast('璇峰厛瀹屽杽鍓嶉潰涓嶈壇閫夐」锛�')
+ // 鏃ュ巻纭畾浜嬩欢鐐瑰嚮
+ calendarConfirm(val) {
+ if (val.range.before < val.range.after) {
+ this.calendarRange = val.range.before + '~' + val.range.after
+ } else {
+ this.calendarRange = val.range.after + '~' + val.range.before
}
- this.ngqtyArr.unshift({
- uid: new Date().getTime(),
- ngqty: '',
- badSheetValue: '',
- arrowDown: true //鍚戜笅绠ご
- })
-
- },
-
- //鍒犻櫎
- trashDelete(index) {
- console.log(index)
- this.ngqtyArr.splice(index, 1)
-
+ if (val.range.before === '') {
+ this.calendarRange = new Date().toISOString().slice(0, 10) + '~' + val.range.after
+ }
+ if (val.range.after === '') {
+ this.calendarRange = val.range.before + '~' + new Date().toISOString().slice(0, 10)
+ }
+ if (val.range.before === '' && val.range.after === '') {
+ this.calendarRange = new Date().toISOString().slice(0, 10) + '~' + new Date().toISOString().slice(0,
+ 10)
+ }
+ // this.getData()
},
- userChange(val) {
- this.userSelectValue = val
+ // 鍗曢�夋寜閽垏鎹�
+ groupChange(val) {
+ console.log(val)
},
- userGroupPickerConfirm(val) {
- console.log(val, 11)
- this.getGroupsPersonPermissions(this.userGroupSheetList.find(i => i.name === val.value[0]).code)
- this.userGroupSheetValue = val.value[0]
- this.userGroupSheetShow = false
- },
- eqpPickerConfirm(val) {
- this.eqpSheetValue = val.value[0]
- this.eqpSheetShow = false
- },
- operPickerConfirm(val) {
- this.operSheetValue = val.value[0]
- this.operSheetShow = false
- }
+
+
+
+
+
+
+
+
+
+
}
}
</script>
@@ -835,75 +566,74 @@
display: block;
}
- .custominputClass {
- width: 412rpx;
- display: flex;
- justify-content: space-between;
- border: 3rpx #eff0f1 solid;
- border-radius: 10rpx;
- padding: 0 16rpx;
+ ::v-deep .u-alert__text--info--light {
+ margin-bottom: 0;
+ font-size: 32rpx !important;
+ padding-left: 10rpx;
+ color: #212121 !important;
+ font-weight: lighter;
+ }
+
+ ::v-deep .u-alert--info--light {
+ background-color: rgba(255, 255, 255, 0.7);
+ }
+
+ ::v-deep .u-steps-item__wrapper {
+ background-color: #eee;
+ }
+
+ ::v-deep .u-steps-item__line--column {
+ display: none;
+ }
+
+ ::v-deep .u-slide-right-enter-active {
+ width: 70%;
+ }
+
+ ::v-deep .uicon-calendar {
+ font-size: 36rpx !important;
+ }
+
+ ::v-deep .u-cell__title-text {
+ font-size: 28rpx;
+ color: #212121;
+ }
+
+ ::v-deep .u-cell__value {
+ font-size: 28rpx;
+ // color: transparent;
+ color: #212121;
}
- .ellipsis {
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
+ ::v-deep .u-cell__label {
+ margin-top: 0;
+ line-height: 12px;
}
- .scanImg2 {
- width: 70px;
- height: 70px;
- border-radius: 50%;
- margin: auto;
- background: url('@/static/img/scan.png') no-repeat;
- box-shadow: #436df5 0px 0px 20px;
- background-size: 100% 100%;
+ ::v-deep .uicon-arrow-right {
+ font-size: 14px !important;
+ color: #212121 !important;
}
- ::v-deep .addClass .uicon-plus-circle {
- font-size: 50rpx !important;
- margin-right: 20rpx !important;
+ ::v-deep .u-line-progress__text {
+ // margin-right: -20px;
+ // color: #212121;
+ // width: 100px;
+ // margin-top: 10px;
+ display: none;
+
}
- ::v-deep .addClass .u-button__text {
- font-size: 46rpx !important;
+ ::v-deep .u-text__value--content {
+ font-size: 12px !important;
}
-
- ::v-deep .u-modal__content {
- padding-bottom: 260rpx;
- margin-bottom: 100rpx;
+ ::v-deep .u-tag__close {
+ background: #436df5 !important;
}
- ::v-deep .u-action-sheet {
- max-height: 600rpx !important;
- overflow: auto !important;
- }
-
- ::v-deep .u-checkbox-label--right {
- padding: 30rpx;
- border-bottom: 1rpx solid #eee;
- }
-
-
-
- .badSheetClass {
- position: relative;
- }
-
- .badNumber {
- position: absolute;
- top: 20rpx;
- left: 20rpx;
- font-size: 26rpx;
- color: rgb(0, 102, 255)
- }
-
- .trash {
- position: absolute;
- top: 20rpx;
- right: 30rpx;
- font-size: 26rpx;
+ ::v-deep .u-cell__body {
+ padding-bottom: 40rpx;
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3