From 8e4ba2b3027b50ee953933ef9ae7cbdba987deb4 Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期二, 15 七月 2025 10:50:27 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev

---
 pages/caigoudingdan/generate.vue      |  483 +++++++++++++
 pages.json                            |   14 
 pages/MJGL/shangmudan/form.vue        |  752 +++++++++++++++++++++
 pages/MJGL/shangmudan/table.vue       |  594 ++++++++++++++++
 pages/index/index.vue                 |    6 
 pages/caigoudingdan/caigoudingdan.vue |  246 +++++++
 6 files changed, 2,095 insertions(+), 0 deletions(-)

diff --git a/pages.json b/pages.json
index 7b3defa..d042fc4 100644
--- a/pages.json
+++ b/pages.json
@@ -462,6 +462,20 @@
 					"style": {
 						"navigationBarTitleText": "鏉ユ枡鏉$爜鎵撳嵃"
 					}
+				},
+				{
+					"path" : "pages/MJGL/shangmudan/table",
+					"style" : 
+					{
+						"navigationBarTitleText" : "涓婃ā鍗�"
+					}
+				},
+				{
+					"path" : "pages/MJGL/shangmudan/form",
+					"style" : 
+					{
+						"navigationBarTitleText" : "涓婃ā鍗�"
+					}
 				}
 	],
 	"tabBar": {
diff --git a/pages/MJGL/shangmudan/form.vue b/pages/MJGL/shangmudan/form.vue
new file mode 100644
index 0000000..8ae3262
--- /dev/null
+++ b/pages/MJGL/shangmudan/form.vue
@@ -0,0 +1,752 @@
+<template>
+	<view>
+		<view class="form">
+			<view class="form-item">
+				<view class="title"><text>*</text>鏉″舰鐮�:</view>
+				<view class="right" style="width: 380rpx;">
+					<input v-model="hform.HBarCode" disabled placeholder="璇锋壂鎻忔潯鐮�"/>
+				</view>
+				<uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons>
+			</view>
+			<view class="form-item">
+				<view class="title">鍗曟嵁鍙�:</view>
+				<view class="righton">
+					<input name="HBillNo" disabled v-model="hform.HBillNo" />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鍗曟嵁鏃ユ湡:</view>
+				<view class="right">
+					<picker mode="date" v-model="hform.HDate" @change="HDateChange">
+						<input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
+					</picker>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title"><text>*</text>浣跨敤閮ㄩ棬:</view>
+				<view class="right">
+					<uni-combox :candidates="arrayHDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" v-model="hform.HDeptName" @input="HDeptNameChange"></uni-combox>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title"><text>*</text>鎿嶄綔鍛�:</view>
+				<view class="right">
+					<uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨鎿嶄綔鍛�" v-model="hform.HEmpName" @input="HEmpNameChange"></uni-combox>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title"><text>*</text>璐熻矗浜�:</view>
+				<view class="right">
+					<uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨璐熻矗浜�" v-model="hform.HMangerName" @input="HManagerNameChange"></uni-combox>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鐢熶骇璧勬簮:</view>
+				<view class="right">
+					<uni-combox :candidates="arrayHSourceName" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName" @input="HSourceNameChange"></uni-combox>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鍣ㄥ叿缂栫爜:</view>
+				<view class="righton">
+					<input name="HMouldNumber" v-model="hform.HMouldNumber" disabled placeholder="璇疯緭鍏ュ櫒鍏风紪鐮�" />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鍣ㄥ叿鍚嶇О:</view>
+				<view class="righton">
+					<input name="HMouldName" v-model="hform.HMouldName" disabled placeholder="璇疯緭鍏ュ櫒鍏峰悕绉�" />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鍣ㄥ叿鍨嬪彿:</view>
+				<view class="righton">
+					<input name="HMouldModel" v-model="hform.HMouldModel" disabled placeholder="璇疯緭鍏ュ櫒鍏峰瀷鍙�" />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鏁伴噺:</view>
+				<view class="righton">
+					<input name="HQty" v-model="hform.HQty" disabled placeholder="璇疯緭鍏ユ暟閲�" />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">涓婃ā鏃堕棿:</view>
+				<view class="righton">
+					<input name="HScanDate" disabled v-model="hform.HScanDate" placeholder="璇烽�夋嫨" />
+				</view>
+			</view>
+			
+			<view class="form-item">
+				<view class="title">鐢熶骇璁㈠崟:</view>
+				<view class="righton">
+					<input name="HICMOBillNo" disabled v-model="hform.HICMOBillNo" />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">娴佽浆鍗�:</view>
+				<view class="righton">
+					<input disabled v-model="hform.HProcExchBillNo" />
+				</view>
+			</view>
+		
+			<view class="form-item">
+				<view class="title">澶囨敞:</view>
+				<view class="right">
+					<textarea name="HRemark" v-model="hform.HRemark" auto-height placeholder="璇疯緭鍏ュ娉�"></textarea>
+				</view>
+			</view>
+			
+			<view class="tab_area"></view>
+			
+			<view v-if="showmore">				
+				<view class="form-item">
+					<view class="title">鍒跺崟浜�:</view>
+					<view class="righton">
+						<input v-model="hform.HMaker" disabled/>
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">鍒跺崟鏃ユ湡:</view>
+					<view class="righton">
+						<input v-if="hform.HMakeDate" v-model="hform.HMakeDate.substr(0,10)" disabled/>
+						<input v-else v-model="hform.HMakeDate" disabled/>
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">淇敼浜�:</view>
+					<view class="righton">
+						<input v-model="hform.HUpDater" disabled/>
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">淇敼鏃ユ湡:</view>
+					<view class="righton">
+						<input v-if="hform.HUpDateDate" v-model="hform.HUpDateDate.substr(0,10)" disabled/>
+						<input v-else v-model="hform.HUpDateDate" disabled/>
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">瀹℃牳浜�:</view>
+					<view class="righton">
+						<input v-model="hform.HChecker" disabled/>
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">瀹℃牳鏃ユ湡:</view>
+					<view class="righton">
+						<input v-if="hform.HCheckDate" v-model="hform.HCheckDate.substr(0,10)" disabled/>
+						<input v-else v-model="hform.HCheckDate" disabled/>
+					</view>
+				</view>
+			
+			</view>
+			<view class="other">
+				<view v-if="!showmore" @tap="showmore = true">
+					灞曞紑鍏朵粬淇℃伅<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
+				</view>
+				<view v-if="showmore" @tap="showmore = false">
+					鎶樺彔鍏朵粬淇℃伅<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
+				</view>
+			</view>
+				
+			<view class="tab_area"></view>
+				
+			<view class="bottom-btn">
+				<button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+				<button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">淇敼</button>
+				<button v-if="btnType != 1 && isEdit" class="btn-a" size="mini" @tap="submit">鎻愪氦</button>					
+				<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+			</view>
+		</view>
+		
+	</view>
+</template>
+<script>
+	import getDateTime from '@/utils/getdateTime.js';
+	import { getUserInfo } from "@/utils/auth.js";
+    export default {
+        data() {
+            return {
+				userInfo:getUserInfo(),
+				serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
+				linterid:'',
+				HBillNo:'',
+				btnType:1,//1鏂板锛�3淇敼
+				showmore: false,
+				
+				arrayHDeptName:[],//閮ㄩ棬
+				HDeptNameList:[],
+				arrayHEmpName:[],//鍙戠幇浜�/璐熻矗浜�
+				HEmpNameList:[],
+				arrayHSourceName:[],//鐢熶骇璧勬簮
+				HSourceNameList:[],
+				
+				
+				isEdit: false,
+				hform:{
+					HInterID:'',
+					HBillNo:'',
+					HDate:getDateTime.dateTimeStr('y-m-d'),
+					HBarCode:'',
+					HDeptName:'',
+					HDeptID:'',
+					HEmpName:'',
+					HEmpID:'',
+					HMangerName:'',
+					HMangerID:'',
+					
+					
+					HSourceName:'',
+					HSourceID:'',
+					HMouldNumber:'',
+					HMouldID:'',
+					HMouldName:'',
+					HMouldModel:'',
+					HQty:'',
+					HScanDate:getDateTime.dateTimeStr('y-m-d h:i:s'),
+					HICMOBillNo:'',
+					HICMOInterID:'',
+					HICMOEntryID:'',
+					HProcExchBillNo:'',
+					HProcExchInterID:'',
+					HProcExchEntryID:'',
+					HOrgID:uni.getStorageSync('OrganizationID'),
+					
+					HMaker:'',
+					HMakeDate:'',
+					HUpDater:'',
+					HUpDateDate:'',		
+					HChecker:'',
+					HCheckDate:'',
+					HCloseMan:'',
+					HCloseDate:'',		
+					HDeleteMan:'',
+					HDeleteDate:'',
+					
+					eventType:'Add'
+				}
+            }
+        },
+		onLoad(e) {
+			
+			this.hform.HMaker = uni.getStorageSync('HUserName')
+			console.log(e,this.userInfo)
+			if(e.linterid){
+				this.btnType = 3
+				this.linterid = e.linterid
+				this.HBillNo = e.HBillNo
+				this.getEditData(e.linterid, e.HBillNo)
+			}else{
+				this.getNewData()
+			}
+	
+			this.getHDeptList()
+			this.getHEmpList()
+			this.getHSourceList()
+		},
+        methods: {
+			//鎵爜
+			toScanCode(){		
+				uni.scanCode({
+				    onlyFromCamera: true,
+				    success: (res) => {
+				        console.log('鏉$爜鍐呭锛�' + res.result);
+						this.hform.HBarCode = res.result
+						this.getHBarCodeData(res.result)
+				    }
+				});
+			},
+			//鏃ユ湡
+			HDateChange(e){
+				console.log(e.detail.value)
+				this.hform.HDate = e.detail.value
+			},
+			getHBarCodeData(HBarCode) {
+				if(!this.hform.HSourceName){
+					uni.showToast({
+						title:'璇峰厛閫夋嫨鐢熶骇璧勬簮',
+						icon:'none'
+					});
+					return;
+				}
+				var HBillType = "";
+				var barNo = "";
+				if (HBarCode.length < 22) {
+					barNo = HBarCode.substr(0, 4);
+					switch (barNo) {
+						case "GXLX":
+						HBillType = "3772";
+							break;
+					}
+				}
+
+				if (HBarCode.length > 22) {
+					barNo = HBarCode.substr(0, 22);
+					switch (barNo) {
+						case "https://qr61.cn/omM1Cj":
+							HBillType = "3899";
+							break;
+						case "https://qr61.cn/oAhaGh":
+							HBillType = "3308";
+							break;
+						case "https://www.aliwork.com":
+							HBillType = "3308";
+							break;
+                    }
+                }
+				uni.request({
+					url: this.serverUrl + '/Sc_MouldUpperBill/txtHBarCode_KeyDown',
+					data: {
+						HBarCode: this.hform.HBarCode,
+						HSourceID:this.hform.HSourceID,
+						UserID:uni.getStorageSync('Czybm'),
+						HBillType:HBillType
+					},
+					success: (res) => {
+						console.log(2, res.data);
+						if (res.data.code == 1) {
+							var data = res.data.data[0];
+							console.log(3, data);
+							var num=data.Num;
+							console.log(4, num);
+							switch (num) {
+								case 1:
+									this.hform.HSourceID = data.HItemID;
+									this.hform.HSourceName = data.HName;
+								break;
+
+								case 2:
+									this.hform.HICMOBillNo = data.鍗曟嵁鍙�;
+									this.hform.HICMOInterID = data.hmainid;
+									this.hform.HICMOEntryID = data.HEntryID;
+								break;
+
+								case 3:
+									this.hform.HMouldID = data.hmainid;
+									this.hform.HMouldNumber = data.妯″叿缂栧彿;
+									this.hform.HMouldName = data.妯″叿鍚嶇О;
+									this.hform.HMouldModel = data.妯″叿鍨嬪彿;
+									this.hform.HQty = 1;
+								break;
+
+								case 4:
+									this.hform.HProcExchBillNo = data.鍗曟嵁鍙�;
+									this.hform.HProcExchInterID = data.hmainid;
+									this.hform.HProcExchEntryID = data.HEntryID;
+									this.hform.HICMOBillNo = data.浠诲姟鍗曞彿;
+									this.hform.HICMOInterID = data.hicmointerid;
+									this.hform.HICMOEntryID = data.HICMOEntryID;
+								break;
+								default:
+									uni.showToast({
+										title: '鏈煡鐨勮繑鍥炵被鍨�',
+										icon: 'none',
+									});
+								break;
+							}
+						} else {
+							uni.showToast({
+								title: res.data.Message,
+								icon: 'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title: '鎺ュ彛璇锋眰澶辫触',
+							icon: 'none'
+						})
+					},
+				});
+			},			
+			//鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+			getHDeptList(){
+				uni.request({
+				    url: this.serverUrl + '/PublicPageMethod/DeptList', 
+					data: { sWhere: "where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + uni.getStorageSync('OrganizationID') + "" },
+				    success: (res) => {
+						if(res.data.count == 1){
+							this.HDeptNameList = res.data.data
+							for(var i=0;i<res.data.data.length;i++){
+								this.arrayHDeptName[i] = res.data.data[i].HName
+							}
+							this.$forceUpdate();
+						}else{
+							uni.showToast({
+								title:res.data.Message,
+								icon:'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title:'鎺ュ彛璇锋眰澶辫触',
+							icon:'none'
+						})
+					},
+				});
+			},
+			//閫夋嫨浣跨敤閮ㄩ棬
+			HDeptNameChange(e){
+				for(var i=0;i<this.HDeptNameList.length;i++){
+					if(this.HDeptNameList[i].HName == e){
+						this.hform.HDeptID = this.HDeptNameList[i].HItemID
+					}
+				}
+			},
+			//鎿嶄綔鍛樸�佽礋璐d汉
+			getHEmpList(){
+				uni.request({
+					url: this.serverUrl + '/Web/GetEmployeeList_Json', 
+					data: { Employee: '',HGroupID:0 },
+					success: (res) => {
+						if(res.data.count == 1){
+							this.HEmpNameList = res.data.data
+							for(var i=0;i<res.data.data.length;i++){
+								this.arrayHEmpName[i] = res.data.data[i].HName
+							}
+							this.$forceUpdate();
+						}else{
+							uni.showToast({
+								title:res.data.Message,
+								icon:'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title:'鎺ュ彛璇锋眰澶辫触',
+							icon:'none'
+						})
+					},
+				});
+			},
+			//閫夋嫨鎿嶄綔鍛�
+			HEmpNameChange(e){
+				for(var i=0;i<this.HEmpNameList.length;i++){
+					if(this.HEmpNameList[i].HName == e){
+						this.hform.HEmpID = this.HEmpNameList[i].HItemID
+					}
+				}
+			},
+			//閫夋嫨璐熻矗浜�
+			HManagerNameChange(e){
+				for(var i=0;i<this.HEmpNameList.length;i++){
+					if(this.HEmpNameList[i].HName == e){
+						this.hform.HMangerID = this.HEmpNameList[i].HItemID
+					}
+				}
+			},
+			//鐢熶骇璧勬簮
+			getHSourceList(){
+				uni.request({
+					url: this.serverUrl + '/api/newBill/getSourceList', 
+					data: { sWhere: '' },
+					success: (res) => {
+						if(res.data.code == 1){
+							this.HSourceNameList = res.data.data.Gy_Source
+							for(var i=0;i<res.data.data.Gy_Source.length;i++){
+								this.arrayHSourceName[i] = res.data.data.Gy_Source[i].鐢熶骇璧勬簮
+							}
+							this.$forceUpdate();
+						}else{
+							uni.showToast({
+								title:res.data.Message,
+								icon:'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title:'鎺ュ彛璇锋眰澶辫触',
+							icon:'none'
+						})
+					},
+				});
+			},
+			//閫夋嫨鐢熶骇璧勬簮
+			HSourceNameChange(e){
+				for(var i=0;i<this.HSourceNameList.length;i++){
+					if(this.HSourceNameList[i].鐢熶骇璧勬簮 == e){
+						this.hform.HSourceID = this.HSourceNameList[i].HItemID
+					}
+				}
+			},
+			ifEdit(){
+				this.isEdit = true
+				this.hform.eventType = 'Modify'
+			},
+			//缂栬緫鍥炴樉
+			getEditData(linterid,HBillNo){				
+				//涓昏〃
+				var sWhere = " and hmainid='" + linterid + "'";
+				uni.request({
+				    url: this.serverUrl + '/Sc_MouldUpperBill/Sc_MouldUpperBillList', 
+					data: { sWhere: sWhere,user: uni.getStorageSync('HUserName') },
+				    success: (res) => {
+				        console.log(1,res.data.data[0]);
+						if(res.data.code == 1){
+							var data = res.data.data[0]							
+							this.btnType=3
+							this.hform.HInterID= data.hmainid
+							this.hform.HBillNo= data.鍗曟嵁鍙�
+							this.hform.HBarCode= data.鏉″舰鐮�
+							this.hform.HDeptID= data.HDeptID
+							this.hform.HDeptName= data.閮ㄩ棬
+							this.hform.HEmpID= data.HEmpID
+							this.hform.HEmpName= data.鎿嶄綔鍛�
+							this.hform.HMangerID= data.HMangerID
+							this.hform.HMangerName= data.璐熻矗浜�
+							this.hform.HRemark= data.琛ㄥご澶囨敞						
+							this.hform.HDate = data.鏃ユ湡.substr(0,10)
+							
+							this.hform.HSourceID=data.HSourceID,
+							this.hform.HSourceName=data.鐢熶骇璧勬簮,							
+							this.hform.HMouldID=data.HMouldID,
+							this.hform.HMouldNumber=data.妯″叿缂栫爜,
+							this.hform.HMouldName=data.妯″叿鍚嶇О,
+							this.hform.HMouldModel=data.妯″叿瑙勬牸,
+							this.hform.HQty=data.鏁伴噺,
+							this.hform.HScanDate=data.涓婃ā鎵爜鏃堕棿,
+							this.hform.HICMOBillNo=data.HICMOBillNo,
+							this.hform.HICMOInterID=data.HICMOInterID,
+							this.hform.HICMOEntryID=data.HICMOEntryID,
+							this.hform.HProcExchBillNo=data.HProcExchBillNo,
+							this.hform.HProcExchInterID=data.HProcExchInterID,
+							this.hform.HProcExchEntryID=data.HProcExchEntryID,
+							this.hform.HOrgID=data.HOrgID,
+																				
+							this.hform.HMaker= data.鍒跺崟浜�
+							this.hform.HMakeDate= data.鍒跺崟鏃ユ湡
+							this.hform.HUpDater= data.淇敼浜�
+							this.hform.HUpDateDate= data.淇敼鏃ユ湡
+							this.hform.HChecker= data.瀹℃牳浜�
+							this.hform.HCheckDate= data.瀹℃牳鏃ユ湡							
+							this.hform.HDeleteMan= data.浣滃簾浜�
+							this.hform.HDeleteDate= data.浣滃簾鏃ユ湡
+						}else{
+							uni.showToast({
+								title:res.data.Message,
+								icon:'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title:'鎺ュ彛璇锋眰澶辫触',
+							icon:'none'
+						})
+					},
+				});				
+			},
+			//鏂板
+			getNewData(){
+				uni.request({
+				    url: this.serverUrl + '/Web/GetMAXNum', 
+					data: { HBillType: '3846' },
+				    success: (res) => {
+						console.log(res.data)
+						if(res.data.count == 1){
+							this.hform.HInterID = res.data.data[0].HInterID
+							this.hform.HBillNo = res.data.data[0].HBillNo
+							this.btnType=1
+						}else{
+							uni.showToast({
+								title:res.data.Message,
+								icon:'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title:'鎺ュ彛璇锋眰澶辫触',
+							icon:'none'
+						})
+					},
+				});
+			},
+            submit() {
+            	if(!this.hform.HBarCode){
+            		uni.showToast({
+            			title:'璇锋壂鎻忔ā鍏锋潯褰㈢爜',
+            			icon:'none'
+            		})
+				}else if(!this.hform.HSourceName){
+					uni.showToast({
+						title:'璇烽�夋嫨鐢熶骇璧勬簮',
+						icon:'none'
+					})
+				}else if(!this.hform.HMouldName){
+					uni.showToast({
+						title:'妯″叿涓嶈兘涓虹┖',
+						icon:'none'
+					})
+            	}else if(!this.hform.HEmpName){
+					uni.showToast({
+						title:'璇烽�夋嫨鎿嶄綔鍛�',
+						icon:'none'
+					})
+				}else if(!this.hform.HMangerName){
+					uni.showToast({
+						title:'璇烽�夋嫨璐熻矗浜�',
+						icon:'none'
+					})
+            	}else{
+            		uni.showLoading({
+            			title:'璇风◢鍊�'
+            		})
+					var sMainStr = JSON.stringify(this.hform);
+					var sMainSub = sMainStr + ";" + uni.getStorageSync('HUserName')+";"+this.btnType;
+            		console.log(sMainSub);
+            		uni.request({
+            		    url: this.serverUrl + '/Sc_MouldUpperBill/AddSc_MouldUpperBill_PDA',
+            			method:'POST',
+            			dataType:"json",
+            			data:{ oMain: sMainSub },
+            		    success: (res) => {
+            		        console.log(1,res);
+							uni.hideLoading()
+            				if(res.data.count == 1){
+								let pages = getCurrentPages();
+								let prePage = pages[pages.length - 2]; 
+								prePage.$vm.getList()
+								if(this.isEdit){
+									setTimeout(()=>{
+										uni.redirectTo({
+											url:'/pages/weiwaigxIn/form?linterid=' + this.linterid + '&HBillNo=' + this.linterid
+										})
+									},1000)
+								}else{
+									setTimeout(()=>{
+										uni.navigateBack()
+									},1000)
+								}
+            				}
+            				uni.showToast({
+            					title:res.data.Message,
+            					icon:'none'
+            				})
+            			},
+            			fail: (res) => {
+            				console.log(res);
+            				uni.showToast({
+            					title:'鎺ュ彛璇锋眰澶辫触',
+            					icon:'none'
+            				})
+            			},
+            		});
+            	}
+            },
+            goBack(){
+				uni.showModal({
+				    title: '鎻愮ず',
+				    content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
+				    success: (res) => {
+				        if (res.confirm) {
+				            console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+							uni.navigateBack()
+				        } else if (res.cancel) {
+				            console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+				        }
+				    }
+				});
+            }
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+	.form{
+		width: 668rpx;
+		margin: 20rpx auto;
+		padding-bottom: 240rpx;
+	}
+	.tab_area{
+		width: 100%;
+		height: 50rpx;
+	}
+	.other{
+		margin-top: 8rpx;
+		text-align: center;
+		font-size: 28rpx;
+		padding: 4rpx 18rpx;
+		color: #1890FF;
+	}
+    .form-item{
+		display: flex;
+		align-items: center;
+		font-size: 30rpx;
+		padding: 6rpx 0;
+		.title{
+			width: 208rpx;
+			text{
+				color: red;
+				font-weight: bold;
+			}
+		}
+		.right{
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #acacac;
+		}
+		.righton{
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #e4e4e4;
+			background-color: #e4e4e4;
+		}
+		input{
+			width: 100%;
+			padding: 8rpx 20rpx;
+			font-size: 30rpx;
+		}
+		textarea{
+			width: 98%;
+			padding: 8rpx 20rpx;
+			font-size: 30rpx;
+		}
+
+	}
+	.bottom-btn{
+		width: 100%;
+		// height: 120rpx;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		background-color: #fff;
+		box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+		padding: 30rpx 40rpx 40rpx 40rpx;
+		button{
+			border-radius: 50rpx;
+			width: 180rpx;
+			height: 66rpx;
+			line-height: 66rpx;
+			font-size: 28rpx;
+		}
+		.btn-a{
+			background-color: #3A78FF;
+			color: #fff;
+		}
+		.btn-b{
+			background-color: #41a863;
+			color: #fff;
+		}
+		.btn-c{
+			background-color: #acacac;
+			color: #fff;
+			position: absolute;
+			right: 120rpx;
+		}
+		.btn-d{
+			background-color: #ff8901;
+			color: #fff;
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/shangmudan/table.vue b/pages/MJGL/shangmudan/table.vue
new file mode 100644
index 0000000..8d153c9
--- /dev/null
+++ b/pages/MJGL/shangmudan/table.vue
@@ -0,0 +1,594 @@
+<template>
+	<view class="content">
+		<view class="form">
+			<view class="form-item">
+				<view class="title">鐘舵��:</view>
+				<view class="right">
+					<picker :range="arrayStatus" :value="hform.HStatus" @change="HStatusChange">
+						<input name="HStatus" disabled :value="hform.HStatus" placeholder="璇烽�夋嫨鐘舵��" />
+					</picker>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">寮�濮嬫椂闂�:</view>
+				<view class="right">
+					<picker mode="date" :value="hform.HBeginDate" @change="HBeginDateChange">
+						<input name="HBeginDate" disabled :value="hform.HBeginDate" placeholder="璇烽�夋嫨" />
+					</picker>
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">缁撴潫鏃堕棿:</view>
+				<view class="right">
+					<picker mode="date" :value="hform.HEndDate" @change="HEndDateChange">
+						<input name="HEndDate" disabled :value="hform.HEndDate" placeholder="璇烽�夋嫨" />
+					</picker>
+				</view>
+			</view>
+			<view v-if="showmore">
+				<view class="form-item">
+					<view class="title">浠诲姟鍗曞彿:</view>
+					<view class="right">
+						<input v-model="hform.HICMOBillNo" placeholder="璇疯緭鍏ヤ换鍔″崟鍙�" />
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">鍗曟嵁鍙�:</view>
+					<view class="right">
+						<input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+					</view>
+				</view>
+				<view class="form-item">
+					<view class="title">娴佽浆鍗″彿:</view>
+					<view class="right">
+						<input v-model="hform.HProcExchBillNo" placeholder="璇疯緭鍏ュ伐搴忔祦杞崱鍙�" />
+					</view>
+				</view>				
+			</view>
+			<view class="other">
+				<view v-if="!showmore" @tap="showmore = true">
+					灞曞紑鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
+				</view>
+				<view v-if="showmore" @tap="showmore = false">
+					鎶樺彔鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
+				</view>
+			</view>
+
+			<view class="buttons">
+				<button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+				<button class="btn-b" size="mini" type="default" @tap="creat">鏂板</button>
+				<button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+			</view>
+		</view>
+
+		<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+		<view class="list" v-for="(item,index) in showList" :key="index">
+			
+			<uni-card :title="item.HProcExchBillNo" :extra="item.鍗曟嵁鍙�" style="margin: 10px;"
+				@tap="showDetail = showDetail==index?-1:index">		
+				<!-- #ifndef MP-WEIXIN-->
+				<view class="card-detail">
+					<view class="detail" v-if="item.閮ㄩ棬">
+						<text>閮ㄩ棬锛�</text>{{item.閮ㄩ棬}}
+					</view>
+					<view class="detail" v-if="item.璐熻矗浜�">
+						<text>璐熻矗浜猴細</text>{{item.璐熻矗浜簘}
+					</view>
+					<view class="detail" v-if="item.妯″叿缂栫爜">
+						<text>妯″叿缂栫爜锛�</text>{{item.妯″叿缂栫爜}}
+					</view>
+					<view class="detail" v-if="item.妯″叿鍚嶇О">
+						<text>妯″叿鍚嶇О锛�</text>{{item.妯″叿鍚嶇О}}
+					</view>
+					<view class="detail" v-if="item.妯″叿瑙勬牸">
+						<text>妯″叿瑙勬牸锛�</text>{{item.妯″叿瑙勬牸}}
+					</view>
+					<view class="detail" v-if="item.鐢熶骇璧勬簮">
+						<text>鐢熶骇璧勬簮锛�</text>{{item.鐢熶骇璧勬簮}}
+					</view>
+					<view class="detail" v-if="item.涓婃ā鎵爜鏃堕棿">
+						<text>涓婃ā鏃堕棿锛�</text>{{item.涓婃ā鎵爜鏃堕棿.substr(0,10)}}
+					</view>
+				</view>
+				<view class="card-detail" v-if="showDetail == index">
+					<view class="detail" v-if="item.鍒跺崟浜�">
+						<text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
+					</view>
+					<view class="detail" v-if="item.鍒跺崟鏃ユ湡">
+						<text>鍒跺崟鏃ユ湡锛�</text>{{item.鍒跺崟鏃ユ湡.substr(0,10)}}
+					</view>
+					<view class="detail" v-if="item.淇敼浜�">
+						<text>淇敼浜猴細</text>{{item.淇敼浜簘}
+					</view>
+					<view class="detail" v-if="item.淇敼鏃ユ湡">
+						<text>淇敼鏃ユ湡锛�</text>{{item.淇敼鏃ユ湡.substr(0,10)}}
+					</view>
+					<view class="detail" v-if="item.瀹℃牳浜�">
+						<text>瀹℃牳浜猴細</text>{{item.瀹℃牳浜簘}
+					</view>
+					<view class="detail" v-if="item.瀹℃牳鏃ユ湡">
+						<text>瀹℃牳鏃ユ湡锛�</text>{{item.瀹℃牳鏃ユ湡.substr(0,10)}}
+					</view>
+					<view class="detail" v-if="item.鍏抽棴浜�">
+						<text>鍏抽棴浜猴細</text>{{item.鍏抽棴浜簘}
+					</view>
+					<view class="detail" v-if="item.鍏抽棴鏃ユ湡">
+						<text>鍏抽棴鏃ユ湡锛�</text>{{item.鍏抽棴鏃ユ湡.substr(0,10)}}
+					</view>
+					<view class="detail" v-if="item.澶囨敞">
+						<text>澶囨敞锛�</text>{{item.澶囨敞}}
+					</view>
+				</view>
+				<!-- #endif -->
+				
+				<!-- #ifdef MP-WEIXIN -->
+				<uni-card style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
+					
+					<view class="card-detail">
+						<view class="detail" v-if="item['閮ㄩ棬']">
+							<text>閮ㄩ棬锛�</text>{{item['閮ㄩ棬']}}
+						</view>
+						<view class="detail" v-if="item['鎿嶄綔鍛�']">
+							<text>鎿嶄綔鍛橈細</text>{{item['鎿嶄綔鍛�']}}
+						</view>
+						<view class="detail" v-if="item['璐熻矗浜�']">
+							<text>璐熻矗浜猴細</text>{{item['璐熻矗浜�']}}
+						</view>
+						<view class="detail" v-if="item['妯″叿缂栫爜']">
+							<text>妯″叿缂栫爜锛�</text>{{item['妯″叿缂栫爜']}}
+						</view>
+						<view class="detail" v-if="item['妯″叿鍚嶇О']">
+							<text>妯″叿鍚嶇О锛�</text>{{item['妯″叿鍚嶇О']}}
+						</view>
+						<view class="detail" v-if="item['妯″叿瑙勬牸']">
+							<text>妯″叿瑙勬牸锛�</text>{{item['妯″叿瑙勬牸']}}
+						</view>
+						<view class="detail" v-if="item['涓婃ā鎵爜鏃堕棿']">
+							<text>涓婃ā鎵爜鏃堕棿锛�</text>{{item['涓婃ā鎵爜鏃堕棿'].substr(0,19)}}
+						</view>
+					</view>
+					<view class="card-detail" v-if="showDetail == index">
+						<view class="detail" v-if="item['鏁伴噺']">
+							<text>鏁伴噺锛�</text>{{item['鏁伴噺']}}
+						</view>
+						<view class="detail" v-if="item['鐢熶骇璁㈠崟']">
+							<text>鐢熶骇璁㈠崟锛�</text>{{item['HICMOBillNo']}}
+						</view>
+						<view class="detail" v-if="item['娴佽浆鍗″彿']">
+							<text>娴佽浆鍗″彿锛�</text>{{item['HProcExchBillNo']}}
+						</view>						
+						<view class="detail" v-if="item['鍒跺崟浜�']">
+							<text>鍒跺崟浜猴細</text>{{item['鍒跺崟浜�']}}
+						</view>
+						<view class="detail" v-if="item['鍒跺崟鏃ユ湡']">
+							<text>鍒跺崟鏃ユ湡锛�</text>{{item['鍒跺崟鏃ユ湡'].substr(0,10)}}
+						</view>
+						<view class="detail" v-if="item['淇敼浜�']">
+							<text>淇敼浜猴細</text>{{item['淇敼浜�']}}
+						</view>
+						<view class="detail" v-if="item['淇敼鏃ユ湡']">
+							<text>淇敼鏃ユ湡锛�</text>{{item['淇敼鏃ユ湡'].substr(0,10)}}
+						</view>
+						<view class="detail" v-if="item['瀹℃牳浜�']">
+							<text>瀹℃牳浜猴細</text>{{item['瀹℃牳浜�']}}
+						</view>
+						<view class="detail" v-if="item['瀹℃牳鏃ユ湡']">
+							<text>瀹℃牳鏃ユ湡锛�</text>{{item['瀹℃牳鏃ユ湡'].substr(0,10)}}
+						</view>
+						<view class="detail" v-if="item['鍏抽棴浜�']">
+							<text>鍏抽棴浜猴細</text>{{item['鍏抽棴浜�']}}
+						</view>
+						<view class="detail" v-if="item['鍏抽棴鏃ユ湡']">
+							<text>鍏抽棴鏃ユ湡锛�</text>{{item['鍏抽棴鏃ユ湡'].substr(0,10)}}
+						</view>
+						<view class="detail" v-if="item['澶囨敞']">
+							<text>澶囨敞锛�</text>{{item['澶囨敞']}}
+						</view>
+					</view>
+					<!-- #endif -->
+
+					<view class="more" v-if="showDetail == index && operations != index">
+						<view class="part" style="border-right: 1px solid #eee;">
+							<uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+						</view>
+						<view class="part" @tap.stop="operations = operations==index?-1:index">
+							<uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+								size="14"></uni-icons>鎿嶄綔
+						</view>
+					</view>
+					<view class="more" v-if="showDetail != index && operations != index">
+						<view class="part" style="border-right: 1px solid #eee;">
+							<uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+						</view>
+						<view class="part" @tap.stop="operations = operations==index?-1:index">
+							<uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+								size="14"></uni-icons>鎿嶄綔
+						</view>
+					</view>
+					
+					<view class="op" v-if="operations == index">						
+						<button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button>
+						<button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button>
+						<button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+					</view>
+				</uni-card>
+		</view>
+
+		<view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+		<view class="over" v-if="listData.length != 0 && listData.length != showList.length">鍔犺浇涓�...</view>
+		<view class="over" v-if="listData.length != 0 && listData.length == showList.length">宸插埌搴�</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getUserInfo
+	} from "@/utils/auth.js";
+	export default {
+		data() {
+			return {
+				userInfo: getUserInfo(),
+				serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+				showmore: false,
+				arrayStatus: ['鍏ㄩ儴', '鏈鏍�', '宸插鏍�', '宸插叧闂�'],
+				hform: {
+					HStatus: '鍏ㄩ儴',
+					HBeginDate: '',
+					HEndDate: '',
+					HICMOBillNo: '',
+					HBillNo: '',
+					HProcExchBillNo: '',					
+				},
+				sWhere: '',
+				listData: [],
+				showList: [],
+				showDetail: -1,
+				operations: -1,
+
+				page: 1,
+			}
+		},
+		onLoad() {
+			this.getList()
+		},
+		onReachBottom: function() {
+			this.page++
+			setTimeout(() => {
+				this.showList = this.showList.concat(this.getPage(this.page, this.listData))
+			}, 100)
+		},
+		onPullDownRefresh: function() {
+			this.clear()
+			setTimeout(() => {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		methods: {
+			getPage(page, list) {
+				let sindex = (parseInt(page) - 1) * 20
+				let eindex = parseInt(page) * 20
+				let newList = list.slice(sindex, eindex)
+				return newList
+			},
+			getList() {
+				uni.showLoading({
+					title: '鍔犺浇涓�...'
+				})
+				uni.request({
+					url: this.serverUrl + '/Sc_MouldUpperBill/Sc_MouldUpperBillList',
+					data: {
+						sWhere: this.sWhere,
+						user: uni.getStorageSync('HUserName')
+					},
+					success: (res) => {
+						console.log(1, res.data.data);
+						if (res.data.count == 1) {
+							this.listData = res.data.data
+							this.showList = this.getPage(this.page, this.listData)
+							setTimeout(() => {
+								uni.hideLoading()
+							}, 1000)
+						} else {
+							uni.hideLoading()
+							uni.showToast({
+								title: res.data.Message,
+								icon: 'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.hideLoading()
+						uni.showToast({
+							title: '鎺ュ彛璇锋眰澶辫触',
+							icon: 'none'
+						})
+					},
+				});
+			},
+			//鐘舵��
+			HStatusChange(e) {
+				console.log(e.detail.value)
+				this.hform.HStatus = this.arrayStatus[e.detail.value]
+			},
+			//閫夋嫨鍗曟嵁鏃ユ湡
+			HBeginDateChange(e) {
+				console.log(e.detail.value)
+				this.hform.HBeginDate = e.detail.value
+			},
+			//閫夋嫨鍗曟嵁鏃ユ湡
+			HEndDateChange(e) {
+				console.log(e.detail.value)
+				this.hform.HEndDate = e.detail.value
+			},
+			//鎼滅储
+			search() {
+				this.sWhere = ''
+				this.listData = []
+				this.page = 1
+				this.showList = []
+
+				console.log(this.hform)
+
+				if (this.hform.HStatus) {
+					if (this.hform.HStatus == '鍏ㄩ儴') {
+						this.sWhere += "";
+					} else if (this.hform.HStatus == '鏈鏍�') {
+						this.sWhere += " and 瀹℃牳浜�=''";
+					} else if (this.hform.HStatus == '宸插鏍�') {
+						this.sWhere += " and 瀹℃牳浜�<>''";
+					} else if (this.hform.HStatus == '宸插叧闂�') {
+						this.sWhere += " and 鍏抽棴浜�<>''";
+					}
+				}
+				if (this.hform.BenginHCreateDate) {
+					this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.BenginHCreateDate + "'";
+				}
+				if (this.hform.EndHCreateDate) {
+					this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.EndHCreateDate + "'";
+				}
+				if (this.hform.HBillNo) {
+					this.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+				}				
+				if (this.hform.HICMOBillNo) {
+					this.sWhere += " and 鐢熶骇璁㈠崟鍙� like '%" + this.hform.HICMOBillNo + "%'";
+				}
+				if (this.hform.HProcExchBillNo) {
+					this.sWhere += " and 娴佽浆鍗″彿 like '%" + this.hform.HProcExchBillNo + "%'";
+				}
+
+				this.getList()
+			},
+			//鏂板
+			creat() {
+				uni.navigateTo({
+					url: '/pages/MJGL/shangmudan/form'
+				})
+			},
+			//閲嶇疆
+			clear() {
+				this.listData = []
+				this.page = 1
+				this.showList = []
+
+				this.showmore = false
+				this.sWhere = ''
+				this.showDetail = -1,
+					this.operations = -1,
+					this.hform = {
+						HStatus: '鍏ㄩ儴',
+						HBeginDate: '',
+						HEndDate: '',
+						HICMOBillNo: '',
+						HBillNo: '',
+						HProcExchBillNo: '',						
+					}
+				this.getList()
+			},
+
+			//缂栬緫
+			edit(item) {
+				console.log(item)
+				uni.navigateTo({
+					url: '/pages/MJGL/shangmudan/form?linterid=' + item.hmainid + '&HBillNo=' + item.鍗曟嵁鍙�
+				})
+			},
+			//鍒犻櫎
+			del(item) {
+				console.log(item)
+				uni.showModal({
+					title: '鎻愮ず',
+					content: '纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠',
+					success: (res) => {
+						if (res.confirm) {
+							console.log('鐢ㄦ埛鐐瑰嚮纭畾');							
+							uni.request({
+								url: this.serverUrl +'/Sc_MouldUpperBill/DeltetSc_MouldUpperBill',
+								data: {
+									HInterID: item.hmainid + "_" + item.hsubid,
+									HPRDORGID: uni.getStorageSync('OrganizationID'),
+									user: uni.getStorageSync('HUserName')
+								},
+								success: (res) => {
+									console.log(1, res);
+									if (res.data.count == 1) {
+										this.clear()
+									}
+									uni.showToast({
+										title: res.data.Message,
+										icon: 'none'
+									})
+								},
+								fail: (res) => {
+									console.log(res);
+									uni.showToast({
+										title: '鎺ュ彛璇锋眰澶辫触',
+										icon: 'none'
+									})
+								},
+							});
+						} else if (res.cancel) {
+							console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.form {
+		width: 640rpx;
+		margin: 20rpx auto;
+	}
+
+	.other {
+		margin-top: 8rpx;
+		text-align: center;
+		font-size: 28rpx;
+		padding: 4rpx 18rpx;
+		color: #1890FF;
+	}
+
+	.form-item {
+		display: flex;
+		align-items: center;
+		font-size: 28rpx;
+		padding: 6rpx 0;
+
+		.title {
+			width: 180rpx;
+
+			text {
+				color: red;
+				font-weight: bold;
+			}
+		}
+
+		.right {
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #acacac;
+		}
+
+		.righton {
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #e4e4e4;
+			background-color: #e4e4e4;
+		}
+
+		input {
+			width: 100%;
+			padding: 8rpx 20rpx;
+			font-size: 30rpx;
+		}
+	}
+
+	.buttons {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		margin-top: 20rpx;
+
+		button {
+			border-radius: 50rpx;
+			width: 180rpx;
+			height: 66rpx;
+			line-height: 66rpx;
+			font-size: 28rpx;
+		}
+
+		.btn-a {
+			background-color: #acacac;
+			color: #fff;
+		}
+
+		.btn-b {
+			background-color: #41a863;
+			color: #fff;
+		}
+
+		.btn-c {
+			background-color: #3a78ff;
+			color: #fff;
+		}
+	}
+
+	.list {
+		width: 100%;
+
+		.card-detail {
+			width: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+			line-height: 120%;
+
+			.detail {
+				// width: 50%;
+				font-size: 26rpx;
+				margin-bottom: 12rpx;
+				color: #555;
+				margin-right: 20rpx;
+
+				text {
+					color: #999;
+					font-size: 26rpx;
+				}
+			}
+		}
+
+		.more {
+			color: #888;
+			font-size: 24rpx;
+			display: flex;
+			border-top: 1px solid #eee;
+			padding-top: 20rpx;
+
+			.part {
+				width: 50%;
+				text-align: center;
+			}
+		}
+
+		.op {
+			display: flex;
+			justify-content: space-around;
+			margin-top: 20rpx;
+
+			button {
+				padding: 0;
+				width: 150rpx;
+				font-size: 25rpx;
+			}
+
+			.op1 {
+				border: 1px solid #41a863;
+				color: #41a863;
+			}
+
+			.op2 {
+				border: 1px solid #d98d00;
+				color: #d98d00;
+			}
+
+			.op3 {
+				border: 1px solid #3a78ff;
+				color: #3a78ff;
+			}
+
+			.op4 {
+				border: 1px solid #da0000;
+				color: #da0000;
+			}
+
+			.op5 {
+				border: 1px solid #888;
+				color: #888;
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/pages/caigoudingdan/caigoudingdan.vue b/pages/caigoudingdan/caigoudingdan.vue
new file mode 100644
index 0000000..4d8c0f0
--- /dev/null
+++ b/pages/caigoudingdan/caigoudingdan.vue
@@ -0,0 +1,246 @@
+<template>
+	<view class="content">
+		<view class="form">
+			<view class="form-item">
+				<view class="title"><text>*</text>鏉$爜:</view>
+				<view class="right" style="width: 380rpx;">
+					<input v-model="HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜" @confirm="getCode(HBarCode)" />
+				</view>
+				<uni-icons type="scan"
+					style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+					size="20" @click="toScanCode"></uni-icons>
+			</view>
+			<view class="form-item">
+				<view class="title">鍗曟嵁鍙�:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HBillNo" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">渚涘簲鍟�:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HSupName" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">閮ㄩ棬:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HDeptName" disabled />
+				</view>
+			</view>
+		</view>
+
+		<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+		<view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
+			<uni-card :title="item.鐗╂枡浠g爜" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
+				<view class="card-detail">
+					<view class="detail">
+						<text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
+					</view>
+					<view class="detail">
+						<text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+					</view>
+					<view class="detail">
+						<text>璁㈠崟鏁伴噺锛�</text>{{item.鏁伴噺}}
+					</view>
+				</view>
+
+			</uni-card>
+		</view>
+
+		<view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+		<view class="over" v-if="listData.length != 0">宸插埌搴�</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getUserInfo
+	} from "@/utils/auth.js";
+	import {
+		CommonUtils
+	} from "../../utils/common";
+	export default {
+		data() {
+			return {
+				userInfo: getUserInfo(),
+				serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+				HBarCode: '',
+				baseInfo: {
+					HBillNo: '',
+					HSupName: '',
+					HDeptName: '',
+					HInterID: '',
+				},
+				sWhere: '',
+				listData: [],
+			}
+		},
+		onLoad() {},
+		methods: {
+			//鎵爜
+			toScanCode() {
+				uni.scanCode({
+					onlyFromCamera: true,
+					success: (res) => {
+						console.log('鏉$爜鍐呭锛�' + res.result);
+						this.HBarCode = res.result
+
+						this.getCode(this.HBarCode)
+					}
+				});
+			},
+			//鎵潯鐮佸鐞�
+			getCode(HBarCode) {
+				if (!HBarCode) {
+					uni.showToast({
+						title: '鏉$爜涓嶈兘涓虹┖',
+						icon: 'none'
+					})
+				} else {
+					CommonUtils.doRequest(
+						"/Cg_POOrderBill/list", {
+							sWhere: ` and 鍗曟嵁鍙� = '${HBarCode}'`,
+							user: this.userInfo.Czymc
+						},
+						(res) => {
+							console.log('閲囪喘璁㈠崟: ', res)
+							let {data, count} = res.data
+							if(count > 0){
+								this.baseInfo = {
+									HBillNo: data[0].鍗曟嵁鍙�,
+									HSupName: data[0].渚涘簲鍟�,
+									HDeptName: data[0].閮ㄩ棬,
+									HInterID: data[0].hmainid,
+								}
+								this.listData = data
+							} else {
+								uni.showToast({
+									title: res.data.Message,
+									icon: 'none'
+								})
+							}
+						}
+					)
+
+				}
+			},
+			toSon(item) {
+				uni.navigateTo({
+					url: `./generate?OperationType=1&closeType=1&linterid=${this.baseInfo.HInterID}&hmaterid=${item["HMaterID"]}`
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.form {
+		width: 640rpx;
+		margin: 20rpx auto;
+	}
+
+	.form-item {
+		display: flex;
+		align-items: center;
+		font-size: 28rpx;
+		padding: 6rpx 0;
+
+		.title {
+			width: 180rpx;
+
+			text {
+				color: red;
+				font-weight: bold;
+			}
+		}
+
+		.right {
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #acacac;
+		}
+
+		.righton {
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #e4e4e4;
+			background-color: #e4e4e4;
+		}
+
+		input {
+			width: 100%;
+			padding: 8rpx 20rpx;
+			font-size: 30rpx;
+		}
+	}
+
+	.buttons {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		margin-top: 20rpx;
+
+		button {
+			border-radius: 50rpx;
+			width: 180rpx;
+			height: 66rpx;
+			line-height: 66rpx;
+			font-size: 28rpx;
+		}
+
+		.btn-a {
+			background-color: #acacac;
+			color: #fff;
+		}
+
+		.btn-b {
+			background-color: #41a863;
+			color: #fff;
+		}
+
+		.btn-c {
+			background-color: #3a78ff;
+			color: #fff;
+		}
+	}
+
+	.list {
+		width: 100%;
+
+		.card-detail {
+			width: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+			line-height: 120%;
+
+			.detail {
+				// width: 50%;
+				font-size: 26rpx;
+				margin-bottom: 12rpx;
+				color: #555;
+				margin-right: 20rpx;
+
+				text {
+					color: #999;
+					font-size: 26rpx;
+				}
+			}
+		}
+
+		.more {
+			color: #888;
+			font-size: 24rpx;
+			display: flex;
+			border-top: 1px solid #eee;
+			padding-top: 20rpx;
+
+			.part {
+				width: 50%;
+				text-align: center;
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/pages/caigoudingdan/generate.vue b/pages/caigoudingdan/generate.vue
new file mode 100644
index 0000000..ce4870c
--- /dev/null
+++ b/pages/caigoudingdan/generate.vue
@@ -0,0 +1,483 @@
+<template>
+	<view class="content">
+		<view class="form">
+			<view class="form-item">
+				<view class="title">鐗╂枡缂栫爜:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HMaterNumber" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鐗╂枡鍚嶇О:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HMaterName" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">瑙勬牸鍨嬪彿:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HMaterModel" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鎵规:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HBatchNo" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">鏀舵枡鏁伴噺:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HQty" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">MTO鍙�:</view>
+				<view class="righton">
+					<input v-model="baseInfo.HMTONo" disabled />
+				</view>
+			</view>
+			<view class="form-item">
+				<view class="title">姣忕鏁伴噺:</view>
+				<view class="right">
+					<input v-model="baseInfo.HMinQty" type="number" placeholder="璇疯緭鍏ユ暟閲�" @confirm="getNum()"
+						@blur="getNum()" />
+				</view>
+			</view>
+			<view class="buttons">
+				<button class="btn-b" size="mini" type="default" @tap="getList()">鏉$爜鐢熸垚</button>
+				<button class="btn-c" size="mini" type="default" @tap="search">鎵撳嵃</button>
+			</view>
+		</view>
+
+		<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+		<view class="list" v-for="(item,index) in listData" :key="index" @tap="toSon(item)">
+			<uni-card :title="item.鐗╂枡浠g爜" :extra="'No. ' + Number(index+1)" style="margin: 10px;">
+				<view class="card-detail">
+					<view class="detail">
+						<text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
+					</view>
+					<view class="detail">
+						<text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+					</view>
+					<view class="detail">
+						<text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+					</view>
+					<view class="detail" style="width: 100%;">
+						<text>鏉$爜缂栧彿锛�</text>{{item.鏉$爜缂栧彿}}
+					</view>
+				</view>
+
+			</uni-card>
+		</view>
+		<labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
+		</labelPrinterComponentVue>
+		<view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+		<view class="over" v-if="listData.length != 0">宸插埌搴�</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getUserInfo
+	} from "@/utils/auth.js";
+	import {
+		CommonUtils
+	} from "../../utils/common";
+	export default {
+		data() {
+			return {
+				printInfo: "",
+				userInfo: getUserInfo(),
+				serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+				OperationType: 1, //鏁版嵁绫诲瀷  1娣诲姞 淇濆瓨  2澶嶅埗  3 缂栬緫
+				linterid: '',
+				HEntryID: '',
+				hmaterid: '',
+				baseInfo: {
+					HBillNo: '',
+					HMainID: '',
+					HSubID: '',
+					HOrderBillNo: '',
+					HMaterID: '',
+					HMaterNumber: '',
+					HMaterName: '',
+					HMaterModel: '',
+					HQty: '',
+					HMTONo: '',
+					HQty: '',
+					HMinQty: '',
+					HBQty: '',
+				},
+				sWhere: '',
+				listData: [],
+			}
+		},
+		onLoad(e) {
+			console.log(e)
+			this.OperationType = e.OperationType
+			this.linterid = e.linterid
+			this.hmaterid = e.hmaterid
+			this.getData()
+		},
+		methods: {
+			getData() {
+				CommonUtils.doRequest(
+					"/Cg_POOrderBill/list", {
+						sWhere: ` and hmainid = ${this.linterid} and HMaterID  = ${this.hmaterid}`
+						,user: this.userInfo.Czymc
+					},
+					(res) => {
+						console.log('閲囪喘璁㈠崟: ', res)
+						let {
+							data,
+							count
+						} = res.data
+						if (count > 0) {
+							this.baseInfo = {
+								HMainID: data[0]['hmainid'],
+								HSubID: data[0]['HEntryID'],
+								HBillNo: data[0]['鍗曟嵁鍙�'],
+								HMaterID: data[0]['HMaterID'],
+								HMaterNumber: data[0]['鐗╂枡浠g爜'],
+								HMaterName: data[0]['鐗╂枡鍚嶇О'],
+								HMaterModel: data[0]['瑙勬牸鍨嬪彿'],
+								HQty: data[0]['鏁伴噺'],
+								HMTONo: data[0]['璁″垝璺熻釜鍙�']
+							}
+							this.listData = data
+						} else {
+							uni.showToast({
+								title: res.data.Message,
+								icon: 'none'
+							})
+						}
+					}
+				)
+			},
+			getNum(e) {
+				if (this.baseInfo.HMinQty && this.baseInfo.HMinQty > 0) {
+					var a = Number(this.baseInfo.HQty) / Number(this.baseInfo.HMinQty)
+					this.baseInfo.HBQty = Math.ceil(Number(this.baseInfo.HQty) / Number(this.baseInfo.HMinQty))
+					this.$forceUpdate()
+				} else {
+					uni.showToast({
+						title: '璇疯緭鍏ュぇ浜�0鐨勫悎鐞嗘暟閲�',
+						icon: "none"
+					})
+				}
+			},
+			async search() {
+				if (this.$printer.isConnected() === false) {
+					this.$refs.labelPrinter.openPopup()
+				} else {
+					// this.printInfo = async () => {
+					// 	let cpcl = await this.$printer.cpcl().clear()
+					// 		.page(new CPage({
+					// 			width: 608,
+					// 			height: 400
+					// 		}))
+					// 		.qrcode(new CQRCode({
+					// 			x: 500,
+					// 			y: 30,
+					// 			width: 3,
+					// 			content: this.generatedBarCode,
+					// 			codeRotation: CCodeRotation.ROTATION_0,
+					// 			level: CCorrectLevel.L
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 30,
+					// 			content: "渚涘簲鍟�: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 80,
+					// 			content: "渚涘簲鍟嗘枡鍙�: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 130,
+					// 			content: "鐗╂枡缂栫爜: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 180,
+					// 			content: "鐗╂枡鍒嗙粍: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 300,
+					// 			y: 180,
+					// 			content: "瑙勬牸鍨嬪彿: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 230,
+					// 			content: "鏁伴噺: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 300,
+					// 			y: 230,
+					// 			content: "鏃ユ湡: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 280,
+					// 			content: "妫�楠屽憳: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 300,
+					// 			y: 280,
+					// 			content: "璁″垝璺熻釜鍙�: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 30,
+					// 			y: 330,
+					// 			content: "妫�楠岀粨鏋�: ",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.box(new CBox({
+					// 			topLeftX: 260,
+					// 			topLeftY: 320,
+					// 			bottomRightX: 280,
+					// 			bottomRightY: 340,
+					// 			lineWidth: 4,
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 290,
+					// 			y: 320,
+					// 			content: "鍚堟牸",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.box(new CBox({
+					// 			topLeftX: 360,
+					// 			topLeftY: 320,
+					// 			bottomRightX: 380,
+					// 			bottomRightY: 340,
+					// 			lineWidth: 4,
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 390,
+					// 			y: 320,
+					// 			content: "涓嶅悎鏍�",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.box(new CBox({
+					// 			topLeftX: 480,
+					// 			topLeftY: 320,
+					// 			bottomRightX: 500,
+					// 			bottomRightY: 340,
+					// 			lineWidth: 4,
+					// 		}))
+					// 		.text(new CText({
+					// 			x: 510,
+					// 			y: 320,
+					// 			content: "鐗归噰",
+					// 			font: CFont.TSS24
+					// 		}))
+					// 		.form(new CForm())
+					// 		.print();
+					// 	console.log(cpcl.command().string())
+					// 	return cpcl.command().binary()
+					// }
+					// await this.$nextTick(() => {
+					// 	this.$refs.labelPrinter.execPrint()
+					// })
+
+					this.printInfo = `! 0 200 200 400 1
+PAGE-WIDTH 608
+SETQRVER 3
+B QR 500 30 M 2 U 3
+LA,${this.generatedBarCode}
+ENDQR
+T 24 0 30 30 渚涘簲鍟�: 
+T 24 0 30 80 渚涘簲鍟嗘枡鍙�:  
+T 24 0 30 130 鐗╂枡缂栫爜: 
+T 24 0 30 180 鐗╂枡鍒嗙粍: 
+T 24 0 300 180 瑙勬牸鍨嬪彿: 
+T 24 0 30 230 鏁伴噺:  
+T 24 0 300 230 鏃ユ湡: 
+T 24 0 30 280 妫�楠屽憳: 
+T 24 0 300 280 璁″垝璺熻釜鍙�:
+T 24 0 30 330 妫�楠岀粨鏋�: 
+BOX 260 330 280 350 4
+T 24 0 290 330 鍚堟牸
+BOX 360 330 380 350 4
+T 24 0 390 330 涓嶅悎鏍�
+BOX 480 330 500 350 4
+T 24 0 510 330 鐗归噰
+FORM
+PRINT`
+
+
+
+					await this.$nextTick(() => {
+						this.$refs.labelPrinter.execPrint()
+					})
+				}
+			},
+			getList() {
+				var sMain = []
+				sMain[0] = this.baseInfo
+				var sMainStr = JSON.stringify(sMain);
+				//鑾峰彇閫夋嫨鐨勭粍缁�
+				var HOrgType = uni.getStorageSync('Organization');
+				//鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
+				var CampanyName = "xxx";
+				//鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
+				var HSourceBillType = "鏀舵枡閫氱煡鍗�";
+				//鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
+				var HSelectBarCodeType = "鍞竴鏉$爜";
+				//鑾峰彇褰撳墠鐧诲綍浜哄憳
+				var UserName = uni.getStorageSync('HUserName');
+				var sMainSub = sMainStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' +
+					CampanyName + ';' + UserName;
+				uni.request({
+					url: this.serverUrl + '/Sc_BarCode/Sub_SaveBill',
+					method: 'POST',
+					data: {
+						msg: sMainSub,
+						CampanyName: CampanyName
+					},
+					success: (res) => {
+						if (res.data.count == 1) {
+							this.listData = res.data.data
+						} else {
+							uni.showToast({
+								title: res.data.Message,
+								icon: 'none'
+							})
+						}
+					},
+					fail: (res) => {
+						console.log(res);
+						uni.showToast({
+							title: '鎺ュ彛璇锋眰澶辫触',
+							icon: 'none'
+						})
+					},
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.form {
+		width: 640rpx;
+		margin: 20rpx auto;
+	}
+
+	.form-item {
+		display: flex;
+		align-items: center;
+		font-size: 28rpx;
+		padding: 6rpx 0;
+
+		.title {
+			width: 180rpx;
+
+			text {
+				color: red;
+				font-weight: bold;
+			}
+		}
+
+		.right {
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #acacac;
+		}
+
+		.righton {
+			width: 450rpx;
+			border-radius: 22rpx;
+			border: 1px solid #e4e4e4;
+			background-color: #e4e4e4;
+		}
+
+		input {
+			width: 100%;
+			padding: 8rpx 20rpx;
+			font-size: 30rpx;
+		}
+	}
+
+	.buttons {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		margin-top: 20rpx;
+
+		button {
+			border-radius: 50rpx;
+			width: 220rpx;
+			height: 66rpx;
+			line-height: 66rpx;
+			font-size: 28rpx;
+		}
+
+		.btn-a {
+			background-color: #acacac;
+			color: #fff;
+		}
+
+		.btn-b {
+			background-color: #41a863;
+			color: #fff;
+		}
+
+		.btn-c {
+			background-color: #3a78ff;
+			color: #fff;
+		}
+	}
+
+	.list {
+		width: 100%;
+
+		.card-detail {
+			width: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+			line-height: 120%;
+
+			.detail {
+				// width: 50%;
+				font-size: 26rpx;
+				margin-bottom: 12rpx;
+				color: #555;
+				margin-right: 20rpx;
+
+				text {
+					color: #999;
+					font-size: 26rpx;
+				}
+			}
+		}
+
+		.more {
+			color: #888;
+			font-size: 24rpx;
+			display: flex;
+			border-top: 1px solid #eee;
+			padding-top: 20rpx;
+
+			.part {
+				width: 50%;
+				text-align: center;
+			}
+		}
+	}
+</style>
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5fec7b6..e48560c 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -169,6 +169,12 @@
 						text: '鏉$爜鎵撳嵃',
 						url: '/pages/tiaomadaying/tiaomadaying',
 						id: 28,
+					},
+					{
+						img: '../../static/icon/icon16.png',
+						text: '涓婃ā鍗�',
+						url: '/pages/MJGL/shangmudan/table',
+						id: 29,
 					}
 				]
 			}

--
Gitblit v1.9.1