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/wwgl/wxfl.vue |  805 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 507 insertions(+), 298 deletions(-)

diff --git a/pages/wwgl/wxfl.vue b/pages/wwgl/wxfl.vue
index 81fae1e..cd367b7 100644
--- a/pages/wwgl/wxfl.vue
+++ b/pages/wwgl/wxfl.vue
@@ -1,163 +1,225 @@
 <template>
 	<view>
-		<page-nav title="濮斿鍙戞枡"></page-nav>
+		<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" class="mainContent">
-			<u-gap height="10" bgColor="#eff0f1"></u-gap>
-			<view class="head">
-				<view class="head_block">
-					<view class="head_left">
-						<view class="head_bar"></view>
-						<view class="head_title" style="font-weight: bolder;">
-							鍙戞枡淇℃伅
+
+		<u-alert :title="alertTitle" type="info"></u-alert>
+
+
+		<!-- 鎶樺彔闈㈡澘 -->
+		<!-- <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 style="position: absolute;width: 200rpx;left: 30rpx;top:34px;font-size: 24rpx;color: #999;">
+					{{item.partname}} {{item.partspec}}
+				</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 class="marginLeft20 marginRight20" style="height: 360rpx;" v-if="topContent.length!==0">
-					<view class="marginBottom20" style="display: flex;">
-						<!--  v-for="item in purchorderArr"  -->
-						<view class="flex_column titleFont">
-							<view>宸ュ崟缂栧彿锛�</view>
-							<view>浜у搧缂栫爜锛�</view>
-							<view>浜у搧鍚嶇О锛�</view>
-							<view>浜у搧瑙勬牸锛�</view>
-							<view>褰撳墠宸ュ簭锛�</view>
-							<view>浠诲姟鏁伴噺锛�</view>
-							<view>鏈彂/宸插彂锛�</view>
+
+				<view v-if="radiovalue==='鐢熶骇宸ュ崟'" style="margin:0 0  5px">
+					<view class="flex_column">
+						<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_column contentFont">
-							<view>{{topContent[0].wo_code}}</view>
-							<view>{{topContent[0].partnumber}}</view>
-							<view>{{topContent[0].partname}}</view>
-							<view>{{topContent[0].partspec?topContent[0].partspec:'/'}}</view>
-							<view>{{topContent[0].stepname}}</view>
-							<view>{{topContent[0].planqty}}</view>
-							<view>{{topContent[0].startqty+'/'+topContent[0].reportqty}}</view>
+						<view style="display:flex">
+							<view class="titleFont" style="font-size: 14px;">浜у搧鍚嶇О锛�</view>
+							<view class="contentFont" style="font-size: 14px;">{{item.partname}}</view>
 						</view>
-					</view>
-				</view>
-
-			</view>
-
-
-			<u-gap height="10" bgColor="#eff0f1"></u-gap>
-			<view class="head">
-				<view class="head_block" style="justify-content: flex-start;height: 70rpx;padding-bottom: 10rpx;">
-					<view class="head_left">
-						<view class="head_bar"></view>
-						<view class="head_title" style="font-weight: bolder;">
-							澶栧崗渚涙柟
-						</view>
-					</view>
-					<view style="margin-left: 20rpx;">
-						<view @click='WXSheetClick' class="custominputClass">
-							<view v-show='WXSheetValue===""' style="color: rgb(192, 196, 204);">璇烽�夋嫨</view>
-							<view v-show='WXSheetValue!==""' class="ellipsis" style="width: 390rpx;">
-								{{WXSheetValue}}
+						<view style="display:flex">
+							<view class="titleFont" style="font-size: 14px;">浜у搧瑙勬牸锛�</view>
+							<view class="contentFont" style="font-size: 14px;">{{item.partspec?item.partspec:'/'}}
 							</view>
-							<u-icon :name="!WXSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon>
 						</view>
-
 					</view>
 				</view>
