李天标 2 years ago
parent
commit
d40dfdc67d

+ 10 - 5
.hbuilderx/launch.json

@@ -2,10 +2,15 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
-            "type": "uniCloud",
-            "default": {
-                "launchtype": "local"
-            }
-        }
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
     ]
 }

+ 190 - 49
pages/Insert/addMachine.vue

@@ -10,7 +10,7 @@
 						<p class="p">扫码</p>
 					</button>
 					<button type="primary" @click="getMachine(coding)" class="button1">
-						<p class="p">确认</p>
+						<p class="p">获取</p>
 					</button>
 				</view>
 				<view class="bodyname">
@@ -31,8 +31,24 @@
 						<p class="p">确认</p>
 					</button>
 				</view>
+				<view class="body">
+					订单编号:<input class="input" name="orderNo" :value="orderNo" />
+					<button type="primary" form-type="submit" class="button1">
+						<p class="p">确认</p>
+					</button>
+				</view>
+				<view class="body">
+					客户编号:<input class="input" name="customerNo" :value="customerNo" />
+					<button type="primary" form-type="submit" class="button1">
+						<p class="p">确认</p>
+					</button>
+				</view>
 			</form>
 			<view class="line"></view>
+			<view class="">
+				<uni-list-item title="添加工序" @click="gongxu()" />
+			</view>
+			<view class="line"></view>
 			<form @submit="jike" @reset="jikeReset">
 				<view class="modules">
 					<view class="title">机壳</view>
@@ -123,6 +139,66 @@
 				</view>
 			</form>
 			<view class="line"></view>
+			<form @submit="anzhuoping" @reset="anzhuopingReset">
+				<view class="modules">
+					<view class="title">安卓屏</view>
+					<view class="body">
+						<input class="input" style="display:none;" name="anzhuopingCoding" :value=anzhuopingCoding />
+						编码:<input class="input" v-model="anzhuopingCoding" />
+						<button type="primary" @click="saoma('anzhuopingCoding')" class="button1">
+							<p class="p">扫码</p>
+						</button>
+						<button type="primary" @click="getMessage(anzhuopingCoding)" class="button1">
+							<p class="p">获取</p>
+						</button>
+					</view>
+					<view class="body">
+						名称:<input class="input" name="anzhuopingName" :value="anzhuopingName" />
+					</view>
+					<view class="body">
+						版本:<input class="input" name="anzhuopingVersion" :value="anzhuopingVersion" />
+					</view>
+					<view class="modulesButton">
+						<button type="primary" form-type="submit" class="button1">
+							<p class="p">确认</p>
+						</button>
+						<button type="primary" @click="updateModules(anzhuopingCoding,'anzhuoping')" class="button1">
+							<p class="p">更换</p>
+						</button>
+					</view>
+				</view>
+			</form>
+			<view class="line"></view>
+			<form @submit="plc" @reset="plcReset">
+				<view class="modules">
+					<view class="title">plc</view>
+					<view class="body">
+						<input class="input" style="display:none;" name="plcCoding" :value=plcCoding />
+						编码:<input class="input" v-model="plcCoding" />
+						<button type="primary" @click="saoma('plcCoding')" class="button1">
+							<p class="p">扫码</p>
+						</button>
+						<button type="primary" @click="getMessage(plcCoding)" class="button1">
+							<p class="p">获取</p>
+						</button>
+					</view>
+					<view class="body">
+						名称:<input class="input" name="plcName" :value="plcName" />
+					</view>
+					<view class="body">
+						版本:<input class="input" name="plcVersion" :value="plcVersion" />
+					</view>
+					<view class="modulesButton">
+						<button type="primary" form-type="submit" class="button1">
+							<p class="p">确认</p>
+						</button>
+						<button type="primary" @click="updateModules(plcCoding,'plc')" class="button1">
+							<p class="p">更换</p>
+						</button>
+					</view>
+				</view>
+			</form>
+			<view class="line"></view>
 			<form @submit="jiareban" @reset="jiarebanReset">
 				<view class="modules">
 					<view class="title">加热板</view>
