From 8c82102ab7bb34e29a73f56b829cd622ab34604c Mon Sep 17 00:00:00 2001
From: zhangxiaoxu <819527061@qq.com>
Date: 星期二, 25 十一月 2025 11:30:23 +0800
Subject: [PATCH] 解决运输方式显示不对得问题
---
pages/new-application-form-data/new-application-form-data.vue | 720 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 474 insertions(+), 246 deletions(-)
diff --git a/pages/new-application-form-data/new-application-form-data.vue b/pages/new-application-form-data/new-application-form-data.vue
index fe61c3d..ef62c42 100644
--- a/pages/new-application-form-data/new-application-form-data.vue
+++ b/pages/new-application-form-data/new-application-form-data.vue
@@ -5,17 +5,20 @@
<!-- <page-meta :page-style="spanStyle"></page-meta> -->
<!-- 琛ㄥ崟 -->
- <combination-title class="newApplicationTitle" title="鏂板"></combination-title>
+ <combination-title class="newApplicationTitle" :title="newFormData.id?'鏌ョ湅':'鏂板'"></combination-title>
<!-- 娉ㄦ剰锛屽鏋滈渶瑕佸吋瀹瑰井淇″皬绋嬪簭锛屾渶濂介�氳繃setRules鏂规硶璁剧疆rules瑙勫垯 -->
<!-- <u-notify :message="accountMsg" :show="trueMsg" :type="accountMsgType"></u-notify> -->
<!-- <u-alert :title="accountMsg" :type="accountMsgType" :description="accountMsgType"></u-alert> -->
<view class="formDataContaniner">
<u--form labelPosition="left" :model="newFormData" :rules="rules" ref="formRef">
+ <u-form-item @click="selectLedger" labelWidth="20%" label="璐﹀" borderBottom>
+ <u--input disabled disabledColor="#ffffff" v-model="ledgerName" border="none"></u--input>
+ </u-form-item>
<u-form-item @click="selectCustomer" labelWidth="20%" label="缁撶畻瀹㈡埛" prop="customerName" borderBottom ref="customerNameRef">
- <u--input v-model="newFormData.customerName" border="none"></u--input>
+ <u--input disabled disabledColor="#ffffff" v-model="newFormData.customerName" border="none"></u--input>
</u-form-item>
<u-form-item @click="selectContract" labelWidth="20%" label="鍚堝悓缂栧彿" prop="contractNum" borderBottom ref="contractNumRef">
- <u--input v-model="newFormData.contractNum" border="none"></u--input>
+ <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractNum" border="none"></u--input>
</u-form-item>
<u-form-item labelWidth="20%" label="鍚堝悓鍚嶇О" borderBottom ref="contractNameRef">
<u--input disabled disabledColor="#ffffff" v-model="newFormData.contractName" border="none"></u--input>
@@ -25,7 +28,7 @@
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item @click="timeShow = true" prop="startDate" labelWidth="20%" label="鏃ユ湡" borderBottom ref="timeDataRef">
- <u--input v-model="timeDataStr" border="none" placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input>
+ <u--input v-model="timeDataStr" border="none" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item labelWidth="20%" label="缂栧彿" borderBottom>
@@ -34,8 +37,20 @@
</u--form>
</view>
+ <!-- 閫夋嫨璐﹀ -->
+ <u-picker
+ @change="selectLedgerChange"
+ @confirm="selectLedgerConfirm"
+ @cancel="selectLedgerCancel"
+ @close="selectLedgerClose"
+ :show="selectLedgerShow"
+ :columns="ledgerList"
+ keyName="name"
+ :closeOnClickOverlay="true"
+ ></u-picker>
+
<!-- 鐢宠鏃ュ巻銆佽寖鍥存椂闂� -->
- <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" :maxDate="maxDate"></u-calendar>
+ <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" ></u-calendar>
<!-- 鐢宠浠樻鏂瑰紡寮瑰嚭鑿滃崟 -->
<u-action-sheet :show="showPayType" :actions="actions" title="璇烽�夋嫨浠樻鏂瑰紡" @close="showPayType = false" @select="sexSelect"></u-action-sheet>
@@ -48,17 +63,34 @@
<view class="selectCustomerContainer">
<view class="searchContainer">
<u--form labelPosition="left" :model="searchCustomerForm" ref="selectformRef">
- <u-form-item labelWidth="12%" label="鍗曚綅" borderBottom ref="compRef">
- <u--input @focus="selectCustomerCompShow = true" v-model="searchCustomerForm.compName" placeholder="鐐瑰嚮閫夋嫨鍗曚綅" border="none"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon>
+ <u-form-item
+ @click="
+ selectCustomerCompShow = true;
+ hideKeyboard();
+ "
+ labelWidth="12%"
+ label="鍗曚綅"
+ borderBottom
+ ref="compRef"
+ >
+ <u--input v-model="searchCustomerForm.compName" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨鍗曚綅" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.compName = ''"></u-icon>-->
</u-form-item>
<u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
- <u--input v-model="selectCustomerData.customerName" border="none" placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''" @click="selectCustomerData.customerName = ''"></u-icon>
+ <u--input v-model="selectCustomerData.customerFullName" border="none" placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
+ <u-icon slot="right" name="close-circle-fill" @click="selectCustomerData.customerFullName = ''"></u-icon>
</u-form-item>
- <u-form-item labelWidth="20%" label="瀹㈡埛绾у埆" borderBottom>
- <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.levelText != ''" @click="searchCustomerForm.levelText = ''"></u-icon>
+ <u-form-item
+ @click="
+ selectLevelShow = true;
+ hideKeyboard();
+ "
+ labelWidth="20%"
+ label="瀹㈡埛绾у埆"
+ borderBottom
+ >
+ <u--input border="none" v-model="searchCustomerForm.levelText" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.levelText = ''"></u-icon>-->
</u-form-item>
</u--form>
</view>
@@ -70,9 +102,8 @@
<view class="searchResultList">
<u-cell-group :right-icon="false">
<u-cell v-for="(item, index) in customerData" :title="item.customerFullName" :arrow="false">
- <text slot="value" class="u-slot-value">
+ <view slot="value" class="u-slot-value">
<button
- class="mini-btn"
type="default"
size="mini"
style="background: #007aff;
@@ -83,15 +114,17 @@
width: 43px;
font-size: 10px;
padding: 0;"
- @click="selectCustomerOkClick(item.id)"
+ @click="selectCustomerOkClick(item)"
>
閫夋嫨
</button>
- </text>
+ </view>
</u-cell>
</u-cell-group>
</view>
-
+ <view class="loadmoreClass">
+ <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px" />
+ </view>
<!-- 閫夋嫨鐢ㄦ埛鑿滃崟椤� -->
<view class="selectCustomerCompSheet">
<u-action-sheet
@@ -121,25 +154,25 @@
<view class="selectCustomerContainer">
<view class="searchContainer">
<u--form labelPosition="left" :model="searchContractForm" ref="selectformRef">
- <u-form-item labelWidth="18%" label="鍚堝悓缂栧彿" borderBottom ref="compRef">
+ <u-form-item labelWidth="20%" label="鍚堝悓缂栧彿" borderBottom ref="compRef">
<u--input v-model="searchContractForm.num" placeholder="璇疯緭鍏ュ悎鍚岀紪鍙�" border="none"></u--input>
<u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.num != ''" @click="searchContractForm.num = ''"></u-icon>
</u-form-item>
- <u-form-item labelWidth="18%" label="瀹㈡埛鍚嶇О" borderBottom ref="compRef">
+ <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="compRef">
<u--input v-model="searchContractForm.customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" border="none"></u--input>
<u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.customerName != ''" @click="searchContractForm.customerName = ''"></u-icon>
</u-form-item>
- <u-form-item labelWidth="18%" label="鍚堝悓绫诲瀷" borderBottom ref="compRef">
- <u--input v-model="searchContractForm.type" placeholder="璇疯緭鍏ュ悎鍚岀被鍨�" border="none" @focus="searchContractFormTypeFocus"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.type != ''" @click="searchContractForm.type = ''"></u-icon>
+ <u-form-item labelWidth="20%" label="鍚堝悓绫诲瀷" borderBottom ref="compRef" @click="searchContractFormTypeFocus">
+ <u--input v-model="searchContractForm.type" disabled disabledColor="#ffffff" placeholder="璇疯緭鍏ュ悎鍚岀被鍨�" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.type != ''" @click="searchContractForm.type = ''"></u-icon>-->
</u-form-item>
- <u-form-item labelWidth="18%" label="绛捐鏃ユ湡" borderBottom ref="compRef">
- <u--input @focus="selectContractStartTimeShow = true" v-model="searchContractForm.startDate" placeholder="鐐瑰嚮閫夋嫨绛捐鏃ユ湡" border="none"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.startDate != ''" @click="searchContractForm.startDate = ''"></u-icon>
+ <u-form-item labelWidth="20%" label="绛捐鏃ユ湡" borderBottom ref="compRef" @click="selectContractStartTimeShow = true">
+ <u--input v-model="searchContractForm.startDate" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨绛捐鏃ユ湡" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.startDate != ''" @click="searchContractForm.startDate = ''"></u-icon>-->
</u-form-item>
- <u-form-item labelWidth="18%" label="缁撴潫鏃ユ湡" borderBottom ref="compRef">
- <u--input @focus="selectContractEndTimeShow = true" v-model="searchContractForm.endDate" placeholder="鐐瑰嚮閫夋嫨缁撴潫鏃ユ湡" border="none"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.endDate != ''" @click="searchContractForm.endDate = ''"></u-icon>
+ <u-form-item labelWidth="20%" label="缁撴潫鏃ユ湡" borderBottom ref="compRef" @click="selectContractEndTimeShow = true">
+ <u--input v-model="searchContractForm.endDate" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨缁撴潫鏃ユ湡" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.endDate != ''" @click="searchContractForm.endDate = ''"></u-icon>-->
</u-form-item>
</u--form>
</view>
@@ -148,30 +181,31 @@
<u-button text="娓呯┖" @click="selectContractResetFields"></u-button>
</view>
<!-- 鍚堝悓鍒楄〃 -->
+ <!-- 婊氬姩閫氱煡 -->
+ <view class="tapStyle">
+ <u-notice-bar :text="noticeText" fontSize="24"></u-notice-bar>
+ </view>
<view class="tableContract">
<view class="tableBody">
<uni-table border emptyText="鏆傛棤鏇村鏁版嵁">
<uni-tr>
- <uni-th width="100" align="center">缁勭粐缁撴瀯</uni-th>
+ <uni-th width="130" align="center">鐓ょ鍚嶇О</uni-th>
<uni-th width="250" align="center">瀹㈡埛鍚嶇О</uni-th>
- <uni-th width="180" align="center">鐓ょ鍚嶇О</uni-th>
- <uni-th width="220" align="center">鍚堝悓缂栧彿</uni-th>
- <uni-th width="90" align="center">鍚堝悓绫诲瀷</uni-th>
+ <uni-th width="230" align="center">鍚堝悓缂栧彿</uni-th>
+ <uni-th width="100" align="center">鍚堝悓绫诲瀷</uni-th>
<uni-th width="130" align="center">绛捐鏃ユ湡</uni-th>
<uni-th width="130" align="center">缁堟鏃ユ湡</uni-th>
<uni-th width="100" align="center">鍚堝悓鎬婚噺</uni-th>
- <uni-th width="100" align="center">鍚堝悓閲戦</uni-th>
+ <uni-th width="120" align="center">鍚堝悓閲戦</uni-th>
<uni-th width="70" align="center">鐘舵��</uni-th>
+ <uni-th width="130" align="center">缁勭粐缁撴瀯</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in contractData" :key="index">
<uni-td align="center">
- <view :style="tdStyle">{{ item.compName }}</view>
+ <view :style="tdStyle">{{ item.coalNames }}</view>
</uni-td>
<uni-td align="left">
- <view :style="tdStyle">{{ item.customerName }}</view>
- </uni-td>
- <uni-td align="center">
- <view :style="tdStyle">{{ item.coalNames }}</view>
+ <view class="contractTableTd">{{ item.customerName }}</view>
</uni-td>
<uni-td align="left">
<view :style="tdStyle">{{ item.num }}</view>
@@ -194,6 +228,9 @@
<uni-td align="center">
<view :style="tdStyle">{{ item.status }}</view>
</uni-td>
+ <uni-td align="center">
+ <view :style="tdStyle">{{ item.compName }}</view>
+ </uni-td>
</uni-tr>
</uni-table>
</view>
@@ -209,6 +246,10 @@
</uni-tr>
</uni-table>
</view>
+ </view>
+ <!-- 鍚堝悓鍔犺浇鏇村 -->
+ <view class="loadmoreClass">
+ <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="statusContractLoading" @loadmore="loadingContract" fontSize="20" height="30px" />
</view>
<!-- 鍚堝悓绫诲瀷閫夋嫨鍣� -->
<view class="selectContractTypePicker">
@@ -341,25 +382,29 @@
</view>
</view>
</template>
- <u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1"><u--input v-model="addContractTransport"></u--input></u-form-item>
+ <u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1">
+ <u--input v-model="addContractTransport" disabled disabledColor="#ffffff"></u--input>
+ </u-form-item>
</view>
<view class="formDownCard">
<u-form-item label="鍗曚环" labelWidth="20%" ref="item1">
<u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff" border="none"></u--input>
</u-form-item>
- <u-form-item label="璁㈠崟閲戦" labelWidth="20%" ref="item1"><u--input v-show="currentRowComputed" v-model="addContractFormdata.amount"></u--input></u-form-item>
+ <u-form-item label="璁㈠崟閲戦" labelWidth="20%" ref="item1">
+ <u--input :disabled="addContractFormdata.trainType == 2" v-show="currentRowComputed" v-model="addContractFormdata.amount"></u--input>
+ </u-form-item>
<u-form-item label="璁㈠崟鏁伴噺" labelWidth="20%" ref="item1">
- <u--input v-model="addContractFormdata.quant" disabled disabledColor="#ffffff" border="none"></u--input>
+ <u--input :disabled="addContractFormdata.trainType == 1" @input="jisuanAmount" v-model="addContractFormdata.quant"></u--input>
</u-form-item>
</view>
<!-- <u-form-item label="鍙戠珯" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.fromStation" border="none"></u--input></u-form-item>
- <u-form-item label="鍒扮珯" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.toStation" border="none"></u--input></u-form-item>
- <u-form-item label="杩愯垂" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost1" border="none"></u--input></u-form-item>
- <u-form-item label="鎶戝皹璐�" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost2" border="none"></u--input></u-form-item> -->
+ <u-form-item label="鍒扮珯" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.toStation" border="none"></u--input></u-form-item>
+ <u-form-item label="杩愯垂" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost1" border="none"></u--input></u-form-item>
+ <u-form-item label="鎶戝皹璐�" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost2" border="none"></u--input></u-form-item> -->
</u--form>
- <view class="addContractConfirm"><u-button text="娣诲姞" type="primary" @click="addContractSanConfirm"></u-button></view>
+ <view class="addContractConfirm"><u-button :text="editApplicationIndex != null ? '娣诲姞淇敼' : '娣诲姞'" type="primary" @click="addContractSanConfirm"></u-button></view>
</view>
<!-- 閫夋嫨鐓ゅ巶 -->
@@ -388,7 +433,7 @@
<view :style="tdStyle">{{ item.compName }}</view>
</uni-td>
<uni-td align="left">
- <view :style="tdStyle">{{ item.remark }}</view>
+ <view :style="tdStyle">{{ item.remark == null ? '' : item.remark }}</view>
</uni-td>
</uni-tr>
</uni-table>
@@ -420,15 +465,15 @@
<u--form labelPosition="left" :model="searchCustomerForm" ref="selectformRef">
<u-form-item labelWidth="12%" label="鍗曚綅" borderBottom ref="compRef">
<u--input @focus="selectCustomerCompShow = true" v-model="searchCustomerForm.compName" placeholder="鐐瑰嚮閫夋嫨鍗曚綅" border="none"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon>
+ <u-icon slot="right" name="close-circle-fill" v-if="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon>
</u-form-item>
<u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
- <u--input v-model="selectCustomerData.customerName" border="none" placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="selectCustomerData.customerName != ''" @click="selectCustomerData.customerName = ''"></u-icon>
+ <u--input v-model="selectCustomerData.customerFullName" border="none" placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
+ <u-icon slot="right" name="close-circle-fill" v-if="selectCustomerData.customerFullName != ''" @click="selectCustomerData.customerName = ''"></u-icon>
</u-form-item>
<u-form-item labelWidth="20%" label="瀹㈡埛绾у埆" borderBottom>
<u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-show="searchCustomerForm.levelText != ''" @click="searchCustomerForm.levelText = ''"></u-icon>
+ <u-icon slot="right" name="close-circle-fill" v-if="searchCustomerForm.levelText != ''" @click="searchCustomerForm.levelText = ''"></u-icon>
</u-form-item>
</u--form>
</view>
@@ -440,7 +485,7 @@
<view class="searchResultList">
<u-cell-group :right-icon="false">
<u-cell v-for="(item, index) in customerData" :title="item.customerFullName" :arrow="false">
- <text slot="value" class="u-slot-value">
+ <view slot="value" class="u-slot-value">
<button
class="mini-btn"
type="default"
@@ -457,9 +502,12 @@
>
閫夋嫨
</button>
- </text>
+ </view>
</u-cell>
</u-cell-group>
+ </view>
+ <view class="loadmoreClass">
+ <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px" />
</view>
<!-- 閫夋嫨鐢ㄦ埛鑿滃崟椤� -->
<view class="selectCustomerCompSheet">
@@ -513,31 +561,41 @@
<view class="newApplicationTable">
<!-- <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁">
- <uni-tr v-for="(item, index) in 12" :key="index">
- <uni-th align="center">瀛楁鏍囬</uni-th>
- <uni-td>
- <view class="text">杈撳叆/閫夋嫨鍐呭</view>
- <view class="icon"><image src="@/static/icon/select.png" mode=""></image></view>
- </uni-td>
- </uni-tr>
- <uni-tr>
- <uni-th align="center">鎿嶄綔</uni-th>
- <uni-td>
- <view class="newApplicationTableUtil">
- <u-button type="primary" text="淇敼" size="mini"></u-button>
- <u-button type="error" text="鍒犻櫎" size="mini"></u-button>
- </view>
- </uni-td>
- </uni-tr>
- </uni-table> -->
+ <uni-tr v-for="(item, index) in 12" :key="index">
+ <uni-th align="center">瀛楁鏍囬</uni-th>
+ <uni-td>
+ <view class="text">杈撳叆/閫夋嫨鍐呭</view>
+ <view class="icon"><image src="@/static/icon/select.png" mode=""></image></view>
+ </uni-td>
+ </uni-tr>
+ <uni-tr>
+ <uni-th align="center">鎿嶄綔</uni-th>
+ <uni-td>
+ <view class="newApplicationTableUtil">
+ <u-button type="primary" text="淇敼" size="mini"></u-button>
+ <u-button type="error" text="鍒犻櫎" size="mini"></u-button>
+ </view>
+ </uni-td>
+ </uni-tr>
+ </uni-table> -->
<view class="balanceNo" v-if="accountDetails.balanceTotal < 0"><text style="color:red;">瀹㈡埛璐︽埛褰撳墠澶勪簬娆犳鐘舵��</text></view>
<view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0">
- <text style="color: #FFA500;;">瀹㈡埛璐︽埛鐜版眹浣欓:{{ accountDetails.balanceTotal }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text>
+ <text style="color: #FFA500;">
+ 瀹㈡埛璐︽埛鐜版眹浣欓:{{ accountDetails.balance == null || undefined ? 0 : accountDetails.balance.toFixed(2) }},鎵垮厬浣欓锛歿{
+ accountDetails.balance2 == null || undefined ? 0 : accountDetails.balance2
+ }}
+ </text>
</view>
<u-swipe-action>
- <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in this.newFormData.contractOrders" :key="index">
+ <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index">
<view class="cardList">
+ <view
+ v-if="!newFormData.id"
+ class="cardListIcon"
+ @click="editApplicationClick(index)">
+ <u-icon name="edit-pen" color="#2979ff" size="35"></u-icon>
+ </view>
<view class="cardList-container">
<view class="cardList_item">
鏀惰揣浜猴細
@@ -561,7 +619,8 @@
</view>
<view class="">
杩愯緭锛�
- <text>{{ item.trainType == 1 ? '璺繍' : '鍦伴攢' }}</text>
+<!-- <text>{{ item.trainType == 1 ? '璺繍' : '鍦伴攢' }}</text>-->
+ <text>{{ item.trainType == 1 ? '鍦伴攢' : '璺繍' }}</text>
</view>
</view>
<view class="cardList_item">
@@ -574,20 +633,20 @@
<text>{{ item.amount }}</text>
</view>
<!-- <view class="">
- 璁㈠崟鏁伴噺锛�<text>218.899</text>
- </view> -->
+ 璁㈠崟鏁伴噺锛�<text>218.899</text>
+ </view> -->
</view>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
- <view class="addCard" @click="addContractClick">
+ <view class="addCard" @click="addContractClick" v-if="!newFormData.id">
<view class="addCard-icon"><u-icon name="plus" size="100"></u-icon></view>
</view>
</view>
- <view class="new-application-button">
+ <view class="new-application-button" v-if="!newFormData.id">
<u-button text="鍙栨秷" :plain="true" type="primary" @click="backPage"></u-button>
<u-button text="纭畾" type="primary" @click="newApplicationFormDataClick"></u-button>
</view>
@@ -600,6 +659,7 @@
<script>
import combinationTitle from '@/components/common/combined-title/combined-title.vue';
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
+import { callWithErrorHandling } from 'vue';
// 鏈�澶ф樉绀虹殑鏃ユ湡
const d = new Date();
@@ -610,8 +670,13 @@
export default {
data() {
return {
+ noticeText:'宸﹀彸婊戝姩琛ㄦ牸鍙煡鐪嬫洿澶氳鎯�',
+ // 璐﹀閫夋嫨鍣�
+ selectLedgerShow: false,
+ ledgerList: [],
+ ledgerName: '',
// accountMsgType: 'error',
- tdStyle: 'max-height: 30px;overflow: scroll;',
+ tdStyle: 'max-height: 30px;overflow: auto;',
spanStyle: 'overflow:auto',
newFormData: {
amount: null,
@@ -633,7 +698,9 @@
quant: null,
remark: '',
startDate: '',
- type: '澶栭攢'
+ type: '',
+ ledgerId: null
+ // ledgerName:''
},
accountDetails: {},
// 鏃堕棿
@@ -678,15 +745,16 @@
// 鏃堕棿
timeShow: false,
mode: 'range',
- maxDate: `${year}-${month}-${date + 80}`,
// 閫夋嫨瀹㈡埛
selectCustomerData: {
compIds: '',
- customerName: '',
+ customerFullName: '',
level: '',
current: 1,
size: 10
},
+ status: 'loadmore',
+ customerDataAllNum: 0, //瀹㈡埛鍒楄〃鎬绘潯鏁�
account: null, //瀹㈡埛璐︽埛淇℃伅
// 鎼滅储瀛楁
selectCompsData: [],
@@ -701,12 +769,21 @@
selectCustomerActions: [],
// 绾у埆
selectLevelShow: false,
- levelList: [{ name: '涓�鏄熺骇', value: 'A' }, { name: '浜屾槦绾�', value: 'B' }, { name: '涓夋槦绾�', value: 'C' }, { name: '鍥涙槦绾�', value: 'D' }, { name: '浜旀槦绾�', value: 'E' }],
+ levelList: [
+ { name: '涓�鏄熺骇', value: 'A' },
+ { name: '浜屾槦绾�', value: 'B' },
+ { name: '涓夋槦绾�', value: 'C' },
+ {
+ name: '鍥涙槦绾�',
+ value: 'D'
+ },
+ { name: '浜旀槦绾�', value: 'E' }
+ ],
// 閫夋嫨鍚堝悓
selectContractShow: false,
searchContractForm: {
current: 1,
- size: 10,
+ size: 50,
num: '',
startDate: '',
endDate: '',
@@ -714,7 +791,10 @@
type: '',
customerName: ''
},
+ statusContractLoading: 'loadmore',
+ contractDataAllNum: 0, // 鍚堝悓鎬绘暟
contractData: [],
+ contractNumList: [],
// 绫诲瀷
selectContractTypeShow: false,
selectContractTypeData: [[]],
@@ -726,31 +806,7 @@
addContractShow: false,
// 娣诲姞鍚堝悓琛ㄥ崟
addContractRules: {},
- addContractFormdata: {
- // amount: null,
- // coalId: null,
- // coalName: '',
- // compId: null,
- // compName: '',
- // cost1: '',
- // cost2: '',
- // customerId: null,
- // customerName: '',
- // edit: true,
- // favouredpolicyIds: '',
- // filedId: null,
- // filedName: '',
- // fromStation: '',
- // modifyId: null,
- // modifyInfoId: null,
- // customerAddressId: null,
- // price: null,
- // priceMode: '0',
- // quant: '',
- // toStation: '',
- // trainType: 1,
- // type: ''
- },
+ addContractFormdata: {},
contractDetails: [], // 閫夋嫨鐨勫悎鍚岃鎯�
// 閫夋嫨鐓ゅ巶
coalFiledSelectShow: false,
@@ -773,27 +829,7 @@
// 鍝佺浠锋牸琛ㄦ牸
loading: false,
// 浠锋牸璇锋眰鍙傛暟
- getNewPriceData: {
- compId: 133,
- compName: '閭㈠彴鐭�',
- customerAddressName: '閭㈠彴鍥芥嘲鍙戠數鏈夐檺璐d换鍏徃',
- customerAddressId: 236,
- coalId: 45,
- coalName: '',
- trainType: 1,
- fromStation: '灏忓悍搴�',
- toStation: '灏忓悍搴�',
- quant: '',
- price: '',
- amount: '',
- priceMode: null,
- filedName: '閭㈠彴鐭夸富鐓ゅ満',
- filedId: 4,
- type: '',
- cost1: '',
- cost2: '',
- edit: true
- },
+ getNewPriceData: {},
dust: null, // 鎶戝皹璐�
trainfreight: {}, //璺繍杩愯垂
// 杩愯緭绫诲瀷
@@ -814,7 +850,8 @@
{
text: '鍒犻櫎'
}
- ]
+ ],
+ editApplicationIndex: null
};
},
onShow() {
@@ -847,7 +884,6 @@
this.addContractFormdata.favouredpolicyIds = favouredpolicyIds;
}
}
-
return temp;
},
showPrice() {
@@ -874,73 +910,41 @@
//杩愯窛
if (this.addContractFormdata.trainType == 2) {
if (e.type.indexOf('A') != -1) {
- //鏍规嵁鍙戠珯鍒扮珯鑾峰彇杩愯窛
- list.push(e);
+ list.push(e); //鏍规嵁鍙戠珯鍒扮珯鑾峰彇杩愯窛
}
}
});
this.favouredpolicyList = list;
-
return true;
},
async currentRowComputed() {
- //鍙樹环鏍肩敤鐨�
- this.changePriceMode(this.addContractFormdata.priceMode);
-
+ this.changePriceMode(this.addContractFormdata.priceMode); //鍙樹环鏍肩敤鐨�
//鍙樿鍗曢噺
- if (this.addContractFormdata.amount > 0 && this.addContractFormdata.price > 0) {
+ if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) {
let price = this.addContractFormdata.price;
- if (this.addContractFormdata.trainType == 2) {
- //濡傛灉璺繍浠锋牸澧炲姞鎶戝皹璐瑰拰杩愯垂
+ if (this.addContractFormdata.trainType == 1) {
+ let q = this.addContractFormdata.amount / price;
+ this.addContractFormdata.quant = q.toFixed(2);
+ this.addContractFormdata.cost1 = null; //杩愯垂
+ this.addContractFormdata.cost2 = null; //鎶戝皹璐�
+ } else if (this.addContractFormdata.trainType == 2) {
+ //濡傛灉璺繍浠锋牸澧炲姞,鎶戝皹璐瑰拰杩愯垂
let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂
price += cost1Price;
price += this.dust;
- }
- let q = this.addContractFormdata.amount / price;
- this.addContractFormdata.quant = q.toFixed(2);
- if (this.addContractFormdata.trainType == 2) {
- let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂
this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //杩愯垂
this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //鎶戝皹璐�
- console.log('杩愯垂锛屾姂灏樿垂锛�', this.addContractFormdata.cost1, this.addContractFormdata.cost2);
- } else {
- this.addContractFormdata.cost1 = null; //杩愯垂
- this.addContractFormdata.cost2 = null; //鎶戝皹璐�
+
+ let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
+ console.log(amount);
+ this.addContractFormdata.amount = amount.toFixed(2);
+ // console.log('杩愯垂锛屾姂灏樿垂锛�', this.addContractFormdata.cost1, this.addContractFormdata.cost2);
}
} else {
this.addContractFormdata.quant = null;
}
- // if (this.currentRow.quant > 0 && this.currentRow.price > 0) {
- // this.currentRow.amount = this.currentRow.quant * this.currentRow.price;
- // return true;
- // }
return true;
}
- // accountMsg() {
- // this.accountMsgType = 'error';
- // if (this.accountDetails) {
- // if (this.accountDetails.balanceType == '璐�') {
- // return '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒';
- // } else {
- // let amount = 0;
- // this.newFormData.contractOrders.forEach(e => {
- // amount += Number(e.amount);
- // });
- // if (this.newFormData.payType == '0') {
- // if (this.accountDetails.balance < amount) {
- // return '瀹㈡埛璐︽埛鐜版眹浣欓涓嶈冻锛岀幇姹囦綑棰�:' + this.accountDetails.balance;
- // }
- // } else {
- // if (this.accountDetails.balance2 < amount) {
- // return '瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + this.accountDetails.balance2;
- // }
- // }
- // }
- // this.accountMsgType = 'warning';
- // return '瀹㈡埛璐︽埛鐜版眹浣欓:' + this.accountDetails.balance + '锛屾壙鍏戜綑棰�:' + (this.accountDetails.balance2 ? this.accountDetails.balance2 : 0);
- // }
- // return null;
- // }
},
watch: {
// 绔嬪嵆澶勭悊 杩涘叆椤甸潰灏辫Е鍙� // immediate: true,
@@ -961,8 +965,27 @@
popupMenu,
combinationTitle
},
+ onLoad(e) {
+ console.log('鎴戞槸璇﹁杩樻槸鏂板----',e)
+ this.newFormData.id = e.id || 0
+ },
methods: {
+ async jisuanAmount() {
+ if (this.addContractFormdata.trainType == 2) {
+ let price = this.addContractFormdata.price;
+ //濡傛灉璺繍浠锋牸澧炲姞鎶戝皹璐瑰拰杩愯垂
+ let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂
+ price += cost1Price;
+ price += this.dust;
+ this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //杩愯垂
+ this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //鎶戝皹璐�
+ let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
+ console.log(amount);
+ this.addContractFormdata.amount = amount.toFixed(2);
+ }
+ },
init() {
+ this.getLedgerList();
this.jcfavouredpolicyitem();
this.coalfiled();
this.coalprice();
@@ -971,6 +994,74 @@
this.others_params();
this.fetchCompTree();
this.getFavouredPolicyItem();
+ this.$reqGet('contract_type').then(res => {
+ console.log('鍚堝悓绫诲瀷', res);
+ res.data.forEach(item => {
+ this.selectContractTypeData[0].push(item.value);
+ });
+ });
+ this.$nextTick(() => {
+ if(this.newFormData.id) {
+ this.$reqGet('formData',{},this.newFormData.id).then(res => {
+ console.log(res,'res====鏌ョ湅====')
+ this.newFormData = res.data
+ console.log(this.newFormData,'this.newFormData====----')
+ if(this.actions.length > 0) { //浠樻鏂瑰紡鍥炴樉
+ this.actions.forEach(item => {
+ console.log(item,'item=====-----')
+ console.log(this.newFormData.payType,'payType')
+ if(this.newFormData.payType == item.value) {
+ this.selectValue = item.name
+ }
+ })
+ }
+ if(this.newFormData.startDate && this.newFormData.endDate) { //鏃ユ湡
+ this.timeDataStr = `${this.newFormData.startDate} - ${this.newFormData.endDate}`
+ }
+
+ })
+ }else {
+
+ }
+ })
+ },
+ /**
+ * 鑾峰彇鍒嗙被璐﹀
+ */
+ getLedgerList() {
+ this.$reqGet('zhaccountledger', { compId: uni.getStorageSync('userInfo').compId }).then(res => {
+ this.ledgerList.push(res.data.records);
+ console.log('璐﹀鍒楄〃', this.ledgerList);
+ if (res.data.records) {
+ this.newFormData.ledgerId = res.data.records[0].id;
+ // this.newFormData.ledgerName = res.data.records[0].name;
+ this.ledgerName = res.data.records[0].name;
+ }
+ });
+ },
+ selectLedger() {
+ this.selectLedgerShow = true;
+ },
+ selectLedgerChange(index) {
+ console.log('璐﹀閫夋嫨鍣�', index);
+ this.ledgerName = index.value[0].name;
+ this.newFormData.ledgerId = index.value[0].id;
+ // this.newFormData.ledgerName = index.value[0].name;
+ if (this.newFormData.customerName || this.newFormData.contractNum || this.newFormData.contractName) {
+ this.newFormData.customerName = '';
+ this.newFormData.contractNum = '';
+ this.newFormData.contractName = '';
+ }
+ },
+ selectLedgerConfirm(index) {
+ console.log('閫夋嫨璐﹀鐐瑰嚮纭畾', index);
+ this.selectLedgerShow = false;
+ },
+ selectLedgerCancel() {
+ this.selectLedgerShow = false;
+ },
+ selectLedgerClose() {
+ this.selectLedgerShow = false;
},
// 閫夋嫨瀹㈡埛
selectCustomer() {
@@ -980,10 +1071,12 @@
title: '鍔犺浇涓�...'
});
this.selectCustomerShow = true;
+ this.selectCustomerData.current = 1;
this.$reqGet('customer', this.selectCustomerData).then(res => {
uni.hideLoading();
if (res.code == 0) {
this.customerData = res.data.records;
+ this.customerDataAllNum = res.data.total;
}
});
},
@@ -1036,29 +1129,63 @@
// 娓呯┖閫夋嫨瀹㈡埛琛ㄥ崟
selectCustomerResetFields() {
this.$refs.selectformRef.resetFields(); // 涓嶈捣鏁堟灉
- this.selectCustomerData.customerName = '';
+ this.selectCustomerData.customerFullName = '';
this.searchCustomerForm.compName = '';
this.searchCustomerForm.levelText = '';
this.selectCustomer();
},
selectCustomerOkClick(v) {
- console.log('id', v);
- this.$reqGet('getAccount', { customerId: v }).then(res => {
+ console.log('澶栧眰瀹㈡埛閫夋嫨', v);
+ this.newFormData.customerName = v.customerName;
+ this.newFormData.customerId = v.id;
+ this.$reqGet('getAccount', { customerId: v.id, ledgerId: this.newFormData.ledgerId }).then(res => {
+ console.log('瀹㈡埛閫夋嫨璐︽埛', res);
this.accountDetails = res.data;
- this.newFormData.customerName = res.data.customerName;
- this.newFormData.customerId = res.data.id;
this.searchContractForm.customerName = res.data.customerName;
+ this.reqContract();
+ this.$nextTick(() => {
+ console.log('zhezhezhe');
+ this.contractData.forEach(item => {
+ this.contractNumList.push(item.num);
+ });
+ console.log('鍚堝悓鍙风爜鍒楄〃', this.contractNumList);
+ // 妫�鏌ユ崲瀹㈡埛鍚庡搴旂殑鍚堝悓
+ if (this.contractNumList.indexOf(this.newFormData.contractNum) > -1) {
+ this.newFormData.contractNum = '';
+ this.newFormData.contractName = '';
+ }
+ });
});
this.$nextTick(() => {
this.selectCustomerShow = false;
});
},
+ loadingCustomer() {
+ console.log('鍔犺浇鏇村浜嬩欢');
+ if (this.selectCustomerData.current >= this.customerDataAllNum / 10) return;
+ this.status = 'loading';
+ this.selectCustomerData.current = ++this.selectCustomerData.current;
+ this.$reqGet('customer', this.selectCustomerData).then(res => {
+ if (this.selectCustomerData.current >= this.customerDataAllNum / 10) {
+ this.status = 'nomore';
+ this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
+ }
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.customerDataAllNum = res.data.total;
+ this.customerData = this.customerData.concat(res.data.records);
+ this.status = 'loadmore';
+ console.log(this.selectCustomerData);
+ }
+ });
+ },
// 鏃堕棿
confirmTime(v) {
this.timeShow = false;
+ console.log('鏃堕棿', v);
v.forEach(e => {
this.newFormData.startDate = v[0];
- this.newFormData.endDate = v[v.lenght - 1];
+ this.newFormData.endDate = v[v.length - 1];
this.timeDataStr = v[0] + ' 鑷� ' + v[v.length - 1];
});
},
@@ -1069,7 +1196,7 @@
if (this.newFormData.contractOrders != []) {
uni.showToast({
title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�',
- icon: 'error',
+ icon: 'none',
duration: 2000
});
}
@@ -1089,14 +1216,6 @@
searchContractFormTypeFocus() {
// 绫诲瀷寮瑰嚭妗�
this.selectContractTypeShow = true;
- // 寮瑰嚭妗嗙被鍨嬭姹�
- this.$nextTick(() => {
- this.$reqGet('contract_type').then(res => {
- res.data.forEach(item => {
- this.selectContractTypeData[0].push(item.value);
- });
- });
- });
},
// 閫夋嫨鍚堝悓寮规
selectContractOpen() {
@@ -1107,11 +1226,40 @@
this.$reqGet('contract_status').then(res => {
console.log('鐘舵��', res);
});
+ this.reqContract();
+ },
+ // 鍚堝悓璇锋眰
+ reqContract() {
+ this.searchContractForm.current = 1;
this.$reqGet('contract', this.searchContractForm).then(res => {
uni.hideLoading();
if (res.code == 0) {
console.log('鍚堝悓', res);
this.contractData = res.data.records;
+ this.contractDataAllNum = res.data.total;
+ }
+ });
+ },
+ // 鍚堝悓鍔犺浇鏇村
+ loadingContract() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ console.log('鍚堝悓鍔犺浇鏇村浜嬩欢', this.statusContractLoading);
+ if (this.searchContractForm.current >= this.contractDataAllNum / 50) return;
+ this.statusContractLoading = 'loading';
+ this.searchContractForm.current = ++this.searchContractForm.current;
+ this.$reqGet('contract', this.searchContractForm).then(res => {
+ if (this.searchContractForm.current >= this.contractDataAllNum / 50) {
+ this.statusContractLoading = 'nomore';
+ this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
+ }
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.contractDataAllNum = res.data.total;
+ this.contractData = this.contractData.concat(res.data.records);
+ this.statusContractLoading = 'loadmore';
+ console.log(this.searchContractForm);
}
});
},
@@ -1161,28 +1309,34 @@
this.newFormData.contractName = e.contractName;
this.newFormData.contractNum = e.num;
this.newFormData.contractId = e.id;
+ this.newFormData.type = e.type;
this.selectContractShow = false;
// 浠锋牸鍙傛暟璧嬪��
this.getNewPriceData.type = e.type;
// 閫夊畾鍚堝悓璇︽儏
- uni
- .request({
- url: `/yunxiao/contractitem/getByContractId/${e.id}`,
- method: 'GET',
- header: {
- 'TENANT-ID': 5,
- Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
- VERSION: 'zzl'
- }
- })
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('getByContractId', {}, e.id)
.then(res => {
- this.contractDetails = res[1].data.data;
- console.log('鍚堝悓璇︽儏', res, this.contractDetails);
+ uni.hideLoading();
+ this.contractDetails = res.data;
+ this.contractDetails.forEach(item => {
+ let a = [{ label: '', id: '' }];
+ a[0].label = item.coalName;
+ a[0].id = item.coalId;
+ if (this.addContractCoalData[0]) {
+ this.addContractCoalData = [];
+ }
+ this.addContractCoalData.push(a);
+ });
})
.catch(err => {
console.log(err);
});
+
+ // 娣诲姞鐓ょ閫夐」
},
// 娣诲姞鍚堝悓鎸夐挳
addContractClick() {
@@ -1193,7 +1347,7 @@
if (this.accountDetails.balanceType == '璐�') {
uni.showToast({
title: '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒',
- icon: 'error',
+ icon: 'none',
duration: 2000
});
} else {
@@ -1232,6 +1386,7 @@
type: ''
};
this.multipleSelection = [];
+ console.log('鏂板缓鍙戣繍鐢宠璁㈠崟', this.addContractFormdata);
}
}
})
@@ -1242,6 +1397,8 @@
// 娣诲姞鍚堝悓寮瑰嚭妗�
addContractClose() {
this.addContractShow = false;
+ this.addContractFormdata = {};
+ this.editApplicationIndex = null;
},
addContractOpen() {
console.log('娣诲姞璁㈠崟鎵撳紑');
@@ -1255,6 +1412,7 @@
},
// 閫夋嫨鐨勭叅鍘�
coalFiledSelectClick(e) {
+ console.log('閫夋嫨鐨勭叅鍘�', e);
this.addContractFormdata.compName = e.compName;
this.addContractFormdata.filedName = e.name;
this.addContractFormdata.compId = e.compId;
@@ -1262,6 +1420,12 @@
this.addContractFormdata.fromStation = e.toStation;
this.selectCoalFiledData = e;
+
+ // 鑾峰彇浠锋牸鍙傛暟
+ this.getNewPriceData.compId = e.compId;
+ this.getNewPriceData.compName = e.compName;
+ this.getNewPriceData.filedId = e.id;
+ this.getNewPriceData.filedName = e.name;
this.coalFiledSelectShow = false;
},
@@ -1277,17 +1441,7 @@
addContractConsigneeConfirm(v) {
this.addContractFormdata.toStation = v.toStation;
this.addContractFormdata.customerName = v.customerName;
- this.$reqGet('getAccount', { customerId: v.id }).then(res => {
- console.log('鑾峰彇鏀惰揣浜鸿处鍙�', res);
- // this.accountDetails = res.data;
- // this.newFormData.customerName = res.data.customerName;
- // this.newFormData.customerId = res.data.id;
- // this.searchContractForm.customerName = res.data.customerName;
- this.addContractFormdata.customerId = res.data.id;
- });
- this.$nextTick(() => {
- this.addContractConsigneeShow = false;
- });
+ this.addContractFormdata.customerId = v.id;
// 璧嬪�肩粰鍙栦环鏍艰姹傚弬鏁�
this.getNewPriceData.customerAddressName = v.customerFullName;
@@ -1296,17 +1450,7 @@
this.addContractFormdata.toStation = v.toStation;
this.addContractFormdata.customerAddressId = v.id;
-
- // 娣诲姞鐓ょ閫夐」
- this.contractDetails.forEach(item => {
- let a = [{ label: '', id: '' }];
- a[0].label = item.coalName;
- a[0].id = item.coalId;
- if(this.addContractCoalData[0]){
- this.addContractCoalData = [];
- }
- this.addContractCoalData.push(a);
- });
+ this.addContractConsigneeShow = false;
},
// 鍝佺閫夋嫨鍣�
addContractCoalConfirm(e) {
@@ -1342,7 +1486,7 @@
// this.currentCoal.type = 1;
// }
this.addContractFormdata.modifyId = data.modifyId;
- this.addContractFormdata.id = data.id;
+ // this.addContractFormdata.id = data.id;
} else {
uni.$u.toast('鐓ょ浠锋牸鏈缃�');
}
@@ -1414,10 +1558,15 @@
},
addContractSanConfirm() {
if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) {
- this.newFormData.contractOrders.push(this.addContractFormdata);
- this.$nextTick(() => {
- this.addContractShow = false;
- });
+ if (this.editApplicationIndex != null) {
+ this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata;
+ } else {
+ this.addContractFormdata.type = this.newFormData.type;
+ this.newFormData.contractOrders.push(this.addContractFormdata);
+ console.log('娣诲姞瀛愯鍗�', this.addContractFormdata);
+ }
+ this.addContractShow = false; // 鍏抽棴寮瑰嚭妗�
+ console.log('this.newFormData.contractOrders褰撳墠鍏抽棴鍚�', this.newFormData.contractOrders);
} else {
uni.$u.toast('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�');
}
@@ -1469,6 +1618,7 @@
// 鑾峰彇鎵�鏈夌殑浼樻儬鏀跨瓥
getFavouredPolicyItem() {
this.$reqGet('getFavouredPolicyItem', { current: 1, size: 1000, status: 0 }).then(res => {
+ console.log('鎵�鏈変紭鎯犳斂绛�', res.data.records);
this.favouredpolicyListAll = res.data.records;
});
},
@@ -1502,25 +1652,33 @@
amount += Number(e.amount);
});
if (this.newFormData.payType == '0') {
- if (this.accountDetails.balance < amount) {
+ if (this.newFormData.contractOrders.length <= 0) {
+ this.$u.toast('璇锋坊鍔犺鍗曞瓙椤癸紒');
+ return false;
+ } else if (this.accountDetails.balance < amount) {
let msg = this.accountDetails.balance == null ? 0 : this.accountDetails.balance;
uni.showToast({
title: '瀹㈡埛璐︽埛鐜版眹浣欓涓嶈冻锛岀幇姹囦綑棰�:' + msg,
- icon: 'error',
+ icon: 'none',
duration: 2000
});
} else {
+ console.log('鎻愪氦鏁翠綋', this.newFormData);
this.xswaybill();
}
} else {
- if (this.accountDetails.balance2 < amount) {
+ if (this.newFormData.contractOrders.length <= 0) {
+ this.$u.toast('璇锋坊鍔犺鍗曞瓙椤癸紒');
+ return false;
+ } else if (this.accountDetails.balance2 < amount) {
let msg = this.accountDetails.balance2 == null ? 0 : this.accountDetails.balance2;
uni.showToast({
title: '瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg,
- icon: 'error',
+ icon: 'none',
duration: 2000
});
} else {
+ console.log('鎻愪氦鏁翠綋', this.newFormData);
this.xswaybill();
}
}
@@ -1534,8 +1692,13 @@
console.log('鍒犻櫎璁㈠崟鍗$墖', e);
this.newFormData.contractOrders.splice(e, 1);
},
+ editApplicationClick(index) {
+ this.editApplicationIndex = index;
+ this.addContractFormdata = this.newFormData.contractOrders[index];
+ this.addContractShow = true;
+ },
xswaybill() {
- console.log('鏂板缓鍙戣繍鐢宠');
+ console.log('鏂板缓鍙戣繍鐢宠', this.newFormData);
uni.showLoading({
title: '鍔犺浇涓�...'
});
@@ -1543,17 +1706,13 @@
uni.hideLoading();
console.log('鏂板缓鍙戣繍鐢宠', res);
if (res.code == 0) {
- uni.showToast({
- title: '娣诲姞鎴愬姛锛�',
- icon: 'success',
- duration: 2000
- });
- this.$nextTick(() => {
+ this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�');
+ setTimeout(() => {
uni.navigateBack({
// url: '/pages/my-application/my-application'
delta: 2
});
- });
+ }, 1500);
}
});
},
@@ -1575,11 +1734,13 @@
.newApplicationTitle {
margin-bottom: 0;
}
+
// 琛ㄥ崟
.formDataContaniner {
.u-form {
width: 91%;
margin: 0 auto 0;
+
.u-form-item {
.u-form-item__body {
.u-form-item__body__left {
@@ -1588,6 +1749,7 @@
}
}
}
+
.u-form-item__body__right {
.u-form-item__body__right__content {
.u-form-item__body__right__content__slot {
@@ -1604,38 +1766,62 @@
.u-popup {
.u-transition {
height: 95%;
+
.u-popup__content {
overflow: scroll !important;
+
.selectCustomerTitle {
margin-bottom: 0;
}
+
.selectCustomerContainer {
padding: 0 4%;
+ // .loadmoreClass{
+ // .u-loadmore{
+ // .u-loadmore__content{
+ // .u-loadmore__content__text{
+ // }
+ // }
+ // }
+ // }
.searchContainer {
+ .u-input {
+ width: 90%;
+ }
}
+
.searchCustomerBtn {
margin-top: vww(10);
display: flex;
+
.u-button {
width: 30%;
}
}
+
// 鏁版嵁鍒楄〃
.searchResultList {
margin-top: vww(16);
}
+ // 婊氬姩閫氱煡
+ .tapStyle{
+ margin-top: vww(30);
+ }
+
// 鍚堝悓琛ㄦ牸
.tableContract {
- margin-top: vww(30);
display: flex;
justify-content: center;
+
.uni-table-scroll {
min-width: 0 !important;
+
.uni-table {
.uni-table-tr {
padding: 0;
font-size: vww(13);
+
.uni-table-th {
width: vww(100);
height: vww(32);
@@ -1654,15 +1840,25 @@
}
}
}
+
.tableBody {
width: 80%;
+ .contractTableTd {
+ width: vww(200);
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
}
+
.TableUtilBtn {
width: 20%;
overflow: hidden;
+
.uni-table {
min-width: 0 !important;
}
+
.TableUtilBtnContainer {
.u-button {
width: vww(20);
@@ -1704,6 +1900,7 @@
}
}
}
+
.selectContractEndTime {
.u-popup {
.u-transition {
@@ -1722,8 +1919,10 @@
.u-popup {
.u-transition {
height: 95%;
+
.u-popup__content {
overflow: scroll !important;
+
.addContractFormTitle {
margin-bottom: 0;
}
@@ -1731,11 +1930,13 @@
// 鎼滅储
.coalFiledSelectSearch {
}
+
// 閫夋嫨鐓ょ
.coalFiledSelectPopup {
.u-popup {
.u-transition {
height: 80%;
+
.u-popup__content {
overflow: scroll !important;
// 琛ㄦ牸
@@ -1744,12 +1945,15 @@
display: flex;
justify-content: center;
margin: 0 auto;
+
.uni-table-scroll {
min-width: 0 !important;
+
.uni-table {
.uni-table-tr {
padding: 0;
font-size: vww(13);
+
.uni-table-th {
width: vww(100);
height: vww(32);
@@ -1768,15 +1972,19 @@
}
}
}
+
.tableBody {
width: 80%;
}
+
.TableUtilBtn {
width: 20%;
overflow: hidden;
+
.uni-table {
min-width: 0 !important;
}
+
.TableUtilBtnContainer {
.u-button {
width: vww(20);
@@ -1798,9 +2006,11 @@
.u-popup {
.u-transition {
height: 95%;
+
.u-popup__content {
// background-color: rgb(247, 247, 247);
overflow: scroll !important;
+
.addContractForm {
width: 92%;
margin: 0 auto;
@@ -1837,16 +2047,19 @@
box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
// margin-top:vww(10);
background-color: #ffffff;
+
.currentPriceContainer {
.currentPriceBox {
width: 92%;
margin: 0 auto;
}
}
+
.selectPriceContainer {
.selectPricebox {
width: 92%;
margin: 0 auto;
+
.selectPriceboxItem {
display: flex;
justify-content: space-between;
@@ -1855,6 +2068,7 @@
}
}
}
+
.formDownCard {
border-radius: vww(4);
padding: vww(10);
@@ -1887,10 +2101,12 @@
width: 100%;
padding: vww(0) vww(10) vww(60) vww(10);
box-sizing: border-box;
+
.u-swipe-action {
.u-swipe-action-item {
box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5;
margin-top: vww(10);
+
.u-swipe-action-item__right {
.u-swipe-action-item__right__button {
.u-swipe-action-item__right__button__wrapper {
@@ -1900,17 +2116,28 @@
}
}
}
+
.cardList {
height: vww(130);
border-radius: vww(4);
padding: vww(10);
+ position: relative;
+
+ .cardListIcon {
+ position: absolute;
+ right: vww(20);
+ top: vww(20);
+ }
+
.cardList-container {
.cardList_item {
margin-top: vww(12);
font-size: 14px;
display: flex;
+
view {
width: 50%;
+
&:nth-child(2) {
margin-left: vww(20);
}
@@ -1918,6 +2145,7 @@
}
}
}
+
.addCard {
width: 100%;
height: vww(130);
--
Gitblit v1.9.1