|
@@ -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,6 +211,7 @@
|
|
|
typesType: ["现货", "期货"],
|
|
|
typesIndex: 0,
|
|
|
deptList: {
|
|
|
+ salePlanType:'现货',
|
|
|
salePlanTypeKey:0,
|
|
|
grainKey:0,
|
|
|
gradeKey:0,
|
|
@@ -283,36 +284,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)) {
|
|
@@ -561,50 +532,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
|