@@ -332,36 +408,6 @@
 					</view>
 				</view>
 			</form>
-			<view class="line"></view>
-			<form @submit="anzhuoping" @reset="anzhuopingReset">
-				<view class="modules">
-					<view class="title">安卓屏</view>
-					<view class="body">
-						<input class="input" style="display:none;" name="anzhuopingCoding" :value=anzhuopingCoding />
-						编码:<input class="input" v-model="anzhuopingCoding" />
-						<button type="primary" @click="saoma('anzhuopingCoding')" class="button1">
-							<p class="p">扫码</p>
-						</button>
-						<button type="primary" @click="getMessage(anzhuopingCoding)" class="button1">
-							<p class="p">获取</p>
-						</button>
-					</view>
-					<view class="body">
-						名称:<input class="input" name="anzhuopingName" :value="anzhuopingName" />
-					</view>
-					<!-- <view class="body">
-						版本:<input class="input" name="anzhuopingVersion" :value="anzhuopingVersion" />
-					</view> -->
-					<view class="modulesButton">
-						<button type="primary" form-type="submit" class="button1">
-							<p class="p">确认</p>
-						</button>
-						<button type="primary" @click="updateModules(anzhuopingCoding,'anzhuoping')" class="button1">
-							<p class="p">更换</p>
-						</button>
-					</view>
-				</view>
-			</form>
 
 			<view class="line"></view>
 			<form @submit="qibeng" @reset="yaxingdaoReset">
@@ -485,10 +531,14 @@
 			</form>
 			
 			<view class="">
-				<button type="primary" formType="submit" class="button">
-					<p class="p1">提交</p>
+				<button type="primary" @click="jiancha()" class="button">
+					<p class="p1">检查</p>
 				</button>
 			</view>
+			<view class="">
+				{{weiname}} </br>
+				{{Modulesname}}
+			</view>
 		</form>
 		<view class="line"></view>
 	</view>
@@ -508,7 +558,7 @@
 		data() {
 			return {
 				produceDate: '',
-				coding: null,
+				coding: '',
 				lutouCoding: null,
 				jiashiqiCoding: null,
 				name: null,
@@ -516,6 +566,8 @@
 				lutouName: null,
 				nameplate: null,
 				clientId:null,
+				orderNo:null,
+				customerNo:null,
 				producePersonnel: null,
 				jiashiqiVersion: null,
 				lutouVersion: null,
@@ -552,13 +604,17 @@
 				anzhuopingCoding:null,
 				anzhuopingName: null,
 				anzhuopingVersion: null,
+				plcCoding:null,
+				plcName: null,
+				plcVersion: null,
 				jiarebanCoding:null,
 				jiarebanName: null,
 				jiarebanVersion: null,
 				xiazaiCoding:null,
 				xiazaiName: null,
 				xiazaiVersion: null,
-				
+				weiname:'',
+				Modulesname:''
 			}
 		},
 		methods: {
@@ -569,6 +625,17 @@
 			btnCancel0() {
 				this.produceDate = '';
 			},
+			gongxu(){
+				var item = {
+					coding:null,
+					type:'add'
+				};
+				var coding = this.coding;
+				item.coding = coding;
+				uni.navigateTo({
+				    url:'workingProcedure?item='+encodeURIComponent(JSON.stringify(item))
+				});
+			},
 			saoma(cod) {
 				var that = this;
 				// 允许从相机和相册扫码
@@ -615,6 +682,9 @@
 						if (cod == 'anzhuopingCoding') {
 							that.anzhuopingCoding = res.result;
 						}
+						if (cod == 'plcCoding') {
+							that.plcCoding = res.result;
+						}
 						if (cod == 'jiarebanCoding') {
 							that.jiarebanCoding = res.result;
 						}
@@ -670,6 +740,9 @@
 				that.anzhuopingName = null;
 				that.anzhuopingCoding = null;
 				that.anzhuopingVersion = null;
+				that.plcName = null;
+				that.plcCoding = null;
+				that.plcVersion = null;
 				that.jiarebanName = null;
 				that.jiarebanCoding = null;
 				that.jiarebanVersion = null;
@@ -693,6 +766,8 @@
 								that.name = tmachine.name;
 								that.nameplate = tmachine.nameplate;
 								that.clientId = tmachine.clientId;
+								that.customerNo = tmachine.customerNo;
+								that.orderNo = tmachine.orderNo;
 								// that.producePersonnel = uni.getStorageSync("name");
 								var modulesList = res.data.data.modulesList;
 								var modules;
@@ -782,6 +857,18 @@
 												that.jiarebanCoding = modulesList[i].coding;
 												that.jiarebanVersion = modulesList[i].coding.substring(8, 10);
 											}
+											//安卓屏
+											if (coding.substring(5, 7) == '15') {
+												that.anzhuopingName = modulesList[i].name;
+												that.anzhuopingCoding = modulesList[i].coding;
+												that.anzhuopingVersion = modulesList[i].coding.substring(8, 10);
+											}
+											//plc
+											if (coding.substring(5, 7) == '16') {
+												that.plcName = modulesList[i].name;
+												that.plcCoding = modulesList[i].coding;
+												that.plcVersion = modulesList[i].coding.substring(8, 10);
+											}
 
 										}
 									}else{
@@ -792,12 +879,7 @@
 											that.qibengCoding = modulesList[i].coding;
 											that.qibengVersion = modulesList[i].coding.substring(8, 10);
 										}
