|
|
@@ -11,8 +11,9 @@
|
|
|
<view>{{newData.newData1?'更改':'请选择'}}</view>
|
|
|
<uni-icons class="right-icon" type="right"></uni-icons>
|
|
|
</view>
|
|
|
- <view class="content-bottom-text-box" v-if="newData.newData1">
|
|
|
- <view class="content-text-box">
|
|
|
+ <view class="content-bottom-text-box" :class="!detailsType?'border-top-box':''"
|
|
|
+ v-if="newData.newData1">
|
|
|
+ <view class="content-text-box" v-if="!newData.newData0">
|
|
|
<view>气瓶编码:</view>
|
|
|
<view>{{newData.newData2}}</view>
|
|
|
</view>
|
|
|
@@ -28,7 +29,7 @@
|
|
|
<view>气体类别:</view>
|
|
|
<view>{{newData.newData5}}</view>
|
|
|
</view>
|
|
|
- <view class="content-text-box">
|
|
|
+ <view class="content-text-box" v-if="!newData.newData0">
|
|
|
<view>压力:</view>
|
|
|
<view>{{newData.newData6}}</view>
|
|
|
</view>
|
|
|
@@ -39,10 +40,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="content-big-box">
|
|
|
+ <view class="content-big-box" v-if="newData.newData8">
|
|
|
<view class="content-title-p">实验室信息</view>
|
|
|
<view class="content-min-box">
|
|
|
- <view class="content-bottom-text-box" v-if="newData.newData8">
|
|
|
+ <view class="content-bottom-text-box">
|
|
|
<view class="content-text-box">
|
|
|
<view>实验室名称:</view>
|
|
|
<view>{{newData.newData9}}</view>
|
|
|
@@ -73,16 +74,19 @@
|
|
|
</picker>
|
|
|
<view class="content-max-input-box" style="margin:0;">
|
|
|
<view class="name-box">费用</view>
|
|
|
- <input class="uni-input input-box" v-if="newData.newData17 != 2" v-model="newData.newData14" type="number"
|
|
|
+ <view class="input-box" style="color:#808080;" @click='shadeButton(1)'>
|
|
|
+ {{newData.newData17 != 2?newData.newData14:'0'}}</view>
|
|
|
+ <!-- <input class="uni-input input-box" v-if="newData.newData17 != 2" v-model="newData.newData14" type="number"
|
|
|
maxlength="10" placeholder="请输入" />
|
|
|
- <p class="input-box" v-if="newData.newData17 == 2">0</p>
|
|
|
+ <p class="input-box" v-if="newData.newData17 == 2">0</p> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-max-input-box">
|
|
|
<view class="name-box">签出人</view>
|
|
|
<view class="input-box" style="color:#808080;" @click='shadeButton(1)'>
|
|
|
- {{newData.newData13?newData.newData13:'请选择'}}</view>
|
|
|
+ {{newData.newData13?newData.newData13:'请选择'}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="content-max-up-box">
|
|
|
<view class="name-box">出库单</view>
|
|
|
@@ -114,9 +118,11 @@
|
|
|
<view class="button-box" @click="searchButton()">搜索</view>
|
|
|
</view>
|
|
|
<view class="list-max-box">
|
|
|
- <view @click="checkUserButton(item)" v-for="(item,index) in userList" :key="index">
|
|
|
+ <view class="for-p" @click="checkUserButton(item)"
|
|
|
+ v-for="(item,index) in userList" :key="index">
|
|
|
{{item.userName}}({{item.account}})
|
|
|
</view>
|
|
|
+ <view class="null-p" v-if="!userList[0]">搜索并查询签出人</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -128,7 +134,9 @@
|
|
|
config
|
|
|
} from '@/api/request/config.js'
|
|
|
import {
|
|
|
- systemUserSelectUser
|
|
|
+ systemUserSelectUser,
|
|
|
+ airbottleNewQpAppletBottleDetail,
|
|
|
+ airBottleNewQpAppletBottleStorageOut,
|
|
|
} from '@/pages_supplierCylinderManagement/api/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -136,6 +144,7 @@
|
|
|
baseUrl: config.base_url,
|
|
|
detailsType: false,
|
|
|
newData: {
|
|
|
+ newData0: '',
|
|
|
newData1: '',
|
|
|
newData2: '',
|
|
|
newData3: '',
|
|
|
@@ -145,6 +154,7 @@
|
|
|
newData7: '',
|
|
|
newData8: '',
|
|
|
newData9: '',
|
|
|
+ newData92: '',
|
|
|
newData10: '',
|
|
|
newData11: '',
|
|
|
newData12: '',
|
|
|
@@ -157,22 +167,56 @@
|
|
|
},
|
|
|
array: ['空瓶出库', '满瓶出库'],
|
|
|
inputData: '',
|
|
|
- userList:[],
|
|
|
- shadeType:false,
|
|
|
+ userList: [],
|
|
|
+ shadeType: false,
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ uni.$on('refreshBPageData', (data) => {
|
|
|
+ this.$set(this.newData, 'newData1', data.id);
|
|
|
+ this.airbottleNewQpAppletBottleDetail(data.id);
|
|
|
+ });
|
|
|
+ if (options.id) {
|
|
|
+ this.$set(this, 'detailsType', true);
|
|
|
+ this.$set(this.newData, 'newData1', options.id);
|
|
|
+ this.airbottleNewQpAppletBottleDetail(options.id);
|
|
|
+ // let obj = JSON.parse(decodeURIComponent(options.infoData));
|
|
|
+ // this.$set(this, 'detailsType', true);
|
|
|
+ // this.$set(this, 'newData', {
|
|
|
+ // newData0: obj.specialGases,
|
|
|
+ // newData1: obj.id,
|
|
|
+ // newData2: obj.bottleCode,
|
|
|
+ // newData3: obj.gasName,
|
|
|
+ // newData4: obj.specification,
|
|
|
+ // newData5: obj.gasCategory,
|
|
|
+ // newData6: obj.pressure,
|
|
|
+ // newData7: obj.purity,
|
|
|
+ // newData8: obj.subId,
|
|
|
+ // newData9: obj.subName,
|
|
|
+ // newData92: obj.deptId,
|
|
|
+ // newData10: obj.buildName,
|
|
|
+ // newData11: obj.floorName,
|
|
|
+ // newData12: obj.roomNum,
|
|
|
+ // newData13: '',
|
|
|
+ // newData133: '',
|
|
|
+ // newData14: obj.latestStorageIn.cost,
|
|
|
+ // newData15: [],
|
|
|
+ // newData16: '',
|
|
|
+ // newData17: '',
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onUnload() {
|
|
|
+ uni.$off('refreshBPageData');
|
|
|
+ },
|
|
|
+ /*
|
|
|
+ onLoad(options) {
|
|
|
if (options.pageType) {
|
|
|
let obj = JSON.parse(decodeURIComponent(options.form));
|
|
|
if (options.pageType == 1) {
|
|
|
//选择气瓶
|
|
|
this.$set(this.newData, 'newData1', obj.id);
|
|
|
- this.$set(this.newData, 'newData2', obj.bottleCode);
|
|
|
- this.$set(this.newData, 'newData3', obj.gasName);
|
|
|
- this.$set(this.newData, 'newData4', obj.specification);
|
|
|
- this.$set(this.newData, 'newData4', obj.gasCategory);
|
|
|
- this.$set(this.newData, 'newData4', obj.pressure);
|
|
|
- this.$set(this.newData, 'newData4', obj.purity);
|
|
|
+ this.airbottleNewQpAppletBottleDetail(obj.id);
|
|
|
} else if (options.pageType == 2) {
|
|
|
//选择实验室
|
|
|
this.$set(this.newData, 'newData5', obj.data5);
|
|
|
@@ -180,18 +224,44 @@
|
|
|
this.$set(this.newData, 'newData7', obj.data7);
|
|
|
this.$set(this.newData, 'newData8', obj.data8);
|
|
|
} else if (options.pageType == 3) {
|
|
|
- //历史记录-气瓶出库
|
|
|
- this.$set(this, 'detailsType', true);
|
|
|
+ //历史记录-气瓶出
|
|
|
+ this.$set(this, 'detailsType', true);库
|
|
|
this.$set(this.newData, 'newData1', "1");
|
|
|
this.$set(this.newData, 'newData8', "1");
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ */
|
|
|
onShow() {
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ //气瓶详情
|
|
|
+ async airbottleNewQpAppletBottleDetail(id) {
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await airbottleNewQpAppletBottleDetail({
|
|
|
+ id: id
|
|
|
+ });
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.$set(this.newData, 'newData0', data.data.specialGases);
|
|
|
+ this.$set(this.newData, 'newData2', data.data.bottleCode);
|
|
|
+ this.$set(this.newData, 'newData3', data.data.gasName);
|
|
|
+ this.$set(this.newData, 'newData4', data.data.specification);
|
|
|
+ this.$set(this.newData, 'newData5', data.data.gasCategory);
|
|
|
+ this.$set(this.newData, 'newData6', data.data.pressure);
|
|
|
+ this.$set(this.newData, 'newData7', data.data.purity);
|
|
|
+ this.$set(this.newData, 'newData8', data.data.subId);
|
|
|
+ this.$set(this.newData, 'newData9', data.data.subName);
|
|
|
+ this.$set(this.newData, 'newData92', data.data.deptId);
|
|
|
+ this.$set(this.newData, 'newData10', data.data.buildName);
|
|
|
+ this.$set(this.newData, 'newData11', data.data.floorName);
|
|
|
+ this.$set(this.newData, 'newData12', data.data.roomNum);
|
|
|
+ this.$set(this.newData, 'newData14', data.data.cost);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //出库状态切换
|
|
|
bindPickerChange(e) {
|
|
|
if (e.detail.value == 0) {
|
|
|
this.$set(this.newData, 'newData17', 1)
|
|
|
@@ -212,6 +282,40 @@
|
|
|
},
|
|
|
//提交方法
|
|
|
submitButton() {
|
|
|
+ let self = this;
|
|
|
+ if (!this.newData.newData1) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择气瓶',
|
|
|
+ icon: "error",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ } else if (!this.newData.newData17) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择出库类型',
|
|
|
+ icon: "error",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ } else if (!this.newData.newData133) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请选择签出人',
|
|
|
+ icon: "error",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ } else if (!this.newData.newData15[0]) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请上传出库单',
|
|
|
+ icon: "error",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
uni.showModal({
|
|
|
title: '确认出库',
|
|
|
content: '确认后,该气体气瓶的当前状态将变更为已出库。',
|
|
|
@@ -221,19 +325,49 @@
|
|
|
confirmColor: '#2684D8',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
- uni.showToast({
|
|
|
- title: '出库完成',
|
|
|
- icon: "success",
|
|
|
- mask: true,
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- setTimeout(function() {
|
|
|
- uni.navigateBack();
|
|
|
- }, 2000);
|
|
|
+ self.airBottleNewQpAppletBottleStorageOut();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //出库
|
|
|
+ async airBottleNewQpAppletBottleStorageOut() {
|
|
|
+ let self = this;
|
|
|
+ let obj = {
|
|
|
+ bottleId: this.newData.newData1,
|
|
|
+ outType: this.newData.newData17,
|
|
|
+ signerOut: this.newData.newData13,
|
|
|
+ signerOutId: this.newData.newData133,
|
|
|
+ voucherUrl: this.newData.newData15 + '',
|
|
|
+ remark: this.newData.newData16,
|
|
|
+ source: '2',
|
|
|
+ };
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await airBottleNewQpAppletBottleStorageOut(obj);
|
|
|
+ if (data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '出库完成',
|
|
|
+ icon: "success",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta: self.detailsType?2:1
|
|
|
+ });
|
|
|
+ // if(self.detailsType){
|
|
|
+ // uni.redirectTo({
|
|
|
+ // url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/cylinderDetails',
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // uni.redirectTo({
|
|
|
+ // url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/index',
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
+ },
|
|
|
/******图片上传******/
|
|
|
selectImage() {
|
|
|
let self = this;
|
|
|
@@ -384,10 +518,13 @@
|
|
|
background-color: #fff;
|
|
|
border-radius: 12rpx;
|
|
|
|
|
|
+ .border-top-box {
|
|
|
+ border-top: 1rpx solid #dedede;
|
|
|
+ }
|
|
|
+
|
|
|
.content-check-box {
|
|
|
display: flex;
|
|
|
padding: 40rpx 30rpx;
|
|
|
- border-bottom: 1rpx solid #dedede;
|
|
|
|
|
|
view {
|
|
|
font-size: 30rpx;
|
|
|
@@ -598,19 +735,26 @@
|
|
|
overflow-y: scroll;
|
|
|
border-top: 1rpx solid #dedede;
|
|
|
|
|
|
- view:nth-child(1) {
|
|
|
+ .for-p:nth-child(1) {
|
|
|
border: none;
|
|
|
}
|
|
|
|
|
|
- view {
|
|
|
+ .for-p {
|
|
|
font-size: 28rpx;
|
|
|
padding: 20rpx 40rpx;
|
|
|
- line-height:60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
border-top: 1rpx solid #dedede;
|
|
|
- display block;
|
|
|
- overflow hidden;
|
|
|
- text-overflow ellipsis;
|
|
|
- white-space nowrap;
|
|
|
+ display:block;
|
|
|
+ overflow:hidden;
|
|
|
+ text-overflow:ellipsis;
|
|
|
+ white-space:nowrap;
|
|
|
+ }
|
|
|
+
|
|
|
+ .null-p {
|
|
|
+ text-align: center;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #999;
|
|
|
+ line-height: 300rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|