|
@@ -14,53 +14,64 @@
|
|
<view class="position">{{warehouseNameAddress}}</view>
|
|
<view class="position">{{warehouseNameAddress}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view style='justify-content: space-between;' class="flex">
|
|
|
|
+ <view class="left">货名</view>
|
|
|
|
+ <view class="flex" @click='showgoodsName'>
|
|
|
|
+ <view>{{goodsName}}</view>
|
|
|
|
+ <u-picker @confirm="goodsnameConfirm" range-key='goodsName' mode="selector"
|
|
|
|
+ v-model="goodsNameshow" :range="goodsnameList"></u-picker>
|
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="content2">
|
|
<view class="content2">
|
|
- <view class="wrap wrap1" v-for="(item,index) in dataList.shippingInformationList" :key='index'>
|
|
|
|
- <view class="row1 row">
|
|
|
|
- <!-- -{{item.customerName}} -->
|
|
|
|
- <view class="customerName">货主-{{index+1}}</view>
|
|
|
|
- <image src="../../../static/img/sign/shanchu@2x.png" @click="reduceBtn(index)"></image>
|
|
|
|
- </view>
|
|
|
|
- <view class="row2 row">
|
|
|
|
- <view class="left">姓名</view>
|
|
|
|
- <view class="right" @click='showCustomerName(item,index)'>
|
|
|
|
- <view>{{item.shipperName}}</view>
|
|
|
|
- <u-picker @confirm="nameConfirm" range-key='customerName' mode="selector"
|
|
|
|
- v-model="item.showCustomerName" :range="nameList"></u-picker>
|
|
|
|
- <u-icon name="arrow-right"></u-icon>
|
|
|
|
|
|
+ <view v-if='!status'>
|
|
|
|
+ <view class="wrap wrap1" v-for="(item,index) in dataList.shippingInformationList" :key='index'>
|
|
|
|
+ <view class="row1 row">
|
|
|
|
+ <!-- -{{item.customerName}} -->
|
|
|
|
+ <view class="customerName">货主-{{index+1}}</view>
|
|
|
|
+ <image src="../../../static/img/sign/shanchu@2x.png" @click="reduceBtn(index)"></image>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="row3 row">
|
|
|
|
- <view class="left">
|
|
|
|
- 供应商(送粮人)
|
|
|
|
|
|
+ <view class="row2 row">
|
|
|
|
+ <view class="left">姓名</view>
|
|
|
|
+ <view class="right" @click='showCustomerName(item,index)'>
|
|
|
|
+ <view>{{item.shipperName}}</view>
|
|
|
|
+ <u-picker @confirm="nameConfirm" range-key='customerName' mode="selector"
|
|
|
|
+ v-model="item.showCustomerName" :range="nameList"></u-picker>
|
|
|
|
+ <u-icon name="arrow-right"></u-icon>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="right">{{item.supplier}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="row4 row" v-for="(item1,index1) in item.carNumberList" :key='index1'>
|
|
|
|
- <view class="left">
|
|
|
|
- 车牌号-{{index1+1}}
|
|
|
|
|
|
+ <view class="row3 row">
|
|
|
|
+ <view class="left">
|
|
|
|
+ 供应商(送粮人)
|
|
|
|
+ </view>
|
|
|
|
+ <view class="right">{{item.supplier}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="right">
|
|
|
|
- <input v-model='item1.carNo' @click.stop="handleShowKeyboard(index,index1)":disabled="true" placeholder="输入7位车牌号" name="input"></input>
|
|
|
|
-
|
|
|
|
- <!-- <u-input v-model="item1.carNo" placeholder="输入7位车牌号" /> -->
|
|
|
|
- <view class="btn">
|
|
|
|
- <view @click="addCarNumber(item.carNumberList)" style="margin-right: 20rpx;">
|
|
|
|
- <image class='row4-img'
|
|
|
|
- src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jia%402x.png"></image>
|
|
|
|
- </view>
|
|
|
|
- <view @click="delCarNumber(item.carNumberList,index1)">
|
|
|
|
- <image class='row4-img'
|
|
|
|
- src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jian%402x.png"></image>
|
|
|
|
|
|
+ <view class="row4 row" v-for="(item1,index1) in item.carNumberList" :key='index1'>
|
|
|
|
+ <view class="left">
|
|
|
|
+ 车牌号-{{index1+1}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="right">
|
|
|
|
+ <input v-model='item1.carNo' @click.stop="handleShowKeyboard(index,index1)":disabled="true" placeholder="输入7位车牌号" name="input"></input>
|
|
|
|
+
|
|
|
|
+ <!-- <u-input v-model="item1.carNo" placeholder="输入7位车牌号" /> -->
|
|
|
|
+ <view class="btn">
|
|
|
|
+ <view @click="addCarNumber(item.carNumberList)" style="margin-right: 20rpx;">
|
|
|
|
+ <image class='row4-img'
|
|
|
|
+ src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jia%402x.png"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view @click="delCarNumber(item.carNumberList,index1)">
|
|
|
|
+ <image class='row4-img'
|
|
|
|
+ src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/jian%402x.png"></image>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
- <view class='add-good-people' @click='addGoodPeople'>
|
|
|
|
|
|
+ <view v-if='!status' class='add-good-people' @click='addGoodPeople'>
|
|
<image class="img"
|
|
<image class="img"
|
|
src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/ic_join_dialing_norm%402x.png"
|
|
src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/ic_join_dialing_norm%402x.png"
|
|
@click="reduceBtn(index)"></image>增加货主
|
|
@click="reduceBtn(index)"></image>增加货主
|
|
@@ -103,6 +114,8 @@
|
|
carNo:'',
|
|
carNo:'',
|
|
warehouseNameAddress: '',
|
|
warehouseNameAddress: '',
|
|
startDate: "",
|
|
startDate: "",
|
|
|
|
+ goodsName:'',
|
|
|
|
+ status:false,
|
|
dataList: {
|
|
dataList: {
|
|
warehouseName: "",
|
|
warehouseName: "",
|
|
validityDate: '',
|
|
validityDate: '',
|
|
@@ -118,13 +131,17 @@
|
|
}]
|
|
}]
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
|
|
+ goodsnameList:[],
|
|
selectObj: {},
|
|
selectObj: {},
|
|
|
|
+ goodsNameshow:false,
|
|
nameListCopy: []
|
|
nameListCopy: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
|
+
|
|
let _pageToData = JSON.parse(options.itemValue)
|
|
let _pageToData = JSON.parse(options.itemValue)
|
|
|
|
+ this.warehouseId=_pageToData.warehouseId
|
|
this.dataList.warehouseName = _pageToData.warehouseName
|
|
this.dataList.warehouseName = _pageToData.warehouseName
|
|
this.startDate = this.getTime()[0]
|
|
this.startDate = this.getTime()[0]
|
|
this.dataList.validityDate = this.getTime()[1]
|
|
this.dataList.validityDate = this.getTime()[1]
|
|
@@ -142,9 +159,24 @@
|
|
}
|
|
}
|
|
this.getCustomer()
|
|
this.getCustomer()
|
|
})
|
|
})
|
|
|
|
+ this.$api.doRequest('get', '/qualityInspectionManagement/api/goodsName', {
|
|
|
|
+ warehouseId: this.warehouseId
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.goodsName=res.data.data[0].goodsName
|
|
|
|
+ this.goodsnameList = res.data.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
console.log("hasLogin", this.hasLogin)
|
|
console.log("hasLogin", this.hasLogin)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goodsnameConfirm(e){
|
|
|
|
+ this.goodsName=this.goodsnameList[e[0]].goodsName
|
|
|
|
+ this.getCustomer()
|
|
|
|
+ },
|
|
|
|
+ showgoodsName(){
|
|
|
|
+ this.goodsNameshow=true
|
|
|
|
+ },
|
|
hidden(){
|
|
hidden(){
|
|
this.carNo=''
|
|
this.carNo=''
|
|
if(this.$refs.keyboard.open){
|
|
if(this.$refs.keyboard.open){
|
|
@@ -182,62 +214,27 @@
|
|
this.selectObj = value
|
|
this.selectObj = value
|
|
this.selectObj.index = index
|
|
this.selectObj.index = index
|
|
value.showCustomerName = true
|
|
value.showCustomerName = true
|
|
- that.$api.doRequest('get', '/paymentManagement/cumulant', {
|
|
|
|
- compId: JSON.parse(localStorage.getItem('pcUserInfo')).data.compId,
|
|
|
|
- customerNumberCard: that.detailData.customerNumberCard,
|
|
|
|
- goodsName: that.detailData.goodsName,
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- for (let i = 0; i < that.purchasePriceList.length; i++) {
|
|
|
|
- if (
|
|
|
|
- that.detailData.goodsName == that.purchasePriceList[i]
|
|
|
|
- .goodsName
|
|
|
|
- ) {
|
|
|
|
- let count = (that.purchasePriceList[i].saleLimit -
|
|
|
|
- res.data.data / 1000).toFixed(2)
|
|
|
|
- if (Number(count) - that.detailData.grossWeight / 1000 <= 0) {
|
|
|
|
- that.$api.msg('该客户累计销售' + that.detailData.goodsName + (
|
|
|
|
- res.data.data / 1000).toFixed(2) +
|
|
|
|
- '吨,还可售粮' +
|
|
|
|
- count + '吨', )
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- that.$api.doRequest('post',
|
|
|
|
- '/weighingManagement/api/editGrossWeight', that
|
|
|
|
- .detailData).then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- that.$refs.uToast.show({
|
|
|
|
- title: '提交成功',
|
|
|
|
- type: 'success'
|
|
|
|
- })
|
|
|
|
- uni.navigateBack({})
|
|
|
|
- } else {
|
|
|
|
- that.$refs.uToast.show({
|
|
|
|
- title: '提交失败',
|
|
|
|
- type: 'error',
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
},
|
|
},
|
|
getCustomer() {
|
|
getCustomer() {
|
|
|
|
+ var that=this
|
|
let _data = {
|
|
let _data = {
|
|
commonId: uni.getStorageSync("userInfo").id,
|
|
commonId: uni.getStorageSync("userInfo").id,
|
|
|
|
+ warehouseId:this.warehouseId,
|
|
|
|
+ goodsName:this.goodsName
|
|
}
|
|
}
|
|
this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoUser', _data).then(
|
|
this.$api.doRequest('get', '/identityAuthenticationInfo/identityAuthenticationInfoUser', _data).then(
|
|
res => {
|
|
res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
this.nameList = res.data.data
|
|
this.nameList = res.data.data
|
|
if(res.data.data.length>0){
|
|
if(res.data.data.length>0){
|
|
|
|
+ that.status=false
|
|
this.dataList.shippingInformationList[0].identityId = res.data.data[0].id
|
|
this.dataList.shippingInformationList[0].identityId = res.data.data[0].id
|
|
this.dataList.shippingInformationList[0].shipperName = res.data.data[0].customerName
|
|
this.dataList.shippingInformationList[0].shipperName = res.data.data[0].customerName
|
|
this.dataList.shippingInformationList[0].supplier = res.data.data[0].supplier ? res.data
|
|
this.dataList.shippingInformationList[0].supplier = res.data.data[0].supplier ? res.data
|
|
.data[0].supplier : '无'
|
|
.data[0].supplier : '无'
|
|
|
|
+ }else{
|
|
|
|
+ that.status=true
|
|
|
|
+ this.$api.msg('当前客户的'+this.goodsName+'送粮量达到上限')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -342,6 +339,10 @@
|
|
this.isShowAlert1 = false
|
|
this.isShowAlert1 = false
|
|
},
|
|
},
|
|
addGoodPeople() {
|
|
addGoodPeople() {
|
|
|
|
+ if(this.status==true){
|
|
|
|
+ this.$api.msg('当前客户的'+this.goodsName+'送粮量达到上限')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
// 判断是否还有剩余的货主
|
|
// 判断是否还有剩余的货主
|
|
if (this.nameList.length != this.dataList.shippingInformationList.length) {
|
|
if (this.nameList.length != this.dataList.shippingInformationList.length) {
|
|
this.dataList.shippingInformationList.push({
|
|
this.dataList.shippingInformationList.push({
|
|
@@ -353,6 +354,7 @@
|
|
carNo: ''
|
|
carNo: ''
|
|
}]
|
|
}]
|
|
})
|
|
})
|
|
|
|
+ this.$forceUpdate()
|
|
} else {
|
|
} else {
|
|
this.$api.msg('无更多认证货主!')
|
|
this.$api.msg('无更多认证货主!')
|
|
}
|
|
}
|