-										//安卓屏
-										if (coding.substring(8, 10) == '71'||coding.substring(8, 10) == '72'||coding.substring(7, 10) == '138'||coding.substring(7, 10) == '139') {
-											that.anzhuopingName = modulesList[i].name;
-											that.anzhuopingCoding = modulesList[i].coding;
-											that.anzhuopingVersion = modulesList[i].coding.substring(8, 10);
-										}
+										
 										
 									}
 								}
@@ -806,6 +888,8 @@
 								that.name = codes.name;
 								that.nameplate = codes.nameplate;
 								that.clientId = codes.clientId;
+								that.customerNo = codes.customerNo;
+								that.orderNo = codes.orderNo;
 								that.producePersonnel = uni.getStorageSync("name");
 							}
 
@@ -915,16 +999,21 @@
 										that.jiarebanCoding = codes.coding;
 										that.jiarebanVersion =codes.code.substring(8, 10);
 									}
-
+									//安卓屏
+									if (coding.substring(5, 7) == '15') {
+										that.anzhuopingName = codes.name;
+										that.anzhuopingCoding = codes.coding;
+										that.anzhuopingVersion = codes.code.substring(8, 10);
+									}
+									//plc
+									if (coding.substring(5, 7) == '16') {
+										that.plcName = codes.name;
+										that.plcCoding = codes.coding;
+										that.plcVersion = codes.code.substring(8, 10);
+									}
 								}
 							}else{
-								//安卓屏
-								if (coding.substring(8, 10) == '71'||coding.substring(8, 10) == '72'||coding.substring(7, 10) == '138'||coding.substring(7, 10) == '139') {
-									// debugger;
-									that.anzhuopingName = codes.name;
-									that.anzhuopingCoding = codes.coding;
-									that.anzhuopingVersion = codes.versions;
-								}
+								
 								//气泵
 								if (coding.substring(8, 10) == '39') {
 									that.qibengName = codes.name;
@@ -959,6 +1048,8 @@
 						"name": modules.name,
 						"nameplate": modules.nameplate,
 						"clientId":modules.clientId,
+						"customerNo":modules.customerNo,
+						"orderNo":modules.orderNo,
 						"createPersonnel": createPersonnel
 					},
 					header: {
@@ -1047,6 +1138,9 @@
 			anzhuoping(event){
 				this.tijiao(event,"anzhuoping");
 			},
+			plc(event){
+				this.tijiao(event,"plc");
+			},
 			jiareban(event){
 				this.tijiao(event,"jiareban");
 			},
@@ -1166,6 +1260,11 @@
 								that.anzhuopingCoding = null;
 								that.anzhuopingVersion = null;
 							}
+							if (name == "plc") {
+								that.plcName = null;
+								that.plcCoding = null;
+								that.plcVersion = null;
+							}
 							if (name == "jiareban") {
 								that.jiarebanName = null;
 								that.jiarebanCoding = null;
@@ -1216,6 +1315,48 @@
 						});
 					}
 				});
