|
@@ -83,12 +83,13 @@
|
|
<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 v-else class="con-list">{{gridList.type}}</view>
|
|
|
|
|
|
+ <view v-else class="con-list">{{gridList.type}}</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" type="digit"></input>
|
|
|
|
|
|
+ <input v-model='gridList.tidalGrainPrice' disabled placeholder="自动获取,不可编辑" name="input"
|
|
|
|
+ type="digit"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="gridList.type == '干粮'" class="c-row">
|
|
<view v-if="gridList.type == '干粮'" class="c-row">
|
|
@@ -129,7 +130,8 @@
|
|
<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.imperfectGrain' placeholder="请输入不完整粒占比" name="input" type="digit"></input>
|
|
|
|
|
|
+ <input v-model='gridList.imperfectGrain' placeholder="请输入不完整粒占比" name="input"
|
|
|
|
+ type="digit"></input>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="c-row ">
|
|
<view class="c-row ">
|
|
@@ -179,7 +181,7 @@
|
|
feild: undefined,
|
|
feild: undefined,
|
|
id: 0,
|
|
id: 0,
|
|
show: false,
|
|
show: false,
|
|
- edit:true,
|
|
|
|
|
|
+ edit: true,
|
|
selector: [],
|
|
selector: [],
|
|
show1: false,
|
|
show1: false,
|
|
inputContent: '',
|
|
inputContent: '',
|
|
@@ -491,14 +493,41 @@
|
|
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('get', '/paymentManagement/cumulant', {
|
|
|
|
+ compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
|
|
|
|
+ customerNumberCard: that.gridList.customerNumberCard,
|
|
|
|
+ goodsName: that.gridList.goodsName,
|
|
|
|
+ })
|
|
|
|
+ .then(response => {
|
|
|
|
+ if (response.data.code == 200) {
|
|
|
|
+ for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
|
+ if (
|
|
|
|
+ that.gridList.goodsName == that.purchasePriceList[i]
|
|
|
|
+ .goodsName
|
|
|
|
+ ) {
|
|
|
|
+ let count = (that.purchasePriceList[i].saleLimit -
|
|
|
|
+ response.data.data / 1000).toFixed(2)
|
|
|
|
+ if (count <= 0) {
|
|
|
|
+ count = 0
|
|
|
|
+ that.$api.msg('该客户累计销售' + this.gridList.goodsName + (
|
|
|
|
+ response.data.data / 1000).toFixed(2) + '吨,还可售粮' +
|
|
|
|
+ count + '吨', )
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ 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('提交失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -515,15 +544,14 @@
|
|
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)
|
|
- if(this.goodsList[e[0]].goodsName=='玉米'){
|
|
|
|
- this.gridList.type='干粮'
|
|
|
|
- this.edit=true
|
|
|
|
- }
|
|
|
|
- else if(this.goodsList[e[0]].goodsName=='玉米(潮粮)'){
|
|
|
|
- this.gridList.type='潮粮'
|
|
|
|
- this.edit=true
|
|
|
|
- }else{
|
|
|
|
- this.edit=false
|
|
|
|
|
|
+ if (this.goodsList[e[0]].goodsName == '玉米') {
|
|
|
|
+ this.gridList.type = '干粮'
|
|
|
|
+ this.edit = true
|
|
|
|
+ } else if (this.goodsList[e[0]].goodsName == '玉米(潮粮)') {
|
|
|
|
+ this.gridList.type = '潮粮'
|
|
|
|
+ this.edit = true
|
|
|
|
+ } else {
|
|
|
|
+ this.edit = false
|
|
}
|
|
}
|
|
this.gridList.goodsName = this.goodsList[e[0]].goodsName
|
|
this.gridList.goodsName = this.goodsList[e[0]].goodsName
|
|
uni.setStorageSync('goodsName', this.gridList.goodsName)
|
|
uni.setStorageSync('goodsName', this.gridList.goodsName)
|