-			</view>
 
 
-			<u-gap height="10" bgColor="#eff0f1"></u-gap>
-			<view class="head">
-				<view class="head_block" style="justify-content: flex-start;height: 70rpx;padding-bottom: 10rpx;">
-					<view class="head_left">
-						<view class="head_bar"></view>
-						<view class="head_title" style="font-weight: bolder;">
-							澶栧崗浜哄憳
+				<!-- {{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;">
+
+						<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>
-					<view style="margin-left: 20rpx;">
-						<view @click='userSheetClick' class="custominputClass">
-							<view v-show='userSheetValue===""' style="color: rgb(192, 196, 204);">璇烽�夋嫨</view>
-							<view v-show='userSheetValue!==""' class="ellipsis" style="width: 390rpx;">
-								{{userSheetValue}}
+						<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>
-							<u-icon :name="!userSheetShow?'arrow-down-fill':'arrow-up-fill'"></u-icon>
 						</view>
+					</view>
 
+				</u-steps>
+				<!-- </u--text> -->
+
+
+			</u-collapse-item>
+
+		</u-collapse>
+
+
+		<!-- 寮瑰嚭灞� -->
+		<!-- 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 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>
 
-			<u-gap height="10" bgColor="#eff0f1"></u-gap>
-			<view class="head">
-				<view class="head_block" style="justify-content: flex-start;height: 70rpx;padding-bottom: 10rpx;">
-					<view class="head_left">
-						<view class="head_bar"></view>
-						<view class="head_title" style="font-weight: bolder;">
-							鍙戞枡鏁伴噺
-						</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>
-					<view style="margin-left: 20rpx;">
-						<view class='inputClass'>
-							<u--input placeholder="璇疯緭鍏�" border="surround" type='number' v-model="fqty">
-							</u--input>
-						</view>
 
-					</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-picker v-if="topContent.length!==0" :show="WXSheetShow" :columns="WXColumns" :itemHeight='55'
-				:closeOnClickOverlay='true' @close='WXSheetShow=false' @confirm='WXPickerConfirm'
-				@cancel='WXSheetShow=false'>
-			</u-picker>
-
-
-			<u-picker v-if="topContent.length!==0" :show="userSheetShow" :columns="userColumns" :itemHeight='55'
-				:closeOnClickOverlay='true' @close='userSheetShow=false' @confirm='userPickerConfirm'
-				@cancel='userSheetShow=false'>
-			</u-picker>
-
-
-		</view>
-
-		<u-button size="large" v-show="topContent.length!==0" :loading="isDisabledSubmitButton"
-			loadingText="姝e湪鎻愪氦,璇风◢绛�..." type="primary" @click="submit" text="鍙戞枡">
-		</u-button>
-
-
-		<!-- 鎮诞鐞� -->
-		<!-- 	<view v-show="topContent.length!==0&&!WXSheetShow&&!userSheetShow" @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,
-		CustomerPermissions,
-		PersonPermissions,
-		SavaMesOrderStepOut
+		ProductionScheduleKanban
 	} from '../../config/api.js';
-	// import scanCode from '@/components/scan-code/scan-code.vue'
-
 	export default {
 		onLoad(option) {
+			const _this = this
+			uni.$off('scancodedate') // 姣忔杩涙潵鍏� 绉婚櫎鍏ㄥ眬鑷畾涔変簨浠剁洃鍚櫒
+			uni.$on('scancodedate', function(content) {
+				console.log("鎵弿鍒扮殑鍐呭涓�:", content)
+				_this.getCheckScanDeviceQrCodeData(content)
+			})
 
+
+			console.log(option, 8)
 		},
 
 		onPullDownRefresh() {
@@ -171,45 +233,60 @@
 		data() {
 			return {
 				topRightMessageCount: '',
+				inputBoxValue: '',
+				alertTitle: '',
+				popupShow: false, //寮瑰嚭灞傛槸鍚︽樉绀�
+				collapseArr: [ //鎶樺彔闈㈡澘鏁版嵁
+				],
+				collapseArrAll: [], //鎵�鏈�
+				placeholder: '璇疯緭鍏ュ伐鍗曚俊鎭�',
+				radiovalue: '鐢熶骇宸ュ崟', //鍗曟嵁绫诲瀷
+				// SO锛氶攢鍞鍗�  MO锛氱敓浜ц鍗�  PO锛氱敓浜у伐鍗�
+				radiolist: [{
+						name: '閿�鍞鍗�'
+					},
+					{
+						name: '鐢熶骇璁㈠崟'
+					},
+					{
+						name: '鐢熶骇宸ュ崟'
+					},
+				],
 
-				isDisabledSubmitButton: false,
+				today: true,
+				month: false,
+				custom: true,
 
-				topContent: [],
-				// {
-				// "wo_code": "MO-2023-06-0003_1",
-				// "partnumber": "308",
-				// "partname": "鐢垫睜鍖�",
-				// "partspec": "",
-				// "seq": "2",
-				// "stepcode": "ZSStep03",
-				// "stepname": "鍘绘瘺鍒�",
-				// "nextstepcode": "ZSStep06",
-				// "nextstepname": "鍖呰2",
-				// "stepdesc": "",
-				// "wkshopcode": "ZS001",
-				// "wkshopname": "娉ㄥ杞﹂棿",
-				// "planqty": 50.00,
-				// "startqty": 29.00,
-				// "noreportqty": 29.00,
-				// "reportqty": 21.00,
-				// "noputqty": 0.0,
-				// "list": null
-				// }, //鎵弿浠诲姟鏉$爜鎵�甯﹀嚭鏉ョ殑鍐呭
-
-				WXSheetValue: '',
-				WXSheetShow: false, //涓婃媺鍒楄〃鏄惁灞曞紑
-				WXColumns: [],
-				WXSheetList: [],
+				// 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), //褰撴湀鏃ユ湡
 
 
-				userSheetValue: '',
-				userSheetShow: false,
-				userColumns: [],
-				userSheetList: [],
 
-				fqty: null,
-
-
+				tagArr: [
+					// {
+					// 	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'
+					// },
+				], //宸查�変腑鐨勪骇鍝佹爣绛�
 
 
 			}
@@ -220,67 +297,28 @@
 		mounted() {
 			this.init()
 
-
-			// this.getMesOrderStepStart('MO-2023-09-0002_1;106')
-
-			this.handleSelectAllApi()
-
-
+			this.getProductionScheduleKanban()
 		},
 		methods: {
 			init() {
 				uni.stopPullDownRefresh();
 			},
+			gotoPage(p1, p2) {
+				let orderstep = null
 
-			async handleSelectAllApi() {
-				await this.getCustomerPermissions()
-				await this.getPersonPermissions()
-			},
-
-
-			async getPersonPermissions(val) {
-				const data = {
-					usercode: val
-				}
-				const res = await PersonPermissions(this.global.formatData(data))
-				this.userSheetList = res.data
-				this.userColumns = [res.data.map(i => i.username)]
-			},
-
-			async getCustomerPermissions(val) {
-				const data = {
-					orderstepqrcode: val
-				}
-				const res = await CustomerPermissions(this.global.formatData(data))
-				this.WXSheetList = res.data
-				this.WXColumns = [res.data.map(i => i.name)]
-			},
-
-			async getMesOrderStepStart(val) {
-				const data = {
-					OperType: 'WX',
-					SelectType: 'OUT',
-					wocode: val ? val.split(';')[0] : '',
-					stepcode: val ? val.split(';')[1] : ''
-				}
-
-				const res = await MesOrderStepStart(this.global.formatData(data))
-				console.log(res, 3)
-
-				if (res.code === '200') {
-					this.WXSheetValue = ''
-					this.userSheetValue = ''
-					this.fqty = null
-					this.topContent = []
-					this.topContent.push(res.data)
+				if (p1) {
+					orderstep = p1 + ';' + p2
+				} else {
+					orderstep = ''
 				}
 
 
-
+				uni.navigateTo({
+					url: './wxfl2?orderstep=' + orderstep
+				})
 			},
 
-			//  浠诲姟鏉$爜  鐨勬壂鐮佹鐐瑰嚮
-			topScanClick() {
+			scan2() {
 				let that = this;
 
 				uni.scanCode({
@@ -290,8 +328,11 @@
 					success: function(res) {
 						console.log('鏉$爜绫诲瀷锛�' + res.scanType);
 						console.log('鏉$爜鍐呭锛�' + res.result);
+						// that.scanContent = res.result;
 
-						that.getMesOrderStepStart(res.result)
+						uni.navigateTo({
+							url: './wxfl2?orderstep=' + res.result
+						})
 
 					},
 					complete: function(res) {
@@ -305,108 +346,215 @@
 				});
 			},
 
-
-			WXSheetClick() {
-				this.WXSheetShow = true
+			getCheckboxValue(val) {
+				this.tagArr = []
+				val.forEach(i => {
+					this.tagArr.push({
+						close: true,
+						name: i.split('/')[1].trim(),
+						code: i.split('/')[0].trim()
+					})
+				})
 			},
 
-			WXPickerConfirm(val) {
-				this.WXSheetValue = val.value[0]
-				this.WXSheetShow = false
-			},
-
-			userSheetClick() {
-				this.userSheetShow = true
-			},
-
-			userPickerConfirm(val) {
-				this.userSheetValue = val.value[0]
-				this.userSheetShow = false
-			},
-
-
-			async submit() {
-
-				if (!this.WXSheetValue) {
-					return uni.$u.toast('澶栧崗渚涙柟涓嶈兘涓虹┖锛�')
+			// 鎺ュ彛鑾峰彇
+			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
 				}
 
-				if (!this.userSheetValue) {
-					return uni.$u.toast('澶栧崗浜哄憳涓嶈兘涓虹┖锛�')
-				}
-
-				if (!this.fqty) {
-					return uni.$u.toast('鍙戞枡鏁伴噺涓嶈兘涓虹┖锛�')
-				}
-
-				if (parseFloat(this.fqty) > parseFloat(this.topContent[0].startqty)) {
-					return uni.$u.toast('鍙戞枡鏁伴噺涓嶈兘澶т簬鏈彂鏁伴噺锛�')
-				}
-
-				// const header = {
-				// 	'Content-Type': 'application/x-www-form-urlencoded',
-				// 	'rediskey': uni.getStorageSync('rediskey'),
-				// 	'admin': uni.getStorageSync('usercode'),
-				// 	'username': encodeURIComponent(uni.getStorageSync('username')),
-				// 	'navTabId': uni.getStorageSync('usercode'),
-				// 	'userid': uni.getStorageSync('userid'),
-				// 	'guid': uni.getStorageSync('guid'),
-				// 	'usertype': 'APP'
-				// }
 
 				const data = {
-					mesordercode: this.topContent[0].wo_code, // 宸ュ崟缂栧彿
-					partcode: this.topContent[0].partnumber, // 浜у搧缂栫爜
-					stepseq: this.topContent[0].seq, // 宸ュ簭搴忓彿    
-					stepcode: this.topContent[0].stepcode, // 宸ュ簭缂栫爜
-					wxcode: this.WXSheetList.find(i => i.name === this.WXSheetValue).code, // 澶栧崗渚涘簲鍟嗙紪鐮�
-					outuser: this.userSheetList.find(i => i.username === this.userSheetValue).usercode, // 鍙戞枡浜哄憳
-					taskqty: this.topContent[0].planqty, // 浠诲姟鏁伴噺
-					fqty: this.fqty // 鍙戞枡鏁伴噺
+					ordertype,
+					partcode: this.tagArr.map(i => i.code).join(','),
+					Ratetime: this.calendarRange,
+
+				}
+				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;
+
+				uni.scanCode({
+					onlyFromCamera: true,
+					// scanType: ['barCode', 'qrCode'],
+					scanType: ['qrCode'],
+					success: function(res) {
+						console.log('鏉$爜绫诲瀷锛�' + res.scanType);
+						console.log('鏉$爜鍐呭锛�' + res.result);
+						that.scanContent = res.result;
+
+						that.getCheckScanDeviceQrCodeData(that.scanContent);
+					},
+					complete: function(res) {
+
+					},
+					fail: function(res) {
+						console.log('鏉$爜绫诲瀷锛�' + res.scanType);
+						console.log('鏉$爜鍐呭锛�' + res.result);
+					}
+
+				});
+			},
+
+			getCheckScanDeviceQrCodeData(code) {
+				this.inputBoxValue = code
+				this.confirmInputBoxValue(this.inputBoxValue)
+			},
+
+
+			// 寮瑰嚭灞傛敹璧�
+			popupClose() {
+				this.getProductionScheduleKanban()
+				this.popupShow = false
+			},
+
+			// 寮瑰嚭灞傚脊鍑�
+			popupOpen() {
+
+			},
+
+			// 閫夋嫨浜у搧
+			chosePart() {
+				let arr = []
+				this.tagArr.forEach(i => {
+					arr.push(i.code + '/' + i.name)
+				})
+				uni.navigateTo({
+					url: '../znfx/chda?param=' + JSON.stringify(arr)
+				});
+			},
+
+			// tag鏍囩鍏抽棴
+			tagClose(val) {
+				this.tagArr.forEach((i, j) => {
+					if (i.code === val.code) {
+						i.close = false
+						this.tagArr.splice(j, 1)
+					}
+				})
+			},
+
+			// 鏃堕棿鑼冨洿鍒囨崲
+			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.calendarRange = new Date().getFullYear() + '-' + (new Date().getMonth() + 1).toString().padStart(
+						2, '0') + '-01' + '~' + new Date().toISOString().slice(0, 10)
+
+				} 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)
+				}
+			},
+
+			// 鏃ュ巻鏃堕棿鐐瑰嚮
+			calendarClick() {
+				this.$refs.calendar.open();
+			},
+
+			// 鏃ュ巻纭畾浜嬩欢鐐瑰嚮
+			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
 				}
 
-				console.log(JSON.stringify(data), 6)
-
-				this.isDisabledSubmitButton = true
-				const res = await SavaMesOrderStepOut(data)
-				if (res.code === '200') {
-					uni.$u.toast('鍙戞枡鎴愬姛锛�')
-
-					this.WXSheetValue = ''
-					this.userSheetValue = ''
-					this.fqty = null
-					this.topContent = []
-
-					this.isDisabledSubmitButton = false
+				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()
+			},
 
-				// this.isDisabledSubmitButton = true
-				// uni.uploadFile({
-				// 	url: this.$baseUrl + '/AppProductionManagement/SavaMesOrderStepOut',
-				// 	files: [{
-				// 		"uri": "/"
-				// 	}],
-				// 	header: header,
-				// 	formData: data,
-				// 	success: (res) => {
-				// 		uni.$u.toast('鍙戞枡鎴愬姛锛�')
 
-				// 		this.WXSheetValue = ''
-				// 		this.userSheetValue = ''
-				// 		this.fqty = null
-				// 		this.topContent = []
-
-				// 		this.isDisabledSubmitButton = false
-				// 	},
-				// 	fail(res) {
-				// 		uni.$u.toast('鍙戞枡澶辫触锛�')
-				// 		this.isDisabledSubmitButton = false
-				// 	},
-				// })
+			// 鍗曢�夋寜閽垏鎹�
+			groupChange(val) {
+				console.log(val)
+			},
 
 
 
-			}
+
+
+
+
+
+
+
 		}
 	}
 </script>
@@ -418,13 +566,74 @@
 		display: block;
 	}
 
-	.custominputClass {
-		width: 412rpx;
-		display: flex;
-		justify-content: space-between;
-		border: 3rpx #eff0f1 solid;
-		border-radius: 10rpx;
-		padding: 0 16rpx;
-		line-height: 68rpx;
+	::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;
+
+	}
+
+	::v-deep .u-cell__label {
+		margin-top: 0;
+		line-height: 12px;
+	}
+
+	::v-deep .uicon-arrow-right {
+		font-size: 14px !important;
+		color: #212121 !important;
+	}
+
+	::v-deep .u-line-progress__text {
+		// margin-right: -20px;
+		// color: #212121;
+		// width: 100px;
+		// margin-top: 10px;
+		display: none;
+
+	}
+
+	::v-deep .u-text__value--content {
+		font-size: 12px !important;
+	}
+
+	::v-deep .u-tag__close {
+		background: #436df5 !important;
+	}
+
+	::v-deep .u-cell__body {
+		padding-bottom: 40rpx;
 	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3