+			},
+			jiancha(){
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + "/TWorkingProcedure/jiancha",
+					method: "POST",
+					data: {
+						"machineCoding": this.coding
+					},
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == false) {
+							var re = res.data.data.toString();
+							this.weiname = '工序:'+re+'未安装';
+						}else{
+							this.weiname = '工序已全部安装';
+						}
+						this.jianchaModules();
+					}
+				});
+			},
+			jianchaModules(){
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + "/TModules/jianchaModules?machineCoding="+this.coding,
+					method: "GET",
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == false) {
+							var re = res.data.data.toString();
+							this.Modulesname = '模块:'+re+'未安装';
+						}else{
+							this.Modulesname = '模块已全部安装';
+						}
+					}
+				});
 			}
 		}
 	}

File diff suppressed because it is too large
+ 1227 - 0
pages/Insert/workingProcedure.vue


+ 6 - 0
pages/select/select.vue

@@ -3,6 +3,7 @@
 			<uni-list>
 				<uni-list-item title="整机查询"  @click="machine()" ></uni-list-item>
 				<uni-list-item title="模块查询"  @click="modules()" ></uni-list-item>
+				<uni-list-item title="订单查询"  @click="orderNo()" ></uni-list-item>
 			</uni-list>
 	</view>
 </template>
@@ -45,6 +46,11 @@
 				uni.navigateTo({
 					url: 'selectModules',
 				});
+			},
+			orderNo(){
+				uni.navigateTo({
+					url: 'selectOrderNo',
+				});
 			}
 		}
 	}

+ 93 - 4
pages/select/selectMachine.vue

@@ -14,7 +14,7 @@
 		<view class="">
 			<t-table>
 				<t-tr class="tr">
-					机器编码:{{coding}}
+					机器编码:<input class="input" v-model="coding" />
 				</t-tr>
 				<t-tr class="tr">
 					机器铭牌:{{nameplate}}
@@ -23,16 +23,34 @@
 					设备编码:{{clientId}}
 				</t-tr>
 				<t-tr class="tr">
+					订单编码:{{orderNo}}
+				</t-tr>
+				<t-tr class="tr">
+					客户编码:{{customerNo}}
+				</t-tr>
+				<t-tr class="tr">
 					机器名称:{{name}}
 				</t-tr>
 				<t-tr class="tr">
 					总装开始时间:{{startDate}}
 				</t-tr>
 				<t-tr class="tr">
+					工序状态:{{weiname}}
+				</t-tr>
+				<t-tr class="tr">
+					模块状态:{{Modulesname}}
+				</t-tr>
+				<t-tr class="tr">
 					总装结束时间:{{endDate}}
 				</t-tr>
 			</t-table>
 		</view>
+		<view class="line"></view>
+		<view class="">
+			<uni-list-item title="工序查询" @click="gongxu()" />
+		</view>
+		<view class="line"></view>
+		<view class="line"></view>
 		<view class="">
 
 			<view v-for="(item,index) in modulesList" :key="index">
@@ -49,6 +67,7 @@
 						</t-td>
 					</t-tr>
 				</t-table>
+				<view class="line"></view>
 			</view>
 
 
@@ -72,13 +91,22 @@
 				name: '',
 				startDate: '',
 				clientId: '',
+				customerNo: '',
+				orderNo: '',
 				endDate: '',
