|
@@ -55,7 +55,7 @@
|
|
|
<view class="title">销售单价(元/吨)</view>
|
|
|
<view class="con-list">
|
|
|
<view class="picker">
|
|
|
- <text>{{purchaseOrder.salePrice}}</text>
|
|
|
+ <text>{{purchaseOrder.unitPrice}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -224,13 +224,14 @@
|
|
|
this.purchaseOrder.buyer = options.buyer
|
|
|
this.purchaseOrder.customer = options.customerName
|
|
|
this.purchaseOrder.basis = options.basisPrice
|
|
|
- this.purchaseOrder.salePrice = options.salePrice
|
|
|
+ this.purchaseOrder.unitPrice = options.unitPrice
|
|
|
this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
|
|
|
this.purchaseOrder.settlementPrice = options.basisPrice
|
|
|
this.purchaseOrder.salePlanType = options.salePlanType
|
|
|
- this.purchaseOrder.procurementPlan=options.procurementPlan
|
|
|
+ this.purchaseOrder.salePlan=options.salePlan
|
|
|
this.purchaseOrder.baggingNotes=options.baggingNotes
|
|
|
this.purchaseOrder.sendWarehouse = options.sendWarehouse
|
|
|
+ this.purchaseOrder.compId=options.compId
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['hasLogin','userInfo']),
|
|
@@ -258,7 +259,7 @@
|
|
|
&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
|
|
|
&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
|
|
|
&receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&salePlanType=${this.purchaseOrder.salePlanType}
|
|
|
- &procurementPlanNo=${this.purchaseOrder.procurementPlan}`
|
|
|
+ &salePlanNo=${this.purchaseOrder.salePlan}`
|
|
|
})
|
|
|
},
|
|
|
commit(){
|
|
@@ -270,25 +271,27 @@
|
|
|
this.$api.msg('采购数量输入错误')
|
|
|
return
|
|
|
}
|
|
|
- if(!this.purchaseOrder.pointPrice){
|
|
|
- this.$api.msg('点价不能为空')
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.purchaseOrder.pointPrice>10000){
|
|
|
- this.$api.msg('点价输入错误')
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.purchaseOrder.pointPrice.indexOf('.')!=-1){
|
|
|
- if(this.purchaseOrder.pointPrice.split(".")[1].length>2){
|
|
|
+ if(this.purchaseOrder.salePlanType=='期货'){
|
|
|
+ if(!this.purchaseOrder.pointPrice){
|
|
|
+ this.$api.msg('点价不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.purchaseOrder.pointPrice>10000){
|
|
|
this.$api.msg('点价输入错误')
|
|
|
return
|
|
|
}
|
|
|
+ if(this.purchaseOrder.pointPrice.indexOf('.')!=-1){
|
|
|
+ if(this.purchaseOrder.pointPrice.split(".")[1].length>2){
|
|
|
+ this.$api.msg('点价输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
this.purchaseOrder.packingFee=-this.purchaseOrder.packingFee
|
|
|
if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
|
|
|
this.$api.msg('包装费输入错误')
|
|
|
return
|
|
|
}
|
|
|
+ }
|
|
|
if(!this.purchaseOrder.customer){
|
|
|
if(this.goods.customerTypeFlag==1){
|
|
|
this.purchaseOrder.customer=this.goods.customerName
|
|
@@ -296,17 +299,21 @@
|
|
|
this.purchaseOrder.customer=this.goods.compName
|
|
|
}
|
|
|
}
|
|
|
- if(!this.purchaseOrder.seller){
|
|
|
+ if(!this.purchaseOrder.buyer){
|
|
|
if(this.goods.customerTypeFlag==1){
|
|
|
- this.purchaseOrder.seller=this.goods.customerName
|
|
|
- this.purchaseOrder.sellerPhone=this.goods.customerPhone
|
|
|
+ this.purchaseOrder.buyer=this.goods.customerName
|
|
|
+ this.purchaseOrder.buyerPhone=this.goods.customerPhone
|
|
|
}else{
|
|
|
- this.purchaseOrder.seller=this.goods.compName
|
|
|
- this.purchaseOrder.sellerPhone=this.goods.customerPhone
|
|
|
+ this.purchaseOrder.buyer=this.goods.compName
|
|
|
+ this.purchaseOrder.buyerPhone=this.goods.customerPhone
|
|
|
}
|
|
|
}
|
|
|
var that=this
|
|
|
+ this.purchaseOrder.commonId=that.userInfo.id
|
|
|
this.purchaseOrder.pcFlag=0
|
|
|
+ if(this.purchaseOrder.salePlanType == "期货"){
|
|
|
+ this.purchaseOrder.unitPrice = this.purchaseOrder.settlementPrice
|
|
|
+ }
|
|
|
uni.showModal({
|
|
|
content: '订单提交后将发送给卖方,是否确定提交?',
|
|
|
success: function (res) {
|
|
@@ -381,38 +388,6 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- changeZhihang(){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pageA/pages/newcompany'
|
|
|
- })
|
|
|
- },
|
|
|
- PriceTypeChange(e) {
|
|
|
- this.priceTypeIndex = e.detail.value
|
|
|
- this.price = this.priceType[this.priceTypeIndex]
|
|
|
- },
|
|
|
- RegionChange(e) {
|
|
|
- this.region = e.detail.value
|
|
|
- this.province = this.region[0];
|
|
|
- this.area = this.region[0]+this.region[1]+this.region[2];
|
|
|
- },
|
|
|
- textareaInput(e) {
|
|
|
- this.memo = e.detail.value
|
|
|
- },
|
|
|
- buyerInput(e){
|
|
|
- this.buyer = e.detail.value
|
|
|
- },
|
|
|
- buyerPhoneInput(e){
|
|
|
- this.buyerPhone = e.detail.value
|
|
|
- },
|
|
|
- unitPriceInput(e){
|
|
|
- this.unitPrice = e.detail.value
|
|
|
- },
|
|
|
- addressInput(e){
|
|
|
- this.address = e.detail.value
|
|
|
- },
|
|
|
- countInput(e){
|
|
|
- this.count = e.detail.value
|
|
|
- },
|
|
|
}
|
|
|
}
|
|
|
</script>
|