|
@@ -3,44 +3,49 @@
|
|
|
<u-navbar title="申请归还">
|
|
|
<view class="details" slot="bottom">
|
|
|
<view class="list">
|
|
|
- <view class="list-head" style="margin-bottom: 3px;">
|
|
|
+ <!-- <view class="list-head" style="margin-bottom: 3px;">
|
|
|
<view class="title">
|
|
|
出库设备清单
|
|
|
</view>
|
|
|
- <view class="amount" @click="gotoscan('')">
|
|
|
- <u-icon name="scan" color="#0051ff" ></u-icon>扫码识别
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+
|
|
|
+ </view> -->
|
|
|
<view class="list-head">
|
|
|
<view class="title">
|
|
|
- 所属项目<span style="color: red;">*</span>
|
|
|
+ 所属项目部<span style="color: red;">*</span>
|
|
|
</view>
|
|
|
<view class="amountView" >
|
|
|
- <view class="amount" v-if="approveList.length" >
|
|
|
+ <!-- <view class="amount" v-if="approveList.length" >
|
|
|
<span @click="show4=true"
|
|
|
style="float: right; color: #45BA45; font-size: 12px;font-weight: normal;">
|
|
|
<u-icon name="file-text"></u-icon>引用</span>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class="amount" >
|
|
|
- <u-input style="border-bottom: 1px solid;"
|
|
|
+ <!-- <u-input style="border-bottom: 1px solid;"
|
|
|
v-model="form.projectName" placeholder="请输入所属项目" type="text" />
|
|
|
+ -->
|
|
|
+
|
|
|
+ <u-input v-model="xmbId" @click="show3=true,showText='xmbId'" @clear="showText='xmbId',change('')" placeholder="请选择所属项目部" type="select" />
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list-head" >
|
|
|
<view class="title">
|
|
|
- 无二维码设备
|
|
|
+ 选择设备
|
|
|
</view>
|
|
|
- <view class="amountView" >
|
|
|
+ <view class="amountView" style="margin-top: 5px;" >
|
|
|
<view class="amount" >
|
|
|
- <span @click="show5=true"
|
|
|
+ <span @click="show5Btn"
|
|
|
style="float: right; color: #45BA45; font-size: 12px;font-weight: normal;">
|
|
|
<u-icon name="file-text"></u-icon>添加设备</span>
|
|
|
</view>
|
|
|
- <view class="amount" >
|
|
|
- 二维码损坏,或者无二维码
|
|
|
+ <view class="amount" style="margin: 0 20px;" >
|
|
|
+ 或者
|
|
|
+ </view>
|
|
|
+ <view class="amount" @click="gotoscan('')" style=" color: #0051ff;font-size: 12px;">
|
|
|
+ <u-icon name="scan" color="#0051ff" ></u-icon>扫码识别
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -172,7 +177,7 @@
|
|
|
|
|
|
<u-divider :isnone="scanList.length==0" v-show="scanList.length==0"
|
|
|
|
|
|
- nonetext="点击'扫码'进行归还" nonetop="150" border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
+ nonetext="选择设备归还" nonetop="150" border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
|
|
|
<u-select v-model="show4" label-name="projectName" value-name="id"
|
|
|
:list="approveList" @confirm="confirm4" ></u-select>
|
|
@@ -181,7 +186,11 @@
|
|
|
border-radius="14"
|
|
|
:closeable="true" >
|
|
|
<view class="showpopup">添加设备</view>
|
|
|
-
|
|
|
+ <view class="search" >
|
|
|
+ 只查自己借出设备<u-switch v-model="queryStatus"
|
|
|
+ :active-value="0" :inactive-value="1"
|
|
|
+ @change="switchchange"></u-switch>
|
|
|
+ </view>
|
|
|
<!-- 搜索 -->
|
|
|
<view class="search" v-if="false" >
|
|
|
|
|
@@ -202,11 +211,14 @@
|
|
|
<view @scrolltolower="refscrolltolower()">
|
|
|
|
|
|
|
|
|
- <equipmentRetrieval @ckItem="ckItem" :list="list" :scanList="scanList"
|
|
|
+ <equipmentRetrieval :departmentId="form.xmbId"
|
|
|
+ :queryStatus="queryStatus"
|
|
|
+ @ckItem="ckItem" :list="list" :scanList="scanList"
|
|
|
|
|
|
ref="equipmentRetrievalRef" :iscomponents="1" :isreturn="1" ></equipmentRetrieval>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <u-select v-model="show3" :list="projectList" @confirm="confirm" ></u-select>
|
|
|
|
|
|
<!-- 确认出库 -->
|
|
|
<view class="bottom" >
|
|
@@ -238,20 +250,27 @@
|
|
|
address:"",
|
|
|
showpopup:false,
|
|
|
deviceposition:"back",
|
|
|
-
|
|
|
+ queryStatus:true,
|
|
|
form:{
|
|
|
projectName:"",
|
|
|
addressId:"",
|
|
|
recordId:"",
|
|
|
deviceIds:"",
|
|
|
+ xmbId:"",
|
|
|
},
|
|
|
+ show3:false,//审批人 步骤1
|
|
|
list:[],
|
|
|
list2:[],
|
|
|
+ showText:"",
|
|
|
+ xmbId:"",
|
|
|
queryContent:'',
|
|
|
scanList:[],
|
|
|
approveList:[],
|
|
|
show4:false,
|
|
|
show5:false,
|
|
|
+ projectList:[
|
|
|
+
|
|
|
+ ],
|
|
|
radiolist: [{
|
|
|
name: '正常',
|
|
|
value: "0",
|
|
@@ -262,17 +281,72 @@
|
|
|
value: "1",
|
|
|
disabled: false
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
],
|
|
|
}
|
|
|
},
|
|
|
onReady(){
|
|
|
- this.getApproveList();
|
|
|
+ //this.getApproveList();
|
|
|
+ this.createOutRecord();
|
|
|
},
|
|
|
components:{
|
|
|
equipmentRetrieval
|
|
|
},
|
|
|
methods: {
|
|
|
+ switchchange(e){
|
|
|
+ console.log(e)
|
|
|
+
|
|
|
+ this.$refs.equipmentRetrievalRef.init()
|
|
|
+ },
|
|
|
+ show5Btn(){
|
|
|
+ if(this.form.xmbId){
|
|
|
+ this.show5=true
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:"请先选择所属项目部"
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ confirm(e) {
|
|
|
+ if(e==''){
|
|
|
+ this.form[this.showText]='';
|
|
|
+ this[this.showText]=''
|
|
|
+ }else{
|
|
|
+ this.form[this.showText]=e[0].value;
|
|
|
+ this[this.showText]=e[0].label
|
|
|
+ }
|
|
|
+ },
|
|
|
+ createOutRecord(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ API.createOutRecord({
|
|
|
+
|
|
|
+ }).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.data.departmentList){
|
|
|
+ this.projectList=res.data.departmentList.map(item=>{
|
|
|
+ return {
|
|
|
+ value: item.id,
|
|
|
+ label: item.name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(this.projectList.length==1){
|
|
|
+ this.form.xmbId=this.projectList[0].value;
|
|
|
+ this.xmbId=this.projectList[0].label
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
ckItem(item){
|
|
|
if(item.code){
|
|
|
|
|
@@ -344,14 +418,14 @@
|
|
|
}
|
|
|
},
|
|
|
gotoOut() {
|
|
|
- if(!this.form.projectName){
|
|
|
+ // if(!this.form.projectName){
|
|
|
|
|
|
- uni.showToast({
|
|
|
- title: "请输入项目名称",
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
+ // uni.showToast({
|
|
|
+ // title: "请输入项目名称",
|
|
|
+ // icon: "none"
|
|
|
+ // })
|
|
|
+ // return
|
|
|
+ // }
|
|
|
if(this.scanList.length==0){
|
|
|
uni.showToast({
|
|
|
title: "请扫码添加出库设备",
|
|
@@ -681,7 +755,7 @@
|
|
|
}
|
|
|
}
|
|
|
.container{
|
|
|
- margin-top: 140px;
|
|
|
+ margin-top: 80px;
|
|
|
|
|
|
}
|
|
|
|