-				modulesList: []
+				modulesList: [],
+				Modulesname:'',
+				weiname:''
 			}
 		},
 		onShow() {
 			
 		},
+		onLoad: function(option) {
+			const item = JSON.parse(decodeURIComponent(option.item));
+			var coding = item.coding;
+			this.getMessage(coding);
+		},
 		methods: {
 			saoma() {
 				var that = this;
@@ -89,7 +117,17 @@
 					}
 				});
 			},
-
+			gongxu(){
+				var item = {
+					coding:null,
+					type:'get'
+				};
+				var coding = this.coding;
+				item.coding = coding;
+				uni.navigateTo({
+					url:'../Insert/workingProcedure?item='+encodeURIComponent(JSON.stringify(item))
+				});
+			},
 			getMessage(coding) {
 				var that = this;
 				var serverUrl = that.serverurl;
@@ -110,6 +148,8 @@
 								that.name = tmachine.name;
 								that.nameplate = tmachine.nameplate;
 								that.clientId = tmachine.clientId;
+								that.customerNo = tmachine.customerNo;
+								that.orderNo = tmachine.orderNo;
 								that.coding = tmachine.coding;
 								that.startDate = tmachine.startDate;
 								that.endDate = tmachine.endDate;
@@ -118,7 +158,9 @@
 								var codes = res.data.data;
 								that.name = codes.name;
 								that.nameplate = codes.nameplate;
-								that.clientId = tmachine.clientId;
+								that.clientId = codes.clientId;
+								that.customerNo = codes.customerNo;
+								that.orderNo = codes.orderNo;
 								that.producePersonnel = uni.getStorageSync("name");
 							}
 
@@ -128,6 +170,7 @@
 								content: res.data.message,
 							});
 						}
+						this.jiancha();
 					}
 				});
 			},
@@ -136,6 +179,48 @@
 				uni.navigateTo({
 					url: 'selectModules',
 				});
+			},
+			jiancha(){
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + "/TWorkingProcedure/jiancha",
+					method: "POST",
+					data: {
+						"machineCoding": this.coding
+					},
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == false) {
+							var re = res.data.data.toString();
+							this.weiname = re+'未安装';
+						}else{
+							this.weiname = '已全部安装';
+						}
+						this.jianchaModules();
+					}
+				});
+			},
+			jianchaModules(){
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + "/TModules/jianchaModules?machineCoding="+this.coding,
+					method: "GET",
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == false) {
+							var re = res.data.data.toString();
+							this.Modulesname = re+'未安装';
+						}else{
+							this.Modulesname = '已全部安装';
+						}
+					}
+				});
 			}
 		}
 	}
@@ -246,4 +331,8 @@
 		padding-left: 20upx;
 		font-size: 35upx;
 	}
+	.line {
+		background: #ECECEC;
+		height: 10upx;
+	}
 </style>

+ 97 - 13
pages/select/selectModules.vue

@@ -17,7 +17,7 @@
 						名称:{{name}}
 					</t-tr>
 					<t-tr class="tr">
-						所属机器编码:{{machineCoding}}
+						所属机器编码:<input class="input" v-model="machineCoding" />
 					</t-tr>
 					<t-tr class="tr">
 						版本号:{{versions}}
@@ -28,6 +28,13 @@
 					<t-tr class="tr">
 						生产日期:{{produceDate}}
 					</t-tr>
+					<t-tr class="tr">
+						出货日期:{{shipmentDate}}  
+						<button v-show="shipmentDate==''" type="primary" @click="chuhuo(coding)"
+							class="button1">
+							<p class="p">出货</p>
+						</button>
+					</t-tr>
 					<view class="" v-if="installPersonnel!=''&&installPersonnel!=null">
 						<t-tr class="tr">
 							装配人员:{{installPersonnel}}
@@ -36,20 +43,35 @@
 							装配日期:{{installDate}}
 						</t-tr>
 					</view>
