From 8fc8838a441ae3d3b1616f4fc003b16292978b54 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期一, 19 十二月 2022 11:19:45 +0800 Subject: [PATCH] 注册,登录,主页,日计划的修改 --- pages/new-application-form-data/new-application-form-data.vue | 557 ++++++++++++++++++++++++++++++++---------------------- 1 files changed, 328 insertions(+), 229 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 b53c266..0760daa 100644 --- a/pages/new-application-form-data/new-application-form-data.vue +++ b/pages/new-application-form-data/new-application-form-data.vue @@ -11,11 +11,14 @@ <!-- <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> @@ -122,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> @@ -149,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> @@ -195,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> @@ -210,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"> @@ -342,7 +382,9 @@ </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"> @@ -357,12 +399,12 @@ </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="editApplicationIndex != null ? '娣诲姞淇敼':'娣诲姞'" type="primary" @click="addContractSanConfirm"></u-button></view> + <view class="addContractConfirm"><u-button :text="editApplicationIndex != null ? '娣诲姞淇敼' : '娣诲姞'" type="primary" @click="addContractSanConfirm"></u-button></view> </view> <!-- 閫夋嫨鐓ゅ巶 --> @@ -423,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> @@ -519,27 +561,31 @@ <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 == null ? 0 :accountDetails.balanceTotal.toFixed(2) }},鎵垮厬浣欓锛歿{ 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 newFormData.contractOrders" :key="index"> @@ -581,8 +627,8 @@ <text>{{ item.amount }}</text> </view> <!-- <view class=""> - 璁㈠崟鏁伴噺锛�<text>218.899</text> - </view> --> + 璁㈠崟鏁伴噺锛�<text>218.899</text> + </view> --> </view> </view> </view> @@ -607,6 +653,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(); @@ -617,8 +664,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, @@ -640,7 +692,9 @@ quant: null, remark: '', startDate: '', - type: '澶栭攢' + type: '', + ledgerId: null + // ledgerName:'' }, accountDetails: {}, // 鏃堕棿 @@ -685,11 +739,10 @@ // 鏃堕棿 timeShow: false, mode: 'range', - maxDate: `${year}-${month}-${date + 70}`, // 閫夋嫨瀹㈡埛 selectCustomerData: { compIds: '', - customerName: '', + customerFullName: '', level: '', current: 1, size: 10 @@ -710,12 +763,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: '', @@ -723,6 +785,8 @@ type: '', customerName: '' }, + statusContractLoading: 'loadmore', + contractDataAllNum: 0, // 鍚堝悓鎬绘暟 contractData: [], contractNumList: [], // 绫诲瀷 @@ -736,31 +800,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, @@ -783,27 +823,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: {}, //璺繍杩愯垂 // 杩愯緭绫诲瀷 @@ -825,7 +845,7 @@ text: '鍒犻櫎' } ], - editApplicationIndex:null + editApplicationIndex: null }; }, onShow() { @@ -858,7 +878,6 @@ this.addContractFormdata.favouredpolicyIds = favouredpolicyIds; } } - return temp; }, showPrice() { @@ -885,20 +904,15 @@ //杩愯窛 if (this.addContractFormdata.trainType == 2) { if (e.type.indexOf('A') != -1) { - //鏍规嵁鍙戠珯鍒扮珯鑾峰彇杩愯窛 - list.push(e); + list.push(e); //鏍规嵁鍙戠珯鍒扮珯鑾峰彇杩愯窛 } } }); this.favouredpolicyList = list; - return true; }, async currentRowComputed() { - console.log('currentRowComputed'); - //鍙樹环鏍肩敤鐨� - this.changePriceMode(this.addContractFormdata.priceMode); - + this.changePriceMode(this.addContractFormdata.priceMode); //鍙樹环鏍肩敤鐨� //鍙樿鍗曢噺 if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) { let price = this.addContractFormdata.price; @@ -908,7 +922,7 @@ 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; @@ -925,31 +939,6 @@ } 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, @@ -981,11 +970,12 @@ 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); + console.log(amount); this.addContractFormdata.amount = amount.toFixed(2); } }, init() { + this.getLedgerList(); this.jcfavouredpolicyitem(); this.coalfiled(); this.coalprice(); @@ -994,6 +984,50 @@ 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); + }); + }); + }, + /** + * 鑾峰彇鍒嗙被璐﹀ + */ + 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() { @@ -1005,7 +1039,6 @@ this.selectCustomerShow = true; this.selectCustomerData.current = 1; this.$reqGet('customer', this.selectCustomerData).then(res => { - console.log('瀹㈡埛鍛靛懙鍝堝搱鍝堟垨', res); uni.hideLoading(); if (res.code == 0) { this.customerData = res.data.records; @@ -1062,7 +1095,7 @@ // 娓呯┖閫夋嫨瀹㈡埛琛ㄥ崟 selectCustomerResetFields() { this.$refs.selectformRef.resetFields(); // 涓嶈捣鏁堟灉 - this.selectCustomerData.customerName = ''; + this.selectCustomerData.customerFullName = ''; this.searchCustomerForm.compName = ''; this.searchCustomerForm.levelText = ''; this.selectCustomer(); @@ -1071,12 +1104,13 @@ console.log('澶栧眰瀹㈡埛閫夋嫨', v); this.newFormData.customerName = v.customerName; this.newFormData.customerId = v.id; - this.$reqGet('getAccount', { customerId: v.id }).then(res => { + this.$reqGet('getAccount', { customerId: v.id, ledgerId: this.newFormData.ledgerId }).then(res => { console.log('瀹㈡埛閫夋嫨璐︽埛', res); this.accountDetails = res.data; this.searchContractForm.customerName = res.data.customerName; this.reqContract(); this.$nextTick(() => { + console.log('zhezhezhe'); this.contractData.forEach(item => { this.contractNumList.push(item.num); }); @@ -1114,9 +1148,10 @@ // 鏃堕棿 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]; }); }, @@ -1127,7 +1162,7 @@ if (this.newFormData.contractOrders != []) { uni.showToast({ title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�', - icon: 'error', + icon: 'none', duration: 2000 }); } @@ -1147,14 +1182,6 @@ searchContractFormTypeFocus() { // 绫诲瀷寮瑰嚭妗� this.selectContractTypeShow = true; - // 寮瑰嚭妗嗙被鍨嬭姹� - this.$nextTick(() => { - this.$reqGet('contract_type').then(res => { - res.data.forEach(item => { - this.selectContractTypeData[0].push(item.value); - }); - }); - }); }, // 閫夋嫨鍚堝悓寮规 selectContractOpen() { @@ -1169,11 +1196,36 @@ }, // 鍚堝悓璇锋眰 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); } }); }, @@ -1223,16 +1275,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; - // 閫夊畾鍚堝悓璇︽儏 - this.$reqGet('getByContractId',{},e.id).then(res=>{ - this.contractDetails = res.data - }).catch(err=>{ - console.log(err); - }) + // 閫夊畾鍚堝悓璇︽儏 + uni.showLoading({ + title: '鍔犺浇涓�...' + }); + this.$reqGet('getByContractId', {}, e.id) + .then(res => { + 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() { @@ -1243,7 +1313,7 @@ if (this.accountDetails.balanceType == '璐�') { uni.showToast({ title: '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒', - icon: 'error', + icon: 'none', duration: 2000 }); } else { @@ -1282,6 +1352,7 @@ type: '' }; this.multipleSelection = []; + console.log('鏂板缓鍙戣繍鐢宠璁㈠崟', this.addContractFormdata); } } }) @@ -1307,7 +1378,7 @@ }, // 閫夋嫨鐨勭叅鍘� coalFiledSelectClick(e) { - console.log('閫夋嫨鐨勭叅鍘�',e); + console.log('閫夋嫨鐨勭叅鍘�', e); this.addContractFormdata.compName = e.compName; this.addContractFormdata.filedName = e.name; this.addContractFormdata.compId = e.compId; @@ -1317,13 +1388,12 @@ this.selectCoalFiledData = e; // 鑾峰彇浠锋牸鍙傛暟 - this.getNewPriceData.compId = e.compId; - this.getNewPriceData.compName = e.compName; - this.getNewPriceData.filedId = e.id; - this.getNewPriceData.filedName = e.name; + this.getNewPriceData.compId = e.compId; + this.getNewPriceData.compName = e.compName; + this.getNewPriceData.filedId = e.id; + this.getNewPriceData.filedName = e.name; - - this.coalFiledSelectShow = false; + this.coalFiledSelectShow = false; }, // 鏀惰揣浜� addContractConsigneeClose() { @@ -1335,20 +1405,9 @@ this.addContractConsigneeShow = true; }, addContractConsigneeConfirm(v) { - console.log('鏀惰揣浜�', v); this.addContractFormdata.toStation = v.toStation; this.addContractFormdata.customerName = v.customerName; this.addContractFormdata.customerId = v.id; - 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.$nextTick(() => { - this.addContractConsigneeShow = false; - }); // 璧嬪�肩粰鍙栦环鏍艰姹傚弬鏁� this.getNewPriceData.customerAddressName = v.customerFullName; @@ -1357,17 +1416,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) { @@ -1475,14 +1524,15 @@ }, addContractSanConfirm() { if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) { - if(this.editApplicationIndex != null){ - this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata; - } else { - this.newFormData.contractOrders.push(this.addContractFormdata); - console.log('娣诲姞瀛愯鍗�',this.addContractFormdata); - } - this.addContractShow = false;// 鍏抽棴寮瑰嚭妗� - console.log('this.newFormData.contractOrders褰撳墠鍏抽棴鍚�',this.newFormData.contractOrders) + 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('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�'); } @@ -1575,11 +1625,11 @@ 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); + console.log('鎻愪氦鏁翠綋', this.newFormData); this.xswaybill(); } } else { @@ -1590,11 +1640,11 @@ 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); + console.log('鎻愪氦鏁翠綋', this.newFormData); this.xswaybill(); } } @@ -1608,11 +1658,11 @@ console.log('鍒犻櫎璁㈠崟鍗$墖', e); this.newFormData.contractOrders.splice(e, 1); }, - editApplicationClick(index){ - this.editApplicationIndex = index; - this.addContractFormdata = this.newFormData.contractOrders[index]; - this.addContractShow = true; - }, + editApplicationClick(index) { + this.editApplicationIndex = index; + this.addContractFormdata = this.newFormData.contractOrders[index]; + this.addContractShow = true; + }, xswaybill() { console.log('鏂板缓鍙戣繍鐢宠', this.newFormData); uni.showLoading({ @@ -1622,19 +1672,13 @@ uni.hideLoading(); console.log('鏂板缓鍙戣繍鐢宠', res); if (res.code == 0) { - // uni.showToast({ - // title: '娣诲姞鎴愬姛锛�', - // icon: 'success', - // duration: 1000 - // }); - this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�') + this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�'); setTimeout(() => { - uni.navigateBack({ - // url: '/pages/my-application/my-application' - delta: 2 - }); - },2000) - + uni.navigateBack({ + // url: '/pages/my-application/my-application' + delta: 2 + }); + }, 1500); } }); }, @@ -1656,11 +1700,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 { @@ -1669,6 +1715,7 @@ } } } + .u-form-item__body__right { .u-form-item__body__right__content { .u-form-item__body__right__content__slot { @@ -1685,11 +1732,14 @@ .u-popup { .u-transition { height: 95%; + .u-popup__content { overflow: scroll !important; + .selectCustomerTitle { margin-bottom: 0; } + .selectCustomerContainer { padding: 0 4%; // .loadmoreClass{ @@ -1701,30 +1751,43 @@ // } // } .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); @@ -1743,15 +1806,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); @@ -1793,6 +1866,7 @@ } } } + .selectContractEndTime { .u-popup { .u-transition { @@ -1811,8 +1885,10 @@ .u-popup { .u-transition { height: 95%; + .u-popup__content { overflow: scroll !important; + .addContractFormTitle { margin-bottom: 0; } @@ -1820,11 +1896,13 @@ // 鎼滅储 .coalFiledSelectSearch { } + // 閫夋嫨鐓ょ .coalFiledSelectPopup { .u-popup { .u-transition { height: 80%; + .u-popup__content { overflow: scroll !important; // 琛ㄦ牸 @@ -1833,12 +1911,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); @@ -1857,15 +1938,19 @@ } } } + .tableBody { width: 80%; } + .TableUtilBtn { width: 20%; overflow: hidden; + .uni-table { min-width: 0 !important; } + .TableUtilBtnContainer { .u-button { width: vww(20); @@ -1887,9 +1972,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; @@ -1926,16 +2013,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; @@ -1944,6 +2034,7 @@ } } } + .formDownCard { border-radius: vww(4); padding: vww(10); @@ -1976,10 +2067,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 { @@ -1989,23 +2082,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); } @@ -2013,6 +2111,7 @@ } } } + .addCard { width: 100%; height: vww(130); -- Gitblit v1.9.1