|
@@ -4,7 +4,7 @@
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">名头</text>
|
|
|
<view class="con-list">
|
|
|
- <text @click="navToDetailPage">{{deptList.seller}}</text>
|
|
|
+ <text @click="navToDetailPage">{{deptList.seller}}<text class='tip_text cuIcon-right'></text></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
@@ -21,9 +21,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
|
- <text class="tit">出货量(吨)</text>
|
|
|
+ <text class="tit">出售量(吨)</text>
|
|
|
<view class="con-list">
|
|
|
- <input placeholder="请输入采购重量,如1000" name="input" v-model="deptList.plannedSaleVolume"></input>
|
|
|
+ <input placeholder="请输入出售重量,如1000" name="input" v-model="deptList.plannedSaleVolume"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="c-row b-b">
|
|
@@ -76,7 +76,7 @@
|
|
|
<view class="c-row b-b">
|
|
|
<text class="tit">卖方手机号</text>
|
|
|
<view class="con-list">
|
|
|
- <input placeholder="请输入买方手机号" name="input" v-model="deptList.sellerPhone"></input>
|
|
|
+ <input placeholder="请输入卖方手机号" name="input" v-model="deptList.sellerPhone"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- <view class="c-row ">
|
|
@@ -104,49 +104,49 @@
|
|
|
style="font-size: 14px; ">完善更多信息<text
|
|
|
style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">水分(%)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">容重(g/L)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">热损伤(%)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">杂质(%)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">霉变粒(%)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">不完整粒(%)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">蛋白(%)<= </text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">粒型 </text>
|
|
|
<picker @change="liChange" :value="liIndex" :range="liType" class="con-list" v-model="deptList.grain">
|
|
|
<view class="con-list">
|
|
@@ -154,7 +154,7 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">品级 </text>
|
|
|
<picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list">
|
|
|
<view class="con-list">
|
|
@@ -163,7 +163,7 @@
|
|
|
</picker>
|
|
|
</view>
|
|
|
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">产出年份</text>
|
|
|
<picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
|
|
|
<view class="con-list">
|
|
@@ -171,7 +171,7 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">包装方式</text>
|
|
|
<picker @change="baoChange" :value="baoIndex" :range="baoType" class="con-list">
|
|
|
<view class="con-list">
|
|
@@ -179,13 +179,13 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
- <view v-if='!checked&&baoIndex==2||!checked&&baoIndex==3' class="c-row b-b">
|
|
|
+ <view v-if='checked&&baoIndex==2||checked&&baoIndex==3' class="c-row b-b">
|
|
|
<text class="tit">袋装备注</text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if='!checked' class="c-row b-b">
|
|
|
+ <view v-if='checked' class="c-row b-b">
|
|
|
<text class="tit">运费承担方</text>
|
|
|
<picker @change="chengChange" :value="chengIndex" :range="chengType" class="con-list">
|
|
|
<view class="con-list">
|
|
@@ -211,13 +211,13 @@
|
|
|
typesType: ["现货", "期货"],
|
|
|
typesIndex: 0,
|
|
|
deptList: {
|
|
|
+ salePlanType:'现货',
|
|
|
salePlanTypeKey:0,
|
|
|
grainKey:0,
|
|
|
gradeKey:0,
|
|
|
packingTypeKey:0,
|
|
|
freightPayerKey:-1,
|
|
|
- priceType: "定价采购",
|
|
|
- procurementPlanType: "现货",
|
|
|
+ priceType: "定价销售",
|
|
|
grain: "塔粮",
|
|
|
grade: "不限(默认)",
|
|
|
outputYear: "2020",
|
|
@@ -245,7 +245,7 @@
|
|
|
],
|
|
|
show: false,
|
|
|
show1: false,
|
|
|
- region: '请选择收货地区',
|
|
|
+ region: '请选择发货地区',
|
|
|
region1: '请选择产地',
|
|
|
baoIndex: 0,
|
|
|
baoType: ['不限(默认)', '散装', '大袋', '小袋'],
|
|
@@ -283,36 +283,6 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- async amendprice() {
|
|
|
- var that = this
|
|
|
- this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
|
|
|
- phone: this.deptList.sellerPhone,
|
|
|
- verifyCode: this.verifyCode
|
|
|
- }).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
-
|
|
|
- } else {
|
|
|
- that.verification = false
|
|
|
- console.log(that.verification,"1")
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(res => {
|
|
|
- that.verification = false
|
|
|
- console.log(that.verification,"2")
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: 'none',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- return false
|
|
|
- });
|
|
|
- },
|
|
|
getcode() {
|
|
|
var that = this
|
|
|
if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.deptList.sellerPhone)) {
|
|
@@ -382,7 +352,7 @@
|
|
|
this.deptList.salePlanTypeKey = e.detail.value+1
|
|
|
this.deptList.salePlanType = this.typesType[this.typesIndex];
|
|
|
if (this.typesIndex == 0) {
|
|
|
- this.deptList.priceType = '定价采购'
|
|
|
+ this.deptList.priceType = '定价销售'
|
|
|
} else {
|
|
|
this.deptList.priceType = '期货盘面价+基差'
|
|
|
}
|
|
@@ -413,16 +383,16 @@
|
|
|
return
|
|
|
}
|
|
|
if (!this.deptList.plannedSaleVolume) {
|
|
|
- this.$api.msg('出货量不能为空')
|
|
|
+ this.$api.msg('出售量不能为空')
|
|
|
return
|
|
|
}
|
|
|
if (this.deptList.plannedSaleVolume > 100000 || this.deptList.plannedSaleVolume < 1) {
|
|
|
- this.$api.msg('出货量输入错误')
|
|
|
+ this.$api.msg('出售量输入错误')
|
|
|
return
|
|
|
}
|
|
|
if (this.deptList.plannedSaleVolume.indexOf('.') != -1) {
|
|
|
if (this.deptList.plannedSaleVolume.split('.')[1].length > 2) {
|
|
|
- this.$api.msg('出货量输入错误')
|
|
|
+ this.$api.msg('出售量输入错误')
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -449,16 +419,16 @@
|
|
|
return
|
|
|
}
|
|
|
if (this.deptList.salePlanType == '现货') {
|
|
|
- if (!this.deptList.unitPrice) {
|
|
|
+ if (!this.deptList.salePrice) {
|
|
|
this.$api.msg('单价不能为空')
|
|
|
return
|
|
|
}
|
|
|
- if (this.deptList.unitPrice > 100000 || this.deptList.unitPrice < 1) {
|
|
|
+ if (this.deptList.salePrice > 100000 || this.deptList.salePrice < 1) {
|
|
|
this.$api.msg('单价输入错误')
|
|
|
return
|
|
|
}
|
|
|
- if (this.deptList.unitPrice.indexOf('.') != -1) {
|
|
|
- if (this.deptList.unitPrice.split('.')[1].length > 2) {
|
|
|
+ if (this.deptList.salePrice.indexOf('.') != -1) {
|
|
|
+ if (this.deptList.salePrice.split('.')[1].length > 2) {
|
|
|
this.$api.msg('单价输入错误')
|
|
|
return
|
|
|
}
|
|
@@ -484,7 +454,14 @@
|
|
|
this.$api.msg('卖方手机号不能为空')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+ if (this.deptList.sellerPhone.length!=11) {
|
|
|
+ this.$api.msg('卖方手机号输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.verifyCode){
|
|
|
+ this.$api.msg('验证码不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.checked == false) {
|
|
|
if (this.deptList.waterContent && this.deptList.waterContent < 1 ||
|
|
|
this.deptList.waterContent && this.deptList.waterContent > 40) {
|
|
@@ -558,50 +535,67 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(this.amendprice() == false){
|
|
|
- this.$api.msg('验证码输入有误!')
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- // this.insertProcurementPlanInfo = this.deptList
|
|
|
- // this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
|
|
|
- // this.insertProcurementPlanInfo.commonId = this.userInfo.id
|
|
|
- // this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
|
|
|
+ var that=this
|
|
|
this.insertSalePlanInfo = this.deptList
|
|
|
this.insertSalePlanInfo.basisPrice = -this.insertSalePlanInfo.basisPrice
|
|
|
this.insertSalePlanInfo.commonId = this.userInfo.id
|
|
|
this.insertSalePlanInfo.salePlanNo='XSJH'+this.getdate()+this.verifyinit()
|
|
|
this.insertSalePlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
|
|
|
- this.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', this
|
|
|
- .insertSalePlanInfo).then(res => {
|
|
|
+ this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
|
|
|
+ phone: this.deptList.sellerPhone,
|
|
|
+ verifyCode: this.verifyCode
|
|
|
+ }).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: "发布成功",
|
|
|
- icon: 'none',
|
|
|
- })
|
|
|
- // setTimeout(() => {
|
|
|
- // uni.navigateBack({})
|
|
|
- // }, 1000)
|
|
|
- this.deptList = {}
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/release/release`
|
|
|
- })
|
|
|
+ that.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', that.insertSalePlanInfo).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "发布成功",
|
|
|
+ icon: 'none',
|
|
|
+ })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // uni.navigateBack({})
|
|
|
+ // }, 1000)
|
|
|
+ that.deptList = {}
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/release/release`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ });
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
+ return
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
.catch(res => {
|
|
|
uni.showToast({
|
|
|
- title: res.errmsg,
|
|
|
+ title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
+ return
|
|
|
});
|
|
|
+ // this.insertProcurementPlanInfo = this.deptList
|
|
|
+ // this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
|
|
|
+ // this.insertProcurementPlanInfo.commonId = this.userInfo.id
|
|
|
+ // this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
|
|
|
},
|
|
|
liChange(e) {
|
|
|
this.liIndex = e.detail.value
|
|
@@ -692,19 +686,16 @@
|
|
|
-webkit-box-direction: normal;
|
|
|
-webkit-flex-direction: column;
|
|
|
flex-direction: column;
|
|
|
- color: #AFB3BF;
|
|
|
line-height: 40rpx;
|
|
|
text-align: right;
|
|
|
padding-right: 20rpx;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
-
|
|
|
.buyup {
|
|
|
background-color: #FFFFFF;
|
|
|
border-radius: 20px;
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
-
|
|
|
.buylow {
|
|
|
background-color: #FFFFFF;
|
|
|
border-radius: 20px;
|
|
@@ -717,7 +708,6 @@
|
|
|
background-color: #22C572;
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
-
|
|
|
.validate {
|
|
|
width: 100px;
|
|
|
height: 32px;
|
|
@@ -738,11 +728,9 @@
|
|
|
height: 30px;
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
-
|
|
|
.getcode.active {
|
|
|
border: none;
|
|
|
}
|
|
|
-
|
|
|
.getcode.active {
|
|
|
background: #22C572;
|
|
|
color: #fff;
|