-					<view class="" v-if="replacePersonnel!=''&&replacePersonnel!=null">
+					<view class="" v-if="replateDate!=''&&replateDate!=null">
+						<!-- <view class="" v-if="replacePersonnel!=''&&replacePersonnel!=null"> -->
 						<t-tr class="tr">
-							更换人员:{{replacePersonnel}}
+							本模块更换人员:{{replacePersonnel}}
 						</t-tr>
 						<t-tr class="tr">
-							更换原因:{{replaceReason}}
+							本模块更换原因:<input class="input" v-model="replaceReason" />
+							<button type="primary" @click="updateReplaceReason()" class="button1">
+								<p class="p">更正</p>
+							</button>
 						</t-tr>
 						<t-tr class="tr">
-							原模板编号:{{oldCoding}}
+							本模块更换日期:{{replateDate}}
 						</t-tr>
+					</view>
+					<view class="" v-if="oldReplateDate!=''&&oldReplateDate!=null">
+						<!-- <view class="" v-if="replacePersonnel!=''&&replacePersonnel!=null"> -->
 						<t-tr class="tr">
-							更换日期:{{replateDate}}
+							旧模块更换人员:{{oldReplacePersonnel}}
+						</t-tr>
+						<t-tr class="tr">
+							旧模块更换原因:{{oldReplaceReason}}
+						</t-tr>
+						<t-tr class="tr" v-if="oldCoding!=null">
+							旧模块编号:{{oldCoding}}
+						</t-tr>
+						<t-tr class="tr">
+							旧模块更换日期:{{oldReplateDate}}
 						</t-tr>
-
 					</view>
 					<t-tr class="tr">
 						状态:{{status}}
@@ -95,6 +117,10 @@
 				replateDate: '',
 				replaceReason: '',
 				replacePersonnel: '',
+				shipmentDate:'',
+				oldReplateDate: '',
+				oldReplaceReason: '',
+				oldReplacePersonnel: '',
 				installDate: '',
 				installPersonnel: '',
 				produceDate: '',
@@ -160,6 +186,58 @@
 				});
 
 			},
