|
@@ -2,13 +2,13 @@
|
|
|
<view class="center">
|
|
|
<view class="transaction">
|
|
|
|
|
|
- <view class="c-row">
|
|
|
+ <view class="c-row b-b">
|
|
|
<view class="title">买方</view>
|
|
|
<view class="con-list">
|
|
|
<view class="title">{{purchaseOrder.buyer}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="c-row b-b">
|
|
|
+ <view class="c-row">
|
|
|
<view class="title">卖方</view>
|
|
|
<view class="con-list">
|
|
|
<!-- <view v-if='goods.customerTypeFlag==1' class="title" @click="liang">{{purchaseOrder.customer?purchaseOrder.customer:goods.customerName}}></view>
|
|
@@ -43,7 +43,7 @@
|
|
|
<text>{{purchaseOrder.minimumVolume}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row">
|
|
|
+ <view v-if="purchaseOrder.salePlanType=='期货'" class="c-row">
|
|
|
<view class="title">今日基差(元/吨)</view>
|
|
|
<view class="con-list">
|
|
|
<view class="picker">
|
|
@@ -94,25 +94,25 @@
|
|
|
<textarea maxlength="-1" v-model='purchaseOrder.baggingNotes' placeholder="请填写包装规格、质量、包装物要求。例:50kg袋装、大粒、彩包" class="textareas"></textarea>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
|
|
|
+ <view v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
|
|
|
<view class="title">点价(元/吨)</view>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写点价" name="input" @input='someprice' v-model="purchaseOrder.pointPrice"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
|
|
|
+ <view v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
|
|
|
<view class="title">发票费用(元/吨)</view>
|
|
|
<view class="con-list">
|
|
|
<input disabled placeholder="请填写发票费用" name="input" @input='someprice' v-model="purchaseOrder.invoiceFee"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="purchaseOrder.procurementPlanType=='期货'" class="c-row b-b align-start">
|
|
|
+ <view v-if="purchaseOrder.salePlanType=='期货'" class="c-row b-b align-start">
|
|
|
<view class="title">包装费(元/吨)</view>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写包装费" name="input" @input='someprice' v-model="purchaseOrder.packingFee"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="purchaseOrder.procurementPlanType=='期货'" class=" align-start ">
|
|
|
+ <view v-if="purchaseOrder.salePlanType=='期货'" class=" align-start ">
|
|
|
<view class="titles">结算价格</view>
|
|
|
<text class="textA">结算价格=点价+基差+发票费用+包装费</text>
|
|
|
<view class="con-list">
|
|
@@ -219,18 +219,20 @@
|
|
|
this.purchaseOrder.planId=options.id
|
|
|
this.purchaseOrder.seller = options.seller
|
|
|
this.purchaseOrder.goodsName = options.goodsName
|
|
|
- this.purchaseOrder.receivePrivate = options.receivePrivate
|
|
|
- this.purchaseOrder.receiveCity = options.receiveCity
|
|
|
- this.purchaseOrder.receiveArea = options.receiveArea
|
|
|
+ this.purchaseOrder.sendPrivate = options.sendPrivate
|
|
|
+ this.purchaseOrder.sendCity = options.sendCity
|
|
|
+ this.purchaseOrder.sendArea = options.sendArea
|
|
|
this.purchaseOrder.minimumVolume = options.minimumVolume
|
|
|
this.purchaseOrder.buyer = options.buyer
|
|
|
this.purchaseOrder.customer = options.customerName
|
|
|
this.purchaseOrder.basis = options.basisPrice
|
|
|
- this.purchaseOrder.unitPrice = options.unitPrice
|
|
|
+ this.purchaseOrder.salePrice = options.salePrice
|
|
|
this.purchaseOrder.receiveWarehouse = options.receiveWarehouse
|
|
|
this.purchaseOrder.settlementPrice = options.basisPrice
|
|
|
- this.purchaseOrder.procurementPlanType = options.procurementPlanType
|
|
|
+ this.purchaseOrder.salePlanType = options.salePlanType
|
|
|
this.purchaseOrder.procurementPlan=options.procurementPlan
|
|
|
+ this.purchaseOrder.baggingNotes=options.baggingNotes
|
|
|
+ this.purchaseOrder.sendWarehouse = options.sendWarehouse
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['hasLogin','userInfo']),
|
|
@@ -257,17 +259,17 @@
|
|
|
&receivePrivate=${this.purchaseOrder.receivePrivate}&receiveCity=${this.purchaseOrder.receiveCity}
|
|
|
&receiveArea=${this.purchaseOrder.receiveArea}&minimumVolume=${this.purchaseOrder.minimumVolume}
|
|
|
&buyer=${this.purchaseOrder.buyer}&basisPrice=${this.purchaseOrder.basis}&unitPrice=${this.purchaseOrder.unitPrice}
|
|
|
- &receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&procurementPlanType=${this.purchaseOrder.procurementPlanType}
|
|
|
+ &receiveWarehouse=${this.purchaseOrder.receiveWarehouse}&salePlanType=${this.purchaseOrder.salePlanType}
|
|
|
&procurementPlanNo=${this.purchaseOrder.procurementPlan}`
|
|
|
})
|
|
|
},
|
|
|
commit(){
|
|
|
if(!this.purchaseOrder.transactionsNumber){
|
|
|
- this.$api.msg('出售价格不能为空')
|
|
|
+ this.$api.msg('采购数量不能为空')
|
|
|
return
|
|
|
}
|
|
|
if(this.purchaseOrder.transactionsNumber>10000||this.purchaseOrder.transactionsNumber<1){
|
|
|
- this.$api.msg('出售数量输入错误')
|
|
|
+ this.$api.msg('采购数量输入错误')
|
|
|
return
|
|
|
}
|
|
|
if(!this.purchaseOrder.pointPrice){
|
|
@@ -284,7 +286,7 @@
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<-2000){
|
|
|
+ if(this.purchaseOrder.packingFee>0||this.purchaseOrder.packingFee<= 2000){
|
|
|
this.$api.msg('包装费输入错误')
|
|
|
return
|
|
|
}
|
|
@@ -306,35 +308,35 @@
|
|
|
}
|
|
|
var that=this
|
|
|
this.purchaseOrder.pcFlag=0
|
|
|
- uni.showModal({
|
|
|
- content: '订单提交后将发送给买方,是否确定提交?',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- that.$api.doRequest('post','/purchaseOrder/api/insertPurchaseOrder', that.purchaseOrder).then(res => {
|
|
|
- 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
|
|
|
- })
|
|
|
- }
|
|
|
- }).catch(res => {
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ // uni.showModal({
|
|
|
+ // content: '订单提交后将发送给买方,是否确定提交?',
|
|
|
+ // success: function (res) {
|
|
|
+ // if (res.confirm) {
|
|
|
+ // that.$api.doRequest('post',' ', that.purchaseOrder).then(res => {
|
|
|
+ // 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
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }).catch(res => {
|
|
|
+ // uni.showToast({
|
|
|
+ // title: res.data.message,
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 2000
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
someprice(e){
|
|
|
if(this.purchaseOrder.pointPrice&&this.purchaseOrder.invoiceFee&&this.purchaseOrder.packingFee){
|