|
@@ -83,13 +83,13 @@
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
<view class="title">扣款项</view>
|
|
<view class="title">扣款项</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input placeholder-style="font-size:14px" placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
|
|
|
|
|
|
+ <input maxlength='16' placeholder="请输入扣款项" name="input" v-model="WarehouseInOutInfo.deductionItems"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
<text class="tit">入库日期</text>
|
|
<text class="tit">入库日期</text>
|
|
|
|
|
|
- <view @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time}}</view>
|
|
|
|
|
|
+ <view class="con-list" @click="show = true">{{WarehouseInOutInfo.inOutDate!=''?WarehouseInOutInfo.inOutDate:time}}</view>
|
|
<u-picker :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
|
|
<u-picker :params='params' :default-time='time' @confirm="DateChange" v-model="show" mode="time"></u-picker>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -118,7 +118,7 @@
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
<view class="title">质检员</view>
|
|
<view class="title">质检员</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input placeholder-style="font-size:14px" placeholder="请输入质检员姓名" name="input" v-model="list.qualityInspector"></input>
|
|
|
|
|
|
+ <input maxlength='10' minlength='2' placeholder-style="font-size:14px" placeholder="请输入质检员姓名" name="input" v-model="list.qualityInspector"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row b-b">
|
|
<view class="c-row b-b">
|
|
@@ -195,6 +195,7 @@ import upload from '@/components/upload.vue';
|
|
goods: {},
|
|
goods: {},
|
|
list: {},
|
|
list: {},
|
|
WarehouseInOutInfo: {
|
|
WarehouseInOutInfo: {
|
|
|
|
+ inOutDate:'',
|
|
warehouseInOutDetail: {},
|
|
warehouseInOutDetail: {},
|
|
pcFlag: 0,
|
|
pcFlag: 0,
|
|
contractNo: {},
|
|
contractNo: {},
|
|
@@ -285,23 +286,134 @@ import upload from '@/components/upload.vue';
|
|
this.imgUrls.splice(index, 1);
|
|
this.imgUrls.splice(index, 1);
|
|
},
|
|
},
|
|
commit1() {
|
|
commit1() {
|
|
|
|
+ if(this.WarehouseInOutInfo.grossWeight>100||this.WarehouseInOutInfo.grossWeight<1){
|
|
|
|
+ this.$api.msg('毛重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.grossWeight.indexOf('.')!=-1){
|
|
|
|
+ if(this.WarehouseInOutInfo.grossWeight.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('毛重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.tare>50||this.WarehouseInOutInfo.tare<1){
|
|
|
|
+ this.$api.msg('皮重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.tare.indexOf('.')!=-1){
|
|
|
|
+ if(this.WarehouseInOutInfo.tare.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('皮重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount>10000||this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount<0){
|
|
|
|
+ this.$api.msg('扣款金额输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount.indexOf('.')!=-1){
|
|
|
|
+ if(this.WarehouseInOutInfo.deductionAmount.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('扣款金额输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.qualityInspector&&this.list.qualityInspector<2||this.list.qualityInspector&&this.list.qualityInspector>10){
|
|
|
|
+ this.$api.msg('质检员姓名输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.protein&&this.list.protein<1||this.list.protein&&this.list.protein>80){
|
|
|
|
+ this.$api.msg('蛋白占比输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.protein&&this.list.protein.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.protein.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('蛋白占比输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.waterContent&&this.list.waterContent<1||this.list.waterContent&&this.list.waterContent>40){
|
|
|
|
+ this.$api.msg('水分输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.waterContent&&this.list.waterContent.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.waterContent.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('水分输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.bulkDensity&&this.list.bulkDensity<1||this.list.bulkDensity&&this.list.bulkDensity>40){
|
|
|
|
+ this.$api.msg('容重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.bulkDensity.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('容重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.jiaorenli&&this.list.jiaorenli<1||this.list.jiaorenli&&this.list.jiaorenli>40){
|
|
|
|
+ this.$api.msg('热损伤输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.jiaorenli&&this.list.jiaorenli.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.jiaorenli.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('热损伤输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.impurity&&this.list.impurity<1||this.list.impurity&&this.list.impurity>40){
|
|
|
|
+ this.$api.msg('杂质输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.impurity&&this.list.impurity.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.impurity.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('杂质输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.mildewGrain&&this.list.mildewGrain<1||this.list.mildewGrain&&this.list.mildewGrain>40){
|
|
|
|
+ this.$api.msg('霉变粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.mildewGrain&&this.list.mildewGrain.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.mildewGrain.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('霉变粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.imperfectGrain&&this.list.imperfectGrain<1||this.list.imperfectGrain&&this.list.imperfectGrain>40){
|
|
|
|
+ this.$api.msg('不完整粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.imperfectGrain&&this.list.imperfectGrain.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.imperfectGrain.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('不完整粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title:"正在暂存"
|
|
title:"正在暂存"
|
|
})
|
|
})
|
|
|
|
+ this.WarehouseInOutInfo.deductionAmount=-this.WarehouseInOutInfo.deductionAmount
|
|
this.WarehouseInOutInfo.warehouseInOutDetail = this.list
|
|
this.WarehouseInOutInfo.warehouseInOutDetail = this.list
|
|
this.WarehouseInOutInfo.statusFlag = 1
|
|
this.WarehouseInOutInfo.statusFlag = 1
|
|
if(this.imgUrls.length > 0){
|
|
if(this.imgUrls.length > 0){
|
|
this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
|
|
this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
|
|
}
|
|
}
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: "暂存成功",
|
|
|
|
- showCancel: false,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '暂存成功',
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ uni.navigateBack({})
|
|
|
|
+ }else{
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.message,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
|
|
|
}).catch(res => {
|
|
}).catch(res => {
|
|
@@ -315,17 +427,126 @@ import upload from '@/components/upload.vue';
|
|
},
|
|
},
|
|
commit() {
|
|
commit() {
|
|
if(!this.WarehouseInOutInfo.grossWeight){
|
|
if(!this.WarehouseInOutInfo.grossWeight){
|
|
- this.$api.msg('毛重不能为空');
|
|
|
|
- return;
|
|
|
|
|
|
+ this.$api.msg('毛重不能为空')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
if(!this.WarehouseInOutInfo.tare){
|
|
if(!this.WarehouseInOutInfo.tare){
|
|
- this.$api.msg('皮重不能为空');
|
|
|
|
- return;
|
|
|
|
|
|
+ this.$api.msg('皮重不能为空')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.WarehouseInOutInfo.warehouseName){
|
|
|
|
+ this.$api.msg('仓库不能为空')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
if(!this.WarehouseInOutInfo.binNumber){
|
|
if(!this.WarehouseInOutInfo.binNumber){
|
|
- this.$api.msg('仓位号不能为空');
|
|
|
|
- return;
|
|
|
|
|
|
+ this.$api.msg('仓库不能为空')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
|
|
+ if(this.WarehouseInOutInfo.grossWeight>100||this.WarehouseInOutInfo.grossWeight<1){
|
|
|
|
+ this.$api.msg('毛重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.grossWeight.indexOf('.')!=-1){
|
|
|
|
+ if(this.WarehouseInOutInfo.grossWeight.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('毛重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.tare>50||this.WarehouseInOutInfo.tare<1){
|
|
|
|
+ this.$api.msg('皮重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.tare.indexOf('.')!=-1){
|
|
|
|
+ if(this.WarehouseInOutInfo.tare.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('皮重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount>10000||this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount<0){
|
|
|
|
+ this.$api.msg('扣款金额输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.WarehouseInOutInfo.deductionAmount&&this.WarehouseInOutInfo.deductionAmount.indexOf('.')!=-1){
|
|
|
|
+ if(this.WarehouseInOutInfo.deductionAmount.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('扣款金额输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.qualityInspector&&this.list.qualityInspector<2||this.list.qualityInspector&&this.list.qualityInspector>10){
|
|
|
|
+ this.$api.msg('质检员姓名输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.protein&&this.list.protein<1||this.list.protein&&this.list.protein>80){
|
|
|
|
+ this.$api.msg('蛋白占比输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.protein&&this.list.protein.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.protein.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('蛋白占比输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.waterContent&&this.list.waterContent<1||this.list.waterContent&&this.list.waterContent>40){
|
|
|
|
+ this.$api.msg('水分输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.waterContent&&this.list.waterContent.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.waterContent.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('水分输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.bulkDensity&&this.list.bulkDensity<1||this.list.bulkDensity&&this.list.bulkDensity>40){
|
|
|
|
+ this.$api.msg('容重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.bulkDensity.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('容重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.jiaorenli&&this.list.jiaorenli<1||this.list.jiaorenli&&this.list.jiaorenli>40){
|
|
|
|
+ this.$api.msg('热损伤输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.jiaorenli&&this.list.jiaorenli.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.jiaorenli.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('热损伤输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.impurity&&this.list.impurity<1||this.list.impurity&&this.list.impurity>40){
|
|
|
|
+ this.$api.msg('杂质输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.impurity&&this.list.impurity.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.impurity.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('杂质输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.mildewGrain&&this.list.mildewGrain<1||this.list.mildewGrain&&this.list.mildewGrain>40){
|
|
|
|
+ this.$api.msg('霉变粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.mildewGrain&&this.list.mildewGrain.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.mildewGrain.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('霉变粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.list.imperfectGrain&&this.list.imperfectGrain<1||this.list.imperfectGrain&&this.list.imperfectGrain>40){
|
|
|
|
+ this.$api.msg('不完整粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.list.imperfectGrain&&this.list.imperfectGrain.indexOf('.')!=-1){
|
|
|
|
+ if(this.list.imperfectGrain.split('.')[1].length>2){
|
|
|
|
+ this.$api.msg('不完整粒输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.WarehouseInOutInfo.deductionAmount=-this.WarehouseInOutInfo.deductionAmount
|
|
if(this.imgUrls.length > 0){
|
|
if(this.imgUrls.length > 0){
|
|
this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
|
|
this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
|
|
}
|
|
}
|
|
@@ -336,17 +557,21 @@ import upload from '@/components/upload.vue';
|
|
})
|
|
})
|
|
|
|
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: "提交成功",
|
|
|
|
- showCancel: false,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack({
|
|
|
|
- delta: 1
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '提交成功',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ uni.navigateBack({})
|
|
|
|
+ }, 200)
|
|
|
|
+ }else{
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.message,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
|
|
|
}).catch(res => {
|
|
}).catch(res => {
|
|
@@ -379,12 +604,12 @@ import upload from '@/components/upload.vue';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
ruChange(e) {
|
|
ruChange(e) {
|
|
- this.ruIndex = e.detail.value
|
|
|
|
- this.rutypes = this.ruType[this.ruIndex];
|
|
|
|
|
|
+ this.WarehouseInOutInfo.inOutTypeKey = e.detail.value
|
|
|
|
+ this.WarehouseInOutInfo.inOutType = this.ruType[this.ruIndex];
|
|
},
|
|
},
|
|
pinChange(e) {
|
|
pinChange(e) {
|
|
- this.pinIndex = e.detail.value
|
|
|
|
- this.pinTypes = this.pinType[this.pinIndex];
|
|
|
|
|
|
+ this.WarehouseInOutInfo.gradeKey = e.detail.value
|
|
|
|
+ this.WarehouseInOutInfo.grade = this.pinType[this.pinIndex];
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
|