|
@@ -28,53 +28,51 @@
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
<view class="title">车牌号</view>
|
|
<view class="title">车牌号</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input v-model='gridList.carNumber' placeholder="请输入车牌号"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <input v-model='gridList.carNumber' placeholder="请输入车牌号" name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="gridList.paramType != '1'" class="c-row ">
|
|
<view v-if="gridList.paramType != '1'" class="c-row ">
|
|
<view class="title">扣重比</view>
|
|
<view class="title">扣重比</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <input v-model='gridList.buckleWeightRatio' placeholder="请输入扣重比" name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-else class="c-row ">
|
|
<view v-else class="c-row ">
|
|
<view class="title">扣杂</view>
|
|
<view class="title">扣杂</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
|
|
<input v-model='gridList.buckleMiscellaneous' placeholder="初检扣杂" @input="waterContentChange"
|
|
- name="input"></input>
|
|
|
|
|
|
+ name="input"></input>
|
|
<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
|
|
<input v-model='gridList.reBuckleMiscellaneous' placeholder="复检扣杂" @input="waterContentChange"
|
|
- name="input"></input>
|
|
|
|
|
|
+ name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
<view class="title">购粮性质</view>
|
|
<view class="title">购粮性质</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <input v-model='gridList.natureOfGrainPurchase' placeholder="请输入购粮性质" name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
<view class="title">仓位号</view>
|
|
<view class="title">仓位号</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
<view @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
|
|
<view @click='show=true'>{{gridList.binNumber?gridList.binNumber:'请选择仓位号'}}</view>
|
|
- <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)' v-model="show" mode="selector" >
|
|
|
|
|
|
+ <u-picker :range="warehouseList" range-key="binNumber" @confirm='binNumberpicker($event)'
|
|
|
|
+ v-model="show" mode="selector">
|
|
</u-picker>
|
|
</u-picker>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
<view class="title">囤位号</view>
|
|
<view class="title">囤位号</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input type='number' v-model='gridList.storageTagNo' placeholder="请输入囤位号"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <input type='number' v-model='gridList.storageTagNo' placeholder="请输入囤位号" name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
<view class="title">货名</view>
|
|
<view class="title">货名</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
<view @click='show2=true'>{{gridList.goodsName}}</view>
|
|
<view @click='show2=true'>{{gridList.goodsName}}</view>
|
|
- <u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2" mode="selector" >
|
|
|
|
|
|
+ <u-picker :range="goodsList" range-key="goodsName" @confirm='goodspicker($event)' v-model="show2"
|
|
|
|
+ mode="selector">
|
|
</u-picker>
|
|
</u-picker>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -82,81 +80,78 @@
|
|
<view class="title">类型</view>
|
|
<view class="title">类型</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
<view @click='show3=true'>{{gridList.type}}</view>
|
|
<view @click='show3=true'>{{gridList.type}}</view>
|
|
- <u-picker :range="typeList" @confirm='typepicker($event)' v-model="show3" mode="selector" >
|
|
|
|
|
|
+ <u-picker :range="typeList" @confirm='typepicker($event)' v-model="show3" mode="selector">
|
|
</u-picker>
|
|
</u-picker>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="gridList.type == '潮粮'" class="c-row">
|
|
<view v-if="gridList.type == '潮粮'" class="c-row">
|
|
<view class="title">净重单价(元/公斤)</view>
|
|
<view class="title">净重单价(元/公斤)</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑" name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="gridList.type == '干粮'" class="c-row">
|
|
<view v-if="gridList.type == '干粮'" class="c-row">
|
|
<view class="title">干粮单价(元/公斤)</view>
|
|
<view class="title">干粮单价(元/公斤)</view>
|
|
<view class="con-list">
|
|
<view class="con-list">
|
|
- <input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <input v-model='gridList.dryGrainPrice' placeholder="请输入干粮单价" name="input"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view style='margin-bottom:300rpx;' class='wrap'>
|
|
|
|
- <view class='title_b'>化验信息</view>
|
|
|
|
|
|
+ <view style='padding-bottom:300rpx;'>
|
|
|
|
+ <view class='wrap'>
|
|
|
|
+ <view class='title_b'>化验信息</view>
|
|
|
|
|
|
- <view class="c-row ">
|
|
|
|
- <view class="title">等级</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
|
|
|
|
- <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1" mode="selector" >
|
|
|
|
- </u-picker>
|
|
|
|
|
|
+ <view class="c-row ">
|
|
|
|
+ <view class="title">等级</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <view @click='show1=true'>{{gridList.grade?gridList.grade:'请选择等级'}}</view>
|
|
|
|
+ <u-picker :range="gradeList" range-key="value" @confirm='gradepicker($event)' v-model="show1"
|
|
|
|
+ mode="selector">
|
|
|
|
+ </u-picker>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="c-row ">
|
|
|
|
- <view class="title">水分(%)</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
|
|
|
|
- name="input"></input>
|
|
|
|
- <input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <view class="c-row ">
|
|
|
|
+ <view class="title">水分(%)</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <input v-model='gridList.waterContent' placeholder="初检水分" @input="waterContentChange"
|
|
|
|
+ name="input"></input>
|
|
|
|
+ <input v-model='gridList.rewaterContent' placeholder="复检水分" @input="waterContentChange"
|
|
|
|
+ name="input"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="c-row ">
|
|
|
|
- <view class="title">容重(克/升)</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <input v-model='gridList.bulkDensity' placeholder="请输入容重"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <view class="c-row ">
|
|
|
|
+ <view class="title">容重(克/升)</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <input v-model='gridList.bulkDensity' placeholder="请输入容重" name="input"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="c-row ">
|
|
|
|
- <view class="title">不完善粒(%)</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <view class="c-row ">
|
|
|
|
+ <view class="title">不完善粒(%)</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比" name="input"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="c-row ">
|
|
|
|
- <view class="title">杂质(%)</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <input v-model='gridList.impurity' placeholder="请输入杂质占比"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <view class="c-row ">
|
|
|
|
+ <view class="title">杂质(%)</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <input v-model='gridList.impurity' placeholder="请输入杂质占比" name="input"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="c-row ">
|
|
|
|
- <view class="title">霉变粒(%)</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <input v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <view class="c-row ">
|
|
|
|
+ <view class="title">霉变粒(%)</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <input v-model='gridList.mildewGrain' placeholder="请输入霉变粒占比" name="input"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="c-row">
|
|
|
|
- <view class="title">热损伤(%)</view>
|
|
|
|
- <view class="con-list">
|
|
|
|
- <input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比"
|
|
|
|
- name="input"></input>
|
|
|
|
|
|
+ <view class="c-row">
|
|
|
|
+ <view class="title">热损伤(%)</view>
|
|
|
|
+ <view class="con-list">
|
|
|
|
+ <input v-model='gridList.jiaorenli' placeholder="请输入热损伤占比" name="input"></input>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
<view class="footer">
|
|
<view class="footer">
|
|
<view @click='submit' class="button">提交</view>
|
|
<view @click='submit' class="button">提交</view>
|
|
</view>
|
|
</view>
|
|
@@ -181,53 +176,64 @@
|
|
modalName: '',
|
|
modalName: '',
|
|
mycarStyle: '',
|
|
mycarStyle: '',
|
|
feild: undefined,
|
|
feild: undefined,
|
|
- id:0,
|
|
|
|
- show:false,
|
|
|
|
- selector:[],
|
|
|
|
- show1:false,
|
|
|
|
|
|
+ id: 0,
|
|
|
|
+ show: false,
|
|
|
|
+ selector: [],
|
|
|
|
+ show1: false,
|
|
inputContent: '',
|
|
inputContent: '',
|
|
coverTransform: 'translateY(0px)',
|
|
coverTransform: 'translateY(0px)',
|
|
coverTransition: '0s',
|
|
coverTransition: '0s',
|
|
moving: false,
|
|
moving: false,
|
|
footprintList: [],
|
|
footprintList: [],
|
|
- searchKeyWord:'',
|
|
|
|
|
|
+ searchKeyWord: '',
|
|
isVip: false,
|
|
isVip: false,
|
|
userInfoTmp: [],
|
|
userInfoTmp: [],
|
|
inputStatus: 'none',
|
|
inputStatus: 'none',
|
|
carInfo: [],
|
|
carInfo: [],
|
|
gridCol: 4,
|
|
gridCol: 4,
|
|
- pageSize:10,
|
|
|
|
- show3:false,
|
|
|
|
- show2:false,
|
|
|
|
- goodsList:[],
|
|
|
|
- currentPage:1,
|
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ show3: false,
|
|
|
|
+ show2: false,
|
|
|
|
+ goodsList: [],
|
|
|
|
+ currentPage: 1,
|
|
gridBorder: false,
|
|
gridBorder: false,
|
|
- headUrl:"../../static/img/myimg/YongHu@3x.png",
|
|
|
|
- userphone:"",
|
|
|
|
- username:"请更改昵称",
|
|
|
|
|
|
+ headUrl: "../../static/img/myimg/YongHu@3x.png",
|
|
|
|
+ userphone: "",
|
|
|
|
+ username: "请更改昵称",
|
|
gridList: {
|
|
gridList: {
|
|
- natureOfGrainPurchase:'贸易粮',
|
|
|
|
- type:'潮粮',
|
|
|
|
- tidalGrainPrice:'',
|
|
|
|
- dryGrainPrice:'',
|
|
|
|
- buckleMiscellaneous:'',
|
|
|
|
|
|
+ natureOfGrainPurchase: '贸易粮',
|
|
|
|
+ type: '潮粮',
|
|
|
|
+ tidalGrainPrice: '',
|
|
|
|
+ dryGrainPrice: '',
|
|
|
|
+ buckleMiscellaneous: '',
|
|
},
|
|
},
|
|
- typeList:['潮粮','干粮'],
|
|
|
|
- managementType:'',
|
|
|
|
|
|
+ typeList: ['潮粮', '干粮'],
|
|
|
|
+ managementType: '',
|
|
warehouseName: '',
|
|
warehouseName: '',
|
|
- warehouseList:[],
|
|
|
|
- warehouseCount:'',
|
|
|
|
- commonWarehouseNo:'',
|
|
|
|
|
|
+ warehouseList: [],
|
|
|
|
+ warehouseCount: '',
|
|
|
|
+ commonWarehouseNo: '',
|
|
showTran: true,
|
|
showTran: true,
|
|
companyId: 1,
|
|
companyId: 1,
|
|
current: 4,
|
|
current: 4,
|
|
- gradeList:[
|
|
|
|
- {key:1,value:'一等品'},
|
|
|
|
- {key:2,value:'二等品'},
|
|
|
|
- {key:3,value:'三等品'},
|
|
|
|
- {key:4,value:'等外'},
|
|
|
|
|
|
+ gradeList: [{
|
|
|
|
+ key: 1,
|
|
|
|
+ value: '一等品'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 2,
|
|
|
|
+ value: '二等品'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 3,
|
|
|
|
+ value: '三等品'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ key: 4,
|
|
|
|
+ value: '等外'
|
|
|
|
+ },
|
|
],
|
|
],
|
|
- cangid:''
|
|
|
|
|
|
+ cangid: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// #ifndef MP
|
|
// #ifndef MP
|
|
@@ -253,131 +259,133 @@
|
|
computed: {
|
|
computed: {
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
// 手机号中间4位加*
|
|
// 手机号中间4位加*
|
|
- starUserphone(){
|
|
|
|
|
|
+ starUserphone() {
|
|
let reg = /^(\d{3})\d{4}(\d{4})$/;
|
|
let reg = /^(\d{3})\d{4}(\d{4})$/;
|
|
- if(this.userphone){
|
|
|
|
|
|
+ if (this.userphone) {
|
|
return this.userphone.replace(reg, "$1****$2");
|
|
return this.userphone.replace(reg, "$1****$2");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onLoad(options){
|
|
|
|
-
|
|
|
|
- this.commonWarehouseNo=options.commonWarehouseNo
|
|
|
|
- this.warehouseCount=Number(options.warehouseCount) + 1
|
|
|
|
- let number = '000' + this.warehouseCount
|
|
|
|
- number = number.substring(number.length - 4, number.length)
|
|
|
|
- this.gridList.warehouseName=options.warehouseName
|
|
|
|
- this.gridList.qualityNo='SGRK' + this.getdate() + this.commonWarehouseNo + number
|
|
|
|
- this.cangid=options.cangid
|
|
|
|
- this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
|
|
|
|
- warehouseId:this.cangid
|
|
|
|
|
|
+ onLoad(options) {
|
|
|
|
+
|
|
|
|
+ this.commonWarehouseNo = options.commonWarehouseNo
|
|
|
|
+ this.warehouseCount = Number(options.warehouseCount) + 1
|
|
|
|
+ let number = '000' + this.warehouseCount
|
|
|
|
+ number = number.substring(number.length - 4, number.length)
|
|
|
|
+ this.gridList.warehouseName = options.warehouseName
|
|
|
|
+ this.gridList.qualityNo = 'SGRK' + this.getdate() + this.commonWarehouseNo + number
|
|
|
|
+ this.cangid = options.cangid
|
|
|
|
+ this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
|
|
|
|
+ warehouseId: this.cangid
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- if(res.data.data){
|
|
|
|
-
|
|
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- this.managementType=options.managementType
|
|
|
|
|
|
+ this.managementType = options.managementType
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.purchasePriceList=uni.getStorageSync('purchasePriceList')
|
|
|
|
- if(uni.getStorageSync('checkcustomer')){
|
|
|
|
- this.gridList.customerName=uni.getStorageSync('checkcustomer').customerName
|
|
|
|
- this.gridList.customerPhone=uni.getStorageSync('checkcustomer').customerPhone
|
|
|
|
|
|
+ this.purchasePriceList = uni.getStorageSync('purchasePriceList')
|
|
|
|
+ if (uni.getStorageSync('checkcustomer')) {
|
|
|
|
+ this.gridList.customerName = uni.getStorageSync('checkcustomer').customerName
|
|
|
|
+ this.gridList.customerPhone = uni.getStorageSync('checkcustomer').customerPhone
|
|
}
|
|
}
|
|
- this.gridList.grade=this.gradeList[0].value
|
|
|
|
- this.gridList.gradeKey=this.gradeList[0].key
|
|
|
|
|
|
+ this.gridList.grade = this.gradeList[0].value
|
|
|
|
+ this.gridList.gradeKey = this.gradeList[0].key
|
|
var that = this
|
|
var that = this
|
|
- this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer',{
|
|
|
|
- compId:'',
|
|
|
|
- authenticationStatusKey:7
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.data.data){
|
|
|
|
- // let data = res.data.data
|
|
|
|
- // that.gridList =data
|
|
|
|
- that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',{
|
|
|
|
- id:this.cangid
|
|
|
|
- }).then(res => {
|
|
|
|
- that.warehouseList=res.data.data.warehousePositionInfoList
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName',{
|
|
|
|
- warehouseId:this.cangid
|
|
|
|
- }).then(res => {
|
|
|
|
- if(res.data.data){
|
|
|
|
- that.goodsList = res.data.data
|
|
|
|
- if(that.goodsList.length > 0){
|
|
|
|
- that.gridList.goodsName=that.goodsList[0].goodsName
|
|
|
|
- uni.setStorageSync('purchasePriceList',that.goodsList)
|
|
|
|
- that.purchasePriceList=uni.getStorageSync('purchasePriceList')
|
|
|
|
- that.waterContentChange()
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // for (let i = 0; i < res.data.data.length; i++) {
|
|
|
|
- // this.goodsList.push(res.data.data[i].goodsName)
|
|
|
|
- // }
|
|
|
|
- // if(this.goodsList.some(item=>{return item.goodsName=='玉米'})){
|
|
|
|
- // this.gridList.goodsName='玉米'
|
|
|
|
- // uni.setStorageSync('goodsName',this.gridList.goodsName)
|
|
|
|
- // }else{
|
|
|
|
- // this.gridList.goodsName=this.goodsList[0].goodsName
|
|
|
|
- // uni.setStorageSync('goodsName',this.gridList.goodsName)
|
|
|
|
- // }
|
|
|
|
|
|
+ this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoCustomer', {
|
|
|
|
+ compId: '',
|
|
|
|
+ authenticationStatusKey: 7
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+ // let data = res.data.data
|
|
|
|
+ // that.gridList =data
|
|
|
|
+ that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
|
+ id: this.cangid
|
|
|
|
+ }).then(res => {
|
|
|
|
+ that.warehouseList = res.data.data.warehousePositionInfoList
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
|
|
|
|
+ warehouseId: this.cangid
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.data) {
|
|
|
|
+ that.goodsList = res.data.data
|
|
|
|
+ if (that.goodsList.length > 0) {
|
|
|
|
+ that.gridList.goodsName = that.goodsList[0].goodsName
|
|
|
|
+ uni.setStorageSync('purchasePriceList', that.goodsList)
|
|
|
|
+ that.purchasePriceList = uni.getStorageSync('purchasePriceList')
|
|
|
|
+ that.waterContentChange()
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
+ // for (let i = 0; i < res.data.data.length; i++) {
|
|
|
|
+ // this.goodsList.push(res.data.data[i].goodsName)
|
|
|
|
+ // }
|
|
|
|
+ // if(this.goodsList.some(item=>{return item.goodsName=='玉米'})){
|
|
|
|
+ // this.gridList.goodsName='玉米'
|
|
|
|
+ // uni.setStorageSync('goodsName',this.gridList.goodsName)
|
|
|
|
+ // }else{
|
|
|
|
+ // this.gridList.goodsName=this.goodsList[0].goodsName
|
|
|
|
+ // uni.setStorageSync('goodsName',this.gridList.goodsName)
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
waterContentChange() {
|
|
waterContentChange() {
|
|
var that = this
|
|
var that = this
|
|
- if(this.gridList.goodsName && this.cangid){
|
|
|
|
- if(!this.gridList.dryGrainPrice||this.gridList.dryGrainPrice == 0){
|
|
|
|
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
|
|
|
|
- warehouseId:this.cangid,
|
|
|
|
- goodsName:this.gridList.goodsName
|
|
|
|
|
|
+ if (this.gridList.goodsName && this.cangid) {
|
|
|
|
+ if (!this.gridList.dryGrainPrice || this.gridList.dryGrainPrice == 0) {
|
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
|
|
|
|
+ warehouseId: this.cangid,
|
|
|
|
+ goodsName: this.gridList.goodsName
|
|
}).then(res => {
|
|
}).then(res => {
|
|
that.gridList.dryGrainPrice = res.data.data
|
|
that.gridList.dryGrainPrice = res.data.data
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (this.gridList.goodsName) {
|
|
if (this.gridList.goodsName) {
|
|
- for (var i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
|
- if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
|
|
|
|
- this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
|
|
|
|
- this.gridList.paramType = this.purchasePriceList[i].paramType
|
|
|
|
|
|
+ for (var i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
|
+ if (this.purchasePriceList[i].goodsName == this.gridList.goodsName) {
|
|
|
|
+ this.gridList.buckleWeightRatio = this.purchasePriceList[i].deductWeight
|
|
|
|
+ this.gridList.paramType = this.purchasePriceList[i].paramType
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
}
|
|
}
|
|
var numReg = /^[0-9]*$/
|
|
var numReg = /^[0-9]*$/
|
|
var numRe = new RegExp(numReg)
|
|
var numRe = new RegExp(numReg)
|
|
//潮粮单价改变事件
|
|
//潮粮单价改变事件
|
|
if (
|
|
if (
|
|
- this.gridList.goodsName &&
|
|
|
|
- this.gridList.waterContent &&
|
|
|
|
- this.gridList.grade&&
|
|
|
|
- numRe.test(this.gridList.waterContent)
|
|
|
|
|
|
+ this.gridList.goodsName &&
|
|
|
|
+ this.gridList.waterContent &&
|
|
|
|
+ this.gridList.grade &&
|
|
|
|
+ numRe.test(this.gridList.waterContent)
|
|
) {
|
|
) {
|
|
- this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice',{
|
|
|
|
- warehouseId:this.cangid,
|
|
|
|
- goodsName:this.gridList.goodsName,
|
|
|
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/tidalGrainPrice', {
|
|
|
|
+ warehouseId: this.cangid,
|
|
|
|
+ goodsName: this.gridList.goodsName,
|
|
waterContent: this.gridList.waterContent,
|
|
waterContent: this.gridList.waterContent,
|
|
grade: this.gridList.grade,
|
|
grade: this.gridList.grade,
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- if(that.gridList.paramType == '1'){
|
|
|
|
- that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that.gridList.buckleMiscellaneous)/100*parseFloat(that.gridList.dryGrainPrice)).toFixed(4)
|
|
|
|
- if(!that.gridList.tidalGrainPrice){
|
|
|
|
|
|
+ if (that.gridList.paramType == '1') {
|
|
|
|
+ that.gridList.tidalGrainPrice = parseFloat(parseFloat(res.data.data) - parseFloat(that
|
|
|
|
+ .gridList.buckleMiscellaneous) / 100 * parseFloat(that.gridList
|
|
|
|
+ .dryGrainPrice)).toFixed(4)
|
|
|
|
+ if (!that.gridList.tidalGrainPrice) {
|
|
that.gridList.tidalGrainPrice = ''
|
|
that.gridList.tidalGrainPrice = ''
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
that.gridList.tidalGrainPrice = res.data.data
|
|
that.gridList.tidalGrainPrice = res.data.data
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- gocustomer(){
|
|
|
|
|
|
+ gocustomer() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pages/erpbusiness/customer?cangid='+this.cangid
|
|
|
|
|
|
+ url: '/pages/erpbusiness/customer?cangid=' + this.cangid
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getdate() {
|
|
getdate() {
|
|
@@ -386,14 +394,14 @@
|
|
var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
|
|
var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
|
|
var datetime = date.getDate() //获取当前日(1-31)
|
|
var datetime = date.getDate() //获取当前日(1-31)
|
|
if (mouth < 10) {
|
|
if (mouth < 10) {
|
|
- mouth = '0' + mouth
|
|
|
|
|
|
+ mouth = '0' + mouth
|
|
}
|
|
}
|
|
if (datetime < 10) {
|
|
if (datetime < 10) {
|
|
- datetime = '0' + datetime
|
|
|
|
|
|
+ datetime = '0' + datetime
|
|
}
|
|
}
|
|
- return year +'' + mouth + '' + datetime
|
|
|
|
|
|
+ return year + '' + mouth + '' + datetime
|
|
},
|
|
},
|
|
- submit(){
|
|
|
|
|
|
+ submit() {
|
|
var that = this
|
|
var that = this
|
|
if (!this.gridList.qualityNo) {
|
|
if (!this.gridList.qualityNo) {
|
|
this.$api.msg('编号不能为空')
|
|
this.$api.msg('编号不能为空')
|
|
@@ -427,17 +435,16 @@
|
|
this.$api.msg('货名不能为空')
|
|
this.$api.msg('货名不能为空')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (this.gridList.buckleWeightRatio < 0 ||this.gridList.buckleWeightRatio > 2) {
|
|
|
|
|
|
+ if (this.gridList.buckleWeightRatio < 0 || this.gridList.buckleWeightRatio > 2) {
|
|
this.$api.msg('扣重比输入错误')
|
|
this.$api.msg('扣重比输入错误')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (
|
|
if (
|
|
String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
|
|
String(this.gridList.buckleWeightRatio).indexOf('.') != -1 &&
|
|
String(this.gridList.buckleWeightRatio).length -
|
|
String(this.gridList.buckleWeightRatio).length -
|
|
- (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2)
|
|
|
|
- {
|
|
|
|
- this.$api.msg('扣重比输入错误')
|
|
|
|
- return
|
|
|
|
|
|
+ (String(this.gridList.buckleWeightRatio).indexOf('.') + 1) > 2) {
|
|
|
|
+ this.$api.msg('扣重比输入错误')
|
|
|
|
+ return
|
|
}
|
|
}
|
|
if (!this.gridList.type) {
|
|
if (!this.gridList.type) {
|
|
this.$api.msg('类型不能为空')
|
|
this.$api.msg('类型不能为空')
|
|
@@ -481,63 +488,64 @@
|
|
confirmText: '提交',
|
|
confirmText: '提交',
|
|
success: function(res) {
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
- that.$api.doRequest('post', '/qualityInspectionManagement/api/addQualityInspection',that.gridList).then(res => {
|
|
|
|
- if(res.data.code==200){
|
|
|
|
- that.$api.msg('提交成功')
|
|
|
|
- uni.navigateBack({
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- hat.$api.msg('提交失败')
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ that.$api.doRequest('post',
|
|
|
|
+ '/qualityInspectionManagement/api/addQualityInspection', that.gridList)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ that.$api.msg('提交成功')
|
|
|
|
+ uni.navigateBack({})
|
|
|
|
+ } else {
|
|
|
|
+ hat.$api.msg('提交失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- gradepicker(e){
|
|
|
|
|
|
+ gradepicker(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
|
|
// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
|
|
- this.gridList.grade=this.gradeList[e[0]].value
|
|
|
|
- this.gridList.gradeKey=this.gradeList[e[0]].key
|
|
|
|
|
|
+ this.gridList.grade = this.gradeList[e[0]].value
|
|
|
|
+ this.gridList.gradeKey = this.gradeList[e[0]].key
|
|
this.waterContentChange()
|
|
this.waterContentChange()
|
|
},
|
|
},
|
|
- goodspicker(e){
|
|
|
|
|
|
+ goodspicker(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
|
|
// this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
|
|
- this.gridList.goodsName=this.goodsList[e[0]].goodsName
|
|
|
|
- uni.setStorageSync('goodsName',this.gridList.goodsName)
|
|
|
|
- if(this.gridList.type == "干粮" && this.gridList.goodsName){
|
|
|
|
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
|
|
|
|
- warehouseId:this.cangid,
|
|
|
|
- goodsName:this.gridList.goodsName
|
|
|
|
- }).then(res => {
|
|
|
|
- that.gridList.dryGrainPrice = res.data.data
|
|
|
|
- })
|
|
|
|
|
|
+ this.gridList.goodsName = this.goodsList[e[0]].goodsName
|
|
|
|
+ uni.setStorageSync('goodsName', this.gridList.goodsName)
|
|
|
|
+ if (this.gridList.type == "干粮" && this.gridList.goodsName) {
|
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
|
|
|
|
+ warehouseId: this.cangid,
|
|
|
|
+ goodsName: this.gridList.goodsName
|
|
|
|
+ }).then(res => {
|
|
|
|
+ that.gridList.dryGrainPrice = res.data.data
|
|
|
|
+ })
|
|
}
|
|
}
|
|
this.waterContentChange()
|
|
this.waterContentChange()
|
|
},
|
|
},
|
|
- typepicker(e){
|
|
|
|
|
|
+ typepicker(e) {
|
|
var that = this
|
|
var that = this
|
|
- this.gridList.type=this.typeList[e[0]]
|
|
|
|
- if(this.gridList.type == "干粮" &&this.gridList.goodsName){
|
|
|
|
- this.$api.doRequest('get', '/purchasePrice/dryGrainPrice',{
|
|
|
|
- warehouseId:this.cangid,
|
|
|
|
- goodsName:this.gridList.goodsName
|
|
|
|
- }).then(res => {
|
|
|
|
- that.gridList.dryGrainPrice = res.data.data
|
|
|
|
- })
|
|
|
|
|
|
+ this.gridList.type = this.typeList[e[0]]
|
|
|
|
+ if (this.gridList.type == "干粮" && this.gridList.goodsName) {
|
|
|
|
+ this.$api.doRequest('get', '/purchasePrice/dryGrainPrice', {
|
|
|
|
+ warehouseId: this.cangid,
|
|
|
|
+ goodsName: this.gridList.goodsName
|
|
|
|
+ }).then(res => {
|
|
|
|
+ that.gridList.dryGrainPrice = res.data.data
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- binNumberpicker(e){
|
|
|
|
- this.gridList.binNumber=this.warehouseList[e[0]].binNumber
|
|
|
|
|
|
+ binNumberpicker(e) {
|
|
|
|
+ this.gridList.binNumber = this.warehouseList[e[0]].binNumber
|
|
},
|
|
},
|
|
- del(item){
|
|
|
|
- this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
|
|
|
|
- id:item.id
|
|
|
|
|
|
+ del(item) {
|
|
|
|
+ this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection', {
|
|
|
|
+ id: item.id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- if(res.data.code==200){
|
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
this.$api.msg('删除成功')
|
|
this.$api.msg('删除成功')
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.$api.msg('系统异常,请联系管理员')
|
|
this.$api.msg('系统异常,请联系管理员')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -638,15 +646,17 @@
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang='scss' scoped>
|
|
<style lang='scss' scoped>
|
|
- page{
|
|
|
|
- background:#F5F6FA;
|
|
|
|
|
|
+ page {
|
|
|
|
+ background: #F5F6FA;
|
|
}
|
|
}
|
|
|
|
+
|
|
.title_b {
|
|
.title_b {
|
|
margin: 20rpx 20rpx 0rpx 20rpx;
|
|
margin: 20rpx 20rpx 0rpx 20rpx;
|
|
padding: 20rpx 10rpx 20rpx 10rpx;
|
|
padding: 20rpx 10rpx 20rpx 10rpx;
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
font-weight: 550;
|
|
font-weight: 550;
|
|
}
|
|
}
|
|
|
|
+
|
|
.c-row {
|
|
.c-row {
|
|
display: -webkit-box;
|
|
display: -webkit-box;
|
|
display: -webkit-flex;
|
|
display: -webkit-flex;
|
|
@@ -657,7 +667,7 @@
|
|
padding: 20rpx 30rpx;
|
|
padding: 20rpx 30rpx;
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
.con-list {
|
|
.con-list {
|
|
-webkit-box-flex: 1;
|
|
-webkit-box-flex: 1;
|
|
-webkit-flex: 1;
|
|
-webkit-flex: 1;
|
|
@@ -674,35 +684,40 @@
|
|
text-align: right;
|
|
text-align: right;
|
|
padding-right: 20rpx;
|
|
padding-right: 20rpx;
|
|
}
|
|
}
|
|
- .wrap{
|
|
|
|
- padding-bottom:10px;
|
|
|
|
- font-size:14px;
|
|
|
|
- background:#fff;margin:10px;border-radius:10px;
|
|
|
|
- input{
|
|
|
|
- font-size:14px;
|
|
|
|
|
|
+
|
|
|
|
+ .wrap {
|
|
|
|
+ padding-bottom: 10px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ background: #fff;
|
|
|
|
+ margin: 10px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+
|
|
|
|
+ input {
|
|
|
|
+ font-size: 14px;
|
|
}
|
|
}
|
|
- >.title{
|
|
|
|
- padding:10px 16px;
|
|
|
|
|
|
+
|
|
|
|
+ >.title {
|
|
|
|
+ padding: 10px 16px;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
- .footer{
|
|
|
|
- background:#fff;
|
|
|
|
- position:fixed;
|
|
|
|
- bottom:0;
|
|
|
|
- width:100%;
|
|
|
|
- padding:20px 10px;
|
|
|
|
- z-index:10;
|
|
|
|
- .button{
|
|
|
|
- background:#22C572;
|
|
|
|
- width:90%;
|
|
|
|
- margin:0 auto;
|
|
|
|
- padding:10px;
|
|
|
|
- color:#fff;
|
|
|
|
- text-align:center;
|
|
|
|
|
|
+
|
|
|
|
+ .footer {
|
|
|
|
+ background: #fff;
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ padding: 20px 10px;
|
|
|
|
+ z-index: 10;
|
|
|
|
+
|
|
|
|
+ .button {
|
|
|
|
+ background: #22C572;
|
|
|
|
+ width: 90%;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ text-align: center;
|
|
border-radius: 30px;
|
|
border-radius: 30px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
-
|
|
|
|
-
|
|
|