+			chuhuo(coding){
+				uni.showModal({
+					title: '出货',
+					content: '确定执行操作?',
+					success: (res) => {
+						if (res.confirm) {
+							var that = this;
+							var serverUrl = that.serverurl;
+							var token = uni.getStorageSync("token");
+							uni.request({
+								url: serverUrl + "/TModules/chuhuo?coding=" + coding,
+								method: "GET",
+								header: {
+									'token': token
+								},
+								success: (Result) => {
+									// console.log(Result);
+									var res = Result;
+									uni.showModal({
+										title: '提示',
+										content: res.data.message,
+									});
+								}
+							});
+						}
+					}
+				});
+			},
+			updateReplaceReason(){
+				var that = this;
+				var serverUrl = that.serverurl;
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: serverUrl + "/TModules/updateReplaceReason",
+					method: "POST",
+					header: {
+						'token': token
+					},
+					data:{
+						"coding":that.coding,
+						"replaceReason":that.replaceReason
+					},
+					success: (Result) => {
+						// console.log(Result);
+						var res = Result;
+						uni.showModal({
+							title: '提示',
+							content: res.data.message,
+						});
+					}
+				});
+			},
 			change(coding, machineCoding) {
 				uni.navigateTo({
 					url: '/pages/select/update?coding=' + coding + '&machineCoding=' + machineCoding,
@@ -222,17 +300,23 @@
 							if (codes.flagCode.length > 1) {
 								that.desList = codes.flagCode.split(",");
 							}
+							if (codes.shipmentDate != null) {
+								that.shipmentDate = codes.shipmentDate;
+							}
 							that.installDate = codes.installDate;
 							that.installPersonnel = codes.installPersonnel;
 							that.replateDate = codes.replateDate;
 							that.replaceReason = codes.replaceReason;
 							that.replacePersonnel = codes.replacePersonnel;
-							if (co.substring(0, 4) != '1000') {
-								that.oldCoding = "";
-							} else {
-								that.oldCoding = "";
-							}
-
+							that.oldCoding = codes.oldCoding;
+							that.oldReplateDate = codes.oldReplateDate;
+							that.oldReplaceReason = codes.oldReplaceReason;
+							that.oldReplacePersonnel = codes.oldReplacePersonnel;
+							// if (co.substring(0, 4) != '1000') {
+							// 	that.oldCoding = codes.oldCoding;
+							// } else {
+							// 	that.oldCoding = '';
+							// }
 						} else {
 							uni.showModal({
 								content: res.data.message,

+ 150 - 0
pages/select/selectOrderNo.vue

@@ -0,0 +1,150 @@
+<template>
+	<view>
+		<view class="body">
+			订单编号:<input class="input" v-model="orderNo" />
+			<button type="primary" @click="select(orderNo)" class="button1">
+				<p class="p">搜索</p>
+			</button>
+			<button type="primary" @click="expert(orderNo)" class="button1">
+				<p class="p">导出</p>
+			</button>
+		</view>
+		<view class="">
+			<uni-collapse :accordion="true">
+				<uni-list>
+					<view  v-for="machine in machineList" :key="machine.id">
+						<uni-list-item :title="machine.coding" @click="trun(machine.coding)"/>
+					</view>
+				</uni-list>
+			</uni-collapse>	
+		</view>
+			
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapActions,
+		mapMutations
+	} from 'vuex'
+	import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
+	import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
+	import uniList from '@/components/uni-list/uni-list.vue'
+	import uniListItem from '@/components/uni-list-item/uni-list-item.vue'
+	export default {
+		components: {
+			uniCollapse,
+			uniCollapseItem,
+			uniList,
+			uniListItem,
+		},
+		data() {
+			return {
+				orderNo:'',
+				machineList:''
+			}
+		},
+		methods: {
+			select(orderNo) {
+				var that = this;
+				var serverUrl = that.serverurl;
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: serverUrl + "/TMachine/selectMachineByOrderNo?orderNo=" + orderNo,
+					method: "GET",
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == true) {
+							that.machineList = res.data.data;
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: res.data.message,
+							});
+						}
+					}
+				});
+			},
+			trun(coding) {
+				var item = {
+					coding:'',
+					type:''
+				};
+				item.coding = coding;
+				uni.navigateTo({
+				    url:'selectMachine?item='+encodeURIComponent(JSON.stringify(item))
+				});
+			},
+			expert(orderNo) {
+				var that = this;
+				var serverUrl = that.serverurl;
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: serverUrl + "/TMachine/expert?orderNo=" + orderNo,
+					method: "GET",
+					header: {
+						'token': token
+					},
+					success: (Result) => {
+						var res = Result;
+						if (res.data.code == true) {
+							var url = res.data.data;
+							var a= [];
+							a=url.split("machine/");
+							// a=url.split("excel/");
+							var fileName = a[1];
+							wx.downloadFile({
+							  url: url,
+							  /* 这里指定filePath属性,不然会是一个临时文件,不能用对应的程序打开 */
+							  filePath:wx.env.USER_DATA_PATH + '/' + fileName,
+							  success(result) {
+							    const filePath = result.filePath;
+							    wx.openDocument({
+							      filePath: filePath,
+							      showMenu: true,
+							      fileType: "xls",
+							      success: rlt => {
+							        console.log("打开文档成功",rlt);
+							      },
+							      fail: err => {
+							        wx.showModal({
+							          content: JSON.stringify(err),
+							          showCancel: false
+							        })
+							      }
+							    });
+							  },
+							  fail(error){
+							    wx.showModal({
+							      content: JSON.stringify(error),
+							      showCancel: false
+							    })
+							  }
+							})
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: res.data.message,
+							});
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+	.body {
+		background-color: #FFFFFF;
+		padding: 20upx 20upx 20upx 20upx;
+		font-size: 30upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+	}
+</style>