|
@@ -8,11 +8,13 @@
|
|
<view class="cu-item flex-sub" :class="1==TabCur?'text-white':''" @tap="tabSelect" data-id="1">
|
|
<view class="cu-item flex-sub" :class="1==TabCur?'text-white':''" @tap="tabSelect" data-id="1">
|
|
<text>我要买粮</text>
|
|
<text>我要买粮</text>
|
|
</view>
|
|
</view>
|
|
- <view v-if="showTran" class="cu-item flex-sub" :class="2==TabCur?'text-white':''" @tap="tabSelect" data-id="2">
|
|
|
|
|
|
+ <view v-if="showTran" class="cu-item flex-sub" :class="2==TabCur?'text-white':''" @tap="tabSelect"
|
|
|
|
+ data-id="2">
|
|
<text>我要找车</text>
|
|
<text>我要找车</text>
|
|
</view>
|
|
</view>
|
|
- <view v-if="showTran" class="cu-item flex-sub" :class="3==TabCur?'text-white':''" @tap="tabSelect" data-id="3">
|
|
|
|
- <text>我要找货</text>
|
|
|
|
|
|
+ <view v-if="showTran" class="cu-item flex-sub" :class="3==TabCur?'text-white':''" @tap="tabSelect"
|
|
|
|
+ data-id="3">
|
|
|
|
+ <text>我要找货</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -27,9 +29,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">验证码</view>
|
|
<view class="title">验证码</view>
|
|
- <input type="mobile" value="" placeholder="6位验证码" maxlength="6"
|
|
|
|
- data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
|
|
|
|
- <button class='cu-btn bg-green shadow':disabled="sendDisabled0" @click="doGetVerify">{{sendText0}}</button>
|
|
|
|
|
|
+ <input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode"
|
|
|
|
+ @input="verifyCodeInput" style="width: 60%;"></input>
|
|
|
|
+ <button class='cu-btn bg-green shadow' :disabled="sendDisabled0"
|
|
|
|
+ @click="doGetVerify">{{sendText0}}</button>
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">货名</view>
|
|
<view class="title">货名</view>
|
|
@@ -82,9 +85,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">验证码</view>
|
|
<view class="title">验证码</view>
|
|
- <input type="mobile" value="" placeholder="6位验证码" maxlength="6"
|
|
|
|
- data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
|
|
|
|
- <button class='cu-btn bg-green shadow':disabled="sendDisabled1" @click="doGetVerify">{{sendText1}}</button>
|
|
|
|
|
|
+ <input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode"
|
|
|
|
+ @input="verifyCodeInput" style="width: 60%;"></input>
|
|
|
|
+ <button class='cu-btn bg-green shadow' :disabled="sendDisabled1"
|
|
|
|
+ @click="doGetVerify">{{sendText1}}</button>
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">货名</view>
|
|
<view class="title">货名</view>
|
|
@@ -153,9 +157,10 @@
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">验证码</view>
|
|
<view class="title">验证码</view>
|
|
- <input type="mobile" value="" placeholder="6位验证码" maxlength="6"
|
|
|
|
- data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input>
|
|
|
|
- <button class='cu-btn bg-green shadow':disabled="sendDisabled2" @click="doGetVerify">{{sendText2}}</button>
|
|
|
|
|
|
+ <input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode"
|
|
|
|
+ @input="verifyCodeInput" style="width: 60%;"></input>
|
|
|
|
+ <button class='cu-btn bg-green shadow' :disabled="sendDisabled2"
|
|
|
|
+ @click="doGetVerify">{{sendText2}}</button>
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">收货人</view>
|
|
<view class="title">收货人</view>
|
|
@@ -194,7 +199,11 @@
|
|
<view class="title">承运人电话</view>
|
|
<view class="title">承运人电话</view>
|
|
<input placeholder="请填写" type="mobile" name="input" @input="driverPhoneInput"></input>
|
|
<input placeholder="请填写" type="mobile" name="input" @input="driverPhoneInput"></input>
|
|
</view>
|
|
</view>
|
|
- <view class="cu-form-group"> <view class="title">验证码</view> <input type="mobile" value="" placeholder="6位验证码" maxlength="6" data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input> <button class='cu-btn bg-green shadow':disabled="sendDisabled3" @click="doGetVerify">{{sendText3}}</button> </view>
|
|
|
|
|
|
+ <view class="cu-form-group">
|
|
|
|
+ <view class="title">验证码</view> <input type="mobile" value="" placeholder="6位验证码" maxlength="6"
|
|
|
|
+ data-key="verifyCode" @input="verifyCodeInput" style="width: 60%;"></input> <button
|
|
|
|
+ class='cu-btn bg-green shadow' :disabled="sendDisabled3" @click="doGetVerify">{{sendText3}}</button>
|
|
|
|
+ </view>
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="action">
|
|
<view class="action">
|
|
司机身份证(正、反面)上传
|
|
司机身份证(正、反面)上传
|
|
@@ -203,13 +212,13 @@
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="bg-img" v-if="personNoImg != ''" @tap="ViewImage" :data-url="personNoImg">
|
|
<view class="bg-img" v-if="personNoImg != ''" @tap="ViewImage" :data-url="personNoImg">
|
|
- <image :src="personNoImg" mode="aspectFit"></image>
|
|
|
|
|
|
+ <image :src="personNoImg" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bg-img" v-if="personNoImg1 != ''" @tap="ViewImage" :data-url="personNoImg1">
|
|
<view class="bg-img" v-if="personNoImg1 != ''" @tap="ViewImage" :data-url="personNoImg1">
|
|
- <image :src="personNoImg1" mode="aspectFit"></image>
|
|
|
|
|
|
+ <image :src="personNoImg1" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="1">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="1">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
@@ -227,13 +236,13 @@
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="bg-img" v-if="driverNoImg != ''" @tap="ViewImage" :data-url="driverNoImg">
|
|
<view class="bg-img" v-if="driverNoImg != ''" @tap="ViewImage" :data-url="driverNoImg">
|
|
- <image :src="driverNoImg" mode="aspectFit"></image>
|
|
|
|
|
|
+ <image :src="driverNoImg" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="2">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="2">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bg-img" v-if="driverNoImg1 != ''" @tap="ViewImage" :data-url="driverNoImg1">
|
|
<view class="bg-img" v-if="driverNoImg1 != ''" @tap="ViewImage" :data-url="driverNoImg1">
|
|
- <image :src="driverNoImg1" mode="aspectFit"></image>
|
|
|
|
|
|
+ <image :src="driverNoImg1" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="3">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="3">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
@@ -251,13 +260,13 @@
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="bg-img" v-if="carNoImg != ''" @tap="ViewImage" :data-url="carNoImg">
|
|
<view class="bg-img" v-if="carNoImg != ''" @tap="ViewImage" :data-url="carNoImg">
|
|
- <image :src="carNoImg" mode="aspectFit"></image>
|
|
|
|
|
|
+ <image :src="carNoImg" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="4">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="4">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="bg-img" v-if="carNoImg1 != ''" @tap="ViewImage" :data-url="carNoImg1">
|
|
<view class="bg-img" v-if="carNoImg1 != ''" @tap="ViewImage" :data-url="carNoImg1">
|
|
- <image :src="carNoImg1" mode="aspectFit"></image>
|
|
|
|
|
|
+ <image :src="carNoImg1" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="5">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="5">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
@@ -270,8 +279,12 @@
|
|
<view class="padding flex flex-direction">
|
|
<view class="padding flex flex-direction">
|
|
<button class="cu-btn commit margin-tb-sm lg" @click="commit">提交</button>
|
|
<button class="cu-btn commit margin-tb-sm lg" @click="commit">提交</button>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
|
|
+ :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定'
|
|
|
|
+ title='登录提示' showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick">
|
|
|
|
+ </u-modal>
|
|
</block>
|
|
</block>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -281,722 +294,730 @@
|
|
mapState
|
|
mapState
|
|
} from 'vuex';
|
|
} from 'vuex';
|
|
export default {
|
|
export default {
|
|
- name: "trust",
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- saleInfo:{
|
|
|
|
- seller:'',
|
|
|
|
- sellerPhone:'',
|
|
|
|
- priceType:'',
|
|
|
|
- unitPrice:0,
|
|
|
|
- origin:'',
|
|
|
|
- stock:'',
|
|
|
|
- minSale:0,
|
|
|
|
- exsitCount:0,
|
|
|
|
- goodsName:'',
|
|
|
|
- verifyCode:'',
|
|
|
|
- buyer:'',
|
|
|
|
- buyerPhone:'',
|
|
|
|
- level:''
|
|
|
|
- },
|
|
|
|
- tran: {
|
|
|
|
- total: 0,
|
|
|
|
- price: 0,
|
|
|
|
- startPlace: undefined,
|
|
|
|
- endPlace: undefined,
|
|
|
|
- goodsName: undefined,
|
|
|
|
- sender:'',
|
|
|
|
- senderPhone:'',
|
|
|
|
- status:0,
|
|
|
|
- receiver:'',
|
|
|
|
- receiverPhone:'',
|
|
|
|
- verifyCode:'',
|
|
|
|
- driver:'',
|
|
|
|
- driverPhone:'',
|
|
|
|
- carNo:'',
|
|
|
|
- personNoImg:'',
|
|
|
|
- personNoImg1:'',
|
|
|
|
- driverNoImg:'',
|
|
|
|
- driverNoImg1:'',
|
|
|
|
- carNoImg:'',
|
|
|
|
- carNoImg1:''
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- PageCur: "trust",
|
|
|
|
- TabCur: 0,
|
|
|
|
- priceTypeIndex:-1,
|
|
|
|
- priceType: ['库内价', '到库价', '到港价'],
|
|
|
|
- unitPrice:0,
|
|
|
|
- price:'',
|
|
|
|
- seller:'',
|
|
|
|
- sellerPhone:'',
|
|
|
|
- minSale:'',
|
|
|
|
- exsitCount:0,
|
|
|
|
- origin:'',
|
|
|
|
- stock:'',
|
|
|
|
- goodsName:'',
|
|
|
|
- verifyCode:'',
|
|
|
|
- sendText0:'获取验证码',
|
|
|
|
- sendText1:'获取验证码',
|
|
|
|
- sendText2:'获取验证码',
|
|
|
|
- sendText3:'获取验证码',
|
|
|
|
- sendDisabled0: false,
|
|
|
|
- sendDisabled1: false,
|
|
|
|
- sendDisabled2: false,
|
|
|
|
- sendDisabled3: false,
|
|
|
|
- buyer:'',
|
|
|
|
- buyerPhone:'',
|
|
|
|
- level:'',
|
|
|
|
- sender:'',
|
|
|
|
- senderPhone:'',
|
|
|
|
- receiver:'',
|
|
|
|
- receiverPhone:'',
|
|
|
|
- total:0,
|
|
|
|
- startPlace:'',
|
|
|
|
- endPlace:'',
|
|
|
|
- driver:'',
|
|
|
|
- driverPhone:'',
|
|
|
|
- carNo:'',
|
|
|
|
- personNoImg:'',
|
|
|
|
- personNoImg1:'',
|
|
|
|
- driverNoImg:'',
|
|
|
|
- driverNoImg1:'',
|
|
|
|
- carNoImg:'',
|
|
|
|
- carNoImg1:'',
|
|
|
|
- showTran:true
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- ...mapState(['hasLogin','userInfo'])
|
|
|
|
- },
|
|
|
|
- onShow() {
|
|
|
|
- this.loadData()
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- async loadData(){
|
|
|
|
- if (!this.hasLogin) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '登录提示',
|
|
|
|
- content: '您尚未登录,是否立即登录?',
|
|
|
|
- showCancel: true,
|
|
|
|
- confirmText: '登录',
|
|
|
|
- success: (e) => {
|
|
|
|
- if (e.confirm) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/public/login'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- fail: () => {},
|
|
|
|
- complete: () => {}
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- driverInput(e) {
|
|
|
|
- this.driver = e.detail.value
|
|
|
|
- },
|
|
|
|
- driverPhoneInput(e) {
|
|
|
|
- this.driverPhone = e.detail.value
|
|
|
|
- },
|
|
|
|
- carNoInput(e) {
|
|
|
|
- this.carNo = e.detail.value
|
|
|
|
- },
|
|
|
|
- senderInput(e){
|
|
|
|
- this.sender = e.detail.value;
|
|
|
|
- },
|
|
|
|
- senderPhoneInput(e){
|
|
|
|
- this.senderPhone = e.detail.value;
|
|
|
|
- },
|
|
|
|
- receiverInput(e){
|
|
|
|
- this.receiver = e.detail.value;
|
|
|
|
- },
|
|
|
|
- receiverPhoneInput(e){
|
|
|
|
- this.receiverPhone = e.detail.value;
|
|
|
|
- },
|
|
|
|
- startPlaceInput(e){
|
|
|
|
- this.startPlace = e.detail.value;
|
|
|
|
- },
|
|
|
|
- endPlaceInput(e){
|
|
|
|
- this.endPlace = e.detail.value;
|
|
|
|
- },
|
|
|
|
- totalInput(e){
|
|
|
|
- this.total = e.detail.value;
|
|
|
|
- },
|
|
|
|
- priceInput(e){
|
|
|
|
- this.price = e.detail.value;
|
|
|
|
- },
|
|
|
|
- tabSelect(e) {
|
|
|
|
- this.TabCur = e.currentTarget.dataset.id;
|
|
|
|
- },
|
|
|
|
- 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];
|
|
|
|
- },
|
|
|
|
- sellerInput(e){
|
|
|
|
- this.seller = e.detail.value
|
|
|
|
- },
|
|
|
|
- sellerPhoneInput(e){
|
|
|
|
- this.sellerPhone = e.detail.value
|
|
|
|
- },
|
|
|
|
- buyerInput(e){
|
|
|
|
- this.buyer = e.detail.value
|
|
|
|
- },
|
|
|
|
- buyerPhoneInput(e){
|
|
|
|
- this.buyerPhone = e.detail.value
|
|
|
|
- },
|
|
|
|
- unitPriceInput(e){
|
|
|
|
- this.unitPrice = e.detail.value
|
|
|
|
- },
|
|
|
|
- minSaleInput(e){
|
|
|
|
- this.minSale = e.detail.value
|
|
|
|
- },
|
|
|
|
- exsitCountInput(e){
|
|
|
|
- this.exsitCount = e.detail.value
|
|
|
|
- },
|
|
|
|
- originInput(e){
|
|
|
|
- this.origin = e.detail.value
|
|
|
|
- },
|
|
|
|
- stockInput(e){
|
|
|
|
- this.stock = e.detail.value
|
|
|
|
- },
|
|
|
|
- goodsNameInput(e){
|
|
|
|
- this.goodsName = e.detail.value
|
|
|
|
- },
|
|
|
|
- verifyCodeInput(e){
|
|
|
|
- this.verifyCode = e.detail.value
|
|
|
|
- },
|
|
|
|
- levelInput(e){
|
|
|
|
- this.level = e.detail.value
|
|
|
|
|
|
+ name: "trust",
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ isShowAlert: false,
|
|
|
|
+ content: '您尚未登录,是否立即登录?',
|
|
|
|
+ saleInfo: {
|
|
|
|
+ seller: '',
|
|
|
|
+ sellerPhone: '',
|
|
|
|
+ priceType: '',
|
|
|
|
+ unitPrice: 0,
|
|
|
|
+ origin: '',
|
|
|
|
+ stock: '',
|
|
|
|
+ minSale: 0,
|
|
|
|
+ exsitCount: 0,
|
|
|
|
+ goodsName: '',
|
|
|
|
+ verifyCode: '',
|
|
|
|
+ buyer: '',
|
|
|
|
+ buyerPhone: '',
|
|
|
|
+ level: ''
|
|
|
|
+ },
|
|
|
|
+ tran: {
|
|
|
|
+ total: 0,
|
|
|
|
+ price: 0,
|
|
|
|
+ startPlace: undefined,
|
|
|
|
+ endPlace: undefined,
|
|
|
|
+ goodsName: undefined,
|
|
|
|
+ sender: '',
|
|
|
|
+ senderPhone: '',
|
|
|
|
+ status: 0,
|
|
|
|
+ receiver: '',
|
|
|
|
+ receiverPhone: '',
|
|
|
|
+ verifyCode: '',
|
|
|
|
+ driver: '',
|
|
|
|
+ driverPhone: '',
|
|
|
|
+ carNo: '',
|
|
|
|
+ personNoImg: '',
|
|
|
|
+ personNoImg1: '',
|
|
|
|
+ driverNoImg: '',
|
|
|
|
+ driverNoImg1: '',
|
|
|
|
+ carNoImg: '',
|
|
|
|
+ carNoImg1: ''
|
|
|
|
+
|
|
},
|
|
},
|
|
- doGetVerify() {
|
|
|
|
- const that = this
|
|
|
|
- var phone = "";
|
|
|
|
- if(this.TabCur == 0){
|
|
|
|
- phone = that.sellerPhone
|
|
|
|
- }else if(this.TabCur == 1){
|
|
|
|
- phone = that.buyerPhone
|
|
|
|
- }
|
|
|
|
- else if(this.TabCur == 2){
|
|
|
|
- phone = that.senderPhone
|
|
|
|
- }
|
|
|
|
- else if(this.TabCur == 3){
|
|
|
|
- phone = that.driverPhone
|
|
|
|
- }
|
|
|
|
- if (!phone || phone.length != 11) {
|
|
|
|
- uni.showToast({
|
|
|
|
- title:'请输入正确手机号!',
|
|
|
|
- icon:'none'
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
|
|
+ PageCur: "trust",
|
|
|
|
+ TabCur: 0,
|
|
|
|
+ priceTypeIndex: -1,
|
|
|
|
+ priceType: ['库内价', '到库价', '到港价'],
|
|
|
|
+ unitPrice: 0,
|
|
|
|
+ price: '',
|
|
|
|
+ seller: '',
|
|
|
|
+ sellerPhone: '',
|
|
|
|
+ minSale: '',
|
|
|
|
+ exsitCount: 0,
|
|
|
|
+ origin: '',
|
|
|
|
+ stock: '',
|
|
|
|
+ goodsName: '',
|
|
|
|
+ verifyCode: '',
|
|
|
|
+ sendText0: '获取验证码',
|
|
|
|
+ sendText1: '获取验证码',
|
|
|
|
+ sendText2: '获取验证码',
|
|
|
|
+ sendText3: '获取验证码',
|
|
|
|
+ sendDisabled0: false,
|
|
|
|
+ sendDisabled1: false,
|
|
|
|
+ sendDisabled2: false,
|
|
|
|
+ sendDisabled3: false,
|
|
|
|
+ buyer: '',
|
|
|
|
+ buyerPhone: '',
|
|
|
|
+ level: '',
|
|
|
|
+ sender: '',
|
|
|
|
+ senderPhone: '',
|
|
|
|
+ receiver: '',
|
|
|
|
+ receiverPhone: '',
|
|
|
|
+ total: 0,
|
|
|
|
+ startPlace: '',
|
|
|
|
+ endPlace: '',
|
|
|
|
+ driver: '',
|
|
|
|
+ driverPhone: '',
|
|
|
|
+ carNo: '',
|
|
|
|
+ personNoImg: '',
|
|
|
|
+ personNoImg1: '',
|
|
|
|
+ driverNoImg: '',
|
|
|
|
+ driverNoImg1: '',
|
|
|
|
+ carNoImg: '',
|
|
|
|
+ carNoImg1: '',
|
|
|
|
+ showTran: true
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(['hasLogin', 'userInfo'])
|
|
|
|
+ },
|
|
|
|
+ onShow() {
|
|
|
|
+ this.loadData()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ alertBtn() {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/public/login'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ cancelClick() {
|
|
|
|
+ this.isShowAlert = false
|
|
|
|
+ },
|
|
|
|
+ async loadData() {
|
|
|
|
+ if (!this.hasLogin) {
|
|
|
|
+ this.isShowAlert = true;
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: '登录提示',
|
|
|
|
+ // content: '您尚未登录,是否立即登录?',
|
|
|
|
+ // showCancel: true,
|
|
|
|
+ // confirmText: '登录',
|
|
|
|
+ // success: (e) => {
|
|
|
|
+ // if (e.confirm) {
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url: '/pages/public/login'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // fail: () => {},
|
|
|
|
+ // complete: () => {}
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ driverInput(e) {
|
|
|
|
+ this.driver = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ driverPhoneInput(e) {
|
|
|
|
+ this.driverPhone = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ carNoInput(e) {
|
|
|
|
+ this.carNo = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ senderInput(e) {
|
|
|
|
+ this.sender = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ senderPhoneInput(e) {
|
|
|
|
+ this.senderPhone = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ receiverInput(e) {
|
|
|
|
+ this.receiver = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ receiverPhoneInput(e) {
|
|
|
|
+ this.receiverPhone = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ startPlaceInput(e) {
|
|
|
|
+ this.startPlace = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ endPlaceInput(e) {
|
|
|
|
+ this.endPlace = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ totalInput(e) {
|
|
|
|
+ this.total = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ priceInput(e) {
|
|
|
|
+ this.price = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ tabSelect(e) {
|
|
|
|
+ this.TabCur = e.currentTarget.dataset.id;
|
|
|
|
+ },
|
|
|
|
+ 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];
|
|
|
|
+ },
|
|
|
|
+ sellerInput(e) {
|
|
|
|
+ this.seller = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ sellerPhoneInput(e) {
|
|
|
|
+ this.sellerPhone = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ buyerInput(e) {
|
|
|
|
+ this.buyer = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ buyerPhoneInput(e) {
|
|
|
|
+ this.buyerPhone = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ unitPriceInput(e) {
|
|
|
|
+ this.unitPrice = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ minSaleInput(e) {
|
|
|
|
+ this.minSale = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ exsitCountInput(e) {
|
|
|
|
+ this.exsitCount = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ originInput(e) {
|
|
|
|
+ this.origin = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ stockInput(e) {
|
|
|
|
+ this.stock = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ goodsNameInput(e) {
|
|
|
|
+ this.goodsName = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ verifyCodeInput(e) {
|
|
|
|
+ this.verifyCode = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ levelInput(e) {
|
|
|
|
+ this.level = e.detail.value
|
|
|
|
+ },
|
|
|
|
+ doGetVerify() {
|
|
|
|
+ const that = this
|
|
|
|
+ var phone = "";
|
|
|
|
+ if (this.TabCur == 0) {
|
|
|
|
+ phone = that.sellerPhone
|
|
|
|
+ } else if (this.TabCur == 1) {
|
|
|
|
+ phone = that.buyerPhone
|
|
|
|
+ } else if (this.TabCur == 2) {
|
|
|
|
+ phone = that.senderPhone
|
|
|
|
+ } else if (this.TabCur == 3) {
|
|
|
|
+ phone = that.driverPhone
|
|
|
|
+ }
|
|
|
|
+ if (!phone || phone.length != 11) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入正确手机号!',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ that.$api.request('user', 'sendVerifyCode', {
|
|
|
|
+ phone: phone,
|
|
|
|
+ }).then(res => {
|
|
|
|
+
|
|
|
|
+ if (that.TabCur == 0) {
|
|
|
|
+ that.sendDisabled0 = true
|
|
|
|
+ } else if (that.TabCur == 1) {
|
|
|
|
+ that.sendDisabled1 = true
|
|
|
|
+ } else if (that.TabCur == 2) {
|
|
|
|
+ that.sendDisabled2 = true
|
|
|
|
+ } else if (that.TabCur == 3) {
|
|
|
|
+ that.sendDisabled3 = true
|
|
}
|
|
}
|
|
- that.$api.request('user', 'sendVerifyCode', {
|
|
|
|
- phone: phone,
|
|
|
|
- }).then(res => {
|
|
|
|
-
|
|
|
|
- if(that.TabCur == 0){
|
|
|
|
- that.sendDisabled0 = true
|
|
|
|
- }else if(that.TabCur == 1){
|
|
|
|
- that.sendDisabled1 = true
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 2){
|
|
|
|
- that.sendDisabled2 = true
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 3){
|
|
|
|
- that.sendDisabled3 = true
|
|
|
|
- }
|
|
|
|
- let sec = 60
|
|
|
|
- let interval = setInterval(() => {
|
|
|
|
- sec--;
|
|
|
|
- if(that.TabCur == 0){
|
|
|
|
- that.sendText0 = sec + 's后重发'
|
|
|
|
- if (sec <= 0) {
|
|
|
|
- that.sendDisabled0 = false
|
|
|
|
- that.sendText0 = "获取验证码"
|
|
|
|
- clearInterval(interval)
|
|
|
|
- }
|
|
|
|
- }else if(that.TabCur == 1){
|
|
|
|
- that.sendText1 = sec + 's后重发'
|
|
|
|
- if (sec <= 0) {
|
|
|
|
- that.sendDisabled1 = false
|
|
|
|
- that.sendText1 = "获取验证码"
|
|
|
|
- clearInterval(interval)
|
|
|
|
- }
|
|
|
|
|
|
+ let sec = 60
|
|
|
|
+ let interval = setInterval(() => {
|
|
|
|
+ sec--;
|
|
|
|
+ if (that.TabCur == 0) {
|
|
|
|
+ that.sendText0 = sec + 's后重发'
|
|
|
|
+ if (sec <= 0) {
|
|
|
|
+ that.sendDisabled0 = false
|
|
|
|
+ that.sendText0 = "获取验证码"
|
|
|
|
+ clearInterval(interval)
|
|
|
|
+ }
|
|
|
|
+ } else if (that.TabCur == 1) {
|
|
|
|
+ that.sendText1 = sec + 's后重发'
|
|
|
|
+ if (sec <= 0) {
|
|
|
|
+ that.sendDisabled1 = false
|
|
|
|
+ that.sendText1 = "获取验证码"
|
|
|
|
+ clearInterval(interval)
|
|
|
|
+ }
|
|
|
|
+ } else if (that.TabCur == 2) {
|
|
|
|
+ that.sendText2 = sec + 's后重发'
|
|
|
|
+ if (sec <= 0) {
|
|
|
|
+ that.sendDisabled2 = false
|
|
|
|
+ that.sendText2 = "获取验证码"
|
|
|
|
+ clearInterval(interval)
|
|
|
|
+ }
|
|
|
|
+ } else if (that.TabCur == 3) {
|
|
|
|
+ that.sendText3 = sec + 's后重发'
|
|
|
|
+ if (sec <= 0) {
|
|
|
|
+ that.sendDisabled3 = false
|
|
|
|
+ that.sendText3 = "获取验证码"
|
|
|
|
+ clearInterval(interval)
|
|
}
|
|
}
|
|
- else if(that.TabCur == 2){
|
|
|
|
- that.sendText2 = sec + 's后重发'
|
|
|
|
- if (sec <= 0) {
|
|
|
|
- that.sendDisabled2 = false
|
|
|
|
- that.sendText2 = "获取验证码"
|
|
|
|
- clearInterval(interval)
|
|
|
|
|
|
+ }
|
|
|
|
+ }, 1000)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ ChooseImagePerson() {
|
|
|
|
+ uni.chooseImage({
|
|
|
|
+ count: 1, //默认9
|
|
|
|
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
+ sourceType: ['album', 'camera'], //从相册选择
|
|
|
|
+ success: (res) => {
|
|
|
|
+ //上传图片
|
|
|
|
+ //图片路径可自行修改
|
|
|
|
+ uploadImage(res.tempFilePaths[0], 'personNoImg/',
|
|
|
|
+ result => {
|
|
|
|
+ if (this.personNoImg.length != 0) {
|
|
|
|
+ this.personNoImg1 = result
|
|
|
|
+ } else {
|
|
|
|
+ this.personNoImg = result
|
|
}
|
|
}
|
|
|
|
+ uni.hideLoading();
|
|
}
|
|
}
|
|
- else if(that.TabCur == 3){
|
|
|
|
- that.sendText3 = sec + 's后重发'
|
|
|
|
- if (sec <= 0) {
|
|
|
|
- that.sendDisabled3 = false
|
|
|
|
- that.sendText3 = "获取验证码"
|
|
|
|
- clearInterval(interval)
|
|
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ ChooseImageDriver() {
|
|
|
|
+ uni.chooseImage({
|
|
|
|
+ count: 1, //默认9
|
|
|
|
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
+ sourceType: ['album', 'camera'], //从相册选择
|
|
|
|
+ success: (res) => {
|
|
|
|
+ //上传图片
|
|
|
|
+ //图片路径可自行修改
|
|
|
|
+ uploadImage(res.tempFilePaths[0], 'driverNoImg/',
|
|
|
|
+ result => {
|
|
|
|
+ if (this.driverNoImg.length != 0) {
|
|
|
|
+ this.driverNoImg1 = result
|
|
|
|
+ } else {
|
|
|
|
+ this.driverNoImg = result
|
|
}
|
|
}
|
|
|
|
+ uni.hideLoading();
|
|
}
|
|
}
|
|
- }, 1000)
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- ChooseImagePerson() {
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认9
|
|
|
|
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ['album','camera'], //从相册选择
|
|
|
|
- success: (res) => {
|
|
|
|
- //上传图片
|
|
|
|
- //图片路径可自行修改
|
|
|
|
- uploadImage(res.tempFilePaths[0], 'personNoImg/',
|
|
|
|
- result => {
|
|
|
|
- if (this.personNoImg.length != 0) {
|
|
|
|
- this.personNoImg1 = result
|
|
|
|
- } else {
|
|
|
|
- this.personNoImg = result
|
|
|
|
- }
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ ChooseImageCar() {
|
|
|
|
+ uni.chooseImage({
|
|
|
|
+ count: 1, //默认9
|
|
|
|
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
+ sourceType: ['album', 'camera'], //从相册选择
|
|
|
|
+ success: (res) => {
|
|
|
|
+ //上传图片
|
|
|
|
+ //图片路径可自行修改
|
|
|
|
+ uploadImage(res.tempFilePaths[0], 'carNoImg/',
|
|
|
|
+ result => {
|
|
|
|
+ if (this.carNoImg.length != 0) {
|
|
|
|
+ this.carNoImg1 = result
|
|
|
|
+ } else {
|
|
|
|
+ this.carNoImg = result
|
|
}
|
|
}
|
|
- )
|
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ ViewImage(e) {
|
|
|
|
+ var img = [];
|
|
|
|
+ img = e.currentTarget.dataset.url.split(' ')
|
|
|
|
+ uni.previewImage({
|
|
|
|
+ current: 0,
|
|
|
|
+ urls: img
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ DelImg(e) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '确定要删除该照片吗?',
|
|
|
|
+ cancelText: '取消',
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: res => {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ if (e.currentTarget.dataset.index == 0) {
|
|
|
|
+ this.personNoImg = "";
|
|
|
|
+ } else if (e.currentTarget.dataset.index == 1) {
|
|
|
|
+ this.personNoImg1 = "";
|
|
|
|
+ } else if (e.currentTarget.dataset.index == 2) {
|
|
|
|
+ this.driverNoImg = "";
|
|
|
|
+ } else if (e.currentTarget.dataset.index == 3) {
|
|
|
|
+ this.driverNoImg1 = "";
|
|
|
|
+ } else if (e.currentTarget.dataset.index == 4) {
|
|
|
|
+ this.carNoImg = "";
|
|
|
|
+ } else if (e.currentTarget.dataset.index == 5) {
|
|
|
|
+ this.carNoImg1 = "";
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
- });
|
|
|
|
- },
|
|
|
|
- ChooseImageDriver() {
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认9
|
|
|
|
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ['album','camera'], //从相册选择
|
|
|
|
- success: (res) => {
|
|
|
|
- //上传图片
|
|
|
|
- //图片路径可自行修改
|
|
|
|
- uploadImage(res.tempFilePaths[0], 'driverNoImg/',
|
|
|
|
- result => {
|
|
|
|
- if (this.driverNoImg.length != 0) {
|
|
|
|
- this.driverNoImg1 = result
|
|
|
|
- } else {
|
|
|
|
- this.driverNoImg = result
|
|
|
|
- }
|
|
|
|
- uni.hideLoading();
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ commit() {
|
|
|
|
+ if (!this.hasLogin) {
|
|
|
|
+ this.isShowAlert = true;
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: '登录提示',
|
|
|
|
+ // content: '您尚未登录,是否立即登录?',
|
|
|
|
+ // showCancel: true,
|
|
|
|
+ // confirmText: '登录',
|
|
|
|
+ // success: (e) => {
|
|
|
|
+ // if (e.confirm) {
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url: '/pages/public/login'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // fail: () => {},
|
|
|
|
+ // complete: () => {}
|
|
|
|
+ // })
|
|
|
|
+ } else {
|
|
|
|
+ const that = this
|
|
|
|
+ if (this.TabCur == 0) {
|
|
|
|
+ if (!that.seller) {
|
|
|
|
+ this.$api.msg('请填写卖方');
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- },
|
|
|
|
- ChooseImageCar() {
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认9
|
|
|
|
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ['album','camera'], //从相册选择
|
|
|
|
- success: (res) => {
|
|
|
|
- //上传图片
|
|
|
|
- //图片路径可自行修改
|
|
|
|
- uploadImage(res.tempFilePaths[0], 'carNoImg/',
|
|
|
|
- result => {
|
|
|
|
- if (this.carNoImg.length != 0) {
|
|
|
|
- this.carNoImg1 = result
|
|
|
|
- } else {
|
|
|
|
- this.carNoImg = result
|
|
|
|
- }
|
|
|
|
- uni.hideLoading();
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ if (!that.sellerPhone) {
|
|
|
|
+ this.$api.msg('请填写手机号码');
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- });
|
|
|
|
- },
|
|
|
|
- ViewImage(e) {
|
|
|
|
- var img = [];
|
|
|
|
- img = e.currentTarget.dataset.url.split(' ')
|
|
|
|
- uni.previewImage({
|
|
|
|
- current:0,
|
|
|
|
- urls: img
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- DelImg(e) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确定要删除该照片吗?',
|
|
|
|
- cancelText: '取消',
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: res => {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- if(e.currentTarget.dataset.index == 0){
|
|
|
|
- this.personNoImg = "";
|
|
|
|
- }
|
|
|
|
- else if(e.currentTarget.dataset.index == 1){
|
|
|
|
- this.personNoImg1 = "";
|
|
|
|
- }
|
|
|
|
- else if(e.currentTarget.dataset.index == 2){
|
|
|
|
- this.driverNoImg = "";
|
|
|
|
- }
|
|
|
|
- else if(e.currentTarget.dataset.index == 3){
|
|
|
|
- this.driverNoImg1 = "";
|
|
|
|
- }
|
|
|
|
- else if(e.currentTarget.dataset.index == 4){
|
|
|
|
- this.carNoImg = "";
|
|
|
|
- }
|
|
|
|
- else if(e.currentTarget.dataset.index == 5){
|
|
|
|
- this.carNoImg1 = "";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ if (!that.exsitCount) {
|
|
|
|
+ this.$api.msg('请填写库存量');
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- })
|
|
|
|
- },
|
|
|
|
- commit(){
|
|
|
|
- if (!this.hasLogin) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '登录提示',
|
|
|
|
- content: '您尚未登录,是否立即登录?',
|
|
|
|
- showCancel: true,
|
|
|
|
- confirmText: '登录',
|
|
|
|
- success: (e) => {
|
|
|
|
- if (e.confirm) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/public/login'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- fail: () => {},
|
|
|
|
- complete: () => {}
|
|
|
|
- })
|
|
|
|
|
|
+ if (!that.minSale) {
|
|
|
|
+ this.$api.msg('请填写最小成交量');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.goodsName) {
|
|
|
|
+ this.$api.msg('请填写货名');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.verifyCode) {
|
|
|
|
+ this.$api.msg('请填写验证码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!that.price) {
|
|
|
|
+ that.$api.msg('请选择价格类型')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.unitPrice) {
|
|
|
|
+ that.$api.msg('请填写协议价格(元/吨)');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.origin) {
|
|
|
|
+ this.$api.msg('请填写产地');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.stock) {
|
|
|
|
+ this.$api.msg('请填写库存地');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.level) {
|
|
|
|
+ this.$api.msg('请填写国标等级');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ that.saleInfo.seller = that.seller
|
|
|
|
+ that.saleInfo.sellerPhone = that.sellerPhone
|
|
|
|
+ that.saleInfo.priceType = that.price
|
|
|
|
+ that.saleInfo.unitPrice = that.unitPrice
|
|
|
|
+ that.saleInfo.minSale = that.minSale
|
|
|
|
+ that.saleInfo.exsitCount = that.exsitCount
|
|
|
|
+ that.saleInfo.origin = that.origin
|
|
|
|
+ that.saleInfo.stock = that.stock
|
|
|
|
+ that.saleInfo.verifyCode = that.verifyCode
|
|
|
|
+ that.saleInfo.goodsName = that.goodsName
|
|
|
|
+ that.saleInfo.buyer = that.buyer
|
|
|
|
+ that.saleInfo.buyerPhone = that.buyerPhone
|
|
|
|
+ that.saleInfo.level = that.level
|
|
|
|
+ } else if (this.TabCur == 1) {
|
|
|
|
+ if (!that.buyer) {
|
|
|
|
+ this.$api.msg('请填写买方');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.buyerPhone) {
|
|
|
|
+ this.$api.msg('请填写手机号码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.goodsName) {
|
|
|
|
+ this.$api.msg('请填写货名');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.verifyCode) {
|
|
|
|
+ this.$api.msg('请填写验证码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!that.price) {
|
|
|
|
+ that.$api.msg('请选择价格类型')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.unitPrice) {
|
|
|
|
+ that.$api.msg('请填写协议价格(元/吨)');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.origin) {
|
|
|
|
+ this.$api.msg('请填写产地');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.stock) {
|
|
|
|
+ this.$api.msg('请填写库存地');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.level) {
|
|
|
|
+ this.$api.msg('请填写国标等级');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ that.saleInfo.seller = that.seller
|
|
|
|
+ that.saleInfo.sellerPhone = that.sellerPhone
|
|
|
|
+ that.saleInfo.priceType = that.price
|
|
|
|
+ that.saleInfo.unitPrice = that.unitPrice
|
|
|
|
+ that.saleInfo.minSale = that.minSale
|
|
|
|
+ that.saleInfo.exsitCount = that.exsitCount
|
|
|
|
+ that.saleInfo.origin = that.origin
|
|
|
|
+ that.saleInfo.stock = that.stock
|
|
|
|
+ that.saleInfo.verifyCode = that.verifyCode
|
|
|
|
+ that.saleInfo.goodsName = that.goodsName
|
|
|
|
+ that.saleInfo.buyer = that.buyer
|
|
|
|
+ that.saleInfo.buyerPhone = that.buyerPhone
|
|
|
|
+ that.saleInfo.level = that.level
|
|
|
|
+ } else if (this.TabCur == 2) {
|
|
|
|
+ if (!that.sender) {
|
|
|
|
+ this.$api.msg('请填写发货方');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.senderPhone) {
|
|
|
|
+ this.$api.msg('请填写发货方手机号码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.receiver) {
|
|
|
|
+ this.$api.msg('请填写收货方');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.receiverPhone) {
|
|
|
|
+ this.$api.msg('请填写收货方手机号码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.goodsName) {
|
|
|
|
+ this.$api.msg('请填写货名');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.verifyCode) {
|
|
|
|
+ this.$api.msg('请填写验证码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ that.tran.sender = that.sender
|
|
|
|
+ that.tran.senderPhone = that.senderPhone
|
|
|
|
+ that.tran.receiver = that.receiver
|
|
|
|
+ that.tran.receiverPhone = that.receiverPhone
|
|
|
|
+ that.tran.verifyCode = that.verifyCode
|
|
|
|
+ that.tran.goodsName = that.goodsName
|
|
|
|
+ that.tran.total = that.total
|
|
|
|
+ that.tran.price = that.price
|
|
|
|
+ that.tran.startPlace = that.startPlace
|
|
|
|
+ that.tran.endPlace = that.endPlace
|
|
|
|
+ } else if (this.TabCur == 3) {
|
|
|
|
+ if (!that.startPlace) {
|
|
|
|
+ this.$api.msg('请填写起始地');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.endPlace) {
|
|
|
|
+ this.$api.msg('请填写目的地');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.driver) {
|
|
|
|
+ this.$api.msg('请填写承运人');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.driverPhone) {
|
|
|
|
+ this.$api.msg('请填写承运人手机号码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(that.driverPhone)) {
|
|
|
|
+ that.$api.msg('请输入正确的承运人手机号码');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.carNo) {
|
|
|
|
+ this.$api.msg('请填写车牌号');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.verifyCode) {
|
|
|
|
+ this.$api.msg('请填写验证码');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (!that.personNoImg || !that.personNoImg1) {
|
|
|
|
+ that.$api.msg('请上传身份证正、反面照片');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.driverNoImg || !that.driverNoImg1) {
|
|
|
|
+ that.$api.msg('请上传驾驶证主、副页照片');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!that.carNoImg || !that.carNoImg1) {
|
|
|
|
+ that.$api.msg('请上传行车证主、副页照片');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ that.tran.driver = that.driver
|
|
|
|
+ that.tran.driverPhone = that.driverPhone
|
|
|
|
+ that.tran.verifyCode = that.verifyCode
|
|
|
|
+ that.tran.price = that.price
|
|
|
|
+ that.tran.startPlace = that.startPlace
|
|
|
|
+ that.tran.endPlace = that.endPlace
|
|
|
|
+ that.tran.carNo = that.carNo
|
|
|
|
+ that.tran.personNoImg = that.personNoImg
|
|
|
|
+ that.tran.personNoImg1 = that.personNoImg1
|
|
|
|
+ that.tran.driverNoImg = that.driverNoImg
|
|
|
|
+ that.tran.driverNoImg1 = that.driverNoImg1
|
|
|
|
+ that.tran.carNoImg = that.carNoImg
|
|
|
|
+ that.tran.carNoImg1 = that.carNoImg1
|
|
}
|
|
}
|
|
- else{
|
|
|
|
- const that = this
|
|
|
|
- if(this.TabCur == 0){
|
|
|
|
- if(!that.seller){
|
|
|
|
- this.$api.msg('请填写卖方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.sellerPhone){
|
|
|
|
- this.$api.msg('请填写手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.exsitCount){
|
|
|
|
- this.$api.msg('请填写库存量');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.minSale){
|
|
|
|
- this.$api.msg('请填写最小成交量');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.goodsName){
|
|
|
|
- this.$api.msg('请填写货名');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (!that.price) {
|
|
|
|
- that.$api.msg('请选择价格类型')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.unitPrice){
|
|
|
|
- that.$api.msg('请填写协议价格(元/吨)');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.origin){
|
|
|
|
- this.$api.msg('请填写产地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.stock){
|
|
|
|
- this.$api.msg('请填写库存地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.level){
|
|
|
|
- this.$api.msg('请填写国标等级');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- that.saleInfo.seller = that.seller
|
|
|
|
- that.saleInfo.sellerPhone = that.sellerPhone
|
|
|
|
- that.saleInfo.priceType = that.price
|
|
|
|
- that.saleInfo.unitPrice = that.unitPrice
|
|
|
|
- that.saleInfo.minSale = that.minSale
|
|
|
|
- that.saleInfo.exsitCount = that.exsitCount
|
|
|
|
- that.saleInfo.origin = that.origin
|
|
|
|
- that.saleInfo.stock = that.stock
|
|
|
|
- that.saleInfo.verifyCode = that.verifyCode
|
|
|
|
- that.saleInfo.goodsName = that.goodsName
|
|
|
|
- that.saleInfo.buyer = that.buyer
|
|
|
|
- that.saleInfo.buyerPhone = that.buyerPhone
|
|
|
|
- that.saleInfo.level = that.level
|
|
|
|
- }else if(this.TabCur == 1){
|
|
|
|
- if(!that.buyer){
|
|
|
|
- this.$api.msg('请填写买方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.buyerPhone){
|
|
|
|
- this.$api.msg('请填写手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.goodsName){
|
|
|
|
- this.$api.msg('请填写货名');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (!that.price) {
|
|
|
|
- that.$api.msg('请选择价格类型')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.unitPrice){
|
|
|
|
- that.$api.msg('请填写协议价格(元/吨)');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.origin){
|
|
|
|
- this.$api.msg('请填写产地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.stock){
|
|
|
|
- this.$api.msg('请填写库存地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.level){
|
|
|
|
- this.$api.msg('请填写国标等级');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- that.saleInfo.seller = that.seller
|
|
|
|
- that.saleInfo.sellerPhone = that.sellerPhone
|
|
|
|
- that.saleInfo.priceType = that.price
|
|
|
|
- that.saleInfo.unitPrice = that.unitPrice
|
|
|
|
- that.saleInfo.minSale = that.minSale
|
|
|
|
- that.saleInfo.exsitCount = that.exsitCount
|
|
|
|
- that.saleInfo.origin = that.origin
|
|
|
|
- that.saleInfo.stock = that.stock
|
|
|
|
- that.saleInfo.verifyCode = that.verifyCode
|
|
|
|
- that.saleInfo.goodsName = that.goodsName
|
|
|
|
- that.saleInfo.buyer = that.buyer
|
|
|
|
- that.saleInfo.buyerPhone = that.buyerPhone
|
|
|
|
- that.saleInfo.level = that.level
|
|
|
|
- }
|
|
|
|
- else if(this.TabCur == 2){
|
|
|
|
- if(!that.sender){
|
|
|
|
- this.$api.msg('请填写发货方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.senderPhone){
|
|
|
|
- this.$api.msg('请填写发货方手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.receiver){
|
|
|
|
- this.$api.msg('请填写收货方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.receiverPhone){
|
|
|
|
- this.$api.msg('请填写收货方手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.goodsName){
|
|
|
|
- this.$api.msg('请填写货名');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- that.tran.sender = that.sender
|
|
|
|
- that.tran.senderPhone = that.senderPhone
|
|
|
|
- that.tran.receiver = that.receiver
|
|
|
|
- that.tran.receiverPhone = that.receiverPhone
|
|
|
|
- that.tran.verifyCode = that.verifyCode
|
|
|
|
- that.tran.goodsName = that.goodsName
|
|
|
|
- that.tran.total = that.total
|
|
|
|
- that.tran.price = that.price
|
|
|
|
- that.tran.startPlace = that.startPlace
|
|
|
|
- that.tran.endPlace = that.endPlace
|
|
|
|
- }
|
|
|
|
- else if(this.TabCur == 3){
|
|
|
|
- if(!that.startPlace){
|
|
|
|
- this.$api.msg('请填写起始地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.endPlace){
|
|
|
|
- this.$api.msg('请填写目的地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.driver){
|
|
|
|
- this.$api.msg('请填写承运人');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.driverPhone){
|
|
|
|
- this.$api.msg('请填写承运人手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!/(^1[3|4|5|7|8][0-9]{9}$)/.test(that.driverPhone)){
|
|
|
|
- that.$api.msg('请输入正确的承运人手机号码');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.carNo){
|
|
|
|
- this.$api.msg('请填写车牌号');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (!that.personNoImg || !that.personNoImg1) {
|
|
|
|
- that.$api.msg('请上传身份证正、反面照片');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!that.driverNoImg || !that.driverNoImg1) {
|
|
|
|
- that.$api.msg('请上传驾驶证主、副页照片');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!that.carNoImg || !that.carNoImg1) {
|
|
|
|
- that.$api.msg('请上传行车证主、副页照片');
|
|
|
|
- return
|
|
|
|
|
|
+ // 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
|
|
|
+ wx.getSetting({
|
|
|
|
+ // withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
|
|
|
|
+ success(res) {
|
|
|
|
+ if (res.authSetting['scope.subscribeMessage']) {
|
|
|
|
+ uni.openSetting({ // 打开设置页
|
|
|
|
+ success(res) {
|
|
|
|
+ console.log(res.authSetting)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
|
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
|
+ tmplIds: ['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'], //
|
|
|
|
+ success(res) {
|
|
|
|
+ console.log(res)
|
|
|
|
+ if (res['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'] ==
|
|
|
|
+ "accept") { // 字段就是tmplIds模板id
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '正在提交',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
|
|
+ if (that.TabCur == 0) {
|
|
|
|
+ that.$api.request('sale', 'addSale', that.saleInfo,
|
|
|
|
+ failres => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ that.$api.msg(failres.errmsg);
|
|
|
|
+
|
|
|
|
+ }).then(res => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: "发布提交成功,工作人员会尽快联系该号码:" +
|
|
|
|
+ that.sellerPhone,
|
|
|
|
+ showCancel: false,
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: () => {
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
+ })
|
|
|
|
+ } else if (that.TabCur == 1) {
|
|
|
|
+ that.$api.request('sale', 'addBuy', that.saleInfo,
|
|
|
|
+ failres => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ that.$api.msg(failres.errmsg);
|
|
|
|
+
|
|
|
|
+ }).then(res => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ showCancel: false,
|
|
|
|
+ content: "发布提交成功,工作人员会尽快联系该号码:" +
|
|
|
|
+ that.buyerPhone,
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: () => {
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
+ })
|
|
|
|
+ } else if (that.TabCur == 2) {
|
|
|
|
+ that.$api.request('tran', 'addTran', that.tran,
|
|
|
|
+ failres => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ that.$api.msg(failres.errmsg);
|
|
|
|
+ }).then(res => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ showCancel: false,
|
|
|
|
+ content: "发布提交成功,工作人员会尽快联系该号码:" +
|
|
|
|
+ that.senderPhone,
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: () => {
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ } else if (that.TabCur == 3) {
|
|
|
|
+ that.$api.request('tran', 'addCarDriver', that.tran,
|
|
|
|
+ failres => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ that.$api.msg(failres.errmsg);
|
|
|
|
+ }).then(res => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ showCancel: false,
|
|
|
|
+ content: "发布提交成功,工作人员会尽快联系该号码:" +
|
|
|
|
+ that.driverPhone,
|
|
|
|
+ confirmText: '确定',
|
|
|
|
+ success: () => {
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- that.tran.driver = that.driver
|
|
|
|
- that.tran.driverPhone = that.driverPhone
|
|
|
|
- that.tran.verifyCode = that.verifyCode
|
|
|
|
- that.tran.price = that.price
|
|
|
|
- that.tran.startPlace = that.startPlace
|
|
|
|
- that.tran.endPlace = that.endPlace
|
|
|
|
- that.tran.carNo = that.carNo
|
|
|
|
- that.tran.personNoImg = that.personNoImg
|
|
|
|
- that.tran.personNoImg1 = that.personNoImg1
|
|
|
|
- that.tran.driverNoImg = that.driverNoImg
|
|
|
|
- that.tran.driverNoImg1 = that.driverNoImg1
|
|
|
|
- that.tran.carNoImg = that.carNoImg
|
|
|
|
- that.tran.carNoImg1 = that.carNoImg1
|
|
|
|
- }
|
|
|
|
- // 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
|
|
|
- wx.getSetting({
|
|
|
|
- // withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
|
|
|
|
- success(res){
|
|
|
|
- if(res.authSetting['scope.subscribeMessage']){
|
|
|
|
- uni.openSetting({ // 打开设置页
|
|
|
|
- success(res) {
|
|
|
|
- console.log(res.authSetting)
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }else{// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
|
|
|
|
- uni.requestSubscribeMessage({
|
|
|
|
- tmplIds: ['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'],//
|
|
|
|
- success (res) {
|
|
|
|
- console.log(res)
|
|
|
|
- if(res['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'] == "accept"){// 字段就是tmplIds模板id
|
|
|
|
- uni.showLoading({
|
|
|
|
- title: '正在提交',
|
|
|
|
- mask:true
|
|
|
|
- })
|
|
|
|
- if(that.TabCur == 0){
|
|
|
|
- that.$api.request('sale', 'addSale',that.saleInfo, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
-
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.sellerPhone,
|
|
|
|
- showCancel: false,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 1){
|
|
|
|
- that.$api.request('sale', 'addBuy',that.saleInfo, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
-
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- showCancel: false,
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.buyerPhone,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 2){
|
|
|
|
- that.$api.request('tran', 'addTran',that.tran, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- showCancel: false,
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.senderPhone,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 3){
|
|
|
|
- that.$api.request('tran', 'addCarDriver',that.tran, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- showCancel: false,
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.driverPhone,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- },
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
- .container{
|
|
|
|
|
|
+ .container {
|
|
padding-bottom: 160rpx;
|
|
padding-bottom: 160rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
.cu-form-group input {
|
|
.cu-form-group input {
|
|
text-align: right;
|
|
text-align: right;
|
|
}
|
|
}
|
|
- .text-white text{
|
|
|
|
|
|
+
|
|
|
|
+ .text-white text {
|
|
background: linear-gradient(45deg, #3DC146, #B2D612);
|
|
background: linear-gradient(45deg, #3DC146, #B2D612);
|
|
- padding:5px 10px;
|
|
|
|
|
|
+ padding: 5px 10px;
|
|
border-radius: 38rpx;
|
|
border-radius: 38rpx;
|
|
}
|
|
}
|
|
|
|
+
|
|
.cu-form-group textarea {
|
|
.cu-form-group textarea {
|
|
text-align: right;
|
|
text-align: right;
|
|
}
|
|
}
|
|
- .commit{
|
|
|
|
|
|
+
|
|
|
|
+ .commit {
|
|
background: linear-gradient(45deg, #DF331C, #DA611A);
|
|
background: linear-gradient(45deg, #DF331C, #DA611A);
|
|
- color:#fff;
|
|
|
|
|
|
+ color: #fff;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|