From 548b97b82e741b67c4258661352ae28462a34f66 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 28 七月 2022 19:00:58 +0800 Subject: [PATCH] editDetails --- pages/new-application-form-data/new-application-form-data.vue | 103 pages/home/home.vue | 30 pages/login/login.vue | 9 pages/my-have-todo/my-have-todo.vue | 1073 ++++--- pages/edit-my-application/edit-my-application.vue | 4393 +++++++++++++++-------------- components/common/popup-menu/popup-menu.vue | 312 +- static/iconfont/iconfont.css | 2 App.vue | 2 components/common/data-select-box/data-select-box.vue | 6 utils/request.js | 8 pages/my-todo/my-todo.vue | 1474 +++++---- api/global.js | 5 pages/my-application/my-application.vue | 1482 +++++---- 13 files changed, 4,701 insertions(+), 4,198 deletions(-) diff --git a/App.vue b/App.vue index 7d90a6b..5111643 100644 --- a/App.vue +++ b/App.vue @@ -15,5 +15,5 @@ <style lang="scss"> /*姣忎釜椤甸潰鍏叡css */ @import '@/uni_modules/uview-ui/index.scss'; - @import "./static/iconfont/iconfont.css"; + @import "@/static/iconfont/iconfont.css"; </style> diff --git a/api/global.js b/api/global.js index a0e15ad..5c99721 100644 --- a/api/global.js +++ b/api/global.js @@ -27,6 +27,8 @@ }); } +const baseUrl = 'http://192.168.3.159:9999' + // POST璇锋眰 function apiLogin({ username, @@ -38,7 +40,7 @@ return new Promise((resolve, reject) => { uni.request({ - url: "/auth/oauth/token?grant_type=password&scope=server", + url: baseUrl + "/auth/oauth/token?grant_type=password&scope=server", method: "POST", data: { username, @@ -55,6 +57,7 @@ resolve(res); }, fail: (err) => { + console.log('閿欒',err); uni.hideLoading(); uni.showToast({ icon: 'none', diff --git a/components/common/data-select-box/data-select-box.vue b/components/common/data-select-box/data-select-box.vue index ec1e908..98bf363 100644 --- a/components/common/data-select-box/data-select-box.vue +++ b/components/common/data-select-box/data-select-box.vue @@ -1,7 +1,7 @@ <template> <view class="data-selet" > <view class="data-selet-content"> - <view class="uni-select__icon" :class="{'activeIcon':isActive}"><uni-icons type="bottom" size="20" color="#dddddd"></uni-icons></image></view> + <view class="uni-select__icon" :class="{'activeIcon':isActive}"><uni-icons type="bottom" size="20" color="#dddddd"></uni-icons></view> <view class="content" @tap="clickHandler"> <input :placeholder="placeholder" :disabled="true" type="text" :value="value" @input="inputChange" style="font-size: 14px;" placeholder-style="color:#cccccc"> </view> @@ -95,8 +95,8 @@ align-items: center; } .cleanIcon{ - + } } } -</style> \ No newline at end of file +</style> diff --git a/components/common/popup-menu/popup-menu.vue b/components/common/popup-menu/popup-menu.vue index 716cd4f..7698aea 100644 --- a/components/common/popup-menu/popup-menu.vue +++ b/components/common/popup-menu/popup-menu.vue @@ -1,166 +1,170 @@ <template> - <view class="popup-menu"> - <u-popup mode="right" :show="menuShow" @close="close" @open="open"> - <u-cell-group> - <u-cell - title="棣栭〉" - isLink - url="/pages/home/home" style="color:blue" - > - <image src="@/static/menuIcon/menu-home.png" slot="icon" size="32" name="search"/> - </u-cell> - <u-cell - v-if="$store.state.shenqingMenu" - v-cloak - title="鎴戠殑鐢宠" - isLink - url="/pages/my-application/my-application" - > - <image src="@/static/menuIcon/menu-application.png" slot="icon" size="32" name="search"/> - </u-cell> - <u-cell - title="鎴戠殑寰呭姙" - isLink - url="/pages/my-todo/my-todo" - > - <image src="@/static/menuIcon/menu-todo.png" slot="icon" size="32" name="search"/> - </u-cell> - <u-cell - title="鎴戠殑宸插姙" - isLink - url="/pages/my-have-todo/my-have-todo" - > - <image src="@/static/menuIcon/menu-havedo.png" slot="icon" size="32" name="search"/> - </u-cell> - <u-cell - v-if="$store.state.rijihuaMenu" - v-cloak - title="鏃ュ彂杩愯鍒�" - isLink - url="/pages/jihua/jihua" style="color:blue" - > - <image src="@/static/menuIcon/menu-shipment.png" slot="icon" size="32" name="search"/> - </u-cell> - </u-cell-group> - <u-button text="閫�鍑�" type="primary" @click="menuPopupClick"></u-button> - </u-popup> - </view> + <view class="popup-menu"> + <u-popup mode="right" :show="menuShow" @close="close" @open="open"> + <u-cell-group> + <u-cell + title="棣栭〉" + isLink + url="/pages/home/home" style="color:blue" + > + <image src="@/static/menuIcon/menu-home.png" slot="icon" size="32" name="search"/> + </u-cell> + <u-cell + v-if="$store.state.shenqingMenu" + v-cloak + title="鎴戠殑鐢宠" + isLink + url="/pages/my-application/my-application" + > + <image src="@/static/menuIcon/menu-application.png" slot="icon" size="32" name="search"/> + </u-cell> + <u-cell + title="鎴戠殑寰呭姙" + isLink + url="/pages/my-todo/my-todo" + > + <image src="@/static/menuIcon/menu-todo.png" slot="icon" size="32" name="search"/> + </u-cell> + <u-cell + title="鎴戠殑宸插姙" + isLink + url="/pages/my-have-todo/my-have-todo" + > + <image src="@/static/menuIcon/menu-havedo.png" slot="icon" size="32" name="search"/> + </u-cell> + <u-cell + v-if="$store.state.rijihuaMenu" + v-cloak + title="鏃ュ彂杩愯鍒�" + isLink + url="/pages/jihua/jihua" style="color:blue" + > + <image src="@/static/menuIcon/menu-shipment.png" slot="icon" size="32" name="search"/> + </u-cell> + </u-cell-group> + <u-button text="閫�鍑�" type="primary" @click="menuPopupClick"></u-button> + </u-popup> + </view> </template> <script> -import { redirectLogin } from '@/utils/status.js'; +import {redirectLogin} from '@/utils/status.js'; + export default { - name: 'PopupMenu', - // props:{ - // menuShow:{ - // type:Boolean, - // default:false - // } - // }, - // watch:{ - // menuShow(newV,oldV){ - // this.menuShow = newV; - // console.log('鐩戝惉menu',newV); - // } - // }, - data() { - return { - menuShow:false - }; - }, - onShow() { - alert(111); - }, - methods: { - menuClick(){ - this.menuShow = !this.menuShow - this.$emit('menuShow',this.menuShow) - }, - open() { - console.log(this.$store.state,'shenqingMenu====') - }, - close() { - this.menuShow = false; - this.$emit('menuShow',this.menuShow) - }, - menuPopupClick(){ - this.menuShow = false; - uni.request({ - url:'/auth/token/logout', - method:'DELETE', - header:{ - 'TENANT-ID': 5, - Authorization: 'Bearer ' + uni.getStorageSync('access_token'), - VERSION: 'zzl' - } - }).then(res=>{ - redirectLogin(); - - }).catch(err=>{ - uni.showToast({ - title:'閫�鍑哄け璐ワ紒', - }) - }) - } - } + name: 'PopupMenu', + // props:{ + // menuShow:{ + // type:Boolean, + // default:false + // } + // }, + // watch:{ + // menuShow(newV,oldV){ + // this.menuShow = newV; + // console.log('鐩戝惉menu',newV); + // } + // }, + data() { + return { + menuShow: false + }; + }, + onShow() { + alert(111); + }, + methods: { + menuClick() { + this.menuShow = !this.menuShow + this.$emit('menuShow', this.menuShow) + }, + open() { + console.log(this.$store.state, 'shenqingMenu====') + }, + close() { + this.menuShow = false; + this.$emit('menuShow', this.menuShow) + }, + menuPopupClick() { + this.menuShow = false; + uni.request({ + url: '/auth/token/logout', + method: 'DELETE', + header: { + 'TENANT-ID': 5, + Authorization: 'Bearer ' + uni.getStorageSync('access_token'), + VERSION: 'zzl' + } + }).then(redirectLogin()).catch(err => { + uni.showToast({ + title: '閫�鍑哄け璐ワ紒', + }) + }) + } + } }; </script> <style lang="scss" scoped> ::v-deep.popup-menu { - .u-popup{ - .u-transition{ - .u-popup__content{ - // 鎸夐挳 - .u-button{ - width:vww(222); - height:vww(40); - margin-bottom:vww(40); - } - // cell鍗曞厓鏍� - .u-cell-group{ - - .u-cell-group__wrapper{ - .u-cell{ - width:vww(270); - height:vww(48); - .u-cell__body{ - height:vww(48); - .u-cell__body__content{ - .u-cell__left-icon-wrap{ - margin-right: vww(8); - image{ - width:vww(16); - height:vww(16); - } - } - .u-cell__title{ - .u-cell__title-text{ - font-size:vww(14); - } - } - } - .u-cell__right-icon-wrap{ - .u-icon{ - .u-icon__icon{ - width:vww(7.27); - height:vww(12); - span{ - color:#007AFF; - - } - } - } - } - } - } - } - } - - - - } - } - } + .u-popup { + .u-transition { + .u-popup__content { + // 鎸夐挳 + .u-button { + width: vww(222); + height: vww(40); + margin-bottom: vww(40); + } + + // cell鍗曞厓鏍� + .u-cell-group { + + .u-cell-group__wrapper { + .u-cell { + width: vww(270); + height: vww(48); + + .u-cell__body { + height: vww(48); + + .u-cell__body__content { + .u-cell__left-icon-wrap { + margin-right: vww(8); + + image { + width: vww(16); + height: vww(16); + } + } + + .u-cell__title { + .u-cell__title-text { + font-size: vww(14); + } + } + } + + .u-cell__right-icon-wrap { + .u-icon { + .u-icon__icon { + width: vww(7.27); + height: vww(12); + + span { + color: #007AFF; + + } + } + } + } + } + } + } + } + + + } + } + } } </style> diff --git a/pages/edit-my-application/edit-my-application.vue b/pages/edit-my-application/edit-my-application.vue index dd12d24..3225f38 100644 --- a/pages/edit-my-application/edit-my-application.vue +++ b/pages/edit-my-application/edit-my-application.vue @@ -1,478 +1,514 @@ <template> - <!-- 鏂板鐢宠琛ㄥ崟 --> - <view class="new-application-form-data"> - <!-- page-mete鐨刾age-style灞炴�х浉褰撲簬HTML鐨刡ody灞炴�� --> - <!-- <page-meta :page-style="spanStyle"></page-meta> --> - <!-- 琛ㄥ崟 --> + <!-- 鏂板鐢宠琛ㄥ崟 --> + <view class="new-application-form-data"> + <!-- page-mete鐨刾age-style灞炴�х浉褰撲簬HTML鐨刡ody灞炴�� --> + <!-- <page-meta :page-style="spanStyle"></page-meta> --> + <!-- 琛ㄥ崟 --> - <combination-title class="newApplicationTitle" title="鏂板"></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 labelWidth="20%" label="缁撶畻瀹㈡埛" prop="customerName" borderBottom ref="customerNameRef"> - <u--input v-model="newFormData.customerName" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-form-item labelWidth="20%" label="鍚堝悓缂栧彿" prop="contractNum" borderBottom ref="contractNumRef"> - <u--input v-model="newFormData.contractNum" disabled disabledColor="#ffffff" 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> - </u-form-item> - <u-form-item labelWidth="20%" label="浠樻鏂瑰紡" borderBottom ref="payTypeRef"> - <u--input :value="newFormData.payType == '0' ? '鐜版眹':'鎵垮厬'" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨浠樻鏂瑰紡" border="none"></u--input> - <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-icon slot="right" name="arrow-right"></u-icon> - </u-form-item> - <u-form-item labelWidth="20%" label="缂栧彿" borderBottom> - <u--input border="none" disabled disabledColor="#ffffff" value="鑷姩鐢熸垚" placeholder="璇疯緭鍏ョ紪鍙�"></u--input> - </u-form-item> - </u--form> - </view> + <combination-title class="newApplicationTitle" title="鏂板"></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" ref="formRef"> + <u-form-item labelWidth="20%" label="缁撶畻瀹㈡埛" borderBottom ref="customerNameRef"> + <u--input v-model="newFormData.customerName" disabled disabledColor="#ffffff" border="none"></u--input> + </u-form-item> + <u-form-item labelWidth="20%" label="鍚堝悓缂栧彿" borderBottom ref="contractNumRef"> + <u--input v-model="newFormData.contractNum" disabled disabledColor="#ffffff" 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> + </u-form-item> + <u-form-item labelWidth="20%" label="浠樻鏂瑰紡" borderBottom ref="payTypeRef"> + <u--input :value="newFormData.payType == '0' ? '鐜版眹':'鎵垮厬'" disabled disabledColor="#ffffff" + placeholder="璇烽�夋嫨浠樻鏂瑰紡" border="none"></u--input> + <u-icon slot="right" name="arrow-right"></u-icon> + </u-form-item> + <u-form-item @click="timeShow = true" labelWidth="20%" label="鏃ユ湡" borderBottom + ref="timeDataRef"> + <u--input v-model="timeDataStr" border="none" placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input> + <u-icon slot="right" name="arrow-right"></u-icon> + </u-form-item> + <u-form-item labelWidth="20%" label="缂栧彿" borderBottom> + <u--input border="none" disabled disabledColor="#ffffff" v-model="newFormData.number" placeholder="璇疯緭鍏ョ紪鍙�"></u--input> + </u-form-item> + </u--form> + </view> - <!-- 鐢宠鏃ュ巻銆佽寖鍥存椂闂� --> - <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" :maxDate="maxDate"></u-calendar> - <!-- 鐢宠浠樻鏂瑰紡寮瑰嚭鑿滃崟 --> - <!-- <u-action-sheet :show="showPayType" :actions="actions" title="璇烽�夋嫨浠樻鏂瑰紡" @close="showPayType = false" @select="sexSelect"></u-action-sheet> --> + <!-- 鐢宠鏃ュ巻銆佽寖鍥存椂闂� --> + <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" + :maxDate="maxDate"></u-calendar> + <!-- 鐢宠浠樻鏂瑰紡寮瑰嚭鑿滃崟 --> + <!-- <u-action-sheet :show="showPayType" :actions="actions" title="璇烽�夋嫨浠樻鏂瑰紡" @close="showPayType = false" @select="sexSelect"></u-action-sheet> --> - <!-- 閫夋嫨瀹㈡埛寮规 --> - <!-- @touchmove.stop.prevent="moveHandleCustomer":闃叉鍥惧眰绌块�� --> - <!-- <view class="selectCustomerPopup"> - <u-popup :show="selectCustomerShow" @close="selectCustomerClose" @open="selectCustomerOpen" mode="bottom" round="22"> - <scroll-view scroll-y="true" style="height:100%;"> - <combination-title class="selectCustomerTitle" title="閫夋嫨瀹㈡埛"></combination-title> - <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> - <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-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> - </u--form> - </view> - <view class="searchCustomerBtn"> - <u-button text="鎼滅储" type="primary" @click="selectCustomer()"></u-button> - <u-button text="娓呯┖" @click="selectCustomerResetFields"></u-button> - </view> --> - <!-- 瀹㈡埛鍒楄〃 --> - <!-- <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"> - <button - class="mini-btn" - type="default" - size="mini" - style="background: #007aff; - color: #ffffff; - margin: auto 0; - height: 20px; - line-height:20px; - width: 43px; - font-size: 10px; - padding: 0;" - @click="selectCustomerOkClick(item)" - > - 閫夋嫨 - </button> - </text> - </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 - :show="selectCustomerCompShow" - :actions="selectCustomerActions" - title="璇烽�夋嫨鍗曚綅" - @close="selectCustomerCompShow = false" - @select="selectCustomerSelect" - ></u-action-sheet> - </view> --> + <!-- 閫夋嫨瀹㈡埛寮规 --> + <!-- @touchmove.stop.prevent="moveHandleCustomer":闃叉鍥惧眰绌块�� --> + <!-- <view class="selectCustomerPopup"> + <u-popup :show="selectCustomerShow" @close="selectCustomerClose" @open="selectCustomerOpen" mode="bottom" round="22"> + <scroll-view scroll-y="true" style="height:100%;"> + <combination-title class="selectCustomerTitle" title="閫夋嫨瀹㈡埛"></combination-title> + <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> + <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-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> + </u--form> + </view> + <view class="searchCustomerBtn"> + <u-button text="鎼滅储" type="primary" @click="selectCustomer()"></u-button> + <u-button text="娓呯┖" @click="selectCustomerResetFields"></u-button> + </view> --> + <!-- 瀹㈡埛鍒楄〃 --> + <!-- <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"> + <button + class="mini-btn" + type="default" + size="mini" + style="background: #007aff; + color: #ffffff; + margin: auto 0; + height: 20px; + line-height:20px; + width: 43px; + font-size: 10px; + padding: 0;" + @click="selectCustomerOkClick(item)" + > + 閫夋嫨 + </button> + </text> + </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 + :show="selectCustomerCompShow" + :actions="selectCustomerActions" + title="璇烽�夋嫨鍗曚綅" + @close="selectCustomerCompShow = false" + @select="selectCustomerSelect" + ></u-action-sheet> + </view> --> - <!-- 绾у埆鑿滃崟椤� --> - <!-- <view class="selectLevelSheet"> - <u-action-sheet :show="selectLevelShow" :actions="levelList" title="璇烽�夋嫨绾у埆" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet> - </view> - </view> - </scroll-view> - </u-popup> - </view> --> + <!-- 绾у埆鑿滃崟椤� --> + <!-- <view class="selectLevelSheet"> + <u-action-sheet :show="selectLevelShow" :actions="levelList" title="璇烽�夋嫨绾у埆" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet> + </view> + </view> +</scroll-view> +</u-popup> +</view> --> - <!-- 閫夋嫨鍚堝悓 --> - <!-- @touchmove.stop.prevent="moveHandleContract" --> - <!-- <view class="selectCustomerPopup"> - <u-popup :show="selectContractShow" @close="selectContractClose" @open="selectContractOpen" mode="bottom" round="22"> - <scroll-view scroll-y="true" style="height:100%;"> - <combination-title class="selectCustomerTitle" title="閫夋嫨鍚堝悓"></combination-title> - <view class="selectCustomerContainer"> - <view class="searchContainer"> - <u--form labelPosition="left" :model="searchContractForm" ref="selectformRef"> - <u-form-item labelWidth="18%" 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--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> - <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> - <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> - </u--form> - </view> - <view class="searchCustomerBtn"> - <u-button text="鎼滅储" type="primary" @click="selectContractOpen()"></u-button> - <u-button text="娓呯┖" @click="selectContractResetFields"></u-button> - </view> --> - <!-- 鍚堝悓鍒楄〃 --> - <!-- <view class="tableContract"> - <view class="tableBody"> - <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th width="100" 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="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="70" 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> - </uni-td> - <uni-td align="left"> - <view :style="tdStyle">{{ item.customerName }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.coalNames }}</view> - </uni-td> - <uni-td align="left"> - <view :style="tdStyle">{{ item.num }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.type }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.startDate }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.endDate }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.countExecutive }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.executive }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.status }}</view> - </uni-td> - </uni-tr> - </uni-table> - </view> + <!-- 閫夋嫨鍚堝悓 --> + <!-- @touchmove.stop.prevent="moveHandleContract" --> + <!-- <view class="selectCustomerPopup"> + <u-popup :show="selectContractShow" @close="selectContractClose" @open="selectContractOpen" mode="bottom" round="22"> + <scroll-view scroll-y="true" style="height:100%;"> + <combination-title class="selectCustomerTitle" title="閫夋嫨鍚堝悓"></combination-title> + <view class="selectCustomerContainer"> + <view class="searchContainer"> + <u--form labelPosition="left" :model="searchContractForm" ref="selectformRef"> + <u-form-item labelWidth="18%" 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--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> + <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> + <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> + </u--form> + </view> + <view class="searchCustomerBtn"> + <u-button text="鎼滅储" type="primary" @click="selectContractOpen()"></u-button> + <u-button text="娓呯┖" @click="selectContractResetFields"></u-button> + </view> --> + <!-- 鍚堝悓鍒楄〃 --> + <!-- <view class="tableContract"> + <view class="tableBody"> + <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th width="100" 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="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="70" 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> + </uni-td> + <uni-td align="left"> + <view :style="tdStyle">{{ item.customerName }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.coalNames }}</view> + </uni-td> + <uni-td align="left"> + <view :style="tdStyle">{{ item.num }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.type }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.startDate }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.endDate }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.countExecutive }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.executive }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.status }}</view> + </uni-td> + </uni-tr> + </uni-table> + </view> - <view class="TableUtilBtn"> - <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr><uni-th align="center">鎿嶄綔</uni-th></uni-tr> - <uni-tr v-for="(item, index) in contractData" :key="index"> - <uni-td align="center"> --> - <!-- 閫夋嫨鍚堝悓 --> - <!-- <view class="TableUtilBtnContainer"><u-button type="primary" @click="selectContractClick(item)" icon="checkbox-mark" size="mini"></u-button></view> - </uni-td> - </uni-tr> - </uni-table> - </view> - </view> --> - <!-- 鍚堝悓绫诲瀷閫夋嫨鍣� --> - <!-- <view class="selectContractTypePicker"> - <u-picker - :closeOnClickOverlay="true" - @close="selectContractTypeClose" - @cancel="selectContractTypeShow = false" - @confirm="selectContractTypeConfirm" - :show="selectContractTypeShow" - :columns="selectContractTypeData" - ></u-picker> - </view> --> - <!-- 鏃堕棿閫夋嫨鍣� --> - <!-- <view class="selectContractStartTime"> - <u-calendar - :show="selectContractStartTimeShow" - @close="selectContractStartTimeClose" - :mode="selectContractTimeMode" - @confirm="selectContractStartTimeConfirm" - ></u-calendar> - </view> - <view class="selectContractEndTime"> - <u-calendar :show="selectContractEndTimeShow" @close="selectContractEndTimeClose" :mode="selectContractTimeMode" @confirm="selectContractEndTimeConfirm"></u-calendar> - </view> - </view> - </scroll-view> - </u-popup> - </view> - --> + <view class="TableUtilBtn"> + <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr><uni-th align="center">鎿嶄綔</uni-th></uni-tr> + <uni-tr v-for="(item, index) in contractData" :key="index"> + <uni-td align="center"> --> + <!-- 閫夋嫨鍚堝悓 --> + <!-- <view class="TableUtilBtnContainer"><u-button type="primary" @click="selectContractClick(item)" icon="checkbox-mark" size="mini"></u-button></view> + </uni-td> +</uni-tr> +</uni-table> +</view> +</view> --> + <!-- 鍚堝悓绫诲瀷閫夋嫨鍣� --> + <!-- <view class="selectContractTypePicker"> + <u-picker + :closeOnClickOverlay="true" + @close="selectContractTypeClose" + @cancel="selectContractTypeShow = false" + @confirm="selectContractTypeConfirm" + :show="selectContractTypeShow" + :columns="selectContractTypeData" + ></u-picker> + </view> --> + <!-- 鏃堕棿閫夋嫨鍣� --> + <!-- <view class="selectContractStartTime"> + <u-calendar + :show="selectContractStartTimeShow" + @close="selectContractStartTimeClose" + :mode="selectContractTimeMode" + @confirm="selectContractStartTimeConfirm" + ></u-calendar> + </view> + <view class="selectContractEndTime"> + <u-calendar :show="selectContractEndTimeShow" @close="selectContractEndTimeClose" :mode="selectContractTimeMode" @confirm="selectContractEndTimeConfirm"></u-calendar> + </view> + </view> +</scroll-view> +</u-popup> +</view> +--> + <!-- 娣诲姞鍚堝悓瀛愰」 --> + <view class="addContractContainer"> + <u-popup :show="addContractShow" @close="addContractClose" @open="addContractOpen" mode="bottom" round="22"> + <scroll-view scroll-y="true" style="height:100%;"> + <combination-title class="addContractFormTitle" title="娣诲姞璁㈠崟"></combination-title> + <!-- 娣诲姞鐢ㄦ埛琛ㄥ崟 --> + <view class="addContractForm"> + <u--form labelPosition="left" :model="addContractFormdata" :rules="addContractRules" ref="form1"> + <view class="formUpCard"> + <u-form-item label="鐭垮巶" labelWidth="20%" ref="item1"> + <u--input v-model="addContractFormdata.filedName" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-form-item @click="coalFiledSelectShow = true" label="鐓ゅ巶" labelWidth="20%" ref="item1"> + <u--input v-model="addContractFormdata.compName" disabled disabledColor="#ffffff"></u--input> + </u-form-item> + <u-form-item label="鏀惰揣浜�" labelWidth="20%" ref="item1" @click="addContractConsignee"> + <u--input v-model="addContractFormdata.customerName" disabled disabledColor="#ffffff"></u--input> + </u-form-item> + <u-form-item @click="addContractCoalShow = true" label="鍝佺" labelWidth="20%" ref="item1"> + <u--input v-model="addContractFormdata.coalName" disabled disabledColor="#ffffff"></u--input> + </u-form-item> + <template> + <!-- 浠锋牸鍗$墖 --> + <view class="priceList" v-if="showPrice && favouredpolicyListcomputed"> + <view class="currentPriceContainer"> + <u-divider text="褰撳墠浠锋牸"></u-divider> + <view class="currentPriceBox"> + <u--form :model="currentCoal" labelPosition="left"> + <u-form-item label="鐓ょ" labelWidth="35%"> + <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-form-item :label="currentCoal.type == 1 ? '閽㈠巶闀垮崗' : '鍩哄噯浠�'" labelWidth="35%"> + <u--input v-model="currentCoal.steelMillPrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-form-item :label="currentCoal.type == 1 ? '鐒﹀寲闀垮崗' : '鐢靛巶鍩哄噯'" labelWidth="35%"> + <u--input v-model="currentCoal.cokingPrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-form-item :label="currentCoal.type == 1 ? '闈為暱鍗�' : '鍖哄煙澶栫數鍘備环'" labelWidth="35%"> + <u--input v-model="currentCoal.noImportantPrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-form-item label="鎸傜墝浠�" labelWidth="35%"> + <u--input v-model="currentCoal.quotePrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + </u--form> + </view> + </view> + <view class="selectPriceContainer"> + <u-divider text="閫夋嫨浠锋牸"></u-divider> + <view class="selectPricebox"> + <u--form labelPosition="left"> + <u-form-item label="鐓ょ" labelWidth="35%"> + <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-radio-group v-model="addContractFormdata.priceMode" placement="column" + @change="groupChange"> + <view class="selectPriceboxItem"> + <u-form-item :label="currentCoal.type == 1 ? '閽㈠巶闀垮崗' : '鍩哄噯浠�'" labelWidth="35%"> + <u--input v-model="afterPrice.steelMillPrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="0" + @change="changePriceMode"></u-radio> + </view> + <view class="selectPriceboxItem"> + <u-form-item :label="currentCoal.type == 1 ? '鐒﹀寲闀垮崗' : '鐢靛巶鍩哄噯'" labelWidth="35%"> + <u--input v-model="afterPrice.cokingPrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="1" + @change="changePriceMode"></u-radio> + </view> + <view class="selectPriceboxItem"> + <u-form-item :label="currentCoal.type == 1 ? '闈為暱鍗�' : '鍖哄煙澶栫數鍘備环'" labelWidth="35%"> + <u--input v-model="afterPrice.noImportantPrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="2" + @change="changePriceMode"></u-radio> + </view> + <view class="selectPriceboxItem"> + <u-form-item label="鎸傜墝浠�" labelWidth="35%"> + <u--input v-model="afterPrice.quotePrice" disabled disabledColor="#ffffff" + border="none"></u--input> + </u-form-item> + <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="3" + @change="changePriceMode"></u-radio> + </view> + </u-radio-group> + </u--form> + </view> + </view> + <view class="selectFavouredPolicy"> + <u-divider text="閫夋嫨浼樻儬鏀跨瓥"></u-divider> + <view class="selectFavouredPolicyBox"> + <u-checkbox-group + v-model="selectOKfavouredpolicyValue" + placement="column" + @change="checkboxChangeFavouredpolicy" + > + <uni-table ref="priceTableRef" :loading="loading" border stripe emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th width="10" align="center">閫夐」</uni-th> + <uni-th width="150" align="center">浼樻儬鏂瑰紡</uni-th> + <uni-th width="60" align="center">绗﹀彿</uni-th> + <uni-th width="60" align="center">鍊�</uni-th> + <uni-th width="60" align="center">浠锋牸浼樻儬</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in favouredpolicyList" :key="index"> + <uni-td align="center"> + <view class=""> + <u-checkbox + :customStyle="{marginBottom: '8px'}" + :key="index" + :name="item.id" size="30" + > + </u-checkbox> + </view> + </uni-td> + <uni-td>{{ item.type }}</uni-td> + <uni-td align="center">{{ operator[item.method].label }}</uni-td> + <uni-td align="center">{{ item.val }}</uni-td> + <uni-td align="center">{{ item.price }}</uni-td> + </uni-tr> + </uni-table> + </u-checkbox-group> + </view> + </view> + </view> + </template> + <u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1"> + <u--input v-model="addContractTransport"></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 :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 :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> + <view class="addContractConfirm"> + <u-button text="娣诲姞" type="primary" @click="addContractSanConfirm"></u-button> + </view> + </view> + <!-- 閫夋嫨鐓ゅ巶 --> + <view class="coalFiledSelectPopup"> + <u-popup :show="coalFiledSelectShow" @close="coalFiledSelectClose" @open="coalFiledSelectOpen" mode="bottom" + round="22"> + <scroll-view scroll-y="true" style="height:100%;"> + <combination-title class="selectCustomerTitle" title="閫夋嫨鐓ゅ巶"></combination-title> + <view class="coalFiledSelectSearch"></view> + <view class="coalFiledTable"> + <view class="tableBody"> + <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th width="120" align="center">鐓ゅ巶鍚嶇О</uni-th> + <uni-th width="120" align="center">鐓ゅ巶缂栧彿</uni-th> + <uni-th width="120" align="center">鎵�灞炵熆</uni-th> + <uni-th width="120" align="center">澶囨敞</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in coalfiledData" :key="index"> + <uni-td align="center"> + <view :style="tdStyle">{{ item.name }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.num }}</view> + </uni-td> + <uni-td align="center"> + <view :style="tdStyle">{{ item.compName }}</view> + </uni-td> + <uni-td align="left"> + <view :style="tdStyle">{{ item.remark }}</view> + </uni-td> + </uni-tr> + </uni-table> + </view> - <!-- 娣诲姞鍚堝悓瀛愰」 --> - <view class="addContractContainer"> - <u-popup :show="addContractShow" @close="addContractClose" @open="addContractOpen" mode="bottom" round="22"> - <scroll-view scroll-y="true" style="height:100%;"> - <combination-title class="addContractFormTitle" title="娣诲姞璁㈠崟"></combination-title> - <!-- 娣诲姞鐢ㄦ埛琛ㄥ崟 --> - <view class="addContractForm"> - <u--form labelPosition="left" :model="addContractFormdata" :rules="addContractRules" ref="form1"> - <view class="formUpCard"> - <u-form-item label="鐭垮巶" labelWidth="20%" ref="item1"> - <u--input v-model="addContractFormdata.filedName" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-form-item @click="coalFiledSelectShow = true" label="鐓ゅ巶" labelWidth="20%" ref="item1"> - <u--input v-model="addContractFormdata.compName" disabled disabledColor="#ffffff"></u--input> - </u-form-item> - <u-form-item label="鏀惰揣浜�" labelWidth="20%" ref="item1" @click="addContractConsignee"> - <u--input v-model="addContractFormdata.customerName" disabled disabledColor="#ffffff"></u--input> - </u-form-item> - <u-form-item @click="addContractCoalShow = true" label="鍝佺" labelWidth="20%" ref="item1"> - <u--input v-model="addContractFormdata.coalName" disabled disabledColor="#ffffff"></u--input> - </u-form-item> - <template> - <!-- 浠锋牸鍗$墖 --> - <view class="priceList" v-if="showPrice && favouredpolicyListcomputed"> - <view class="currentPriceContainer"> - <u-divider text="褰撳墠浠锋牸"></u-divider> - <view class="currentPriceBox"> - <u--form :model="currentCoal" labelPosition="left"> - <u-form-item label="鐓ょ" labelWidth="35%"> - <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-form-item :label="currentCoal.type == 1 ? '閽㈠巶闀垮崗' : '鍩哄噯浠�'" labelWidth="35%"> - <u--input v-model="currentCoal.steelMillPrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-form-item :label="currentCoal.type == 1 ? '鐒﹀寲闀垮崗' : '鐢靛巶鍩哄噯'" labelWidth="35%"> - <u--input v-model="currentCoal.cokingPrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-form-item :label="currentCoal.type == 1 ? '闈為暱鍗�' : '鍖哄煙澶栫數鍘備环'" labelWidth="35%"> - <u--input v-model="currentCoal.noImportantPrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-form-item label="鎸傜墝浠�" labelWidth="35%"> - <u--input v-model="currentCoal.quotePrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - </u--form> - </view> - </view> - <view class="selectPriceContainer"> - <u-divider text="閫夋嫨浠锋牸"></u-divider> - <view class="selectPricebox"> - <u--form labelPosition="left"> - <u-form-item label="鐓ょ" labelWidth="35%"> - <u--input v-model="currentCoal.coalName" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-radio-group v-model="addContractFormdata.priceMode" placement="column" @change="groupChange"> - <view class="selectPriceboxItem"> - <u-form-item :label="currentCoal.type == 1 ? '閽㈠巶闀垮崗' : '鍩哄噯浠�'" labelWidth="35%"> - <u--input v-model="afterPrice.steelMillPrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="0" @change="changePriceMode"></u-radio> - </view> - <view class="selectPriceboxItem"> - <u-form-item :label="currentCoal.type == 1 ? '鐒﹀寲闀垮崗' : '鐢靛巶鍩哄噯'" labelWidth="35%"> - <u--input v-model="afterPrice.cokingPrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="1" @change="changePriceMode"></u-radio> - </view> - <view class="selectPriceboxItem"> - <u-form-item :label="currentCoal.type == 1 ? '闈為暱鍗�' : '鍖哄煙澶栫數鍘備环'" labelWidth="35%"> - <u--input v-model="afterPrice.noImportantPrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="2" @change="changePriceMode"></u-radio> - </view> - <view class="selectPriceboxItem"> - <u-form-item label="鎸傜墝浠�" labelWidth="35%"> - <u--input v-model="afterPrice.quotePrice" disabled disabledColor="#ffffff" border="none"></u--input> - </u-form-item> - <u-radio shape="square" size="30" :customStyle="{ marginBottom: '8px' }" name="3" @change="changePriceMode"></u-radio> - </view> - </u-radio-group> - </u--form> - </view> - </view> - <view class="selectFavouredPolicy"> - <u-divider text="閫夋嫨浼樻儬鏀跨瓥"></u-divider> - <view class="selectFavouredPolicyBox"> - <u-checkbox-group - v-model="selectOKfavouredpolicyValue" - placement="column" - @change="checkboxChangeFavouredpolicy" - > - <uni-table ref="priceTableRef" :loading="loading" border stripe emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th width="10" align="center" >閫夐」</uni-th> - <uni-th width="150" align="center">浼樻儬鏂瑰紡</uni-th> - <uni-th width="60" align="center">绗﹀彿</uni-th> - <uni-th width="60" align="center">鍊�</uni-th> - <uni-th width="60" align="center">浠锋牸浼樻儬</uni-th> - </uni-tr> - <uni-tr v-for="(item, index) in favouredpolicyList" :key="index"> - <uni-td align="center"> - <view class=""> - <u-checkbox - :customStyle="{marginBottom: '8px'}" - :key="index" - :name="item.id" size="30" - > - </u-checkbox> - </view> - </uni-td> - <uni-td>{{ item.type }}</uni-td> - <uni-td align="center">{{ operator[item.method].label }}</uni-td> - <uni-td align="center">{{ item.val }}</uni-td> - <uni-td align="center">{{ item.price }}</uni-td> - </uni-tr> - - </uni-table> - </u-checkbox-group> - </view> - </view> - </view> - </template> - <u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1"><u--input v-model="addContractTransport"></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 :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 :disabled="addContractFormdata.trainType == 1" @input="jisuanAmount" v-model="addContractFormdata.quant"></u--input> - </u-form-item> - </view> + <view class="TableUtilBtn"> + <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th align="center">鎿嶄綔</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in coalfiledData" :key="index"> + <uni-td align="center"> + <!-- 閫夋嫨鍚堝悓 --> + <view class="TableUtilBtnContainer"> + <u-button type="primary" @click="coalFiledSelectClick(item)" icon="checkbox-mark" + size="mini"></u-button> + </view> + </uni-td> + </uni-tr> + </uni-table> + </view> + </view> + </scroll-view> + </u-popup> + </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> - - <view class="addContractConfirm"><u-button text="娣诲姞" type="primary" @click="addContractSanConfirm"></u-button></view> - </view> - - <!-- 閫夋嫨鐓ゅ巶 --> - <view class="coalFiledSelectPopup"> - <u-popup :show="coalFiledSelectShow" @close="coalFiledSelectClose" @open="coalFiledSelectOpen" mode="bottom" round="22"> - <scroll-view scroll-y="true" style="height:100%;"> - <combination-title class="selectCustomerTitle" title="閫夋嫨鐓ゅ巶"></combination-title> - <view class="coalFiledSelectSearch"></view> - <view class="coalFiledTable"> - <view class="tableBody"> - <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th width="120" align="center">鐓ゅ巶鍚嶇О</uni-th> - <uni-th width="120" align="center">鐓ゅ巶缂栧彿</uni-th> - <uni-th width="120" align="center">鎵�灞炵熆</uni-th> - <uni-th width="120" align="center">澶囨敞</uni-th> - </uni-tr> - <uni-tr v-for="(item, index) in coalfiledData" :key="index"> - <uni-td align="center"> - <view :style="tdStyle">{{ item.name }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.num }}</view> - </uni-td> - <uni-td align="center"> - <view :style="tdStyle">{{ item.compName }}</view> - </uni-td> - <uni-td align="left"> - <view :style="tdStyle">{{ item.remark }}</view> - </uni-td> - </uni-tr> - </uni-table> - </view> - - <view class="TableUtilBtn"> - <uni-table border emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr><uni-th align="center">鎿嶄綔</uni-th></uni-tr> - <uni-tr v-for="(item, index) in coalfiledData" :key="index"> - <uni-td align="center"> - <!-- 閫夋嫨鍚堝悓 --> - <view class="TableUtilBtnContainer"><u-button type="primary" @click="coalFiledSelectClick(item)" icon="checkbox-mark" size="mini"></u-button></view> - </uni-td> - </uni-tr> - </uni-table> - </view> - </view> - </scroll-view> - </u-popup> - </view> - - <!-- 閫夋嫨鏀惰揣浜� --> - <view class="selectCustomerPopup"> - <u-popup :show="addContractConsigneeShow" @close="addContractConsigneeClose" @open="addContractConsigneeOpen" mode="bottom" round="22"> - <scroll-view scroll-y="true" style="height:100%;"> - <combination-title class="selectCustomerTitle" title="閫夋嫨鏀惰揣浜�"></combination-title> - <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> - <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-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> - </u--form> - </view> - <view class="searchCustomerBtn"> - <u-button text="鎼滅储" type="primary" @click="selectCustomer()"></u-button> - <u-button text="娓呯┖" @click="selectCustomerResetFields"></u-button> - </view> - <!-- 瀹㈡埛鍒楄〃 --> - <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"> - <button - class="mini-btn" - type="default" - size="mini" - style="background: #007aff; + <!-- 閫夋嫨鏀惰揣浜� --> + <view class="selectCustomerPopup"> + <u-popup :show="addContractConsigneeShow" @close="addContractConsigneeClose" + @open="addContractConsigneeOpen" mode="bottom" round="22"> + <scroll-view scroll-y="true" style="height:100%;"> + <combination-title class="selectCustomerTitle" title="閫夋嫨鏀惰揣浜�"></combination-title> + <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> + <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-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> + </u--form> + </view> + <view class="searchCustomerBtn"> + <u-button text="鎼滅储" type="primary" @click="selectCustomer()"></u-button> + <u-button text="娓呯┖" @click="selectCustomerResetFields"></u-button> + </view> + <!-- 瀹㈡埛鍒楄〃 --> + <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"> + <button + class="mini-btn" + type="default" + size="mini" + style="background: #007aff; color: #ffffff; margin: auto 0; height: 20px; @@ -480,154 +516,164 @@ width: 43px; font-size: 10px; padding: 0;" - @click="addContractConsigneeConfirm(item)" - > - 閫夋嫨 - </button> - </text> - </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 - :show="selectCustomerCompShow" - :actions="selectCustomerActions" - title="璇烽�夋嫨鍗曚綅" - @close="selectCustomerCompShow = false" - @select="selectCustomerSelect" - ></u-action-sheet> - </view> - <!-- 绾у埆鑿滃崟椤� --> - <view class="selectLevelSheet"> - <u-action-sheet :show="selectLevelShow" :actions="levelList" title="璇烽�夋嫨绾у埆" @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet> - </view> - </view> - </scroll-view> - </u-popup> - </view> + @click="addContractConsigneeConfirm(item)" + > + 閫夋嫨 + </button> + </text> + </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 + :show="selectCustomerCompShow" + :actions="selectCustomerActions" + title="璇烽�夋嫨鍗曚綅" + @close="selectCustomerCompShow = false" + @select="selectCustomerSelect" + ></u-action-sheet> + </view> + <!-- 绾у埆鑿滃崟椤� --> + <view class="selectLevelSheet"> + <u-action-sheet :show="selectLevelShow" :actions="levelList" title="璇烽�夋嫨绾у埆" + @close="selectLevelShow = false" @select="selectLevelSelect"></u-action-sheet> + </view> + </view> + </scroll-view> + </u-popup> + </view> - <!-- 鍝佺閫夋嫨鍣� --> - <view class="addContractCoalPicker"> - <u-picker - :show="addContractCoalShow" - :columns="addContractCoalData" - @close="addContractCoalClose" - @cancel="addContractCoalShow = false" - @confirm="addContractCoalConfirm" - :closeOnClickOverlay="true" - keyName="label" - ></u-picker> - </view> + <!-- 鍝佺閫夋嫨鍣� --> + <view class="addContractCoalPicker"> + <u-picker + :show="addContractCoalShow" + :columns="addContractCoalData" + @close="addContractCoalClose" + @cancel="addContractCoalShow = false" + @confirm="addContractCoalConfirm" + :closeOnClickOverlay="true" + keyName="label" + ></u-picker> + </view> - <!-- 杩愯緭閫夋嫨鍣� --> - <view class="addContractCoalPicker"> - <u-picker - :show="addContractTransportShow" - :columns="addContractTransportData" - @close="addContractTransportClose" - @cancel="addContractTransportShow = false" - @confirm="addContractTransportConfirm" - :closeOnClickOverlay="true" - keyName="label" - ></u-picker> - </view> - </scroll-view> - </u-popup> - </view> + <!-- 杩愯緭閫夋嫨鍣� --> + <view class="addContractCoalPicker"> + <u-picker + :show="addContractTransportShow" + :columns="addContractTransportData" + @close="addContractTransportClose" + @cancel="addContractTransportShow = false" + @confirm="addContractTransportConfirm" + :closeOnClickOverlay="true" + keyName="label" + ></u-picker> + </view> + </scroll-view> + </u-popup> + </view> - <!-- 鐢宠琛ㄦ牸 --> + <!-- 鐢宠琛ㄦ牸 --> - <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> --> - <view class="balanceNo" v-if="accountDetails.balanceTotal < 0"><text style="color:red;">瀹㈡埛璐︽埛褰撳墠澶勪簬娆犳鐘舵��</text></view> + <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> --> + <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> - </view> - <u-swipe-action> - <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index"> - <view class="cardList"> - <view class="" 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"> - 鏀惰揣浜猴細 - <text>{{ item.customerName }}</text> - </view> - <view class="cardList_item"> - <view class=""> - 鐭垮巶锛� - <text>{{ item.filedName }}</text> - </view> - <view class=""> - 鐓ゅ巶锛� - <text>{{ item.compName }}</text> - </view> - </view> + <view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0"> + <text style="color: #FFA500;;">瀹㈡埛璐︽埛鐜版眹浣欓:{{ + accountDetails.balanceTotal + }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null ? 0 : customerChengdui }} + </text> + </view> + <u-swipe-action> + <u-swipe-action-item @click="deleteContractCardClick" :options="options1" + v-for="(item, index) in newFormData.contractOrders" :key="index"> + <view class="cardList"> + <view class="" 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"> + 鏀惰揣浜猴細 + <text>{{ item.customerName }}</text> + </view> + <view class="cardList_item"> + <view class=""> + 鐭垮巶锛� + <text>{{ item.filedName }}</text> + </view> + <view class=""> + 鐓ゅ巶锛� + <text>{{ item.compName }}</text> + </view> + </view> - <view class="cardList_item"> - <view class=""> - 鍝佺锛� - <text>{{ item.coalName }}</text> - </view> - <view class=""> - 杩愯緭锛� - <text>{{ item.trainType == 1 ? '鍦伴攢':'璺繍' }}</text> - </view> - </view> - <view class="cardList_item"> - <view class=""> - 鍗曚环锛� - <text>{{ item.price }}</text> - </view> - <view class=""> - 璁㈠崟閲戦锛� - <text>{{ item.amount }}</text> - </view> - <!-- <view class=""> - 璁㈠崟鏁伴噺锛�<text>218.899</text> - </view> --> - </view> - </view> - </view> - </u-swipe-action-item> - </u-swipe-action> + <view class="cardList_item"> + <view class=""> + 鍝佺锛� + <text>{{ item.coalName }}</text> + </view> + <view class=""> + 杩愯緭锛� + <text>{{ item.trainType == 1 ? '鍦伴攢' : '璺繍' }}</text> + </view> + </view> + <view class="cardList_item"> + <view class=""> + 鍗曚环锛� + <text>{{ item.price }}</text> + </view> + <view class=""> + 璁㈠崟閲戦锛� + <text>{{ item.amount }}</text> + </view> + <!-- <view class=""> + 璁㈠崟鏁伴噺锛�<text>218.899</text> + </view> --> + </view> + </view> + </view> + </u-swipe-action-item> + </u-swipe-action> - <view class="addCard" @click="addContractClick"> - <view class="addCard-icon"><u-icon name="plus" size="100"></u-icon></view> - </view> - </view> + <view class="addCard" @click="addContractClick"> + <view class="addCard-icon"> + <u-icon name="plus" size="100"></u-icon> + </view> + </view> + </view> - <view class="new-application-button"> - <u-button text="鍙栨秷" :plain="true" type="primary" @click="backPage"></u-button> - <u-button text="纭畾" type="primary" @click="newApplicationFormDataClick"></u-button> - </view> + <view class="new-application-button"> + <u-button text="鍙栨秷" :plain="true" type="primary" @click="backPage"></u-button> + <u-button text="纭畾" type="primary" @click="newApplicationFormDataClick"></u-button> + </view> - <!-- 鑿滃崟鏍� --> - <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> - </view> + <!-- 鑿滃崟鏍� --> + <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> + </view> </template> <script> @@ -641,1595 +687,1642 @@ month = month < 10 ? `0${month}` : month; const date = d.getDate(); export default { - data() { - return { - applicationOrderIndex:null, - - tdStyle: 'max-height: 30px;overflow: scroll;', - spanStyle: 'overflow:auto', - newFormData: { - amount: null, - coalId: '', - coalName: '', - contractId: 169, - contractName: '', - contractNum: '', - contractOrders: [], - customerAddressId: '', - customerId: 236, - customerName: '', - endDate: '', - executiveQuant: null, - id: null, - number: '', - payType: '', - price: null, - quant: null, - remark: '', - startDate: '', - type: '澶栭攢' - }, - accountDetails: {}, - // 鏃堕棿 - timeDataStr: '', - menuShow: false, - // 琛ㄥ崟 - // selectCustomerShow: false, // 閫夋嫨鐢ㄦ埛寮规 - showPayType: false, // 浠樻鏂瑰紡寮规 - payData: [], - actions: [], - selectValue: '', - rules: { - customerName: [ - { - required: true, - message: '璇烽�夋嫨缁撶畻瀹㈡埛', - trigger: ['blur', 'change'] - } - ], - contractNum: [ - { - required: true, - message: '璇烽�夋嫨鍚堝悓缂栧彿', - trigger: ['blur', 'change'] - } - ], - payType: [ - { - required: true, - message: '璇烽�夋嫨浠樻鏂瑰紡', - trigger: ['blur', 'change'] - } - ], - startDate: [ - { - required: true, - message: '璇烽�夋嫨鏃堕棿', - trigger: ['blur', 'change'] - } - ] - }, - // 鏃堕棿 - timeShow: false, - mode: 'range', - maxDate: `${year}-${month}-${date + 70}`, - // 閫夋嫨瀹㈡埛 - selectCustomerData: { - compIds: '', - customerName: '', - level: '', - current: 1, - size: 10 - }, - status:'loadmore', - customerDataAllNum:0,//瀹㈡埛鍒楄〃鎬绘潯鏁� - account: null, //瀹㈡埛璐︽埛淇℃伅 - // 鎼滅储瀛楁 - selectCompsData: [], - selectCustomerLevel: [], - searchCustomerForm: { - compName: '', - levelText: '' - }, - customerData: [], - // 閫夋嫨鍗曚綅 - selectCustomerCompShow: false, - selectCustomerActions: [], - // 绾у埆 - selectLevelShow: false, - levelList: [{ name: '涓�鏄熺骇', value: 'A' }, { name: '浜屾槦绾�', value: 'B' }, { name: '涓夋槦绾�', value: 'C' }, { name: '鍥涙槦绾�', value: 'D' }, { name: '浜旀槦绾�', value: 'E' }], - // 閫夋嫨鍚堝悓 - // selectContractShow: false, - // searchContractForm: { - // current: 1, - // size: 10, - // num: '', - // startDate: '', - // endDate: '', - // result: 2, - // type: '', - // customerName: '' - // }, - // contractData: [], - // 绫诲瀷 - // selectContractTypeShow: false, - // selectContractTypeData: [[]], - // 鏃堕棿 - // selectContractTimeMode: 'single', - // selectContractStartTimeShow: false, - // selectContractEndTimeShow: false, - // 娣诲姞鍚堝悓 - 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: '' - - }, - contractDetails: [], // 閫夋嫨鐨勫悎鍚岃鎯� - // 閫夋嫨鐓ゅ巶 - coalFiledSelectShow: false, - coalfiledData: [], - coalfiledParams: { current: 1, size: 10 }, - selectCoalFiledData: {}, - // 閫夋嫨鏀惰揣浜� - addContractConsigneeShow: false, - // 鍝佺閫夋嫨鍣� - addContractCoalShow: false, - addContractCoalData: [[]], - // 杩愯緭绫诲瀷 + data() { + return { + applicationOrderIndex: null, + tdStyle: 'max-height: 30px;overflow: scroll;', + spanStyle: 'overflow:auto', + newFormData: { + // amount: null, + // coalId: '', + // coalName: '', + // contractId: 169, + // contractName: '', + // contractNum: '', + // contractOrders: [], + // customerAddressId: '', + // customerId: 236, + // customerName: '', + // endDate: '', + // executiveQuant: null, + // id: null, + // number: '', + // payType: '', + // price: null, + // quant: null, + // remark: '', + // startDate: '', + // type: '澶栭攢' + }, + accountDetails: {}, + // 鏃堕棿 + timeDataStr: '', + menuShow: false, + // 琛ㄥ崟 + // selectCustomerShow: false, // 閫夋嫨鐢ㄦ埛寮规 + showPayType: false, // 浠樻鏂瑰紡寮规 + payData: [], + actions: [], + selectValue: '', + rules: { + // customerName: [ + // { + // required: true, + // message: '璇烽�夋嫨缁撶畻瀹㈡埛', + // trigger: ['blur', 'change'] + // } + // ], + // contractNum: [ + // { + // required: true, + // message: '璇烽�夋嫨鍚堝悓缂栧彿', + // trigger: ['blur', 'change'] + // } + // ], + // payType: [ + // { + // required: true, + // message: '璇烽�夋嫨浠樻鏂瑰紡', + // trigger: ['blur', 'change'] + // } + // ], + // startDate: [ + // { + // required: true, + // message: '璇烽�夋嫨鏃堕棿', + // trigger: ['blur', 'change'] + // } + // ] + }, + // 鏃堕棿 + timeShow: false, + mode: 'range', + maxDate: `${year}-${month}-${date + 70}`, + // 閫夋嫨瀹㈡埛 + selectCustomerData: { + compIds: '', + customerName: '', + level: '', + current: 1, + size: 10 + }, + status: 'loadmore', + customerDataAllNum: 0,//瀹㈡埛鍒楄〃鎬绘潯鏁� + account: null, //瀹㈡埛璐︽埛淇℃伅 + // 鎼滅储瀛楁 + selectCompsData: [], + selectCustomerLevel: [], + searchCustomerForm: { + compName: '', + levelText: '' + }, + customerData: [], + // 閫夋嫨鍗曚綅 + selectCustomerCompShow: false, + selectCustomerActions: [], + // 绾у埆 + selectLevelShow: false, + levelList: [{name: '涓�鏄熺骇', value: 'A'}, {name: '浜屾槦绾�', value: 'B'}, {name: '涓夋槦绾�', value: 'C'}, { + name: '鍥涙槦绾�', + value: 'D' + }, {name: '浜旀槦绾�', value: 'E'}], + // 閫夋嫨鍚堝悓 + // selectContractShow: false, + // searchContractForm: { + // current: 1, + // size: 10, + // num: '', + // startDate: '', + // endDate: '', + // result: 2, + // type: '', + // customerName: '' + // }, + // contractData: [], + // 绫诲瀷 + // selectContractTypeShow: false, + // selectContractTypeData: [[]], + // 鏃堕棿 + // selectContractTimeMode: 'single', + // selectContractStartTimeShow: false, + // selectContractEndTimeShow: false, + // 娣诲姞鍚堝悓 + addContractShow: false, + // 娣诲姞鍚堝悓琛ㄥ崟 + addContractRules: { + // compName: [ + // { + // required: true, + // message: '璇烽�夋嫨鐓ゅ巶', + // trigger: ['blur', 'change'] + // } + // ], - // 浼樻儬 - favouredpolicyListAll: [], //浼樻儬鏀跨瓥鍒楄〃鎵�鏈夌殑 - favouredpolicyList: [], // 浼樻儬鏀跨瓥鍒楄〃 - multipleSelection: [], //閫変腑鐨勪紭鎯犳斂绛� - selectOKfavouredpolicyValue:[],//澶嶉�夋閫変腑 - // 鍗曢�夋 - addContractTransport: '', - // 鍝佺浠锋牸琛ㄦ牸 - 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 - }, - dust: null, // 鎶戝皹璐� - trainfreight: {}, //璺繍杩愯垂 - // 杩愯緭绫诲瀷 - addContractTransportShow: false, - addContractTransportData: [[{ label: '鍦伴攢', value: 1 }, { label: '璺繍', value: 2 }]], - currentCoal: { - coalName: '', - cokingPrice: null, - modifyId: null, - modifyInfoId: null, - noImportantPrice: null, - quotePrice: null, - steelMillPrice: null, - type: null - }, - // 婊戝姩鍗曞厓鏍� - options1: [ - { - text: '鍒犻櫎' - } - ], - editApplicationTableId:'' - }; - }, - onLoad(options){ - this.editApplicationTableId = JSON.parse(options.index); - - }, - onShow() { - if (this.menuShow == true) { - this.$refs.menuRef.menuClick(); - } - this.init(); - }, - // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 - onNavigationBarButtonTap(e) { - this.$refs.menuRef.menuClick(); - }, - computed: { - afterPrice() { - console.log(this.currentCoal,'this.currentCoal---computed') - let temp = this.currentCoal; - console.log(temp,'temp======================') - let favouredpolicyIds = ''; - if (this.favouredpolicyList.length > 0) { - this.multipleSelection.forEach(e => { - if (favouredpolicyIds.length > 0) { - favouredpolicyIds += ','; - } - favouredpolicyIds += e.id; - temp.steelMillPrice -= e.price; - temp.cokingPrice -= e.price; - temp.noImportantPrice -= e.price; - temp.quotePrice -= e.price; - }); - if (this.multipleSelection.length > 0) { - this.addContractFormdata.favouredpolicyIds = favouredpolicyIds; - } - } - console.log(temp,'quotePrice1111111111111111======111111111111111111111111') - return temp; - }, - showPrice() { - if (this.addContractFormdata) { - let row = this.addContractFormdata; - if (row.compId && row.customerAddressId && row.coalId) { - // this.rowClik(this.currentRow); - return true; - } - } - return false; - }, - //浼樻儬鏀跨瓥 - favouredpolicyListcomputed() { - let list = []; - this.favouredpolicyListAll.forEach(e => { - //鏀粯鏂瑰紡 - if (e.type.indexOf('B') != -1 && e.coalIds) { - if (e.coalIds.indexOf(this.addContractFormdata.coalId) != -1) { - list.push(e); - } - } - //杩愯窛 - if (this.addContractFormdata.trainType == 2) { - if (e.type.indexOf('A') != -1) { - //鏍规嵁鍙戠珯鍒扮珯鑾峰彇杩愯窛 - list.push(e); - } - } - }); - this.favouredpolicyList = list; + }, + addContractFormdata: { + // id:null, + // 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: '', + // quant: '', + // toStation: '', + // trainType: 1, + // type: '' - return true; - }, - async currentRowComputed() { - console.log('杩涘叆璁$畻锛宑urrentRowComputed'); - console.log('璺繍-------------杩涙潵',this.addContractFormdata,'this.addContractFormdata-----'); - - //鍙樹环鏍肩敤鐨� - this.changePriceMode(this.addContractFormdata.priceMode); + }, + contractDetails: [], // 閫夋嫨鐨勫悎鍚岃鎯� + // 閫夋嫨鐓ゅ巶 + coalFiledSelectShow: false, + coalfiledData: [], + coalfiledParams: {current: 1, size: 10}, + selectCoalFiledData: {}, + // 閫夋嫨鏀惰揣浜� + addContractConsigneeShow: false, + // 鍝佺閫夋嫨鍣� + addContractCoalShow: false, + addContractCoalData: [[]], + // 杩愯緭绫诲瀷 - //鍙樿鍗曢噺 - if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) { - console.log('璺繍-------------杩涙潵',this.addContractFormdata,'this.addContractFormdata-----222222222222222222222'); - let price = this.addContractFormdata.price; - if (this.addContractFormdata.trainType == 1) { - console.log('鍦伴攢'); - 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) { - console.log('璺繍',this.addContractFormdata,'this.addContractFormdata-----'); - //濡傛灉璺繍浠锋牸澧炲姞鎶戝皹璐瑰拰杩愯垂 - let cost1Price = await this.getFreight(this.addContractFormdata.fromStation, this.addContractFormdata.toStation, this.addContractFormdata.customerAddressId); //璺繍杩愯垂 - console.log('杩愯垂',cost1Price); - price += cost1Price; - console.log(price,'price======') - price += this.dust; - console.log(this.addContractFormdata.quant,'this.addContractFormdata.quant===') - 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,price,Number(price * this.addContractFormdata.quant),Number(this.addContractFormdata.cost1),Number(this.addContractFormdata.cost2)); - console.log('quant:'+this.addContractFormdata.quant,'cost1:'+this.addContractFormdata.cost1,'cost2:'+this.addContractFormdata.cost2); - this.addContractFormdata.amount = amount.toFixed(2); - } - } 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, - // 娣卞害鐩戝惉 灞炴�х殑鍙樺寲// deep: true - // 閫夋嫨瀹㈡埛鏌ヨ鏉′欢 - 'searchCustomerForm.compName'(newV, oldV) { - if (newV == '') { - this.selectCustomerData.compIds = ''; - } - }, - 'searchCustomerForm.levelText'(newV, oldV) { - if (newV == '') { - this.selectCustomerData.level = ''; - } - }, - // 'selectOKfavouredpolicyValue'(newV,oleV){ - // } - }, - components: { - popupMenu, - combinationTitle - }, - methods: { - async jisuanAmount() { - console.log('杩涘叆璁$畻'); - 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); - this.addContractFormdata.amount = amount.toFixed(2); - } - }, - init() { - this.jcfavouredpolicyitem(); - this.coalfiled(); - this.coalprice(); - this.operato(); - this.pay_type(); - this.others_params(); - this.fetchCompTree(); - this.getFavouredPolicyItem(); - this.editApplicationFormData(); // 淇敼鐢宠琛ㄥ崟璇︽儏 - }, - editApplicationFormData(){ - this.$reqGet('formData',{},this.editApplicationTableId).then(res=>{ - console.log('鏁翠綋璇︽儏',res.data); - this.newFormData = res.data; - this.timeDataStr = this.newFormData.startDate; - }) - }, - editApplicationClick(index){ - this.applicationOrderIndex = index;// 寰呬慨鏀硅鍗昳ndex - this.addContractFormdata = this.newFormData.contractOrders[index]; - console.log('淇敼鐨勮鍗曡鎯�1',this.addContractFormdata,index,this.newFormData.contractOrders); - this.addContractFormdata.priceMode = this.newFormData.contractOrders[this.applicationOrderIndex].priceMode.toString(); - // 淇敼璁㈠崟浼樻儬鍒濆鍖� - if(this.newFormData.contractOrders[index].favouredpolicyIds){ - this.newFormData.contractOrders[index].favouredpolicyIds.split(',').map(item=>{ - this.selectOKfavouredpolicyValue.push(Number(item)); - }); - } - - - // 鑾峰彇浠锋牸 - // this.getNewPriceData = this.addContractFormdata; - this.getNewPriceData.type = this.newFormData.type; - this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName; - this.getNewPriceData.customerAddressId = this.addContractFormdata.id; - this.getNewPriceData.toStation = this.addContractFormdata.toStation; - this.getNewPriceData.coalId = this.addContractFormdata.coalId; - this.getNewPriceData.coalName =this.addContractFormdata.coalName; - // 鑾峰彇鍚堝悓鐓ょ浠锋牸 - this.getNewPrice(); - - // 鍒濆鍖栫涓�娆′紭鎯犱环鏍艰绠� - // this.$nextTick(()=>{ - if(this.selectOKfavouredpolicyValue.length == 0){ - this.multipleSelection = []; - } else { - this.multipleSelection = []; - this.favouredpolicyList.forEach((item)=>{ - if(this.selectOKfavouredpolicyValue.indexOf(item.id) != -1){ - this.multipleSelection.push(item); - } - }) - } - // }) - - // 璁㈠崟杩愯緭绫诲瀷 - switch(this.addContractFormdata.trainType){ - case 1: - this.addContractTransport = '鍦伴攢'; - break; - case 2: - this.addContractTransport = '璺繍'; - break; - } - - // 鑾峰彇鍚堝悓璇︽儏锛岀叅绉� - this.getContractDetails(); - - this.$nextTick(()=>{ - this.addContractShow = true; - }) - - console.log('淇敼鐨勮鍗曡鎯�',this.addContractFormdata); - }, - getContractDetails(){ - uni.showLoading({ - title:'鍔犺浇涓�...' - }) - this.$reqGet('getByContractId',{},this.newFormData.contractId).then(res=>{ - uni.hideLoading(); - if(res.code == 0){ - this.contractDetails = res.data; - } - }) - this.$nextTick(()=>{ - 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); - }); - }) - }, - checkboxChangeFavouredpolicy(e){ - // this.selectOKfavouredpolicyValue = e; - if(e.length == 0){ - this.multipleSelection = []; - } else { - this.multipleSelection = []; - this.favouredpolicyList.forEach((item,i)=>{ - if(e.indexOf(item.id) != -1){ - this.multipleSelection.push(item); - } - }) - } - - }, - // 閫夋嫨瀹㈡埛 - selectCustomer() { - this.selectLevelShow = false; - this.selectCustomerCompShow = false; - uni.showLoading({ - 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; - } - }); - }, - // 瀹㈡埛閫夋嫨寮规鎵撳紑浜� - // selectCustomerOpen() { - // // this.spanStyle = 'overflow:hidden'; //褰撹挋灞傚脊璧锋椂锛屽浐瀹氱晫闈㈢姝㈡粴鍔紝褰撹挋灞傚叧闂椂锛屽厑璁告粴鍔� - // }, - // selectCustomerClose() { - // // this.spanStyle = 'overflow:auto'; // 璁﹉tml鐨刡ody鍙粦鍔� - // // this.selectCustomerShow = false; - // }, - // 鑾峰彇鍗曚綅鏍� - fetchCompTree() { - this.selectCustomerActions = []; - this.$reqGet('fetchCompTree').then(res => { - if (res.code == 0) { - let a = { name: '', id: '' }; - a.name = res.data[0].name; - a.id = res.data[0].id; - this.selectCustomerActions.push(a); - res.data[0].children.forEach(item => { - let a = { name: '', id: '' }; - a.name = item.name; - a.id = item.id; - this.selectCustomerActions.push(a); - }); - } - }); - }, - // 瀹㈡埛閫夋嫨妗嗗崟浣嶉�夋嫨鑿滃崟 - selectCustomerSelect(v) { - uni.hideKeyboard(); - this.selectCustomerData.compIds = v.id; - this.searchCustomerForm.compName = v.name; - }, - // 绾у埆 - selectLevelSelect(v) { - uni.hideKeyboard(); - this.selectCustomerData.level = v.value; - this.searchCustomerForm.levelText = v.name; - }, - // 浠樻绫诲瀷 - sexSelect(v) { - uni.hideKeyboard(); - this.selectValue = v.name; - this.newFormData.payType = v.value; - // this.newFormData.payType = e.name; - // this.$refs.form1.validateField('userInfo.sex'); - }, - // 娓呯┖閫夋嫨瀹㈡埛琛ㄥ崟 - selectCustomerResetFields() { - this.$refs.selectformRef.resetFields(); // 涓嶈捣鏁堟灉 - this.selectCustomerData.customerName = ''; - this.searchCustomerForm.compName = ''; - this.searchCustomerForm.levelText = ''; - this.selectCustomer(); - }, - selectCustomerOkClick(v) { - this.newFormData.customerName = v.customerName; - this.newFormData.customerId = v.id; - this.$reqGet('getAccount', { customerId: v.id }).then(res => { - this.accountDetails = res.data; + // 浼樻儬 + favouredpolicyListAll: [], //浼樻儬鏀跨瓥鍒楄〃鎵�鏈夌殑 + favouredpolicyList: [], // 浼樻儬鏀跨瓥鍒楄〃 + multipleSelection: [], //閫変腑鐨勪紭鎯犳斂绛� + selectOKfavouredpolicyValue: [],//澶嶉�夋閫変腑 + // 鍗曢�夋 + addContractTransport: '', + // 鍝佺浠锋牸琛ㄦ牸 + 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 + }, + dust: null, // 鎶戝皹璐� + trainfreight: {}, //璺繍杩愯垂 + // 杩愯緭绫诲瀷 + addContractTransportShow: false, + addContractTransportData: [[{label: '鍦伴攢', value: 1}, {label: '璺繍', value: 2}]], + currentCoal: { + coalName: '', + cokingPrice: null, + modifyId: null, + modifyInfoId: null, + noImportantPrice: null, + quotePrice: null, + steelMillPrice: null, + type: null + }, + // 婊戝姩鍗曞厓鏍� + options1: [ + { + text: '鍒犻櫎' + } + ], + editApplicationTableId: '' + }; + }, + onLoad(options) { + this.editApplicationTableId = JSON.parse(options.index); - this.searchContractForm.customerName = res.data.customerName; - }); - this.$nextTick(() => { - // this.selectCustomerShow = false; - }); - }, - loadingCustomer(){ - 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'; - } - }); - }, - // 鏃堕棿 - confirmTime(v) { - this.timeShow = false; - v.forEach(e => { - this.newFormData.startDate = v[0]; - this.newFormData.endDate = v[v.lenght - 1]; - this.timeDataStr = v[0] + ' 鑷� ' + v[v.length - 1]; - }); - }, + }, + onShow() { + if (this.menuShow == true) { + this.$refs.menuRef.menuClick(); + } + this.init(); + }, + // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 + onNavigationBarButtonTap(e) { + this.$refs.menuRef.menuClick(); + }, + computed: { + afterPrice() { + let temp = Object.assign({},this.currentCoal); + let favouredpolicyIds = ''; + if (this.favouredpolicyList.length > 0) { + console.log('鍙樺悗鐨勪环鏍�',this.multipleSelection,temp,this.currentCoal); + this.multipleSelection.forEach(e => { + if (favouredpolicyIds.length > 0) { + favouredpolicyIds += ','; + } + favouredpolicyIds += e.id; + temp.steelMillPrice -= e.price; + temp.cokingPrice -= e.price; + temp.noImportantPrice -= e.price; + temp.quotePrice -= e.price; + }); + if (this.multipleSelection.length > 0) { + this.addContractFormdata.favouredpolicyIds = favouredpolicyIds; + } + } + return temp; + }, + showPrice() { + if (this.addContractFormdata) { + let row = this.addContractFormdata; + if (row.compId && row.customerAddressId && row.coalId) { + // this.rowClik(this.currentRow); + return true; + } + } + return false; + }, + //浼樻儬鏀跨瓥 + favouredpolicyListcomputed() { + let list = []; + this.favouredpolicyListAll.forEach(e => { + //鏀粯鏂瑰紡 + if (e.type.indexOf('B') != -1 && e.coalIds) { + if (e.coalIds.indexOf(this.addContractFormdata.coalId) != -1) { + list.push(e); + } + } + //杩愯窛 + if (this.addContractFormdata.trainType == 2) { + if (e.type.indexOf('A') != -1) { + //鏍规嵁鍙戠珯鍒扮珯鑾峰彇杩愯窛 + list.push(e); + } + } + }); + this.favouredpolicyList = list; - // 閫夋嫨鍚堝悓 - // selectContract() { - // if (this.newFormData.customerName != '') { - // if (this.newFormData.contractOrders != []) { - // uni.showToast({ - // title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�', - // icon: 'error', - // duration: 2000 - // }); - // } - // this.selectContractShow = true; - // } else { - // this.$refs.formRef - // .validate() - // .then(res => { - // uni.$u.toast('鏍¢獙鎴愬姛'); - // }) - // .catch(err => { - // uni.$u.toast('璇烽�夋嫨缁撶畻瀹㈡埛'); - // }); - // } - // }, - // 閫夋嫨鍚堝悓绫诲瀷杈撳叆妗嗚幏鍙栫劍鐐硅Е鍙� - // searchContractFormTypeFocus() { - // // 绫诲瀷寮瑰嚭妗� - // this.selectContractTypeShow = true; - // // 寮瑰嚭妗嗙被鍨嬭姹� - // this.$nextTick(() => { - // this.$reqGet('contract_type').then(res => { - // res.data.forEach(item => { - // this.selectContractTypeData[0].push(item.value); - // }); - // }); - // }); - // }, - // 閫夋嫨鍚堝悓寮规 - // selectContractOpen() { - // uni.showLoading({ - // title: '鍔犺浇涓�...' - // }); - // this.$reqGet('contract_status').then(res => { - // // console.log('鐘舵��', res); - // }); - // this.$reqGet('contract', this.searchContractForm).then(res => { - // uni.hideLoading(); - // if (res.code == 0) { - // // console.log('鍚堝悓', res); - // this.contractData = res.data.records; - // } - // }); - // }, - // selectContractClose() { - // this.selectContractShow = false; - // }, - // 鍚堝悓绫诲瀷閫夋嫨鍣� - // selectContractTypeConfirm(v) { - // this.searchContractForm.type = v.value[0]; - // this.selectContractTypeShow = false; - // console.log('閫夋嫨鍣ㄧ‘瀹氬悗鐨勫��', v, this.searchContractForm.type); - // }, - // selectContractTypeClose(v) { - // // 鍒濆鍖栧悎鍚岀被鍨嬮�夋嫨鍣� - // this.selectContractTypeData[0] = []; + return true; + }, + async currentRowComputed() { - // this.selectContractTypeShow = false; - // if (v) { - // this.searchContractForm.type = v.value[0]; - // } - // }, - // 鍚堝悓鏃堕棿閫夋嫨鍣� - // selectContractStartTimeConfirm(e) { - // this.selectContractStartTimeShow = false; - // this.searchContractForm.startDate = e[0]; - // }, - // selectContractStartTimeClose() { - // this.selectContractStartTimeShow = false; - // }, - // selectContractEndTimeConfirm(e) { - // this.selectContractEndTimeShow = false; - // this.searchContractForm.endDate = e[0]; - // }, - // selectContractEndTimeClose() { - // this.selectContractEndTimeShow = false; - // }, - // 閲嶇疆琛ㄥ崟鎵�鏈夊瓧娈� - // selectContractResetFields() { - // this.searchContractForm.num = ''; - // this.searchContractForm.startDate = ''; - // this.searchContractForm.endDate = ''; - // this.searchContractForm.customerName = ''; - // this.searchContractForm.type = ''; - // }, - // selectContractClick(e) { - // console.log('閫夋嫨鍚堝悓', e); - // this.newFormData.contractName = e.contractName; - // this.newFormData.contractNum = e.num; - // this.newFormData.contractId = e.id; - // this.selectContractShow = false; + //鍙樹环鏍肩敤鐨� + this.changePriceMode(this.addContractFormdata.priceMode); - // // 浠锋牸鍙傛暟璧嬪�� - // 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' - // } - // }) - // .then(res => { - // this.contractDetails = res[1].data.data; - // console.log('鍚堝悓璇︽儏', res, this.contractDetails); - // }) - // .catch(err => { - // console.log(err); - // }); - // }, - // 娣诲姞璁㈠崟鎸夐挳 - addContractClick() { - // 鎵撳嵃true鎴杅alse - this.$refs.formRef - .validate() - .then(res => { - if (this.accountDetails.balanceType == '璐�') { - uni.showToast({ - title: '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒', - icon: 'error', - duration: 2000 - }); - } else { - if (this.accountDetails.balance == 0 || (null && this.accountDetails.balance2 == 0) || null) { - uni.showToast({ - title: '璐︽埛浣欓涓嶈冻锛�', - icon: 'error', - duration: 2000 - }); - } else { - this.addContractShow = true; - this.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: '' - }; - - // this.getNewPriceData.type = this.newFormData.type; - // this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName; - // this.getNewPriceData.customerAddressId = this.addContractFormdata.id; - // this.getNewPriceData.toStation = this.addContractFormdata.toStation; - // this.getNewPriceData.coalId = this.addContractFormdata.coalId; - // this.getNewPriceData.coalName =this.addContractFormdata.coalName; - // 鑾峰彇鍚堝悓鐓ょ浠锋牸 - // this.getNewPrice(); - - // 杩愯緭绫诲瀷鍒濆鍖� - switch(this.addContractFormdata.trainType){ - case 1: - this.addContractTransport = '鍦伴攢'; - break; - case 2: - this.addContractTransport = '璺繍'; - break; - } - - // 鑾峰彇鍚堝悓璇︽儏锛岀叅绉� - this.getContractDetails(); - - // console.log('this.addContractFormdata',this.addContractFormdata); - this.multipleSelection = []; - } - } - }) - .catch(err => { - uni.$u.toast('鏁堥獙澶辫触'); - }); - }, - // 娣诲姞鍚堝悓寮瑰嚭妗� - addContractClose() { - this.addContractFormdata = {}; - this.addContractShow = false; - }, - addContractOpen() { - console.log('娣诲姞鐢宠瀛愰」绐楀彛鎵撳紑this.addContractFormdata',this.addContractFormdata); - // console.log('娣诲姞璁㈠崟鎵撳紑'); - }, - // 閫夋嫨鐓ゅ巶 - coalFiledSelectOpen(e) { - // console.log('coalfiledSelect: ', e); - }, - coalFiledSelectClose() { - this.coalFiledSelectShow = false; - }, - // 閫夋嫨鐨勭叅鍘� - coalFiledSelectClick(e) { - this.addContractFormdata.compName = e.compName; - this.addContractFormdata.filedName = e.name; - this.addContractFormdata.compId = e.compId; - this.addContractFormdata.filedId = e.id; - this.addContractFormdata.fromStation = e.toStation; + //鍙樿鍗曢噺 + if (this.addContractFormdata.id != null) { + if (this.addContractFormdata.price > 0 && (this.addContractFormdata.amount > 0 || this.addContractFormdata.quant > 0)) { + let price = this.addContractFormdata.price; + 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; + this.addContractFormdata.cost1 = (this.addContractFormdata.quant * cost1Price).toFixed(2); //杩愯垂 + this.addContractFormdata.cost2 = (this.addContractFormdata.quant * this.dust).toFixed(2); //鎶戝皹璐� - this.selectCoalFiledData = e; + let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2); + this.addContractFormdata.amount = amount.toFixed(2); + } + } + } else { + this.addContractFormdata.quant = null; + } + 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, + // 娣卞害鐩戝惉 灞炴�х殑鍙樺寲// deep: true + // 閫夋嫨瀹㈡埛鏌ヨ鏉′欢 + 'searchCustomerForm.compName'(newV, oldV) { + if (newV == '') { + this.selectCustomerData.compIds = ''; + } + }, + 'searchCustomerForm.levelText'(newV, oldV) { + if (newV == '') { + this.selectCustomerData.level = ''; + } + }, + // 'selectOKfavouredpolicyValue'(newV,oleV){ + // } + }, + components: { + popupMenu, + combinationTitle + }, + 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); + this.addContractFormdata.amount = amount.toFixed(2); + } + }, + init() { + this.jcfavouredpolicyitem(); + this.coalfiled(); + this.coalprice(); + this.operato(); + this.pay_type(); + this.others_params(); + this.fetchCompTree(); + this.getFavouredPolicyItem(); + this.editApplicationFormData(); // 淇敼鐢宠琛ㄥ崟璇︽儏 + }, + // 鍒濆鍖栫敵璇疯〃鍗� + async editApplicationFormData() { + uni.showLoading({ + title:'鍔犺浇涓�...' + }) + // 閫氳繃鐢宠id鑾峰彇琛ㄥ崟 + await this.$reqGet('formData', {}, this.editApplicationTableId).then(res => { + uni.hideLoading(); + console.log('鏁翠綋璇︽儏', res.data); + this.newFormData = res.data; + this.timeDataStr = this.newFormData.startDate; + }) - this.coalFiledSelectShow = false; - }, - // 鏀惰揣浜� - addContractConsigneeClose() { - this.addContractConsigneeShow = false; - }, - // 娣诲姞鍚堝悓瀛愰」鏀惰揣浜烘墦寮� - addContractConsigneeOpen() { - this.selectCustomer() - }, - addContractConsignee() { - 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; - }); + // 鑾峰彇鍚堝悓璇︽儏锛岀叅绉� + await this.getContractDetails(); - // 璧嬪�肩粰鍙栦环鏍艰姹傚弬鏁� - this.getNewPriceData.customerAddressName = v.customerFullName; - this.getNewPriceData.customerAddressId = v.id; - this.getNewPriceData.toStation = v.toStation; + // 鍒濆鍖栧綋鍓嶇敵璇峰鎴疯处鎴锋儏鍐� + if(this.newFormData.customerId){ + await this.$reqGet('getAccount', {customerId: this.newFormData.customerId}).then(res => { + this.accountDetails = res.data; + }); + } + }, + editApplicationClick(index) { + this.applicationOrderIndex = index;// 寰呬慨鏀硅鍗昳ndex + this.addContractFormdata = Object.assign({},this.newFormData.contractOrders[index]); + console.log('淇敼鎸囧畾璁㈠崟琛ㄥ崟----------',this.addContractFormdata.id,this.addContractFormdata); + this.addContractFormdata.priceMode = this.newFormData.contractOrders[this.applicationOrderIndex].priceMode.toString(); + // 淇敼璁㈠崟浼樻儬鍒濆鍖� + if (this.newFormData.contractOrders[index].favouredpolicyIds) { + this.newFormData.contractOrders[index].favouredpolicyIds.split(',').map(item => { + this.selectOKfavouredpolicyValue.push(Number(item)); + }); + } - 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); - }); - - }, - // 鍝佺閫夋嫨鍣� - addContractCoalConfirm(e) { - // console.log('鍝佺閫夋嫨鍣�', e); + // 鑾峰彇浠锋牸 + // this.getNewPriceData = this.addContractFormdata; + this.getNewPriceData.compName = this.newFormData.contractOrders[this.applicationOrderIndex].compName; + this.getNewPriceData.traninType = this.newFormData.contractOrders[this.applicationOrderIndex].traninType; + this.getNewPriceData.compId = this.newFormData.contractOrders[this.applicationOrderIndex].compId; + this.getNewPriceData.fromStation = this.newFormData.contractOrders[this.applicationOrderIndex].fromStation; + this.getNewPriceData.toStation = this.newFormData.contractOrders[this.applicationOrderIndex].toStation; + this.getNewPriceData.filedId = this.newFormData.contractOrders[this.applicationOrderIndex].filedId; + this.getNewPriceData.filedName = this.newFormData.contractOrders[this.applicationOrderIndex].filedName; + this.getNewPriceData.customerAddressName = this.newFormData.contractOrders[this.applicationOrderIndex].customerAddressName; + this.getNewPriceData.customerAddressId = this.newFormData.contractOrders[this.applicationOrderIndex].customerAddressId; + this.getNewPriceData.toStation = this.newFormData.contractOrders[this.applicationOrderIndex].toStation; + this.getNewPriceData.coalId = this.newFormData.contractOrders[this.applicationOrderIndex].coalId; + this.getNewPriceData.coalName = this.newFormData.contractOrders[this.applicationOrderIndex].coalName; + // 鑾峰彇鍚堝悓鐓ょ浠锋牸 + this.getNewPrice(); - this.addContractCoalShow = false; // 鍏抽棴閫夋嫨鍣� - this.addContractFormdata.coalId = e.value[0].id; - this.addContractFormdata.coalName = e.value[0].label; - // 鐓ょ浠锋牸璇锋眰(鐓ゅ巶=>浠锋牸鍙傛暟) - this.getNewPriceData.coalId = e.value[0].id; - this.getNewPriceData.coalName = e.value[0].label; + // 鍒濆鍖栫涓�娆′紭鎯犱环鏍艰绠� + // this.$nextTick(()=>{ + if (this.selectOKfavouredpolicyValue.length == 0) { + this.multipleSelection = []; + } else { + this.multipleSelection = []; + this.favouredpolicyList.forEach((item) => { + if (this.selectOKfavouredpolicyValue.indexOf(item.id) != -1) { + this.multipleSelection.push(item); + } + }) + } + // }) - // this.selectCoalFiledData.compId = e.compId; - // this.selectCoalFiledData.compName = e.compName; - // this.selectCoalFiledData.toStation = e.fromStation; - - this.getNewPrice(); - }, - getNewPrice(){ - this.$reqGet('getNewPrice', this.getNewPriceData).then(res => { - if (res.code == 0) { - // console.log('鑾峰彇浠锋牸',res); - let data = res.data; - if (data) { - this.currentCoal.coalName = data.coalName; - this.currentCoal.cokingPrice = data.cokingPrice; //鐒﹀寲浠锋牸 - this.currentCoal.noImportantPrice = data.noImportantPrice; //涓嶉噸瑕佷环鏍� - this.currentCoal.quotePrice = data.quotePrice; // 鎸傜墝浠锋牸 - this.currentCoal.steelMillPrice = data.steelMillPrice; // 閽㈠巶浠锋牸 - this.currentCoal.modifyId = data.modifyId; //淇敼id - this.currentCoal.modifyInfoId = data.id; - - this.addContractFormdata.price = data.steelMillPrice; - this.addContractFormdata.modifyId = data.modifyId; - this.addContractFormdata.id = data.id; - } else { - uni.$u.toast('鐓ょ浠锋牸鏈缃�'); - } - } - }); - }, - addContractCoalClose() { - this.addContractCoalShow = false; - }, - // 鐓ゅ搧绉嶄环鏍� - groupChange(e) { - // console.log('鍗曢�夋灏忕粍', e); - }, - changePriceMode(e) { - console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===111'); - if (!this.currentCoal) return; - console.log('鍗曢�夋鏁板瓧',e,this.addContractFormdata.priceMode); - console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===2222'); - if(e){ - this.addContractFormdata.priceMode = e; - console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===3333'); - console.log(typeof this.addContractFormdata.priceMode,this.addContractFormdata.priceMode,'this.addContractFormdata.priceMode=======瀛楃涓�') - } - console.log(this.afterPrice,'this.afterPrice.quotePrice=======afterPrice222222'); - console.log(this.afterPrice.cokingPrice,'this.afterPrice.quotePrice=======afterPrice222222------------'); - console.log(this.afterPrice.quotePrice,'this.afterPrice.quotePrice=======afterPrice222222------------') - this.addContractFormdata.price = this.afterPrice.quotePrice; - console.log(this.addContractFormdata.price,'this.addContractFormdata.price=====afterPrice333333333333') - switch (this.addContractFormdata.priceMode) { - case '0': - console.log('浠锋牸',this.afterPrice.steelMillPrice); - this.addContractFormdata.price = this.afterPrice.steelMillPrice; - break; - case '1': - this.addContractFormdata.price = this.afterPrice.cokingPrice; - break; - case '2': - this.addContractFormdata.price = this.afterPrice.noImportantPrice; - break; - case '3': - this.addContractFormdata.price = this.afterPrice.quotePrice; - console.log('杩涘叆鍗曢�夋',this.addContractFormdata,'this.addContractFormdata===444'); - break; - } - }, - // 浼樻儬閫夋嫨 - selectionChange(e) { - // console.log('浼樻儬閫夋嫨',e); - this.multipleSelection = []; - this.favouredpolicyList.forEach((item, i) => { - if (e.detail.index.indexOf(i) != -1) { - this.multipleSelection.push(item); - } - }); - }, - // 杩愯緭閫夋嫨鍣� - addContractTransportConfirm(e) { - this.addContractTransportShow = false; - this.addContractFormdata.trainType = e.value[0].value; - switch (this.addContractFormdata.trainType) { - case 1: - this.addContractTransport = '鍦伴攢'; - break; - case 2: - this.addContractTransport = '璺繍'; - break; - } - }, - addContractTransportClose() { - this.addContractTransportShow = false; - }, - // 鑾峰彇杩愯垂 - async getFreight(from, to, customerId) { - let key = from + to + customerId; - let price = this.trainfreight[key]; - price = await this.$reqGet('trainFreightFind', { from, to, customerId }).then(res => { - let resPrice = 10; //榛樿浠锋牸涓�10 - if (res.data) { - resPrice = res.data.price; - } - return resPrice; - }); - return price; - }, - addContractSanConfirm() { - if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) { - if(this.applicationOrderIndex == null){ - this.newFormData.contractOrders.push(this.addContractFormdata); - this.$nextTick(() => { - this.addContractShow = false; - }); - this.$u.toast('娣诲姞鎴愬姛'); - } else { - // this.newFormData.contractOrders.map(i => { - // return this.newformData.contractOrders[] - // }) - this.newFormData.contractOrders[this.applicationOrderIndex] = this.addContractFormdata; - this.addContractShow = false; // 闅愯棌寮瑰嚭妗� - this.applicationOrderIndex = null; // 鍒濆鍖栦慨鏀硅鍗昳ndex - this.$u.toast('淇敼鎴愬姛'); - } - - - } else { - uni.$u.toast('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�'); - } - }, - // 鍒濆鏁版嵁璇锋眰 - operato() { - this.$reqGet('operator').then(res => { - this.operator = res.data; - }); - }, - pay_type() { - this.actions = []; - this.$reqGet('pay_type').then(res => { - // console.log('paytype', res); - this.payData = res.data; - res.data.forEach(e => { - let a = { name: '', value: '' }; - a.name = e.label; - a.value = e.value; - this.actions.push(a); - }); - }); - // console.log(this.actions); - }, - // 鎶戝皹璐� - others_params() { - this.$reqGet('others_params').then(res => { - // console.log('others_params', res); - res.data.forEach(e => { - if (e.label == 'dust') { - this.dust = parseFloat(e.value); - } - }); - }); - }, - coalprice() { - this.$reqGet('coalprice', { current: 1, size: 1000 }).then(res => { - // console.log('coalprice', res); - }); - }, - // 绾у埆璺濅紭鎯� - jcfavouredpolicyitem() { - this.$reqGet('jcfavouredpolicyitem', { current: 1, size: 1000, status: 0 }).then(res => { - // console.log('绾у埆璺濅紭鎯�', res); - // this.favouredpolicyListAll = res.data.records; - }); - }, - // 鑾峰彇鎵�鏈夌殑浼樻儬鏀跨瓥 - getFavouredPolicyItem() { - this.$reqGet('getFavouredPolicyItem', { current: 1, size: 1000, status: 0 }).then(res => { - // console.log('鎵�鏈変环鏍间紭鎯�',res.data.records); - this.favouredpolicyListAll = res.data.records; - }); - }, - // 鐓ゅ満 - coalfiled() { - this.$reqGet('coalfiled', this.coalfiledParams).then(res => { - this.coalfiledData = res.data.records; - }); - }, - // 鏃堕棿 - timeClose() { - this.timeShow = false; - }, - menushow(e) { - this.menuShow = e; - }, - // 閫夋嫨瀹㈡埛 - // moveHandleCustomer() { - // return true; - // }, - // moveHandleContract(){ - // return true; - // }, - // 鏂板缓鍙戣繍鐢宠 - newApplicationFormDataClick() { - this.$refs.formRef - .validate() - .then(res => { - let amount = 0; - this.newFormData.contractOrders.forEach(e => { - amount += Number(e.amount); - }); - if (this.newFormData.payType == '0') { - 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', - duration: 2000 - }); - } else { - this.editShenQing(); - // this.xswaybill(); - } - } else { - 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', - duration: 2000 - }); - } else { - this.editShenQing(); - - // this.xswaybill(); - } - } - }) - .catch(err => { - uni.$u.toast('鏍¢獙澶辫触'); - }); - }, - // 淇敼鐢宠淇℃伅 - editShenQing(){ - uni.request({ - url:'/yunxiao/xswaybill', - method:"PUT", - data:this.newFormData, - header:{ - 'TENANT-ID': 5, - Authorization: 'Bearer ' + uni.getStorageSync('access_token'), - VERSION: 'zzl' - }, - - }).then(res=>{ - // console.log(res); - if(res.code == 0){ - uni.showToast({ - title:'淇敼鎴愬姛', - icon:'success', - duration:2000 - }) - this.$u.toast('淇敼鎴愬姛') - } - uni.navigateBack({ - delta: 1 - }); - }) - }, - // 鍒犻櫎璁㈠崟鍗$墖 - deleteContractCardClick(e) { - // console.log('鍒犻櫎璁㈠崟鍗$墖', e); - this.newFormData.contractOrders.splice(e, 1); - }, - xswaybill() { - console.log('鏂板缓鍙戣繍鐢宠', this.newFormData); - uni.showLoading({ - title: '鍔犺浇涓�...' - }); - this.$reqPost('xswaybill', this.newFormData).then(res => { - uni.hideLoading(); - console.log('鏂板缓鍙戣繍鐢宠', res); - if (res.code == 0) { - uni.showToast({ - title: '娣诲姞鎴愬姛锛�', - icon: 'success', - duration: 2000 - }); - // this.$nextTick(() => { - // uni.navigateBack({ - // // url: '/pages/my-application/my-application' - // delta: 2 - // }); - // }); - } - }); - }, - backPage() { - uni.navigateBack({ - delta: 1 - }); - } - } + // 璁㈠崟杩愯緭绫诲瀷 + switch (this.addContractFormdata.trainType) { + case 1: + this.addContractTransport = '鍦伴攢'; + break; + case 2: + this.addContractTransport = '璺繍'; + break; + } + + + this.$nextTick(() => { + this.addContractShow = true; + }) + + }, + getContractDetails() { + uni.showLoading({ + title: '鍔犺浇涓�...' + }) + this.$reqGet('getByContractId', {}, this.newFormData.contractId).then(res => { + uni.hideLoading(); + if (res.code == 0) { + this.contractDetails = res.data; + } + }) + this.$nextTick(() => { + 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); + }); + }) + }, + checkboxChangeFavouredpolicy(e) { + // this.selectOKfavouredpolicyValue = e; + if (e.length == 0) { + this.multipleSelection = []; + } else { + this.multipleSelection = []; + this.favouredpolicyList.forEach((item, i) => { + if (e.indexOf(item.id) != -1) { + this.multipleSelection.push(item); + } + }) + } + + }, + // 閫夋嫨瀹㈡埛 + selectCustomer() { + this.selectLevelShow = false; + this.selectCustomerCompShow = false; + uni.showLoading({ + 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; + } + }); + }, + // 瀹㈡埛閫夋嫨寮规鎵撳紑浜� + // selectCustomerOpen() { + // // this.spanStyle = 'overflow:hidden'; //褰撹挋灞傚脊璧锋椂锛屽浐瀹氱晫闈㈢姝㈡粴鍔紝褰撹挋灞傚叧闂椂锛屽厑璁告粴鍔� + // }, + // selectCustomerClose() { + // // this.spanStyle = 'overflow:auto'; // 璁﹉tml鐨刡ody鍙粦鍔� + // // this.selectCustomerShow = false; + // }, + // 鑾峰彇鍗曚綅鏍� + fetchCompTree() { + this.selectCustomerActions = []; + this.$reqGet('fetchCompTree').then(res => { + if (res.code == 0) { + let a = {name: '', id: ''}; + a.name = res.data[0].name; + a.id = res.data[0].id; + this.selectCustomerActions.push(a); + res.data[0].children.forEach(item => { + let a = {name: '', id: ''}; + a.name = item.name; + a.id = item.id; + this.selectCustomerActions.push(a); + }); + } + }); + }, + // 瀹㈡埛閫夋嫨妗嗗崟浣嶉�夋嫨鑿滃崟 + selectCustomerSelect(v) { + uni.hideKeyboard(); + this.selectCustomerData.compIds = v.id; + this.searchCustomerForm.compName = v.name; + }, + // 绾у埆 + selectLevelSelect(v) { + uni.hideKeyboard(); + this.selectCustomerData.level = v.value; + this.searchCustomerForm.levelText = v.name; + }, + // 浠樻绫诲瀷 + sexSelect(v) { + uni.hideKeyboard(); + this.selectValue = v.name; + this.newFormData.payType = v.value; + // this.newFormData.payType = e.name; + // this.$refs.form1.validateField('userInfo.sex'); + }, + // 娓呯┖閫夋嫨瀹㈡埛琛ㄥ崟 + selectCustomerResetFields() { + this.$refs.selectformRef.resetFields(); // 涓嶈捣鏁堟灉 + this.selectCustomerData.customerName = ''; + this.searchCustomerForm.compName = ''; + this.searchCustomerForm.levelText = ''; + this.selectCustomer(); + }, + selectCustomerOkClick(v) { + this.newFormData.customerName = v.customerName; + this.newFormData.customerId = v.id; + this.$reqGet('getAccount', {customerId: v.id}).then(res => { + this.accountDetails = res.data; + + this.searchContractForm.customerName = res.data.customerName; + }); + this.$nextTick(() => { + // this.selectCustomerShow = false; + }); + }, + loadingCustomer() { + 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'; + } + }); + }, + // 鏃堕棿 + confirmTime(v) { + this.timeShow = false; + v.forEach(e => { + this.newFormData.startDate = v[0]; + this.newFormData.endDate = v[v.lenght - 1]; + this.timeDataStr = v[0] + ' 鑷� ' + v[v.length - 1]; + }); + }, + + // 閫夋嫨鍚堝悓 + // selectContract() { + // if (this.newFormData.customerName != '') { + // if (this.newFormData.contractOrders != []) { + // uni.showToast({ + // title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�', + // icon: 'error', + // duration: 2000 + // }); + // } + // this.selectContractShow = true; + // } else { + // this.$refs.formRef + // .validate() + // .then(res => { + // uni.$u.toast('鏍¢獙鎴愬姛'); + // }) + // .catch(err => { + // uni.$u.toast('璇烽�夋嫨缁撶畻瀹㈡埛'); + // }); + // } + // }, + // 閫夋嫨鍚堝悓绫诲瀷杈撳叆妗嗚幏鍙栫劍鐐硅Е鍙� + // searchContractFormTypeFocus() { + // // 绫诲瀷寮瑰嚭妗� + // this.selectContractTypeShow = true; + // // 寮瑰嚭妗嗙被鍨嬭姹� + // this.$nextTick(() => { + // this.$reqGet('contract_type').then(res => { + // res.data.forEach(item => { + // this.selectContractTypeData[0].push(item.value); + // }); + // }); + // }); + // }, + // 閫夋嫨鍚堝悓寮规 + // selectContractOpen() { + // uni.showLoading({ + // title: '鍔犺浇涓�...' + // }); + // this.$reqGet('contract_status').then(res => { + // // console.log('鐘舵��', res); + // }); + // this.$reqGet('contract', this.searchContractForm).then(res => { + // uni.hideLoading(); + // if (res.code == 0) { + // // console.log('鍚堝悓', res); + // this.contractData = res.data.records; + // } + // }); + // }, + // selectContractClose() { + // this.selectContractShow = false; + // }, + // 鍚堝悓绫诲瀷閫夋嫨鍣� + // selectContractTypeConfirm(v) { + // this.searchContractForm.type = v.value[0]; + // this.selectContractTypeShow = false; + // console.log('閫夋嫨鍣ㄧ‘瀹氬悗鐨勫��', v, this.searchContractForm.type); + // }, + // selectContractTypeClose(v) { + // // 鍒濆鍖栧悎鍚岀被鍨嬮�夋嫨鍣� + // this.selectContractTypeData[0] = []; + + // this.selectContractTypeShow = false; + // if (v) { + // this.searchContractForm.type = v.value[0]; + // } + // }, + // 鍚堝悓鏃堕棿閫夋嫨鍣� + // selectContractStartTimeConfirm(e) { + // this.selectContractStartTimeShow = false; + // this.searchContractForm.startDate = e[0]; + // }, + // selectContractStartTimeClose() { + // this.selectContractStartTimeShow = false; + // }, + // selectContractEndTimeConfirm(e) { + // this.selectContractEndTimeShow = false; + // this.searchContractForm.endDate = e[0]; + // }, + // selectContractEndTimeClose() { + // this.selectContractEndTimeShow = false; + // }, + // 閲嶇疆琛ㄥ崟鎵�鏈夊瓧娈� + // selectContractResetFields() { + // this.searchContractForm.num = ''; + // this.searchContractForm.startDate = ''; + // this.searchContractForm.endDate = ''; + // this.searchContractForm.customerName = ''; + // this.searchContractForm.type = ''; + // }, + // selectContractClick(e) { + // console.log('閫夋嫨鍚堝悓', e); + // this.newFormData.contractName = e.contractName; + // this.newFormData.contractNum = e.num; + // this.newFormData.contractId = e.id; + // 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' + // } + // }) + // .then(res => { + // this.contractDetails = res[1].data.data; + // console.log('鍚堝悓璇︽儏', res, this.contractDetails); + // }) + // .catch(err => { + // console.log(err); + // }); + // }, + // 娣诲姞璁㈠崟鎸夐挳 + addContractClick() { + // 鎵撳嵃true鎴杅alse + // this.$refs.formRef + // .validate() + // .then(res => { + if (this.accountDetails.balanceType == '璐�') { + uni.showToast({ + title: '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒', + icon: 'error', + duration: 2000 + }); + } else { + if (this.accountDetails.balance == 0 || (null && this.accountDetails.balance2 == 0) || null) { + uni.showToast({ + title: '璐︽埛浣欓涓嶈冻锛�', + icon: 'error', + duration: 2000 + }); + } else { + this.addContractShow = true; + this.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: '' + }; + + // this.getNewPriceData.type = this.newFormData.type; + // this.getNewPriceData.customerAddressName = this.addContractFormdata.customerFullName; + // this.getNewPriceData.customerAddressId = this.addContractFormdata.id; + // this.getNewPriceData.toStation = this.addContractFormdata.toStation; + // this.getNewPriceData.coalId = this.addContractFormdata.coalId; + // this.getNewPriceData.coalName =this.addContractFormdata.coalName; + // 鑾峰彇鍚堝悓鐓ょ浠锋牸 + // this.getNewPrice(); + + // 杩愯緭绫诲瀷鍒濆鍖� + switch (this.addContractFormdata.trainType) { + case 1: + this.addContractTransport = '鍦伴攢'; + break; + case 2: + this.addContractTransport = '璺繍'; + break; + } + + // 鑾峰彇鍚堝悓璇︽儏锛岀叅绉� + this.getContractDetails(); + + this.multipleSelection = []; + } + } + // }) + // .catch(err => { + // uni.$u.toast('鏁堥獙澶辫触'); + // }); + }, + // 娣诲姞鍚堝悓寮瑰嚭妗� + addContractClose() { + this.addContractShow = false; + this.addContractFormdata = {}; + this.applicationOrderIndex = null; + }, + addContractOpen() { + console.log('娣诲姞璁㈠崟鎵撳紑'); + }, + // 閫夋嫨鐓ゅ巶 + coalFiledSelectOpen(e) { + // console.log('coalfiledSelect: ', e); + }, + coalFiledSelectClose() { + this.coalFiledSelectShow = false; + }, + // 閫夋嫨鐨勭叅鍘� + coalFiledSelectClick(e) { + this.addContractFormdata.compName = e.compName; + this.addContractFormdata.filedName = e.name; + this.addContractFormdata.compId = e.compId; + this.addContractFormdata.filedId = e.id; + this.addContractFormdata.fromStation = e.toStation; + + this.selectCoalFiledData = e; + + this.coalFiledSelectShow = false; + }, + // 鏀惰揣浜� + addContractConsigneeClose() { + this.addContractConsigneeShow = false; + }, + // 娣诲姞鍚堝悓瀛愰」鏀惰揣浜烘墦寮� + addContractConsigneeOpen() { + this.selectCustomer() + }, + addContractConsignee() { + 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; + this.getNewPriceData.customerAddressId = v.id; + this.getNewPriceData.toStation = v.toStation; + + 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); + }); + + }, + // 鍝佺閫夋嫨鍣� + addContractCoalConfirm(e) { + // console.log('鍝佺閫夋嫨鍣�', e); + + this.addContractCoalShow = false; // 鍏抽棴閫夋嫨鍣� + this.addContractFormdata.coalId = e.value[0].id; + this.addContractFormdata.coalName = e.value[0].label; + // 鐓ょ浠锋牸璇锋眰(鐓ゅ巶=>浠锋牸鍙傛暟) + this.getNewPriceData.coalId = e.value[0].id; + this.getNewPriceData.coalName = e.value[0].label; + + // this.selectCoalFiledData.compId = e.compId; + // this.selectCoalFiledData.compName = e.compName; + // this.selectCoalFiledData.toStation = e.fromStation; + + this.getNewPrice(); + }, + getNewPrice() { + this.$reqGet('getNewPrice', this.getNewPriceData).then(res => { + if (res.code == 0) { + // console.log('鑾峰彇浠锋牸',res); + let data = res.data; + if (data) { + this.currentCoal.coalName = data.coalName; + this.currentCoal.cokingPrice = data.cokingPrice; //鐒﹀寲浠锋牸 + this.currentCoal.noImportantPrice = data.noImportantPrice; //涓嶉噸瑕佷环鏍� + this.currentCoal.quotePrice = data.quotePrice; // 鎸傜墝浠锋牸 + this.currentCoal.steelMillPrice = data.steelMillPrice; // 閽㈠巶浠锋牸 + this.currentCoal.modifyId = data.modifyId; //淇敼id + this.currentCoal.modifyInfoId = data.id; + + this.addContractFormdata.price = data.steelMillPrice; + this.addContractFormdata.modifyId = data.modifyId; + // this.addContractFormdata.id = data.id; + } else { + uni.$u.toast('鐓ょ浠锋牸鏈缃�'); + } + } + }); + }, + addContractCoalClose() { + this.addContractCoalShow = false; + }, + // 鐓ゅ搧绉嶄环鏍� + groupChange(e) { + // console.log('鍗曢�夋灏忕粍', e); + }, + changePriceMode(e) { + if (!this.currentCoal) return; + if (e) { + this.addContractFormdata.priceMode = e; + } + + this.addContractFormdata.price = this.afterPrice.quotePrice; + switch (this.addContractFormdata.priceMode) { + case '0': + this.addContractFormdata.price = this.afterPrice.steelMillPrice; + break; + case '1': + this.addContractFormdata.price = this.afterPrice.cokingPrice; + break; + case '2': + this.addContractFormdata.price = this.afterPrice.noImportantPrice; + break; + case '3': + this.addContractFormdata.price = this.afterPrice.quotePrice; + break; + } + }, + // 浼樻儬閫夋嫨 + selectionChange(e) { + // console.log('浼樻儬閫夋嫨',e); + this.multipleSelection = []; + this.favouredpolicyList.forEach((item, i) => { + if (e.detail.index.indexOf(i) != -1) { + this.multipleSelection.push(item); + } + }); + }, + // 杩愯緭閫夋嫨鍣� + addContractTransportConfirm(e) { + this.addContractTransportShow = false; + this.addContractFormdata.trainType = e.value[0].value; + switch (this.addContractFormdata.trainType) { + case 1: + this.addContractTransport = '鍦伴攢'; + break; + case 2: + this.addContractTransport = '璺繍'; + break; + } + }, + addContractTransportClose() { + this.addContractTransportShow = false; + }, + // 鑾峰彇杩愯垂 + async getFreight(from, to, customerId) { + let key = from + to + customerId; + let price = this.trainfreight[key]; + price = await this.$reqGet('trainFreightFind', {from, to, customerId}).then(res => { + let resPrice = 10; //榛樿浠锋牸涓�10 + if (res.data) { + resPrice = res.data.price; + } + return resPrice; + }); + return price; + }, + addContractSanConfirm() { + if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) { + if (this.applicationOrderIndex == null) { + this.newFormData.contractOrders.push(this.addContractFormdata); + this.$nextTick(() => { + this.addContractShow = false; + }); + this.$u.toast('娣诲姞鎴愬姛'); + } else { + // this.newFormData.contractOrders.map(i => { + // return this.newformData.contractOrders[] + // }) + this.newFormData.contractOrders[this.applicationOrderIndex] = this.addContractFormdata; + this.addContractShow = false; // 闅愯棌寮瑰嚭妗� + this.applicationOrderIndex = null; // 鍒濆鍖栦慨鏀硅鍗昳ndex + this.$u.toast('淇敼鎴愬姛'); + } + } else { + uni.$u.toast('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�'); + } + }, + // 鍒濆鏁版嵁璇锋眰 + operato() { + this.$reqGet('operator').then(res => { + this.operator = res.data; + }); + }, + pay_type() { + this.actions = []; + this.$reqGet('pay_type').then(res => { + // console.log('paytype', res); + this.payData = res.data; + res.data.forEach(e => { + let a = {name: '', value: ''}; + a.name = e.label; + a.value = e.value; + this.actions.push(a); + }); + }); + // console.log(this.actions); + }, + // 鎶戝皹璐� + others_params() { + this.$reqGet('others_params').then(res => { + // console.log('others_params', res); + res.data.forEach(e => { + if (e.label == 'dust') { + this.dust = parseFloat(e.value); + } + }); + }); + }, + coalprice() { + this.$reqGet('coalprice', {current: 1, size: 1000}).then(res => { + // console.log('coalprice', res); + }); + }, + // 绾у埆璺濅紭鎯� + jcfavouredpolicyitem() { + this.$reqGet('jcfavouredpolicyitem', {current: 1, size: 1000, status: 0}).then(res => { + // console.log('绾у埆璺濅紭鎯�', res); + // this.favouredpolicyListAll = res.data.records; + }); + }, + // 鑾峰彇鎵�鏈夌殑浼樻儬鏀跨瓥 + getFavouredPolicyItem() { + this.$reqGet('getFavouredPolicyItem', {current: 1, size: 1000, status: 0}).then(res => { + // console.log('鎵�鏈変环鏍间紭鎯�',res.data.records); + this.favouredpolicyListAll = res.data.records; + }); + }, + // 鐓ゅ満 + coalfiled() { + this.$reqGet('coalfiled', this.coalfiledParams).then(res => { + this.coalfiledData = res.data.records; + }); + }, + // 鏃堕棿 + timeClose() { + this.timeShow = false; + }, + menushow(e) { + this.menuShow = e; + }, + // 閫夋嫨瀹㈡埛 + // moveHandleCustomer() { + // return true; + // }, + // moveHandleContract(){ + // return true; + // }, + // 鏂板缓鍙戣繍鐢宠 + newApplicationFormDataClick() { + console.log('鎻愪氦鐢宠鎸夐挳'); + this.$refs.formRef + .validate() + .then(res => { + let amount = 0; + this.newFormData.contractOrders.forEach(e => { + amount += Number(e.amount); + }); + if (this.newFormData.payType == '0') { + 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', + duration: 2000 + }); + } else { + uni.showLoading({ + title:'鍔犺浇涓�...' + }); + this.editShenQing(); + // this.xswaybill(); + } + } else { + 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', + duration: 2000 + }); + } else { + uni.showLoading({ + title:'鍔犺浇涓�...' + }); + this.editShenQing(); + // this.xswaybill(); + } + } + }) + .catch(err => { + uni.$u.toast('鏍¢獙澶辫触'); + }); + }, + // 淇敼鐢宠淇℃伅 + editShenQing() { + uni.request({ + url: '/yunxiao/xswaybill', + method: "PUT", + data: this.newFormData, + header: { + 'TENANT-ID': 5, + Authorization: 'Bearer ' + uni.getStorageSync('access_token'), + VERSION: 'zzl' + } + }).then(res => { + uni.hideLoading(); + this.$u.toast('淇敼鎴愬姛'); + this.$nextTick(() => { + uni.navigateBack({ + delta: 1 + }); + }) + }) + }, + // 鍒犻櫎璁㈠崟鍗$墖 + deleteContractCardClick(e) { + // console.log('鍒犻櫎璁㈠崟鍗$墖', e); + this.newFormData.contractOrders.splice(e, 1); + }, + xswaybill() { + console.log('鏂板缓鍙戣繍鐢宠', this.newFormData); + uni.showLoading({ + title: '鍔犺浇涓�...' + }); + this.$reqPost('xswaybill', this.newFormData).then(res => { + uni.hideLoading(); + console.log('鏂板缓鍙戣繍鐢宠', res); + if (res.code == 0) { + uni.showToast({ + title: '娣诲姞鎴愬姛锛�', + icon: 'success', + duration: 2000 + }); + // this.$nextTick(() => { + // uni.navigateBack({ + // // url: '/pages/my-application/my-application' + // delta: 2 + // }); + // }); + } + }); + }, + backPage() { + uni.navigateBack({ + delta: 1 + }); + } + } }; </script> <style lang="scss" scoped> @include tableMainStyle(); ::v-deep.new-application-form-data { - width: 100%; - padding-bottom: vww(40); - // 鏍囬 - .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 { - .u-form-item__body__left__content { - .u-form-item__body__left__content__label { - } - } - } - .u-form-item__body__right { - .u-form-item__body__right__content { - .u-form-item__body__right__content__slot { - } - } - } - } - } - } - } + width: 100%; + padding-bottom: vww(40); + // 鏍囬 + .newApplicationTitle { + margin-bottom: 0; + } - // 閫夋嫨瀹㈡埛寮规 - .selectCustomerPopup { - .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 { - } - .searchCustomerBtn { - margin-top: vww(10); - display: flex; - .u-button { - width: 30%; - } - } - // 鏁版嵁鍒楄〃 - .searchResultList { - margin-top: vww(16); - } + // 琛ㄥ崟 + .formDataContaniner { + .u-form { + width: 91%; + margin: 0 auto 0; - // 鍚堝悓琛ㄦ牸 - .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); - line-height: vww(20); - padding: vww(5) vww(10); - color: #111111; - font-weight: 400; - background: #f5f5f5; - } + .u-form-item { + .u-form-item__body { + .u-form-item__body__left { + .u-form-item__body__left__content { + .u-form-item__body__left__content__label { + } + } + } - .uni-table-td { - line-height: vww(20); - padding: vww(5) vww(10); - color: #111111; - } - } - } - } - .tableBody { - width: 80%; - } - .TableUtilBtn { - width: 20%; - overflow: hidden; - .uni-table { - min-width: 0 !important; - } - .TableUtilBtnContainer { - .u-button { - width: vww(20); - } - } - } - } + .u-form-item__body__right { + .u-form-item__body__right__content { + .u-form-item__body__right__content__slot { + } + } + } + } + } + } + } - // 鍚堝悓绫诲瀷閫夋嫨鍣� - .selectContractTypePicker { - .u-popup { - .u-transition { - height: auto; - } - } - } + // 閫夋嫨瀹㈡埛寮规 + .selectCustomerPopup { + .u-popup { + .u-transition { + height: 95%; - .selectCustomerCompSheet { - .u-popup { - .u-transition { - height: auto; - } - } - } + .u-popup__content { + overflow: scroll !important; - .selectLevelSheet { - .u-popup { - .u-transition { - height: auto; - } - } - } + .selectCustomerTitle { + margin-bottom: 0; + } - // 鏃堕棿閫夋嫨鍣� - .selectContractStartTime { - .u-popup { - .u-transition { - height: auto; - } - } - } - .selectContractEndTime { - .u-popup { - .u-transition { - height: auto; - } - } - } - } - } - } - } - } + .selectCustomerContainer { + padding: 0 4%; + // .loadmoreClass{ + // .u-loadmore{ + // .u-loadmore__content{ + // .u-loadmore__content__text{ + // } + // } + // } + // } + .searchContainer { + } - // 鐓ゅ巶 - .addContractContainer { - .u-popup { - .u-transition { - height: 95%; - .u-popup__content { - overflow: scroll !important; - .addContractFormTitle { - margin-bottom: 0; - } + .searchCustomerBtn { + margin-top: vww(10); + display: flex; - // 鎼滅储 - .coalFiledSelectSearch { - } - // 閫夋嫨鐓ょ - .coalFiledSelectPopup { - .u-popup { - .u-transition { - height: 80%; - .u-popup__content { - overflow: scroll !important; - // 琛ㄦ牸 - .coalFiledTable { - width: 92%; - 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); - line-height: vww(20); - padding: vww(5) vww(10); - color: #111111; - font-weight: 400; - background: #f5f5f5; - } + .u-button { + width: 30%; + } + } - .uni-table-td { - line-height: vww(20); - padding: vww(5) vww(10); - color: #111111; - } - } - } - } - .tableBody { - width: 80%; - } - .TableUtilBtn { - width: 20%; - overflow: hidden; - .uni-table { - min-width: 0 !important; - } - .TableUtilBtnContainer { - .u-button { - width: vww(20); - } - } - } - } - } - } - } - } - } - } - } - } + // 鏁版嵁鍒楄〃 + .searchResultList { + margin-top: vww(16); + } - // 娣诲姞鍚堝悓 - .addContractContainer { - .u-popup { - .u-transition { - height: 95%; - .u-popup__content { - // background-color: rgb(247, 247, 247); - overflow: scroll !important; - .addContractForm { - width: 92%; - margin: 0 auto; + // 鍚堝悓琛ㄦ牸 + .tableContract { + margin-top: vww(30); + display: flex; + justify-content: center; - // 琛ㄥ崟 - // .u-form{ - // .u-form-item{ - // .u-form-item__body{ - // .u-form-item__body__right{ - // .u-form-item__body__right__content__slot{ - // .u-input{ - // border:1px solid #dddddd; - // .u-input__content{ + .uni-table-scroll { + min-width: 0 !important; - // } - // } - // } - // } - // } - // } - // } + .uni-table { + .uni-table-tr { + padding: 0; + font-size: vww(13); - .formUpCard { - margin-top: vww(10); - padding: vww(10); - border-radius: vww(4); - box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; - background-color: #ffffff; - // 浠锋牸鍗$墖 - .priceList { - min-height: vww(20); - border-radius: vww(4); - padding: vww(10) 0; - 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; - } - } - } - } - } - .formDownCard { - border-radius: vww(4); - padding: vww(10); - box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; - margin-top: vww(10); - background-color: #ffffff; - } + .uni-table-th { + width: vww(100); + height: vww(32); + line-height: vww(20); + padding: vww(5) vww(10); + color: #111111; + font-weight: 400; + background: #f5f5f5; + } - .addContractConfirm { - margin-top: vww(30); - } - } + .uni-table-td { + line-height: vww(20); + padding: vww(5) vww(10); + color: #111111; + } + } + } + } - // 鍝佺閫夋嫨鍣� - .addContractCoalPicker { - .u-popup { - .u-transition { - height: auto; - } - } - } - } - } - } - } + .tableBody { + width: 80%; + } - // 琛ㄦ牸 - .newApplicationTable { - margin: vww(40) auto; - 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 { - background-color: #ee336b !important; - } - } - } - } - } - .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); - } - } - } - } - } - .addCard { - width: 100%; - height: vww(130); - margin-top: vww(10); - border-radius: vww(4); - display: flex; - justify-content: center; - align-items: center; - box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; - } - } + .TableUtilBtn { + width: 20%; + overflow: hidden; - // button - .new-application-button { - display: flex; + .uni-table { + min-width: 0 !important; + } - .u-button { - width: vww(120); - height: vww(40); - } - } + .TableUtilBtnContainer { + .u-button { + width: vww(20); + } + } + } + } + + // 鍚堝悓绫诲瀷閫夋嫨鍣� + .selectContractTypePicker { + .u-popup { + .u-transition { + height: auto; + } + } + } + + .selectCustomerCompSheet { + .u-popup { + .u-transition { + height: auto; + } + } + } + + .selectLevelSheet { + .u-popup { + .u-transition { + height: auto; + } + } + } + + // 鏃堕棿閫夋嫨鍣� + .selectContractStartTime { + .u-popup { + .u-transition { + height: auto; + } + } + } + + .selectContractEndTime { + .u-popup { + .u-transition { + height: auto; + } + } + } + } + } + } + } + } + + // 鐓ゅ巶 + .addContractContainer { + .u-popup { + .u-transition { + height: 95%; + + .u-popup__content { + overflow: scroll !important; + + .addContractFormTitle { + margin-bottom: 0; + } + + // 鎼滅储 + .coalFiledSelectSearch { + } + + // 閫夋嫨鐓ょ + .coalFiledSelectPopup { + .u-popup { + .u-transition { + height: 80%; + + .u-popup__content { + overflow: scroll !important; + // 琛ㄦ牸 + .coalFiledTable { + width: 92%; + 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); + line-height: vww(20); + padding: vww(5) vww(10); + color: #111111; + font-weight: 400; + background: #f5f5f5; + } + + .uni-table-td { + line-height: vww(20); + padding: vww(5) vww(10); + color: #111111; + } + } + } + } + + .tableBody { + width: 80%; + } + + .TableUtilBtn { + width: 20%; + overflow: hidden; + + .uni-table { + min-width: 0 !important; + } + + .TableUtilBtnContainer { + .u-button { + width: vww(20); + } + } + } + } + } + } + } + } + } + } + } + } + + // 娣诲姞鍚堝悓 + .addContractContainer { + .u-popup { + .u-transition { + height: 95%; + + .u-popup__content { + // background-color: rgb(247, 247, 247); + overflow: scroll !important; + + .addContractForm { + width: 92%; + margin: 0 auto; + + // 琛ㄥ崟 + // .u-form{ + // .u-form-item{ + // .u-form-item__body{ + // .u-form-item__body__right{ + // .u-form-item__body__right__content__slot{ + // .u-input{ + // border:1px solid #dddddd; + // .u-input__content{ + + // } + // } + // } + // } + // } + // } + // } + + .formUpCard { + margin-top: vww(10); + padding: vww(10); + border-radius: vww(4); + box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; + background-color: #ffffff; + // 浠锋牸鍗$墖 + .priceList { + min-height: vww(20); + border-radius: vww(4); + padding: vww(10) 0; + 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; + } + } + } + } + } + + .formDownCard { + border-radius: vww(4); + padding: vww(10); + box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; + margin-top: vww(10); + background-color: #ffffff; + } + + .addContractConfirm { + margin-top: vww(30); + } + } + + // 鍝佺閫夋嫨鍣� + .addContractCoalPicker { + .u-popup { + .u-transition { + height: auto; + } + } + } + } + } + } + } + + // 琛ㄦ牸 + .newApplicationTable { + margin: vww(40) auto; + 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 { + background-color: #ee336b !important; + } + } + } + } + } + + .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); + } + } + } + } + } + + .addCard { + width: 100%; + height: vww(130); + margin-top: vww(10); + border-radius: vww(4); + display: flex; + justify-content: center; + align-items: center; + box-shadow: 0 2px 16px #e5e5e5, 0 0 1px #e5e5e5, 0 0 1px #e5e5e5; + } + } + + // button + .new-application-button { + display: flex; + + .u-button { + width: vww(120); + height: vww(40); + } + } } </style> diff --git a/pages/home/home.vue b/pages/home/home.vue index 3fb7798..e53f9b8 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -3,8 +3,8 @@ <!-- 杞挱鍥� --> <view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view> <!-- 鎴戠殑鐢宠 --> - <combined-title title="鎴戠殑鐢宠" detailsPath="/pages/my-application/my-application"></combined-title> - <combination-card v-for="(item, index) in shenqingData" index="index"> + <combined-title title="鎴戠殑鐢宠" detailsPath="/pages/my-application/my-application" v-if="$store.state.shenqingMenu"></combined-title> + <combination-card v-for="(item, index) in shenqingData" index="index" v-if="$store.state.shenqingMenu"> <template v-slot:top> <view> <text>{{ item.title }}</text> @@ -52,7 +52,7 @@ </view> <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> <image src="@/static/home/biaodan.png" mode=""></image> - <view>琛ㄥ崟鏁版嵁</view> + <view>鐢宠璇︽儏</view> </view> <view @click="apply(item)" v-if="item.status == 3"> <image src="@/static/home/history.png" mode=""></image> @@ -73,7 +73,7 @@ <image src="@/static/home/biaodan.png" mode=""></image> <view>琛ㄥ崟鏁版嵁</view> </view> - + </view> --> </view> </template> @@ -110,10 +110,10 @@ <view class="bottom-container"> <!-- 寰呭姙鎸夐挳 --> <view class="bottom-content__item"> - <!-- <view @click="theFormDataClick"> + <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> <image src="@/static/home/jindu.png" mode=""></image> <view>鐢宠璇︽儏</view> - </view> --> + </view> <view @click="adopClick(item)"> <image src="@/static/home/tongguo.png" mode=""></image> <view>閫氳繃</view> @@ -182,7 +182,7 @@ <view class="bottom-container"> <!-- 宸插姙鎸夐挳 --> <view class="bottom-content__item"> - <view @click="theFormDataClick(item.tableId)"> + <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> <image src="@/static/home/biaodan.png" mode=""></image> <view>琛ㄥ崟鏁版嵁</view> </view> @@ -324,7 +324,6 @@ // data shenqingData: [], daibanData: [], - daibanData: [], yibanData: [], menuShow: false, // 鐢宠 @@ -354,11 +353,18 @@ console.log(e); this.$refs.menuRef.menuClick(); }, + onLoad(){ + console.log('鍔犺浇椤甸潰'); + wx.hideShareMenu({ + menus: ['shareAppMessage', 'shareTimeline'] + }) + }, onShow() { if (this.menuShow == true) { this.$refs.menuRef.menuClick(); } this.init(); + }, components: { combinedTitle, @@ -503,7 +509,7 @@ this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�') } }) - + }, deleteApplicationModalCancel() { this.deleteApplicationModalShow = false; @@ -576,7 +582,7 @@ uni.showToast({ title:res.data, icon:'success', - duration:2000 + duration:2000 }); } // 鍒濆鍖栫敵璇峰垪琛� @@ -594,7 +600,7 @@ } console.log(this.form); }); - + this.modalVisible = true; }, // 淇敼 @@ -685,7 +691,7 @@ justify-content: center; align-content: center; margin-right: vww(10); - &:nth-last-child() { + &:nth-last-child(1) { margin-right: 0; } view { diff --git a/pages/login/login.vue b/pages/login/login.vue index e62dafb..7681ca0 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -24,12 +24,15 @@ formData:{ username:'fyy', password:'123456!@#' + // username:'anjianwei', + // password:'123456' } }; }, methods:{ loginSubmit(){ - // console.log('login'); + console.log('鐐瑰嚮鐧诲綍'); + // console.log('login'); uni.showLoading({ title:'鐧诲綍涓�...' }); @@ -61,7 +64,7 @@ }) } } - + } }; </script> @@ -104,7 +107,7 @@ } .loginBtn { margin-top: vww(80); - + button { background-color: #007aff; color: #ffffff; diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue index dc26f9b..0a83ac1 100644 --- a/pages/my-application/my-application.vue +++ b/pages/my-application/my-application.vue @@ -1,721 +1,821 @@ <template> - <!-- 鎴戠殑鐢宠 --> - <view class="my-application" > - <!-- 鎼滅储鍖哄煙 --> - <view class="searchBox"> - <view class="topRow"> - <view class="search"> - <u-search - @clickIcon="searchIconClick" - :clearabled="true" - :showAction="false" - placeholder="璇疯緭鍏ユ爣棰�" - v-model="myApplication.title" - shape="square" - searchIconColor="#cccccc" - ></u-search> - </view> + <!-- 鎴戠殑鐢宠 --> + <view class="my-application"> + <!-- 鎼滅储鍖哄煙 --> + <view class="searchBox"> + <u-collapse :border="true" + @change="searchChange" + @close="searchClose" + @open="searchOpen" + > + <u-collapse-item :border="false" + title="鎼滅储妗�" + name="Docs guide" + > + <view class="topRow"> + <view class="search"> + <u-search + @clickIcon="searchIconClick" + :clearabled="true" + :showAction="false" + placeholder="璇疯緭鍏ユ爣棰�" + v-model="myApplication.title" + shape="square" + searchIconColor="#cccccc" + ></u-search> + </view> - <data-select-box ref="dataSelectBox" class="data-select-box" placeholder="璇烽�夋嫨鏉′欢" v-model="selectText" :clearabled="true" @click="dataSelectClick"></data-select-box> - </view> - <!-- 鏃堕棿閫夋嫨鍣� --> - <view class="example-body"><uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" /></view> - <view class="searchBtn"><u-button type="primary" text="鎼滅储" @click="searchClick"></u-button> <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button></view> - </view> + <data-select-box ref="dataSelectBox" class="data-select-box" placeholder="璇烽�夋嫨鏉′欢" v-model="selectText" + :clearabled="true" @click="dataSelectClick"></data-select-box> + </view> + <!-- 鏃堕棿閫夋嫨鍣� --> + <view class="example-body"> + <uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick"/> + </view> + <view class="searchBtn"> + <u-button type="primary" text="鎼滅储" @click="searchClick"></u-button> + <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button> + </view> + </u-collapse-item> + </u-collapse> + </view> - <!-- 閫夋嫨鍣� --> - <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" :columns="selectList"></u-picker> - <!-- 鎴戠殑鐢宠鍗$墖鍖哄煙 --> - <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> --> - <combination-card v-for="(item, index) in shenqingData" index="index"> - <template v-slot:top> - <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> --> - <view> - <text>{{ item.title }}</text> - </view> - </template> - <template v-slot:center> - <view class="center-container"> - <view class="center-content__one center-margin"> - <view class=""> - <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> - </view> - <view class=""> - <text>瀹℃壒鐜妭锛歿{ item.currTaskName }}</text> - </view> - </view> - <view class="center-content__two center-margin"> - <view class=""> - 鐘舵�侊細 - <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text> - </view> - <view class=""> - 缁撴灉锛� - <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text> - </view> - </view> - <view class="center-content__three center-margin"> - <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> - </view> - <view class="center-content__four"> - <text>鎻愪氦鐢宠鏃堕棿锛歿{ item.applyTime }}</text> - </view> - </view> - </template> - <template v-slot:bottom> - <view class="bottom-container"> - <!-- 鎸夐挳鍖哄煙 --> - <view class="bottom-content__chulizhong bottom-content__item"> - <view @click="withDrawClick(item.id)" v-if="item.status == 1"> - <image src="@/static/home/cehui.png" mode=""></image> - <view>鎾ゅ洖</view> - </view> - <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1"> - <image src="@/static/home/jindu.png" mode=""></image> - <view>鏌ョ湅杩涘害</view> - </view> - <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> - <image src="@/static/home/biaodan.png" mode=""></image> - <view>琛ㄥ崟鏁版嵁</view> - </view> - <view v-if="item.status == 3" @click="apply(item)"> - <image src="@/static/home/history.png" mode=""></image> - <view>閲嶆柊鐢宠</view> - </view> - <view v-if="item.status == 3" @click="editMyApplication(item)"> - <image src="@/static/home/history.png" mode=""></image> - <view>缂栬緫</view> - </view> - <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3"> - <image src="@/static/home/history.png" mode=""></image> - <view>瀹℃壒鍘嗗彶</view> - </view> - </view> - </view> - </template> - </combination-card> - <!-- </u-checkbox-group> --> + <!-- 閫夋嫨鍣� --> + <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" + :columns="selectList"></u-picker> - <!-- 鎾ゅ洖妯℃�佹 --> - <view class="wodeshenqingMotai"> - <u-modal width="684rpx" :show="withDrawShow" title="鎾ゅ洖鍘熷洜" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel"> - <view class="slot-content"><u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea></view> - </u-modal> - </view> + <!-- 鎴戠殑鐢宠鍗$墖鍖哄煙 --> + <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> --> + <combination-card v-for="(item, index) in shenqingData" index="index"> + <template v-slot:top> + <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> --> + <view> + <text>{{ item.title }}</text> + </view> + </template> + <template v-slot:center> + <view class="center-container"> + <view class="center-content__one center-margin"> + <view class=""> + <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> + </view> + <view class=""> + <text>瀹℃壒鐜妭锛歿{ item.currTaskName }}</text> + </view> + </view> + <view class="center-content__two center-margin"> + <view class=""> + 鐘舵�侊細 + <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text> + </view> + <view class=""> + 缁撴灉锛� + <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text> + </view> + </view> + <view class="center-content__three center-margin"> + <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> + </view> + <view class="center-content__four"> + <text>鎻愪氦鐢宠鏃堕棿锛歿{ item.applyTime }}</text> + </view> + </view> + </template> + <template v-slot:bottom> + <view class="bottom-container"> + <!-- 鎸夐挳鍖哄煙 --> + <view class="bottom-content__chulizhong bottom-content__item"> + <view @click="withDrawClick(item.id)" v-if="item.status == 1"> + <image src="@/static/home/cehui.png" mode=""></image> + <view>鎾ゅ洖</view> + </view> + <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1"> + <image src="@/static/home/jindu.png" mode=""></image> + <view>鏌ョ湅杩涘害</view> + </view> + <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> + <image src="@/static/home/biaodan.png" mode=""></image> + <view>鐢宠璇︽儏</view> + </view> + <view v-if="item.status == 3" @click="apply(item)"> + <image src="@/static/home/history.png" mode=""></image> + <view>閲嶆柊鐢宠</view> + </view> + <view v-if="item.status == 3" @click="editMyApplication(item)"> + <image src="@/static/home/history.png" mode=""></image> + <view>缂栬緫</view> + </view> + <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3"> + <image src="@/static/home/history.png" mode=""></image> + <view>瀹℃壒鍘嗗彶</view> + </view> + </view> + </view> + </template> + </combination-card> + <!-- </u-checkbox-group> --> - <!-- 鎵归噺鍒犻櫎妯℃�佹 --> - <view class="batchDeleteModal"> - <u-modal - :show="batchDeleteModalShow" - title="鎻愮ず" - content="纭畾鍒犻櫎鐢宠锛�" - :showCancelButton="true" - @confirm="batchDeleteModalConfirm" - @cancel="batchDeleteModalCancel" - ></u-modal> - </view> - - <view class="" style="height:50px;"> - - </view> + <!-- 鎾ゅ洖妯℃�佹 --> + <view class="wodeshenqingMotai"> + <u-modal width="684rpx" :show="withDrawShow" title="鎾ゅ洖鍘熷洜" :showCancelButton="true" @confirm="withDrawConfirm" + @cancel="withDrawCancel"> + <view class="slot-content"> + <u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea> + </view> + </u-modal> + </view> - <!-- 搴曢儴鍏ㄩ�� --> - <view class="bottomTabbar"> - <view class="bottomTabbar_checkBox"> - <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> - <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> - </u-checkbox-group> --> - </view> - <view class="bottomTabbar_button"> - <!-- <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="batchDeleteClick"></u-button> --> - <u-button type="primary" text="鏂板鐢宠" @click="newApplicationClick"></u-button> - </view> - </view> + <!-- 鎵归噺鍒犻櫎妯℃�佹 --> + <view class="batchDeleteModal"> + <u-modal + :show="batchDeleteModalShow" + title="鎻愮ず" + content="纭畾鍒犻櫎鐢宠锛�" + :showCancelButton="true" + @confirm="batchDeleteModalConfirm" + @cancel="batchDeleteModalCancel" + ></u-modal> + </view> - <!-- 鑿滃崟鏍� --> - <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> - </view> + <!--杩斿洖椤堕儴--> + <u-back-top :scroll-top="scrollTop"></u-back-top> + + <view class="" style="height:50px;"> + + </view> + + <!-- 搴曢儴鍏ㄩ�� --> + <view class="bottomTabbar"> + <view class="bottomTabbar_checkBox"> + <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> + <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> + </u-checkbox-group> --> + </view> + <view class="bottomTabbar_button"> + <!-- <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="batchDeleteClick"></u-button> --> + <u-button type="primary" text="鏂板鐢宠" @click="newApplicationClick"></u-button> + </view> + </view> + + + + <!-- 鑿滃崟鏍� --> + <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> + </view> </template> <script> import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; import combinationCard from '@/components/common/combination-card/combination-card.vue'; import dataSelectBox from '@/components/common/data-select-box/data-select-box.vue'; + export default { - name: 'MyApplication', - data() { - return { - status: ['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], - statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], - result: ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖'], - resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], - // 鎼滅储鍖哄煙 - selectText: '', - // 閫夋嫨鍣� - selectPickerShow: false, - selectList: [['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖']], - activeColor: '#cccccc', - isActive: false, - // 鏃堕棿閫夋嫨鍣� - range: [], - // 鎾ゅ洖妯℃�佹 - withDrawShow: false, - withDrawData: { - reason: '', - id: '', // 鎾ゅ洖鐢宠ID - procInstId: '' - }, - // 閲嶆柊鐢宠 - form: { - sendMessage: true, - sendSms: true, - sendEmail: true, - procDefId: '', - assignees: [], - priority: '0' - }, - assigneeList: [], - showAssign: false, - isGateway: false, - isCustom: false, - // 鎵归噺鍒犻櫎鐢宠 - batchDeleteModalShow: false, - // 澶嶉�夋 - checkBoxValue: [], - totalSelectValue: [], - menuShow: false, - shenqingData: [], // 瀹瑰櫒 - // 璇锋眰鍙傛暟 - myApplication: { - title: '', - status: '', - result: '', - pageNumber: 1, - pageSize: 10, - startTime: '', - endTime: '', - sort: 'createTime', - order: 'desc' - }, - // 涓婃媺鍔犺浇鏇村 - timer: {}, - load: 0, - loadingText: '鍔犺浇涓�...', - loadingType: 0, - contentText: { - contentDown: '涓婃媺鏄剧ず鏇村', - contentRefresh: '姝e湪鍔犺浇...', - contentNomore: '娌℃湁鏇村鏁版嵁浜�' - } - }; - }, - onShow() { - if (this.menuShow == true) { - this.$refs.menuRef.menuClick(); - } - this.myApplication.pageNumber = 1; - this.init(); - }, - // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 - onNavigationBarButtonTap(e) { - // console.log(e); - this.$refs.menuRef.menuClick(); - }, - watch: { - // 鏃堕棿缁戝畾鏃ユ湡 - range(nVal) { - console.log('鑼冨洿閫�:', this.range); - this.myApplication.startTime = this.range[0]; - this.myApplication.endTime = this.range[1]; - }, - // 鐩戝惉杈撳叆妗嗙殑鍐呭 - selectText(nVal) { - if (nVal == '') { - this.myApplication.status = ''; - this.myApplication.result = ''; - } - } - }, - components: { - combinationCard, - popupMenu, - dataSelectBox - }, - // 涓婃媺鍔犺浇鏇村 - onReachBottom() { - if (this.timer != null) { - clearTimeout(this.timer); - } - this.timer = setTimeout(() => { - this.getMoreNews(); - }, 1000); - }, - // 涓嬫媺鍔犺浇 - onPullDownRefresh() { - console.log('refresh'); - this.myApplication.pageNumber = 1; - this.loadingType = 0; - this.shenqingData = []; - setTimeout(()=> { - uni.stopPullDownRefresh(); - }, 1000); - this.init(); - }, - methods: { - init() { - this.getMoreNews(); - }, - // getProcessDataList() { - // this.$reqGet('getProcessDataList', this.myApplication).then(res => { - // if (res.code === 0) { - // console.log('鐢宠', res); - // this.shenqingData = res.data.records; - // } - // }); - // }, - getMoreNews() { - if (this.loadingType !== 0) { - //loadingType!=0;鐩存帴杩斿洖 - return false; - } - this.loadingType = 1; - uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 - this.$reqGet('getProcessDataList', this.myApplication).then(response => { - console.log('response', response); - this.myApplication.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 - if (response.data.records.length < 1) { - // 娌℃湁鏁版嵁 - this.loadingType = 2; - uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 - uni.showToast({ - title: '娌℃湁鏇村鏁版嵁浜嗭紒', - icon: 'error' - }); - return; - } - // this.myApplication.pageNumber++; // 姣忚Е搴曚竴娆� page +1 - if(this.myApplication.title||this.myApplication.status||this.myApplication.result||this.myApplication.startTime||this.myApplication.endTime){ - this.shenqingData = response.data.records - } else{ - this.shenqingData = this.shenqingData.concat(response.data.records); - } - //灏嗘暟鎹嫾鎺ュ湪涓�璧� - this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 - uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 - }); - }, - // 鏉′欢閫夋嫨鍣� - selectConfirm(v) { - this.selectText = v.value.toString(); - this.myApplication.status = v.indexs[0]; - this.myApplication.result = v.indexs[1]; - this.selectPickerShow = false; - }, - dataSelectCancel() { - this.selectPickerShow = false; - this.$refs.dataSelectBox.isActive = false; - }, - dataSelectClick() { - this.selectPickerShow = true; - }, - // 鑿滃崟 - menushow(e) { - this.menuShow = e; - }, - // 鏃堕棿閫夋嫨鍣� - maskClick(e) { - console.log('maskClick浜嬩欢:', e); - }, - searchClick() { - console.log('this.myApplication', this.myApplication); - this.myApplication.pageNumber = 1; - this.loadingType = 0; - this.getMoreNews(); - }, - emptyButtonClick(){ - this.myApplication.title = ''; - this.selectText = ''; - this.range = []; - this.init(); - }, - // 鎾ゅ洖妯℃�佹 - withDrawClick(id) { - this.withDrawShow = true; - this.withDrawData.id = id; - }, - withDrawConfirm() { - this.shenqingData.forEach(i => { - if (i.id == this.withDrawData.id) { - this.withDrawData.procInstId = i.procInstId; - } - }); - this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { - console.log('res', res); - if (res.code == 0) { - uni.showToast({ - title: res.data, - duration: 2000 - }); - } - this.withDrawShow = false; - // 鍒濆鍖栫敵璇峰垪琛� - this.myApplication.pageNumber = 1; - this.shenqingData = []; - this.getMoreNews(); - }); + name: 'MyApplication', + data() { + return { + scrollTop: 0, + status: ['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], + statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], + result: ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖'], + resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], + // 鎼滅储鍖哄煙 + selectText: '', + // 閫夋嫨鍣� + selectPickerShow: false, + selectList: [['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖']], + activeColor: '#cccccc', + isActive: false, + // 鏃堕棿閫夋嫨鍣� + range: [], + // 鎾ゅ洖妯℃�佹 + withDrawShow: false, + withDrawData: { + reason: '', + id: '', // 鎾ゅ洖鐢宠ID + procInstId: '' + }, + // 閲嶆柊鐢宠 + form: { + sendMessage: true, + sendSms: true, + sendEmail: true, + procDefId: '', + assignees: [], + priority: '0' + }, + assigneeList: [], + showAssign: false, + isGateway: false, + isCustom: false, + // 鎵归噺鍒犻櫎鐢宠 + batchDeleteModalShow: false, + // 澶嶉�夋 + checkBoxValue: [], + totalSelectValue: [], + menuShow: false, + shenqingData: [], // 瀹瑰櫒 + // 璇锋眰鍙傛暟 + myApplication: { + title: '', + status: '', + result: '', + pageNumber: 1, + pageSize: 10, + startTime: '', + endTime: '', + sort: 'createTime', + order: 'desc' + }, + // 涓婃媺鍔犺浇鏇村 + timer: {}, + load: 0, + loadingText: '鍔犺浇涓�...', + loadingType: 0, + contentText: { + contentDown: '涓婃媺鏄剧ず鏇村', + contentRefresh: '姝e湪鍔犺浇...', + contentNomore: '娌℃湁鏇村鏁版嵁浜�' + } + }; + }, + // 杩斿洖椤堕儴 + onPageScroll(e) { + // console.log('椤甸潰婊戝姩', this.scrollTop); + this.scrollTop = e.scrollTop; + }, + onShow() { + if (this.menuShow == true) { + this.$refs.menuRef.menuClick(); + } + this.init(); + }, + // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 + onNavigationBarButtonTap(e) { + // console.log(e); + this.$refs.menuRef.menuClick(); + }, + watch: { + // 鏃堕棿缁戝畾鏃ユ湡 + range(nVal) { + console.log('鑼冨洿閫�:', this.range); + this.myApplication.startTime = this.range[0]; + this.myApplication.endTime = this.range[1]; + }, + // 鐩戝惉杈撳叆妗嗙殑鍐呭 + selectText(nVal) { + if (nVal == '') { + this.myApplication.status = ''; + this.myApplication.result = ''; + } + }, + scrollTop(nVal){ + if(nVal){ + // console.log('椤甸潰婊戝姩鍙樺寲'); + } + } + }, + components: { + combinationCard, + popupMenu, + dataSelectBox + }, + // 涓婃媺鍔犺浇鏇村 + onReachBottom() { + if (this.timer != null) { + clearTimeout(this.timer); + } + this.timer = setTimeout(() => { + this.getMoreNews(); + }, 1000); + }, + // 涓嬫媺鍔犺浇 + onPullDownRefresh() { + console.log('refresh'); - console.log(this.withDrawId); - if (this.withDrawData.reason.length >= 2) { - console.log(this.withDrawData.reason); - } else { - uni.showToast({ - title: '璇疯鑼冭緭鍏�', - duration: 2000 - }); - } - }, - withDrawCancel() { - this.withDrawShow = false; - }, - apply(v) { - if (!v.procDefId || v.procDefId == 'null') { - this.$u.toast('娴佺▼瀹氫箟涓虹┖'); - return; - } - this.form.id = v.id; - this.form.procDefId = v.procDefId; - this.form.title = v.title; - // 鍔犺浇瀹℃壒浜� - // this.userLoading = true; - uni.showLoading({ - title: '瀹℃壒浜哄姞杞戒腑' - }); - // getFirstNode(v.procDefId).then((res) => { - this.$reqGet('getFirstNode', {}, v.procDefId).then(res => { - // this.userLoading = false; - console.log('瀹℃壒浜�', res); - uni.hideLoading(); - if (res.data) { - this.error = ''; - if (res.data.type == 3 || res.data.type == 4) { - this.isGateway = true; - this.form.firstGateway = true; - this.showAssign = false; - this.isCustom = false; - return; - } - if (res.data.type == 5) { - this.isCustom = true; - this.isGateway = false; - this.form.firstGateway = false; - this.showAssign = false; - return; - } - if (res.data.type == 1) { - this.showAssign = true; - this.isGateway = false; - this.form.firstGateway = false; - this.isCustom = false; - if (res.data.users && res.data.users.length > 0) { - this.assigneeList = res.data.users; - // 榛樿鍕鹃�� - let ids = []; - res.data.users.forEach(e => { - ids.push(e.userId); - }); - this.form.assignees = ids; - this.showAssign = true; - // 鑾峰彇琛ㄥ崟鍐呭锛岄噸鏂板垱寤虹敵璇� - this.$reqPost('apply',this.form,'form').then(res=>{ - console.log('閲嶆柊鎻愪氦鐢宠',res); - if(res.code == 0){ - uni.showToast({ - title:res.data, - icon:'success', - duration:2000 - }); - } - // 鍒濆鍖栫敵璇峰垪琛� - this.myApplication.pageNumber = 1; - this.shenqingData = []; - this.getMoreNews(); - }) - } else { - this.form.assignees = []; - this.showAssign = true; - this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�'; - } - } - } - console.log(this.form); - }); - - this.modalVisible = true; - // } - }, - // 淇敼鐢宠 - editMyApplication(v){ - console.log('淇敼鐢宠'); - uni.navigateTo({ - url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}` - }); - }, - // 鎵归噺鍒犻櫎妯℃�佹 - batchDeleteClick() { - this.batchDeleteModalShow = true; - }, - batchDeleteModalConfirm() { - this.batchDeleteModalShow = false; - }, - batchDeleteModalCancel() { - this.batchDeleteModalShow = false; - }, - // 鎼滅储 - searchIconClick() { - console.log(1111, this.myApplication.title); - }, + setTimeout(() => { + uni.stopPullDownRefresh(); + }, 1000); + this.init(); + }, + methods: { + init() { + this.myApplication.pageNumber = 1; + this.loadingType = 0; + this.shenqingData = []; + this.getMoreNews(); + }, + // getProcessDataList() { + // this.$reqGet('getProcessDataList', this.myApplication).then(res => { + // if (res.code === 0) { + // console.log('鐢宠', res); + // this.shenqingData = res.data.records; + // } + // }); + // }, + getMoreNews() { + if (this.loadingType !== 0) { + //loadingType!=0;鐩存帴杩斿洖 + return false; + } + uni.showLoading({ + title: '鍔犺浇涓�...' + }) + this.loadingType = 1; + uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 + this.$reqGet('getProcessDataList', this.myApplication).then(response => { + uni.hideLoading(); + console.log('response', response); + this.myApplication.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 + if (response.data.records.length < 1) { + // 娌℃湁鏁版嵁 + this.loadingType = 2; + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + uni.showToast({ + title: '娌℃湁鏇村鏁版嵁浜嗭紒', + icon: 'error' + }); + return; + } + // this.myApplication.pageNumber++; // 姣忚Е搴曚竴娆� page +1 + if (this.myApplication.title || this.myApplication.status || this.myApplication.result || this.myApplication.startTime || this.myApplication.endTime) { + if(this.myApplication.pageNumber == 1){ + this.shenqingData = response.data.records + }else{ + this.shenqingData = this.shenqingData.concat(response.data.records); + } + } else { + if(this.myApplication.pageNumber == 1){ + this.shenqingData = []; + } + this.shenqingData = this.shenqingData.concat(response.data.records); + } + //灏嗘暟鎹嫾鎺ュ湪涓�璧� + this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + }); + }, + // 鏉′欢閫夋嫨鍣� + selectConfirm(v) { + this.selectText = v.value.toString(); + this.myApplication.status = v.indexs[0]; + this.myApplication.result = v.indexs[1]; + this.selectPickerShow = false; + }, + dataSelectCancel() { + this.selectPickerShow = false; + this.$refs.dataSelectBox.isActive = false; + }, + dataSelectClick() { + this.selectPickerShow = true; + }, + // 鑿滃崟 + menushow(e) { + this.menuShow = e; + }, + // 鏃堕棿閫夋嫨鍣� + maskClick(e) { + console.log('maskClick浜嬩欢:', e); + }, + searchChange(e){ + console.log('e', e); + }, + searchClose(e){ + console.log('e', e); + }, + searchOpen(e){ + console.log('e', e); + }, + searchClick() { + console.log('this.myApplication', this.myApplication); + this.myApplication.pageNumber = 1; + this.loadingType = 0; + this.getMoreNews(); + }, + emptyButtonClick() { + this.loadingType == 0; + this.myApplication.pageNumber = 1; + this.myApplication.title = ''; + this.selectText = ''; + this.range = []; + this.init(); + }, + // 鎾ゅ洖妯℃�佹 + withDrawClick(id) { + this.withDrawShow = true; + this.withDrawData.id = id; + }, + withDrawConfirm() { + this.shenqingData.forEach(i => { + if (i.id == this.withDrawData.id) { + this.withDrawData.procInstId = i.procInstId; + } + }); + this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { + console.log('res', res); + if (res.code == 0) { + uni.showToast({ + title: res.data, + duration: 2000 + }); + } + this.withDrawShow = false; + // 鍒濆鍖栫敵璇峰垪琛� + this.myApplication.pageNumber = 1; + this.shenqingData = []; + this.getMoreNews(); + }); - checkboxChange(n) { - console.log('change', n); - }, - totalSelectChange(n) { - if (n[0] == 'tatalSelect') { - this.shenqingData.forEach(item => { - this.totalSelectValue.push(item.id); - }); - this.checkBoxValue = this.totalSelectValue; - } else { - this.checkBoxValue = []; - } - console.log('totalChange', n); - }, - // 鏌ョ湅杩涘害 - checkTheScheduleClick(v) { - uni.navigateTo({ - url: `/pages/check-the-schedule/check-the-schedule?index=${v}` - }); - }, - // 琛ㄥ崟鏁版嵁 - theFormDataClick(v) { - uni.navigateTo({ - url: `/pages/the-form-data/the-form-data?index=${v}` - }); - }, - // 瀹℃壒鍘嗗彶 - approvalHistoryClick(v) { - uni.navigateTo({ - url: `/pages/approval-history/approval-history?index=${v}` - }); - }, - // 鏂板鐢宠 - newApplicationClick() { - uni.navigateTo({ - url: '/pages/new-application/new-application' - }); - } - } + console.log(this.withDrawId); + if (this.withDrawData.reason.length >= 2) { + console.log(this.withDrawData.reason); + } else { + uni.showToast({ + title: '璇疯鑼冭緭鍏�', + duration: 2000 + }); + } + }, + withDrawCancel() { + this.withDrawShow = false; + }, + apply(v) { + if (!v.procDefId || v.procDefId == 'null') { + this.$u.toast('娴佺▼瀹氫箟涓虹┖'); + return; + } + this.form.id = v.id; + this.form.procDefId = v.procDefId; + this.form.title = v.title; + // 鍔犺浇瀹℃壒浜� + // this.userLoading = true; + uni.showLoading({ + title: '瀹℃壒浜哄姞杞戒腑' + }); + // getFirstNode(v.procDefId).then((res) => { + this.$reqGet('getFirstNode', {}, v.procDefId).then(res => { + // this.userLoading = false; + console.log('瀹℃壒浜�', res); + uni.hideLoading(); + if (res.data) { + this.error = ''; + if (res.data.type == 3 || res.data.type == 4) { + this.isGateway = true; + this.form.firstGateway = true; + this.showAssign = false; + this.isCustom = false; + return; + } + if (res.data.type == 5) { + this.isCustom = true; + this.isGateway = false; + this.form.firstGateway = false; + this.showAssign = false; + return; + } + if (res.data.type == 1) { + this.showAssign = true; + this.isGateway = false; + this.form.firstGateway = false; + this.isCustom = false; + if (res.data.users && res.data.users.length > 0) { + this.assigneeList = res.data.users; + // 榛樿鍕鹃�� + let ids = []; + res.data.users.forEach(e => { + ids.push(e.userId); + }); + this.form.assignees = ids; + this.showAssign = true; + // 鑾峰彇琛ㄥ崟鍐呭锛岄噸鏂板垱寤虹敵璇� + this.$reqPost('apply', this.form, 'form').then(res => { + console.log('閲嶆柊鎻愪氦鐢宠', res); + if (res.code == 0) { + uni.showToast({ + title: res.data, + icon: 'success', + duration: 2000 + }); + } + // 鍒濆鍖栫敵璇峰垪琛� + this.myApplication.pageNumber = 1; + this.shenqingData = []; + this.getMoreNews(); + }) + } else { + this.form.assignees = []; + this.showAssign = true; + this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�'; + } + } + } + console.log(this.form); + }); + + this.modalVisible = true; + // } + }, + // 淇敼鐢宠 + editMyApplication(v) { + console.log('淇敼鐢宠'); + uni.navigateTo({ + url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}` + }); + }, + // 鎵归噺鍒犻櫎妯℃�佹 + batchDeleteClick() { + this.batchDeleteModalShow = true; + }, + batchDeleteModalConfirm() { + this.batchDeleteModalShow = false; + }, + batchDeleteModalCancel() { + this.batchDeleteModalShow = false; + }, + // 鎼滅储 + searchIconClick() { + console.log(1111, this.myApplication.title); + }, + + checkboxChange(n) { + console.log('change', n); + }, + totalSelectChange(n) { + if (n[0] == 'tatalSelect') { + this.shenqingData.forEach(item => { + this.totalSelectValue.push(item.id); + }); + this.checkBoxValue = this.totalSelectValue; + } else { + this.checkBoxValue = []; + } + console.log('totalChange', n); + }, + // 鏌ョ湅杩涘害 + checkTheScheduleClick(v) { + uni.navigateTo({ + url: `/pages/check-the-schedule/check-the-schedule?index=${v}` + }); + }, + // 琛ㄥ崟鏁版嵁 + theFormDataClick(v) { + uni.navigateTo({ + url: `/pages/the-form-data/the-form-data?index=${v}` + }); + }, + // 瀹℃壒鍘嗗彶 + approvalHistoryClick(v) { + uni.navigateTo({ + url: `/pages/approval-history/approval-history?index=${v}` + }); + }, + // 鏂板鐢宠 + newApplicationClick() { + uni.navigateTo({ + url: '/pages/new-application/new-application' + }); + } + } }; </script> <style lang="scss" scoped> ::v-deep.my-application { - width: 100%; - height: 100%; - .searchBox { - width: 94%; - margin: vww(16) auto; - .topRow { - display: flex; - justify-content: space-between; - flex-wrap: nowrap; - .search { - // width: vww(160); - width: 48%; - .u-search { - border: 1px solid #d1d1d1; - border-radius: vww(4); - .u-search__content { - height: 38px; - background-color: #ffffff !important; - .u-search__content__icon { - width: 10px; - height: 5.5px; - .u-icon { - .u-icon__icon { - font-size: 20px !important; - } - } - } - .u-search__content__close { - width: 16px !important; - height: 16px !important; - background-color: #cccccc !important; - .u-icon { - .u-icon__icon { - font-size: 10px !important; - } - } - } - .u-search__content__input { - margin-left: vww(10); - background-color: #ffffff !important; - .uni-input-placeholder { - color: #cccccc !important; - } - .u-search__content__input--placeholder { - // color:#CCCCCC; - } - } - } - } - } - .data-select-box { - width: 48%; - } - // 涓嬫媺鑿滃崟 - // .data-selet { - // border: 1px solid #d1d1d1; - // border-radius: 4px; - // // width: vww(160); - // width:48%; - // height: 40px; - // display: flex; - // align-items: center; - // font-size: 13px; - // color: #cccccc; - // .uni-select__icon { - // display: flex; - // align-content: center; - // margin: 0 10px; - // image { - // width: 10px; - // height: 5.5px; - // } - // } - // .content { - // margin-left: vww(8); - // width: vww(150); - // } - // } - } + width: 100%; + height: 100%; - // 鏃堕棿閫夋嫨鍣� - .example-body { - margin-top: vww(16); - width: 100%; - } + .searchBox { + width: 94%; + margin: vww(16) auto; - // 鎼滅储鎸夐挳 - .searchBtn { - width: 100%; - display: flex; - align-items: center; - .u-button { - width: vww(90); - height: vww(32); - margin: vww(16) auto 0; - } - } - } + .u-collapse{ + .u-collapse-item{ + .u-collapse-item__content{ + .topRow { + display: flex; + justify-content: space-between; + flex-wrap: nowrap; - // 鍗$墖涓棿 - .center-container { - display: flex; - flex-direction: column; - .center-content__one { - display: flex; - view { - width: 50%; - } - } - .center-content__two { - display: flex; - // margin: vww(10) 0; - view { - width: 50%; - } - } - .center-content__three { - display: flex; - view { - width: 50%; - } - } - .center-content__four { - } - } - // 涓棿閮ㄥ垎鏍峰紡 - .center-margin { - margin-bottom: vww(16); - } + .search { + // width: vww(160); + width: 48%; - // 鍗$墖搴曢儴 - .bottom-container { - .bottom-content__item { - display: flex; - justify-content: space-around; - view { - display: flex; - justify-content: center; - align-content: center; - margin-right: vww(10); - &:nth-last-child() { - margin-right: 0; - } - view { - display: inline-block; - } - image { - width: vww(16); - height: vww(16); - margin-right: vww(4); - } - } - } - } + .u-search { + border: 1px solid #d1d1d1; + border-radius: vww(4); - // 妯℃�佹 - .wodeshenqingMotai { - // width:100%; - // height:vww(244); - .slot-content { - .u-textarea { - width: vww(280); - height: vww(90) !important; - .uni-textarea-wrapper { - height: vww(90) !important; - } - } - } - } + .u-search__content { + height: vww(38); + background-color: #ffffff !important; - // 搴曢儴 - .bottomTabbar { - position: fixed; - bottom: 0; - width: 100%; - height: vww(48); - display: flex; - align-items: center; - justify-content: space-between; - background-color: #f5f5f5; - .bottomTabbar_checkBox { - margin-left: vww(16); - .u-checkbox-group { - .u-checkbox { - } - } - } - .bottomTabbar_button { - display: flex; - .u-button { - font-size: 13px; - margin-right: vww(14); - width: vww(90); - height: vww(32); - } - } - } + .u-search__content__icon { + width: 10px; + height: 5.5px; + + .u-icon { + .u-icon__icon { + font-size: 20px !important; + } + } + } + + .u-search__content__close { + width: 16px !important; + height: 16px !important; + background-color: #cccccc !important; + + .u-icon { + .u-icon__icon { + font-size: 10px !important; + } + } + } + + .u-search__content__input { + margin-left: vww(10); + background-color: #ffffff !important; + + .uni-input-placeholder { + color: #cccccc !important; + } + + .u-search__content__input--placeholder { + // color:#CCCCCC; + } + } + } + } + } + + .data-select-box { + width: 48%; + } + + // 涓嬫媺鑿滃崟 + // .data-selet { + // border: 1px solid #d1d1d1; + // border-radius: 4px; + // // width: vww(160); + // width:48%; + // height: 40px; + // display: flex; + // align-items: center; + // font-size: 13px; + // color: #cccccc; + // .uni-select__icon { + // display: flex; + // align-content: center; + // margin: 0 10px; + // image { + // width: 10px; + // height: 5.5px; + // } + // } + // .content { + // margin-left: vww(8); + // width: vww(150); + // } + // } + } + + // 鏃堕棿閫夋嫨鍣� + .example-body { + margin-top: vww(16); + width: 100%; + } + + // 鎼滅储鎸夐挳 + .searchBtn { + width: 100%; + display: flex; + align-items: center; + + .u-button { + width: vww(90); + height: vww(32); + margin: vww(16) auto 0; + } + } + } + } + } + + + } + + // 鍗$墖涓棿 + .center-container { + display: flex; + flex-direction: column; + + .center-content__one { + display: flex; + + view { + width: 50%; + } + } + + .center-content__two { + display: flex; + // margin: vww(10) 0; + view { + width: 50%; + } + } + + .center-content__three { + display: flex; + + view { + width: 50%; + } + } + + .center-content__four { + } + } + + // 涓棿閮ㄥ垎鏍峰紡 + .center-margin { + margin-bottom: vww(16); + } + + // 鍗$墖搴曢儴 + .bottom-container { + .bottom-content__item { + display: flex; + justify-content: space-around; + + view { + display: flex; + justify-content: center; + align-content: center; + margin-right: vww(10); + + &:nth-last-child(1) { + margin-right: 0; + } + + view { + display: inline-block; + } + + image { + width: vww(16); + height: vww(16); + margin-right: vww(4); + } + } + } + } + + // 妯℃�佹 + .wodeshenqingMotai { + // width:100%; + // height:vww(244); + .slot-content { + .u-textarea { + width: vww(280); + height: vww(90) !important; + + .uni-textarea-wrapper { + height: vww(90) !important; + } + } + } + } + + // 搴曢儴 + .bottomTabbar { + position: fixed; + bottom: 0; + width: 100%; + height: vww(48); + display: flex; + align-items: center; + justify-content: space-between; + background-color: #f5f5f5; + + .bottomTabbar_checkBox { + margin-left: vww(16); + + .u-checkbox-group { + .u-checkbox { + } + } + } + + .bottomTabbar_button { + display: flex; + + .u-button { + font-size: 13px; + margin-right: vww(14); + width: vww(90); + height: vww(32); + } + } + } } </style> diff --git a/pages/my-have-todo/my-have-todo.vue b/pages/my-have-todo/my-have-todo.vue index edf4aca..445a07c 100644 --- a/pages/my-have-todo/my-have-todo.vue +++ b/pages/my-have-todo/my-have-todo.vue @@ -1,478 +1,635 @@ <template> - <view class="my-have-todo"> - <!-- 鎼滅储鍖哄煙 --> - <view class="searchContainer"> - - - <view class="searchBox"> - <view class="search"> - <u-search :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" v-model="haveTodoParams.title" shape="square"></u-search> - </view> - <!-- 鐘舵�侀�夋嫨鍣� --> - <!-- <view class="data-selet" @click="statusSeletShow = true"> - <view class="content"> - <text>{{ dataSeletText }}</text> - </view> - <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> - </view> --> - <view class="search"> - <u-search :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="haveTodoParams.name" shape="square"></u-search> - </view> - </view> + <view class="my-have-todo"> + <!-- 鎼滅储鍖哄煙 --> + <view class="searchContainer"> - <!-- 鏃堕棿鎼滅储鍖哄煙 --> - <view class="timeContiner"> - <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.startDate" @change="startDateChange" placeholder="寮�濮嬫椂闂�" /> - <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.endDate" @change="endDateChange" placeholder="缁撴潫鏃堕棿" /> - </view> - - <view class="searchButton"> - <u-button type="primary" text="鎼滅储" @click="searchButtonClick"></u-button> - <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button> - </view> -</view> - <!-- 鎴戠殑宸插姙鍗$墖鍖哄煙 --> - <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> - <combination-card v-for="(item, index) in yibanData" index="index"> - <template v-slot:top> - <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> - <view> - <text>{{ item.actBusiness.title }}</text> - </view> - </template> - <template v-slot:center> - <view class="center-container"> - <view class="center-content__one center-margin"> - <view> - <text>浠诲姟鍚嶇О锛歿{ item.name }}</text> - </view> - <view> - <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> - </view> - </view> - <view class="center-content__two center-margin"> - <view> - <text>鍙戣捣浜猴細{{ item.actBusiness.createByName }}</text> - </view> - <view> - <text>瀹℃壒鎿嶄綔锛歿{ item.deleteReason }}</text> - </view> - </view> - <view class="center-content__three center-margin"> - <view class=""> - <text>瀹℃壒鎰忚锛歿{ item.comment }}</text> - </view> - <view class=""> - <text>鑰楁椂锛歿{ - item.duration >= 86400000 - ? parseInt(item.duration / 86400000 + '澶�' + parseInt(item.duration % 86400000) / 3600000 + '鏃�' + parseInt(item.duration % 3600000) / 60000 + '鍒�') - : item.duration >= 3600000 - ? parseInt(item.duration / 3600000) + '鏃�' + parseInt(item.duration / 3600000 % 3600000) + '鍒�' - : parseInt(item.duration / 60000) + '鍒�' - }}</text> - </view> - </view> - <view class="center-content__four"> - <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> - </view> - </view> - </template> - <template v-slot:bottom> - <view class="bottom-container"> - <!-- 宸插姙鎸夐挳 --> - <view class="bottom-content__item"> - <view @click="theFormDataClick(item.tableId)"> - <image src="@/static/home/biaodan.png" mode=""></image> - <view>琛ㄥ崟鏁版嵁</view> - </view> - <view @click="approvalHistoryClick(item.procInstId)"> - <image src="@/static/home/history.png" mode=""></image> - <view>瀹℃壒鍘嗗彶</view> - </view> - <view @click="deleteApplicationClick(item.id)"> - <image src="@/static/home/delete.png" mode=""></image> - <view>鍒犻櫎</view> - </view> - </view> - </view> - </template> - </combination-card> - </u-checkbox-group> + <u-collapse :border="true" + @change="searchChange" + @close="searchClose" + @open="searchOpen" + > + <u-collapse-item :border="false" + title="鎼滅储妗�" + name="Docs guide" + > + <view class="searchBox"> + <view class="search"> + <u-search :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" v-model="haveTodoParams.title" + shape="square"></u-search> + </view> + <!-- 鐘舵�侀�夋嫨鍣� --> + <!-- <view class="data-selet" @click="statusSeletShow = true"> + <view class="content"> + <text>{{ dataSeletText }}</text> + </view> + <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> + </view> --> + <view class="search"> + <u-search :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="haveTodoParams.name" + shape="square"></u-search> + </view> + </view> - <!-- 搴曢儴鍏ㄩ�� --> - <view class="bottomTabbar"> - <view class="bottomTabbar_checkBox"> - <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"><u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox></u-checkbox-group> - </view> - <view class="bottomTabbar_button"> - <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="deleteApplicationClickAll()"></u-button> - </view> - </view> - - <!-- 鍒犻櫎宸插姙鐢宠妯℃�佹 --> - <view class="deleteApplicationModal"> - <u-modal - :show="deleteApplicationModalShow" - title="鎻愮ず" - content="纭畾鍒犻櫎閫夋嫨鐢宠锛�" - :showCancelButton="true" - @confirm="deleteApplicationModalConfirm" - @cancel="deleteApplicationModalCancel" - ></u-modal> - </view> + <!-- 鏃堕棿鎼滅储鍖哄煙 --> + <view class="timeContiner"> + <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.startDate" + @change="startDateChange" placeholder="寮�濮嬫椂闂�"/> + <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.endDate" + @change="endDateChange" placeholder="缁撴潫鏃堕棿"/> + </view> - <!-- 閫夋嫨鍣� --> - <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> --> - - <!-- 鑿滃崟鏍� --> - <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> - </view> + <view class="searchButton"> + <u-button type="primary" text="鎼滅储" @click="searchButtonClick"></u-button> + <u-button type="primary" :plain="true" text="娓呯┖" @click="emptyButtonClick"></u-button> + </view> + + </u-collapse-item> + </u-collapse> + </view> + <!-- 鎴戠殑宸插姙鍗$墖鍖哄煙 --> + <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> + <combination-card v-for="(item, index) in yibanData" index="index"> + <template v-slot:top> + <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> + <view> + <text>{{ item.actBusiness.title }}</text> + </view> + </template> + <template v-slot:center> + <view class="center-container"> + <view class="center-content__one center-margin"> + <view> + <text>浠诲姟鍚嶇О锛歿{ item.name }}</text> + </view> + <view> + <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> + </view> + </view> + <view class="center-content__two center-margin"> + <view> + <text>鍙戣捣浜猴細{{ item.actBusiness.createByName }}</text> + </view> + <view> + <text>瀹℃壒鎿嶄綔锛歿{ item.deleteReason }}</text> + </view> + </view> + <view class="center-content__three center-margin"> + <view class=""> + <text>瀹℃壒鎰忚锛歿{ item.comment }}</text> + </view> + <view class=""> + <text>鑰楁椂锛歿{ + item.duration >= 86400000 + ? parseInt(item.duration / 86400000 + '澶�' + parseInt(item.duration % 86400000) / 3600000 + '鏃�' + parseInt(item.duration % 3600000) / 60000 + '鍒�') + : item.duration >= 3600000 + ? parseInt(item.duration / 3600000) + '鏃�' + parseInt(item.duration / 3600000 % 3600000) + '鍒�' + : parseInt(item.duration / 60000) + '鍒�' + }} + </text> + </view> + </view> + <view class="center-content__four"> + <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> + </view> + </view> + </template> + <template v-slot:bottom> + <view class="bottom-container"> + <!-- 宸插姙鎸夐挳 --> + <view class="bottom-content__item"> + <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> + <image src="@/static/home/biaodan.png" mode=""></image> + <view>鐢宠璇︽儏</view> + </view> + <view @click="approvalHistoryClick(item.procInstId)"> + <image src="@/static/home/history.png" mode=""></image> + <view>瀹℃壒鍘嗗彶</view> + </view> + <view @click="deleteApplicationClick(item.id)"> + <image src="@/static/home/delete.png" mode=""></image> + <view>鍒犻櫎</view> + </view> + </view> + </view> + </template> + </combination-card> + </u-checkbox-group> + + <!-- 搴曢儴鍏ㄩ�� --> + <view class="bottomTabbar"> + <view class="bottomTabbar_checkBox"> + <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> + <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> + </u-checkbox-group> + </view> + <view class="bottomTabbar_button"> + <u-button :plain="true" type="primary" text="鎵归噺鍒犻櫎" @click="deleteApplicationClickAll()"></u-button> + </view> + </view> + + <!-- 鍒犻櫎宸插姙鐢宠妯℃�佹 --> + <view class="deleteApplicationModal"> + <u-modal + :show="deleteApplicationModalShow" + title="鎻愮ず" + content="纭畾鍒犻櫎閫夋嫨鐢宠锛�" + :showCancelButton="true" + @confirm="deleteApplicationModalConfirm" + @cancel="deleteApplicationModalCancel" + ></u-modal> + </view> + + <!-- 閫夋嫨鍣� --> + <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> --> + + <!--杩斿洖椤堕儴--> + <u-back-top :scroll-top="scrollTop"></u-back-top> + + <!-- 鑿滃崟鏍� --> + <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> + </view> </template> <script> import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; import combinationCard from '@/components/common/combination-card/combination-card.vue'; + export default { - data() { - return { - // 鏉′欢鎼滅储 - // searchData: '', - // dataSeletText: '璇烽�夋嫨鐘舵��', - // 鏃堕棿閫夋嫨 - // createTime: '', - // endTime: '', - // 澶嶉�夋 - checkBoxValue:[], - totalSelectValue:[], - // 閫夋嫨鍣� - // statusSeletShow: false, - // statusList: [['涓浗', '缇庡浗', '鏃ユ湰']], - yibanData: [], - // 鍒犻櫎鐢宠 - deleteIds:'', - deleteApplicationModalShow:false, - haveTodoParams:{ - name: '', - pageNumber: 1, - pageSize: 10, - sort: 'createTime', - order: 'desc', - title: '', - startDate: '', - endDate: '' - } - }; - }, - onShow(){ - if(this.menuShow == true){ - this.$refs.menuRef.menuClick() - } - this.init(); - }, - // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 - onNavigationBarButtonTap(e) { - // console.log(e); - this.$refs.menuRef.menuClick() - }, - components: { - combinationCard, - popupMenu - }, - methods: { - init(){ - this.doneList(); - }, - // 宸插姙 - doneList() { - uni.showLoading({ - title:'鍔犺浇涓�...' - }) - this.$reqGet('doneList', this.haveTodoParams).then(res => { - uni.hideLoading(); - if (res.code === 0) { - // console.log('宸插姙', res); - this.yibanData = res.data.content; - } - }); - }, - // 鎼滅储 - searchButtonClick(){ - this.init(); - }, - // 娓呯┖ - emptyButtonClick(){ - this.haveTodoParams.name = ''; - this.haveTodoParams.title = ''; - this.haveTodoParams.startDate = ''; - this.haveTodoParams.endDate = ''; - this.init(); - }, - menushow(e){ - this.menuShow = e - }, - deleteApplicationClick(id){ - this.deleteIds = id; - this.deleteApplicationModalShow = true; - }, - deleteApplicationClickAll(){ - if(this.checkBoxValue.length > 0){ - this.deleteIds = this.checkBoxValue.toString(','); - this.deleteApplicationModalShow = true; - } else{ - this.$u.toast('鏈�変腑鐢宠') - } - }, - // 鍒犻櫎鐢宠妯℃�佹 - deleteApplicationModalConfirm() { - this.deleteApplicationModalShow = false; - this.$reqPost('deleteHistoric',{ids:this.deleteIds},'form').then(res=>{ - if(res.code == 0){ - this.$nextTick(()=>{ - this.$u.toast('鎿嶄綔鎴愬姛锛�') - }) - this.yibanData = []; - this.init(); - } else { - this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�') - } - }) - }, - deleteApplicationModalCancel() { - this.deleteApplicationModalShow = false; - }, - // 鏃堕棿閫夋嫨鍣� - startDateChange() { - // this.queryRealTimeShippingData.startDate = ''; - // this.$nextTick(() => { - // console.log(this.queryRealTimeShippingData); - // this.realTimeShipping(); - // }); - }, - endDateChange() { - // this.queryRealTimeShippingData.endDate = ''; - // this.$nextTick(() => { - // console.log(this.queryRealTimeShippingData); - // this.realTimeShipping(); - // }); - }, - // 澶嶉�夋 - checkboxChange(n){ - console.log(n); - }, - totalSelectChange(n){ - if(n[0] == 'tatalSelect'){ - this.yibanData.forEach(item=>{ - this.totalSelectValue.push(item.id) - }) - this.checkBoxValue = this.totalSelectValue - }else{ - this.checkBoxValue = [] - } - }, - // 鐘舵�� - // statusConfirm(a){ - // this.statusSeletShow = false - // console.log(a) - // }, - // 琛ㄥ崟鏁版嵁 - theFormDataClick(v) { - uni.navigateTo({ - url: `/pages/the-form-data/the-form-data?index=${v}` - }); - }, - // 瀹℃壒鍘嗗彶 - approvalHistoryClick(v) { - uni.navigateTo({ - url: `/pages/approval-history/approval-history?index=${v}` - }); - } - } + data() { + return { + scrollTop: 0, + // 鏉′欢鎼滅储 + // searchData: '', + // dataSeletText: '璇烽�夋嫨鐘舵��', + // 鏃堕棿閫夋嫨 + // createTime: '', + // endTime: '', + // 澶嶉�夋 + checkBoxValue: [], + totalSelectValue: [], + // 閫夋嫨鍣� + // statusSeletShow: false, + // statusList: [['涓浗', '缇庡浗', '鏃ユ湰']], + yibanData: [], + // 鍒犻櫎鐢宠 + deleteIds: '', + deleteApplicationModalShow: false, + haveTodoParams: { + name: '', + pageNumber: 1, + pageSize: 10, + sort: 'createTime', + order: 'desc', + title: '', + startDate: '', + endDate: '' + }, + // 涓婃媺鍔犺浇鏇村 + timer: {}, + load: 0, + loadingText: '鍔犺浇涓�...', + loadingType: 0, + contentText: { + contentDown: '涓婃媺鏄剧ず鏇村', + contentRefresh: '姝e湪鍔犺浇...', + contentNomore: '娌℃湁鏇村鏁版嵁浜�' + } + }; + }, + // 涓婃媺鍔犺浇鏇村 + onReachBottom() { + if (this.timer != null) { + clearTimeout(this.timer); + } + this.timer = setTimeout(() => { + this.getMoreNews(); + }, 1000); + }, + // 杩斿洖椤堕儴 + onPageScroll(e) { + this.scrollTop = e.scrollTop; + }, + // 涓嬫媺鍔犺浇 + onPullDownRefresh() { + console.log('refresh'); + setTimeout(() => { + uni.stopPullDownRefresh(); + }, 1000); + this.init(); + }, + onShow() { + if (this.menuShow == true) { + this.$refs.menuRef.menuClick() + } + this.init(); + }, + // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 + onNavigationBarButtonTap(e) { + // console.log(e); + this.$refs.menuRef.menuClick() + }, + components: { + combinationCard, + popupMenu + }, + methods: { + init() { + this.haveTodoParams.pageNumber = 1; + this.loadingType = 0; + this.yibanData = []; + // this.doneList(); + this.getMoreNews(); + }, + getMoreNews() { + if (this.loadingType !== 0) { + //loadingType!=0;鐩存帴杩斿洖 + return false; + } + uni.showLoading({ + title: '鍔犺浇涓�...' + }) + this.loadingType = 1; + uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 + this.$reqGet('doneList', this.haveTodoParams).then(response => { + uni.hideLoading(); + this.haveTodoParams.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 + if (response.data.content.length < 1) { + // 娌℃湁鏁版嵁 + this.loadingType = 2; + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + uni.showToast({ + title: '娌℃湁鏇村鏁版嵁浜嗭紒', + icon: 'error' + }); + return; + } + // this.myApplication.pageNumber++; // 姣忚Е搴曚竴娆� page +1 + if (this.haveTodoParams.name || this.haveTodoParams.title || this.haveTodoParams.startDate || this.haveTodoParams.endTime ) { + if(this.haveTodoParams.pageNumber == 1){ + this.yibanData = response.data.content + } else{ + this.yibanData = this.yibanData.concat(response.data.content); + } + } else { + if(this.haveTodoParams.pageNumber ==1){ + this.yibanData = []; + } + this.yibanData = this.yibanData.concat(response.data.content); + } + //灏嗘暟鎹嫾鎺ュ湪涓�璧� + this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + }); + }, + // 宸插姙 + // doneList() { + // uni.showLoading({ + // title:'鍔犺浇涓�...' + // }) + // this.$reqGet('doneList', this.haveTodoParams).then(res => { + // uni.hideLoading(); + // if (res.code === 0) { + // // console.log('宸插姙', res); + // this.yibanData = res.data.content; + // } + // }); + // }, + searchChange(e){ + console.log('e', e); + }, + searchClose(e){ + console.log('e', e); + }, + searchOpen(e){ + console.log('e', e); + }, + // 鎼滅储 + searchButtonClick() { + this.loadingType == 0; + this.haveTodoParams.pageNumber = 1; + this.init(); + }, + // 娓呯┖ + emptyButtonClick() { + this.loadingType == 0; + this.haveTodoParams.pageNumber = 1; + this.haveTodoParams.name = ''; + this.haveTodoParams.title = ''; + this.haveTodoParams.startDate = ''; + this.haveTodoParams.endDate = ''; + this.init(); + }, + menushow(e) { + this.menuShow = e + }, + deleteApplicationClick(id) { + this.deleteIds = id; + this.deleteApplicationModalShow = true; + }, + deleteApplicationClickAll() { + if (this.checkBoxValue.length > 0) { + this.deleteIds = this.checkBoxValue.toString(','); + this.deleteApplicationModalShow = true; + } else { + this.$u.toast('鏈�変腑鐢宠') + } + }, + // 鍒犻櫎鐢宠妯℃�佹 + deleteApplicationModalConfirm() { + this.deleteApplicationModalShow = false; + this.$reqPost('deleteHistoric', {ids: this.deleteIds}, 'form').then(res => { + if (res.code == 0) { + this.$nextTick(() => { + this.$u.toast('鎿嶄綔鎴愬姛锛�') + }) + this.yibanData = []; + this.init(); + } else { + this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�') + } + }) + }, + deleteApplicationModalCancel() { + this.deleteApplicationModalShow = false; + }, + // 鏃堕棿閫夋嫨鍣� + startDateChange() { + // this.queryRealTimeShippingData.startDate = ''; + // this.$nextTick(() => { + // console.log(this.queryRealTimeShippingData); + // this.realTimeShipping(); + // }); + }, + endDateChange() { + // this.queryRealTimeShippingData.endDate = ''; + // this.$nextTick(() => { + // console.log(this.queryRealTimeShippingData); + // this.realTimeShipping(); + // }); + }, + // 澶嶉�夋 + checkboxChange(n) { + console.log(n); + }, + totalSelectChange(n) { + if (n[0] == 'tatalSelect') { + this.yibanData.forEach(item => { + this.totalSelectValue.push(item.id) + }) + this.checkBoxValue = this.totalSelectValue + } else { + this.checkBoxValue = [] + } + }, + // 鐘舵�� + // statusConfirm(a){ + // this.statusSeletShow = false + // console.log(a) + // }, + // 琛ㄥ崟鏁版嵁 + theFormDataClick(v) { + uni.navigateTo({ + url: `/pages/the-form-data/the-form-data?index=${v}` + }); + }, + // 瀹℃壒鍘嗗彶 + approvalHistoryClick(v) { + uni.navigateTo({ + url: `/pages/approval-history/approval-history?index=${v}` + }); + } + } }; </script> <style lang="scss" scoped> ::v-deep.my-have-todo { - // 鎼滅储鍖哄煙 - .searchContainer{ - - .searchButton{ - width: 91%; - margin: vww(16) auto; - display: flex; - .u-button{ - width:30%; - } - } - - .searchBox { - width: 91%; - display: flex; - justify-content: space-between; - margin: vww(16) auto; - .search { - width: vww(160); - border: 1px solid #d1d1d1; - border-radius: vww(4); - .u-search { - .u-search__content { - height: 40px; - background-color: #ffffff !important; - .u-search__content__icon { - width: 10px; - height: 5.5px; - } - .u-search__content__input { - background-color: #ffffff !important; - .uni-input-placeholder{ - color:#CCCCCC!important; - } - } - } - } - } - // 涓嬫媺鑿滃崟 - .data-selet { - border: 1px solid #d1d1d1; - border-radius: 4px; - width: vww(160); - // width: 100%; - height: 40px; - display: flex; - align-items: center; - font-size: 13px; - color: #CCCCCC; - .uni-select__icon { - display: flex; - align-content: center; - margin: 0 10px; - image { - width: 10px; - height: 5.5px; - } - } - .content { - margin-left: vww(8); - width: vww(150); - } - } - } - - // 鏃堕棿鎼滅储 - .timeContiner { - width: 91%; - margin: 0 auto vww(16); - display: flex; - flex-direction: row; - justify-content: space-between; - .uni-date { - width: vww(160); - .uni-date-editor { - .uni-date-editor--x { - .uni-date-x { - .uni-date__x-input { - .uni-input-wrapper{ - .uni-input-placeholder{ - color:#CCCCCC; - font-size: vww(13); - } - } - } - } - } - .uni-date-x--border{ - border: 1px solid #d1d1d1!important; - } - } - } - } - - } - + // 鎼滅储鍖哄煙 + .searchContainer { + width:91%; + margin:vww(16) auto; + .u-collapse { + .u-collapse-item { + .u-collapse-item__content { - + .searchButton { + width: 100%; + margin: 0 auto; + display: flex; - // 鍗$墖涓棿 - .center-container { - display: flex; - flex-direction: column; - .center-content__one { - display: flex; - view { - width: 50%; - } - } - .center-content__two { - display: flex; - // margin: vww(10) 0; - view { - width: 50%; - } - } - .center-content__three { - display: flex; - view { - width: 50%; - } - } - .center-content__four { - } - } - // 涓棿閮ㄥ垎鏍峰紡 - .center-margin { - margin-bottom: vww(16); - } + .u-button { + width: 30%; + } + } - // 鍗$墖搴曢儴 - .bottom-container { - .bottom-content__item { - display: flex; - justify-content: space-around; - view { - display: flex; - justify-content: center; - align-content: center; - margin-right: vww(10); - &:nth-last-child() { - margin-right: 0; - } - view { - display: inline-block; - } - image { - width: vww(16); - height: vww(16); - margin-right: vww(4); - } - } - } - } - - // 搴曢儴 - .bottomTabbar{ - position:fixed; - bottom:0; - width:100%; - height:vww(48); - display:flex; - align-items: center; - justify-content: space-between; - background-color:#F5F5F5; - .bottomTabbar_checkBox{ - margin-left:vww(16); - .u-checkbox-group{ - .u-checkbox{ - } - } - } - .bottomTabbar_button{ - display:flex; - .u-button{ - font-size:13px; - margin-right:vww(14); - width:vww(90); - height:vww(32); - } - } - } + .searchBox { + width: 100%; + display: flex; + justify-content: space-between; + margin:0 auto vww(16); + + .search { + width: vww(150); + border: 1px solid #d1d1d1; + border-radius: vww(4); + + .u-search { + .u-search__content { + height: 40px; + background-color: #ffffff !important; + + .u-search__content__icon { + width: 10px; + height: 5.5px; + } + + .u-search__content__close { + width: 16px !important; + height: 16px !important; + background-color: #cccccc !important; + + .u-icon { + .u-icon__icon { + font-size: 10px !important; + } + } + } + + .u-search__content__input { + background-color: #ffffff !important; + + .uni-input-placeholder { + color: #CCCCCC !important; + } + } + } + } + } + + // 涓嬫媺鑿滃崟 + .data-selet { + border: 1px solid #d1d1d1; + border-radius: 4px; + width: vww(150); + // width: 100%; + height: 40px; + display: flex; + align-items: center; + font-size: 13px; + color: #CCCCCC; + + .uni-select__icon { + display: flex; + align-content: center; + margin: 0 10px; + + image { + width: 10px; + height: 5.5px; + } + } + + .content { + margin-left: vww(8); + width: vww(150); + } + } + } + + // 鏃堕棿鎼滅储 + .timeContiner { + width: 100%; + margin: 0 auto vww(16); + display: flex; + flex-direction: row; + justify-content: space-between; + + .uni-date { + width: vww(150); + + .uni-date-editor { + .uni-date-editor--x { + .uni-date-x { + .uni-date__x-input { + .uni-input-wrapper { + .uni-input-placeholder { + color: #CCCCCC; + font-size: vww(13); + } + } + } + } + } + + .uni-date-x--border { + border: 1px solid #d1d1d1 !important; + } + } + } + } + } + } + } + } + + + // 鍗$墖涓棿 + .center-container { + display: flex; + flex-direction: column; + + .center-content__one { + display: flex; + + view { + width: 50%; + } + } + + .center-content__two { + display: flex; + // margin: vww(10) 0; + view { + width: 50%; + } + } + + .center-content__three { + display: flex; + + view { + width: 50%; + } + } + + .center-content__four { + } + } + + // 涓棿閮ㄥ垎鏍峰紡 + .center-margin { + margin-bottom: vww(16); + } + + // 鍗$墖搴曢儴 + .bottom-container { + .bottom-content__item { + display: flex; + justify-content: space-around; + + view { + display: flex; + justify-content: center; + align-content: center; + margin-right: vww(10); + + &:nth-last-child(1) { + margin-right: 0; + } + + view { + display: inline-block; + } + + image { + width: vww(16); + height: vww(16); + margin-right: vww(4); + } + } + } + } + + // 搴曢儴 + .bottomTabbar { + position: fixed; + bottom: 0; + width: 100%; + height: vww(48); + display: flex; + align-items: center; + justify-content: space-between; + background-color: #F5F5F5; + + .bottomTabbar_checkBox { + margin-left: vww(16); + + .u-checkbox-group { + .u-checkbox { + } + } + } + + .bottomTabbar_button { + display: flex; + + .u-button { + font-size: 13px; + margin-right: vww(14); + width: vww(90); + height: vww(32); + } + } + } } </style> diff --git a/pages/my-todo/my-todo.vue b/pages/my-todo/my-todo.vue index eb4bd8d..66ca313 100644 --- a/pages/my-todo/my-todo.vue +++ b/pages/my-todo/my-todo.vue @@ -1,705 +1,819 @@ <template> - <!-- 鎴戠殑寰呭姙 --> - <view class="my-todo"> - <!-- 鎼滅储鍖哄煙 --> - <view class="searchContainer"> - <view class="searchBox"> - <view class="search"> - <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" v-model="todoParams.title" shape="square"></u-search> - </view> - <!-- 鐘舵�侀�夋嫨鍣� --> - <!-- <view class="data-selet" @click="statusSeletShow = true"> - <view class="content"> - <text>{{ dataSeletText }}</text> - </view> - <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> - </view> --> - <view class="search"> - <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ヤ换鍔″悕绉�" v-model="todoParams.name" shape="square"></u-search> - </view> - </view> - - <!-- 鏃堕棿鎼滅储鍖哄煙 --> - <view class="timeContiner"> - <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.startDate" @change="startDateChange" placeholder="寮�濮嬫椂闂�" /> - <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.endDate" @change="endDateChange" placeholder="缁撴潫鏃堕棿" /> - </view> - - <view class="searchButton"> - <u-button type="primary" text="鎼滅储" @click="searchButtonClick"></u-button> - <u-button type="primary" text="娓呯┖" :plain="true" @click="emptyButtonClick"></u-button> - </view> - </view> + <!-- 鎴戠殑寰呭姙 --> + <view class="my-todo"> + <!-- 鎼滅储鍖哄煙 --> - <!-- 鎴戠殑寰呭姙鍗$墖鍖哄煙 --> - <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> - <combination-card v-for="(item, index) in daibanData" index="index"> - <template v-slot:top> - <u-checkbox size="35" :key="item.id" :name="item.id+item.procInstId"></u-checkbox> - <view> - <text>{{ item.actBusiness.title }}</text> - </view> - </template> - <template v-slot:center> - <view class="center-container"> - <view class="center-content__one center-margin"> - <view class=""> - <text>浠诲姟鍚嶇О锛歿{ item.name }}</text> - </view> - <view class=""> - <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> - </view> - </view> - <view class="center-content__two center-margin"> - <text>鍙戣捣浜猴細{{ item.actBusiness.createByName }}</text> - </view> + <view class="searchContainer"> + <u-collapse :border="true" + @change="searchChange" + @close="searchChange" + @open="searchOpen" + > + <u-collapse-item :border="false" + title="鎼滅储妗�" + name="Docs guide" + > + <view class="searchBox"> + <view class="search"> + <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" + v-model="todoParams.title" shape="square"></u-search> + </view> + <!-- 鐘舵�侀�夋嫨鍣� --> + <!-- <view class="data-selet" @click="statusSeletShow = true"> + <view class="content"> + <text>{{ dataSeletText }}</text> + </view> + <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> + </view> --> + <view class="search"> + <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="璇疯緭鍏ヤ换鍔″悕绉�" + v-model="todoParams.name" shape="square"></u-search> + </view> + </view> - <view class="center-content__three"> - <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> - </view> - </view> - </template> - <template v-slot:bottom> - <view class="bottom-container"> - <!-- 寰呭姙鎸夐挳 --> - <view class="bottom-content__item"> - <!-- <view @click="theFormDataClick"> - <image src="@/static/home/jindu.png" mode=""></image> - <view>鐢宠璇︽儏</view> - </view> --> - <view @click="adopClick(item)"> - <image src="@/static/home/tongguo.png" mode=""></image> - <view>閫氳繃</view> - </view> - <view @click="rejectModalShow = true"> - <image src="@/static/home/bohui.png" mode=""></image> - <view>椹冲洖</view> - </view> - <view @click="approvalHistoryClick(item.procInstId)"> - <image src="@/static/home/history.png" mode=""></image> - <view>鍘嗗彶</view> - </view> - </view> - </view> - </template> - </combination-card> - </u-checkbox-group> + <!-- 鏃堕棿鎼滅储鍖哄煙 --> + <view class="timeContiner"> + <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.startDate" + @change="startDateChange" placeholder="寮�濮嬫椂闂�"/> + <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.endDate" + @change="endDateChange" placeholder="缁撴潫鏃堕棿"/> + </view> - <!-- 搴曢儴鍏ㄩ�� --> - <view class="bottomTabbar"> - <view class="bottomTabbar_checkBox"> - <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> - <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> - </u-checkbox-group> - </view> - <view class="bottomTabbar_button"> - <u-button :plain="true" type="primary" text="鎵归噺椹冲洖" @click="batchRejectClick"></u-button> - <u-button type="primary" text="鎵归噺閫氳繃" @click="batchAdoptClick"></u-button> - </view> - </view> + <view class="searchButton"> + <u-button type="primary" text="鎼滅储" @click="searchButtonClick"></u-button> + <u-button type="primary" text="娓呯┖" :plain="true" @click="emptyButtonClick"></u-button> + </view> + </u-collapse-item> + </u-collapse> + </view> - <!-- 閫氳繃妯℃�佹 --> - <view class="adoptModal"> - <u-modal width="684rpx" :show="adoptModalShow" title="瀹℃壒閫氳繃" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> - <view class="slot-content"><view class="rejectMesaage"> - <u-icon name="info-circle-fill" color="#0307ff"></u-icon> - <text>{{ modalType == 0 ? '娉ㄦ剰锛氬皢榛樿鍒嗛厤缁欒妭鐐硅瀹氱殑鎵�鏈夊彲瀹℃壒鐢ㄦ埛' : '娉ㄦ剰锛氭墍鏈夋祦绋嬪皢椹冲洖鑷冲彂璧蜂汉' }}</text> - </view><u--textarea v-model="adoptForm.comment" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea></view> - </u-modal> - </view> - <!-- 椹冲洖妯℃�佹 --> - <view class="rejectModal"> - <u-modal width="684rpx" :show="rejectModalShow" title="椹冲洖" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> - <view class="slot-content"> - <view class="rejectMesaage"> - <u-icon name="info-circle-fill" color="#0307ff"></u-icon> - <text>{{ modalType == 0 ? '娉ㄦ剰锛氬皢榛樿鍒嗛厤缁欒妭鐐硅瀹氱殑鎵�鏈夊彲瀹℃壒鐢ㄦ埛' : '娉ㄦ剰锛氭墍鏈夋祦绋嬪皢椹冲洖鑷冲彂璧蜂汉' }}</text> - </view> - <u--textarea v-model="rejectForm.comment" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea> - <!-- <view class="rejectBack"> - <view class="rejectBack-title"><text>椹冲洖鑷�</text></view> - <view class="data-selet" @click="statusSeletShow = true"> - <view class="content"> - <text>{{ dataSeletText }}</text> - </view> - <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> - </view> - </view> --> - </view> - </u-modal> - </view> - - <!-- 鎵归噺椹冲洖妯℃�佹 --> - <!-- <view class="rejectModal"> - <u-modal width="684rpx" :show="rejectModalShow" title="椹冲洖" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> - <view class="slot-content"> - <u--textarea v-model="rejectModalContent" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea> - <view class="rejectBack"> - <view class="rejectBack-title"><text>椹冲洖鑷�</text></view> - <view class="data-selet" @click="statusSeletShow = true"> - <view class="content"> - <text>{{ dataSeletText }}</text> - </view> - <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> - </view> - </view> - </view> - </u-modal> - </view> --> - - <!-- 鎵归噺閫氳繃妯℃�佹 --> - <!-- <view class="adoptModal"> - <u-modal width="684rpx" :show="adoptModalShow" title="瀹℃壒閫氳繃" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> - <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea></view> - </u-modal> - </view> --> - - <!-- 鑿滃崟鏍� --> - <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> - </view> + <!-- 鎴戠殑寰呭姙鍗$墖鍖哄煙 --> + <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> + <combination-card v-for="(item, index) in daibanData" index="index"> + <template v-slot:top> + <u-checkbox size="35" :key="item.id" :name="item.id+item.procInstId"></u-checkbox> + <view> + <text>{{ item.actBusiness.title }}</text> + </view> + </template> + <template v-slot:center> + <view class="center-container"> + <view class="center-content__one center-margin"> + <view class=""> + <text>浠诲姟鍚嶇О锛歿{ item.name }}</text> + </view> + <view class=""> + <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text> + </view> + </view> + <view class="center-content__two center-margin"> + <text>鍙戣捣浜猴細{{ item.actBusiness.createByName }}</text> + </view> + + <view class="center-content__three"> + <text>鍒涘缓鏃堕棿锛歿{ item.createTime }}</text> + </view> + </view> + </template> + <template v-slot:bottom> + <view class="bottom-container"> + <!-- 寰呭姙鎸夐挳 --> + <view class="bottom-content__item"> + <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> + <image src="@/static/home/jindu.png" mode=""></image> + <view>鐢宠璇︽儏</view> + </view> + <view @click="adopClick(item)"> + <image src="@/static/home/tongguo.png" mode=""></image> + <view>閫氳繃</view> + </view> + <view @click="rejectModalShow = true"> + <image src="@/static/home/bohui.png" mode=""></image> + <view>椹冲洖</view> + </view> + <view @click="approvalHistoryClick(item.procInstId)"> + <image src="@/static/home/history.png" mode=""></image> + <view>鍘嗗彶</view> + </view> + </view> + </view> + </template> + </combination-card> + </u-checkbox-group> + + <!-- 搴曢儴鍏ㄩ�� --> + <view class="bottomTabbar"> + <view class="bottomTabbar_checkBox"> + <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> + <u-checkbox labelSize="13px" label="鍏ㄩ��" name="tatalSelect"></u-checkbox> + </u-checkbox-group> + </view> + <view class="bottomTabbar_button"> + <u-button :plain="true" type="primary" text="鎵归噺椹冲洖" @click="batchRejectClick"></u-button> + <u-button type="primary" text="鎵归噺閫氳繃" @click="batchAdoptClick"></u-button> + </view> + </view> + + <!-- 閫氳繃妯℃�佹 --> + <view class="adoptModal"> + <u-modal width="684rpx" :show="adoptModalShow" title="瀹℃壒閫氳繃" :showCancelButton="true" @confirm="adoptModalConfirm" + @cancel="adoptModalCancel"> + <view class="slot-content"> + <view class="rejectMesaage"> + <u-icon name="info-circle-fill" color="#0307ff"></u-icon> + <text>{{ modalType == 0 ? '娉ㄦ剰锛氬皢榛樿鍒嗛厤缁欒妭鐐硅瀹氱殑鎵�鏈夊彲瀹℃壒鐢ㄦ埛' : '娉ㄦ剰锛氭墍鏈夋祦绋嬪皢椹冲洖鑷冲彂璧蜂汉' }}</text> + </view> + <u--textarea v-model="adoptForm.comment" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea> + </view> + </u-modal> + </view> + + <!-- 椹冲洖妯℃�佹 --> + <view class="rejectModal"> + <u-modal width="684rpx" :show="rejectModalShow" title="椹冲洖" :showCancelButton="true" @confirm="rejectModalConfirm" + @cancel="rejectModalCancel"> + <view class="slot-content"> + <view class="rejectMesaage"> + <u-icon name="info-circle-fill" color="#0307ff"></u-icon> + <text>{{ modalType == 0 ? '娉ㄦ剰锛氬皢榛樿鍒嗛厤缁欒妭鐐硅瀹氱殑鎵�鏈夊彲瀹℃壒鐢ㄦ埛' : '娉ㄦ剰锛氭墍鏈夋祦绋嬪皢椹冲洖鑷冲彂璧蜂汉' }}</text> + </view> + <u--textarea v-model="rejectForm.comment" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea> + <!-- <view class="rejectBack"> + <view class="rejectBack-title"><text>椹冲洖鑷�</text></view> + <view class="data-selet" @click="statusSeletShow = true"> + <view class="content"> + <text>{{ dataSeletText }}</text> + </view> + <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> + </view> + </view> --> + </view> + </u-modal> + </view> + + <!-- 鎵归噺椹冲洖妯℃�佹 --> + <!-- <view class="rejectModal"> + <u-modal width="684rpx" :show="rejectModalShow" title="椹冲洖" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> + <view class="slot-content"> + <u--textarea v-model="rejectModalContent" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea> + <view class="rejectBack"> + <view class="rejectBack-title"><text>椹冲洖鑷�</text></view> + <view class="data-selet" @click="statusSeletShow = true"> + <view class="content"> + <text>{{ dataSeletText }}</text> + </view> + <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="鍔犺浇澶辫触"></image></view> + </view> + </view> + </view> + </u-modal> + </view> --> + + <!-- 鎵归噺閫氳繃妯℃�佹 --> + <!-- <view class="adoptModal"> + <u-modal width="684rpx" :show="adoptModalShow" title="瀹℃壒閫氳繃" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> + <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="璇疯緭鍏ュ鎵规剰瑙�"></u--textarea></view> + </u-modal> + </view> --> + + <!--杩斿洖椤堕儴--> + <u-back-top :scroll-top="scrollTop"></u-back-top> + + <!-- 鑿滃崟鏍� --> + <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> + </view> </template> <script> import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; import combinationCard from '@/components/common/combination-card/combination-card.vue'; + export default { - data() { - return { - // 澶嶉�夋 - checkBoxValue:[], - totalSelectValue:[], - // 閫氳繃妯℃�佹 - adoptModalShow: false, - adoptModalContent: '', - adoptDataBox:[], - // 閫氳繃璇锋眰 - adoptForm: { - ids: '', - comment: '' - }, - // 椹冲洖妯℃�佹 - rejectModalShow: false, - rejectModalContent: '', - menuShow:false, - rejectDataBox:[], - // 椹冲洖璇锋眰 - rejectForm: { - procInstIds: '', - comment: '' - }, - modalType:0, - // data - daibanData: [], - // 寰呭姙 - todoParams: { - name: '', - pageNumber: 1, - pageSize: 10, - title: '', - startDate: '', - endDate: '', - }, - // 涓婃媺鍔犺浇鏇村 - timer: {}, - load: 0, - loadingText: '鍔犺浇涓�...', - loadingType: 0, - contentText: { - contentDown: '涓婃媺鏄剧ず鏇村', - contentRefresh: '姝e湪鍔犺浇...', - contentNomore: '娌℃湁鏇村鏁版嵁浜�' - } - }; - }, - onShow(){ - if(this.menuShow == true){ - this.$refs.menuRef.menuClick() - } - this.myApplication.pageNumber = 1; - this.init(); - }, - // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 - onNavigationBarButtonTap(e) { - // console.log(e); - this.$refs.menuRef.menuClick() - }, - components: { - combinationCard, - popupMenu - }, - // 涓婃媺鍔犺浇鏇村 - onReachBottom() { - if (this.timer != null) { - clearTimeout(this.timer); - } - this.timer = setTimeout(() => { - this.getMoreNews(); - }, 1000); - }, - // 涓嬫媺鍔犺浇 - onPullDownRefresh() { - console.log('refresh'); - this.todoParams.pageNumber = 1; - this.loadingType = 0; - this.daibanData = []; - setTimeout(()=> { - uni.stopPullDownRefresh(); - }, 1000); - this.init(); - }, - methods: { - init(){ - // this.todoList(); - this.getMoreNews(); - }, - // 寰呭姙鍒楄〃 - // todoList(){ - // this.$reqGet('todoList', this.todoParams).then(res => { - // if (res.code === 0) { - // this.daibanData = res.data.content; - // } - // }); - // }, - getMoreNews() { - if (this.loadingType !== 0) { - //loadingType!=0;鐩存帴杩斿洖 - return false; - } - this.loadingType = 1; - uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 - this.$reqGet('todoList', this.todoParams).then(res => { - // if (res.code === 0) { - // this.daibanData = res.data.content; - // } - this.todoParams.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 - if (res.data.content.length < 1) { - // 娌℃湁鏁版嵁 - this.loadingType = 2; - uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 - uni.showToast({ - title: '娌℃湁鏇村鏁版嵁浜嗭紒', - icon: 'error' - }); - return; - } - - if(this.todoParams.name||this.todoParams.startTime||this.todoParams.endTime||this.todoParams.title){ - this.daibanData = res.data.content - } else{ - this.daibanData = this.daibanData.concat(res.data.content); - } - //灏嗘暟鎹嫾鎺ュ湪涓�璧� - this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 - uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 - }); - }, - // 鎼滅储鐐瑰嚮 - searchButtonClick(){ - this.todoParams.pageNumber = 1; - this.init(); - }, - // 娓呯┖ - emptyButtonClick(){ - this.todoParams.name = ''; - this.todoParams.title = ''; - this.todoParams.startDate = ''; - this.todoParams.endDate = ''; - this.init(); - }, - menushow(e){ - this.menuShow = e; - }, - // 鏃堕棿閫夋嫨鍣� - startDateChange() { - // this.queryRealTimeShippingData.startDate = ''; - // this.$nextTick(() => { - // console.log(this.queryRealTimeShippingData); - // this.realTimeShipping(); - // }); - }, - endDateChange() { - // this.queryRealTimeShippingData.endDate = ''; - // this.$nextTick(() => { - // console.log(this.queryRealTimeShippingData); - // this.realTimeShipping(); - // }); - }, - // 鎼滅储 - searchIconClick() { - console.log(1111, this.searchData); - }, - - // 鐘舵�� - statusConfirm(a) { - this.statusSeletShow = false; - console.log(a); - }, - // 澶嶉�夋 - checkboxChange(n){ - console.log('checkbox',n); - }, - totalSelectChange(n){ - if(n[0] == 'tatalSelect'){ - this.daibanData.forEach(item=>{ - this.totalSelectValue.push(item.id+item.procInstId) - }) - this.checkBoxValue = this.totalSelectValue - } else { - this.checkBoxValue = [] - } - console.log('totalSelect',n); - }, - // 琛ㄥ崟鏁版嵁 - theFormDataClick() { - uni.navigateTo({ - url: '/pages/the-form-data/the-form-data' - }); - }, - // 瀹℃壒鍘嗗彶 - approvalHistoryClick(v) { - uni.navigateTo({ - url: `/pages/approval-history/approval-history?index=${v}` - }); - }, - // 閫氳繃 - adopClick(v){ - this.adoptModalShow = true; - this.adoptForm.ids = v.id; - this.modalType = 0; - }, - batchAdoptClick(){ - if(this.checkBoxValue.length != 0){ - this.adoptModalShow = true; - } else { - this.$u.toast('鏈�夋嫨鐢宠锛�') - } - }, - // 閫氳繃妯℃�佹 - adoptModalConfirm() { - this.adoptModalShow = false; - this.checkBoxValue.forEach(item=>{ - this.adoptDataBox.push(item.slice(0,6)) - }) - this.adoptForm.ids = this.adoptDataBox.toString(); - this.$reqPost('passAll', this.adoptForm, 'form').then(res => { - console.log('鏄惁杩樺師',this.adoptForm.ids,this.rejectForm.procInstIds); - if (res.code == 0) { - this.$u.toast('鎿嶄綔鎴愬姛!'); - } else { - this.$u.toast('娣诲姞澶辫触!!'); - } - this.init(); - }); - }, - adoptModalCancel() { - this.adoptModalShow = false; - }, - // 椹冲洖妯℃�佹 - rejectModalConfirm() { - this.rejectModalShow = false; - this.checkBoxValue.forEach(item=>{ - this.rejectDataBox.push(item.slice(6,12)) - }) - this.rejectForm.procInstIds = this.rejectDataBox.toString(); - this.$reqPost('backAll', this.rejectForm, 'form').then(res => { - if (res.code == 0) { - this.$u.toast('鎿嶄綔鎴愬姛锛�'); - } else { - this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�'); - } - this.init(); - }); - }, - rejectModalCancel() { - this.rejectModalShow = false; - }, - rejectClick(v) { - this.modalType = 1; - this.rejectModalShow = true; - this.rejectForm.procInstIds = v.procInstId; - }, - batchRejectClick(){ - if(this.checkBoxValue.length != 0){ - this.rejectModalShow = true; - - console.log(this.rejectDataBox); - } else{ - this.$u.toast('鏈�変腑鐢宠锛�') - } - - } - } + data() { + return { + scrollTop: 0, + // 澶嶉�夋 + checkBoxValue: [], + totalSelectValue: [], + // 閫氳繃妯℃�佹 + adoptModalShow: false, + adoptModalContent: '', + adoptDataBox: [], + // 閫氳繃璇锋眰 + adoptForm: { + ids: '', + comment: '' + }, + // 椹冲洖妯℃�佹 + rejectModalShow: false, + rejectModalContent: '', + menuShow: false, + rejectDataBox: [], + // 椹冲洖璇锋眰 + rejectForm: { + procInstIds: '', + comment: '' + }, + modalType: 0, + // data + daibanData: [], + // 寰呭姙 + todoParams: { + name: '', + pageNumber: 1, + pageSize: 10, + title: '', + startDate: '', + endDate: '', + }, + // 涓婃媺鍔犺浇鏇村 + timer: {}, + load: 0, + loadingText: '鍔犺浇涓�...', + loadingType: 0, + contentText: { + contentDown: '涓婃媺鏄剧ず鏇村', + contentRefresh: '姝e湪鍔犺浇...', + contentNomore: '娌℃湁鏇村鏁版嵁浜�' + } + }; + }, + // 杩斿洖椤堕儴 + onPageScroll(e) { + this.scrollTop = e.scrollTop; + }, + onShow() { + if (this.menuShow == true) { + this.$refs.menuRef.menuClick() + } + this.todoParams.pageNumber = 1; + this.init(); + }, + // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗 + onNavigationBarButtonTap(e) { + // console.log(e); + this.$refs.menuRef.menuClick() + }, + components: { + combinationCard, + popupMenu + }, + // 涓婃媺鍔犺浇鏇村 + onReachBottom() { + if (this.timer != null) { + clearTimeout(this.timer); + } + this.timer = setTimeout(() => { + this.getMoreNews(); + }, 1000); + }, + // 涓嬫媺鍔犺浇 + onPullDownRefresh() { + console.log('refresh'); + setTimeout(() => { + uni.stopPullDownRefresh(); + }, 1000); + this.init(); + }, + methods: { + init() { + this.todoParams.pageNumber = 1; + this.loadingType = 0; + this.daibanData = []; + // this.todoList(); + this.getMoreNews(); + }, + // 寰呭姙鍒楄〃 + // todoList(){ + // this.$reqGet('todoList', this.todoParams).then(res => { + // if (res.code === 0) { + // this.daibanData = res.data.content; + // } + // }); + // }, + getMoreNews() { + if (this.loadingType != 0) { + //loadingType!=0;鐩存帴杩斿洖 + return false; + } + uni.showLoading({ + title: "鍔犺浇涓�..." + }) + this.loadingType = 1; + uni.showNavigationBarLoading(); //鏄剧ず鍔犺浇鍔ㄧ敾 + this.$reqGet('todoList', this.todoParams).then(res => { + uni.hideLoading(); + // if (res.code === 0) { + // this.daibanData = res.data.content; + // } + this.todoParams.pageNumber++; // 寰楀埌鏁版嵁涔嬪悗 page+1 + if (res.data.content.length < 1) { + // 娌℃湁鏁版嵁 + this.loadingType = 2; + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + uni.showToast({ + title: '娌℃湁鏇村鏁版嵁浜嗭紒', + icon: 'error' + }); + return; + } + + if (this.todoParams.name != '' || this.todoParams.startDate != '' || this.todoParams.endDate != '' || this.todoParams.title != '') { + if(this.todoParams.pageNumber == 1){ + this.daibanData = res.data.content; + }else{ + this.daibanData = this.daibanData.concat(res.data.content); + } + } else { + if(this.todoParams.pageNumber == 1){ + this.daibanData = []; + } + this.daibanData = this.daibanData.concat(res.data.content); + } + //灏嗘暟鎹嫾鎺ュ湪涓�璧� + this.loadingType = 0; // 灏唋oadingType褰�0閲嶇疆 + uni.hideNavigationBarLoading(); // 鍏抽棴鍔犺浇鍔ㄧ敾 + }); + }, + // 鎼滅储鐐瑰嚮 + searchButtonClick() { + this.loadingType == 0; + this.todoParams.pageNumber = 1; + this.init(); + }, + // 娓呯┖ + emptyButtonClick() { + this.loadingType == 0; + this.todoParams.pageNumber = 1; + this.todoParams.name = ''; + this.todoParams.title = ''; + this.todoParams.startDate = ''; + this.todoParams.endDate = ''; + this.init(); + }, + menushow(e) { + this.menuShow = e; + }, + // 鏃堕棿閫夋嫨鍣� + startDateChange() { + // this.queryRealTimeShippingData.startDate = ''; + // this.$nextTick(() => { + // console.log(this.queryRealTimeShippingData); + // this.realTimeShipping(); + // }); + }, + endDateChange() { + // this.queryRealTimeShippingData.endDate = ''; + // this.$nextTick(() => { + // console.log(this.queryRealTimeShippingData); + // this.realTimeShipping(); + // }); + }, + searchChange(e){ + console.log('e', e); + }, + searchClose(e){ + console.log('e', e); + }, + searchOpen(e){ + console.log('e', e); + }, + // 鎼滅储 + searchIconClick() { + console.log(1111, this.searchData); + }, + + // 鐘舵�� + statusConfirm(a) { + this.statusSeletShow = false; + console.log(a); + }, + // 澶嶉�夋 + checkboxChange(n) { + console.log('checkbox', n); + }, + totalSelectChange(n) { + if (n[0] == 'tatalSelect') { + this.daibanData.forEach(item => { + this.totalSelectValue.push(item.id + item.procInstId) + }) + this.checkBoxValue = this.totalSelectValue + } else { + this.checkBoxValue = [] + } + console.log('totalSelect', n); + }, + // 琛ㄥ崟鏁版嵁 + theFormDataClick(v) { + uni.navigateTo({ + url: `/pages/the-form-data/the-form-data?index=${v}` + }); + }, + // 瀹℃壒鍘嗗彶 + approvalHistoryClick(v) { + uni.navigateTo({ + url: `/pages/approval-history/approval-history?index=${v}` + }); + }, + // 閫氳繃 + adopClick(v) { + this.adoptModalShow = true; + this.adoptForm.ids = v.id; + this.modalType = 0; + }, + batchAdoptClick() { + if (this.checkBoxValue.length != 0) { + this.adoptModalShow = true; + } else { + this.$u.toast('鏈�夋嫨鐢宠锛�') + } + }, + // 閫氳繃妯℃�佹 + adoptModalConfirm() { + this.adoptModalShow = false; + this.checkBoxValue.forEach(item => { + this.adoptDataBox.push(item.slice(0, 6)) + }) + this.adoptForm.ids = this.adoptDataBox.toString(); + this.$reqPost('passAll', this.adoptForm, 'form').then(res => { + console.log('鏄惁杩樺師', this.adoptForm.ids, this.rejectForm.procInstIds); + if (res.code == 0) { + this.$u.toast('鎿嶄綔鎴愬姛!'); + } else { + this.$u.toast('娣诲姞澶辫触!!'); + } + this.init(); + }); + }, + adoptModalCancel() { + this.adoptModalShow = false; + }, + // 椹冲洖妯℃�佹 + rejectModalConfirm() { + this.rejectModalShow = false; + this.checkBoxValue.forEach(item => { + this.rejectDataBox.push(item.slice(6, 12)) + }) + this.rejectForm.procInstIds = this.rejectDataBox.toString(); + this.$reqPost('backAll', this.rejectForm, 'form').then(res => { + if (res.code == 0) { + this.$u.toast('鎿嶄綔鎴愬姛锛�'); + } else { + this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�'); + } + this.init(); + }); + }, + rejectModalCancel() { + this.rejectModalShow = false; + }, + rejectClick(v) { + this.modalType = 1; + this.rejectModalShow = true; + this.rejectForm.procInstIds = v.procInstId; + }, + batchRejectClick() { + if (this.checkBoxValue.length != 0) { + this.rejectModalShow = true; + + console.log(this.rejectDataBox); + } else { + this.$u.toast('鏈�変腑鐢宠锛�') + } + + } + } }; </script> <style lang="scss" scoped> ::v-deep.my-todo { - // 鎼滅储鍖哄煙 - .searchContainer{ - .searchButton{ - width:91%; - margin: vww(16) auto; - display:flex; - .u-button{ - width:30%; - } - } - // 鏉′欢鎼滅储 - .searchBox { - width: 91%; - display: flex; - justify-content: space-between; - margin: vww(16) auto; - .search { - width: vww(160); - border: 1px solid #d1d1d1; - border-radius: vww(4); - .u-search { - .u-search__content { - height: 38px; - background-color: #ffffff !important; - .u-search__content__icon { - width: 10px; - height: 5.5px; - } - .u-search__content__input { - background-color: #ffffff !important; - .uni-input-placeholder{ - color:#CCCCCC!important; - } - } - } - } - } - // 涓嬫媺鑿滃崟 - .data-selet { - border: 1px solid #d1d1d1; - border-radius: 4px; - width: vww(160); - // width: 100%; - height: 40px; - display: flex; - align-items: center; - font-size: 13px; - color: #CCCCCC; - .uni-select__icon { - display: flex; - align-content: center; - margin: 0 10px; - image { - width: 10px; - height: 5.5px; - } - } - .content { - margin-left: vww(8); - width: vww(150); - } - } - } - // 鏃堕棿鎼滅储 - .timeContiner { - width: 91%; - margin: 0 auto vww(16); - display: flex; - flex-direction: row; - justify-content: space-between; - .uni-date { - width: vww(160); - .uni-date-editor { - .uni-date-editor--x { - .uni-date-x { - .uni-date__x-input { - .uni-input-wrapper{ - .uni-input-placeholder{ - color:#CCCCCC; - font-size: vww(13); - } - } - } - } - } - .uni-date-x--border{ - border: 1px solid #d1d1d1!important; - } - } - } - } - - } - + // 鎼滅储鍖哄煙 + .searchContainer { + width:91%; + margin:vww(16) auto; + .u-collapse { + .u-collapse-item { + .u-collapse-item__content { + .searchButton { + width: 100%; + margin: 0 auto; + display: flex; - - + .u-button { + width: 30%; + } + } - // 鍗$墖涓棿 - .center-container { - display: flex; - flex-direction: column; - .center-content__one { - display: flex; - view { - width: 50%; - } - } - .center-content__two { - display: flex; - // margin: vww(10) 0; - view { - width: 50%; - } - } - .center-content__three { - display: flex; - view { - width: 50%; - } - } - .center-content__four { - } - } - // 涓棿閮ㄥ垎鏍峰紡 - .center-margin { - margin-bottom: vww(16); - } + // 鏉′欢鎼滅储 + .searchBox { + width: 100%; + display: flex; + justify-content: space-between; + margin: 0 auto vww(16); - // 鍗$墖搴曢儴 - .bottom-container { - .bottom-content__item { - display: flex; - justify-content: space-around; - view { - display: flex; - justify-content: center; - align-content: center; - margin-right: vww(10); - &:nth-last-child() { - margin-right: 0; - } - view { - display: inline-block; - } - image { - width: vww(16); - height: vww(16); - margin-right: vww(4); - } - } - } - } + .search { + width: vww(150); + border: 1px solid #d1d1d1; + border-radius: vww(4); - // 搴曢儴 - .bottomTabbar { - position: fixed; - bottom: 0; - width: 100%; - height: vww(48); - display: flex; - align-items: center; - justify-content: space-between; - background-color: #f5f5f5; - .bottomTabbar_checkBox { - margin-left: vww(16); - .u-checkbox-group { - .u-checkbox { - } - } - } - .bottomTabbar_button { - display: flex; - .u-button { - font-size: 13px; - margin-right: vww(14); - width: vww(90); - height: vww(32); - } - } - } + .u-search { + .u-search__content { + height: 38px; + background-color: #ffffff !important; - // 閫氳繃妯℃�佹 - .adoptModal { - // width:100%; - // height:vww(244); - .slot-content { - .rejectMesaage { - display: flex; - padding: vww(3); - border: 1px solid #0307ff; - border-radius: vww(4); - font-size: 13px; - text { - margin-left: vww(5); - } - } - .u-textarea { - margin-top:vww(10); - width: vww(280); - height: vww(90) !important; - .uni-textarea-wrapper { - height: vww(90) !important; - } - } - } - } + .u-search__content__icon { + width: 10px; + height: 5.5px; + } - // 椹冲洖妯℃�佹 - .rejectModal { - .slot-content { - display: inline-block; - .rejectMesaage { - display: flex; - padding: vww(3); - border: 1px solid #0307ff; - border-radius: vww(4); - font-size: 13px; - text { - margin-left: vww(5); - } - } - .u-textarea { - margin-top:vww(10); - width: vww(280); - height: vww(90) !important; - .uni-textarea-wrapper { - height: vww(90) !important; - } - } - - .rejectBack { - margin-top:vww(24); - .rejectBack-title { - font-size: vww(13); - } - // 涓嬫媺鑿滃崟 - .data-selet { - border: 1px solid #d1d1d1; - border-radius: 4px; - width: vww(300); - height: 40px; - display: flex; - align-items: center; - font-size: 13px; - color: #666; - margin-top:vww(8); - .uni-select__icon { - display: flex; - align-content: center; - margin: 0 10px; - image { - width: 10px; - height: 5.5px; - } - } - .content { - margin-left: vww(8); - width: vww(280); - } - } - } - } - } - - + .u-search__content__close { + width: 16px !important; + height: 16px !important; + background-color: #cccccc !important; + + .u-icon { + .u-icon__icon { + font-size: 10px !important; + } + } + } + + .u-search__content__input { + background-color: #ffffff !important; + + .uni-input-placeholder { + color: #CCCCCC !important; + } + } + } + } + } + + // 涓嬫媺鑿滃崟 + .data-selet { + border: 1px solid #d1d1d1; + border-radius: 4px; + width: vww(150); + // width: 100%; + height: 40px; + display: flex; + align-items: center; + font-size: 13px; + color: #CCCCCC; + + .uni-select__icon { + display: flex; + align-content: center; + margin: 0 10px; + + image { + width: 10px; + height: 5.5px; + } + } + + .content { + margin-left: vww(8); + width: vww(150); + } + } + } + + // 鏃堕棿鎼滅储 + .timeContiner { + width: 100%; + margin: 0 auto vww(16); + display: flex; + flex-direction: row; + justify-content: space-between; + + .uni-date { + width: vww(150); + + .uni-date-editor { + .uni-date-editor--x { + .uni-date-x { + .uni-date__x-input { + .uni-input-wrapper { + .uni-input-placeholder { + color: #CCCCCC; + font-size: vww(13); + } + } + } + } + } + + .uni-date-x--border { + border: 1px solid #d1d1d1 !important; + } + } + } + } + } + } + } + + + } + + + // 鍗$墖涓棿 + .center-container { + display: flex; + flex-direction: column; + + .center-content__one { + display: flex; + + view { + width: 50%; + } + } + + .center-content__two { + display: flex; + // margin: vww(10) 0; + view { + width: 50%; + } + } + + .center-content__three { + display: flex; + + view { + width: 50%; + } + } + + .center-content__four { + } + } + + // 涓棿閮ㄥ垎鏍峰紡 + .center-margin { + margin-bottom: vww(16); + } + + // 鍗$墖搴曢儴 + .bottom-container { + .bottom-content__item { + display: flex; + justify-content: space-around; + + view { + display: flex; + justify-content: center; + align-content: center; + margin-right: vww(10); + + &:nth-last-child(1) { + margin-right: 0; + } + + view { + display: inline-block; + } + + image { + width: vww(16); + height: vww(16); + margin-right: vww(4); + } + } + } + } + + // 搴曢儴 + .bottomTabbar { + position: fixed; + bottom: 0; + width: 100%; + height: vww(48); + display: flex; + align-items: center; + justify-content: space-between; + background-color: #f5f5f5; + + .bottomTabbar_checkBox { + margin-left: vww(16); + + .u-checkbox-group { + .u-checkbox { + } + } + } + + .bottomTabbar_button { + display: flex; + + .u-button { + font-size: 13px; + margin-right: vww(14); + width: vww(90); + height: vww(32); + } + } + } + + // 閫氳繃妯℃�佹 + .adoptModal { + // width:100%; + // height:vww(244); + .slot-content { + .rejectMesaage { + display: flex; + padding: vww(3); + border: 1px solid #0307ff; + border-radius: vww(4); + font-size: 13px; + + text { + margin-left: vww(5); + } + } + + .u-textarea { + margin-top: vww(10); + width: vww(280); + height: vww(90) !important; + + .uni-textarea-wrapper { + height: vww(90) !important; + } + } + } + } + + // 椹冲洖妯℃�佹 + .rejectModal { + .slot-content { + display: inline-block; + + .rejectMesaage { + display: flex; + padding: vww(3); + border: 1px solid #0307ff; + border-radius: vww(4); + font-size: 13px; + + text { + margin-left: vww(5); + } + } + + .u-textarea { + margin-top: vww(10); + width: vww(280); + height: vww(90) !important; + + .uni-textarea-wrapper { + height: vww(90) !important; + } + } + + .rejectBack { + margin-top: vww(24); + + .rejectBack-title { + font-size: vww(13); + } + + // 涓嬫媺鑿滃崟 + .data-selet { + border: 1px solid #d1d1d1; + border-radius: 4px; + width: vww(300); + height: 40px; + display: flex; + align-items: center; + font-size: 13px; + color: #666; + margin-top: vww(8); + + .uni-select__icon { + display: flex; + align-content: center; + margin: 0 10px; + + image { + width: 10px; + height: 5.5px; + } + } + + .content { + margin-left: vww(8); + width: vww(280); + } + } + } + } + } + + } </style> 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 3d75a8e..dc1bf80 100644 --- a/pages/new-application-form-data/new-application-form-data.vue +++ b/pages/new-application-form-data/new-application-form-data.vue @@ -363,7 +363,7 @@ <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> <!-- 閫夋嫨鐓ゅ巶 --> @@ -540,12 +540,12 @@ <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.balanceTotal == null ? 0 :accountDetails.balanceTotal.toFixed(2) }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text> </view> <u-swipe-action> <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index"> <view class="cardList"> - <view class="" class="cardListIcon"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view> + <view 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"> 鏀惰揣浜猴細 @@ -785,25 +785,25 @@ 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 + // 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 }, dust: null, // 鎶戝皹璐� trainfreight: {}, //璺繍杩愯垂 @@ -825,7 +825,8 @@ { text: '鍒犻櫎' } - ] + ], + editApplicationIndex:null }; }, onShow() { @@ -1304,6 +1305,8 @@ // 娣诲姞鍚堝悓寮瑰嚭妗� addContractClose() { this.addContractShow = false; + this.addContractFormdata = {}; + this.editApplicationIndex = null; }, addContractOpen() { console.log('娣诲姞璁㈠崟鎵撳紑'); @@ -1317,6 +1320,7 @@ }, // 閫夋嫨鐨勭叅鍘� coalFiledSelectClick(e) { + console.log('閫夋嫨鐨勭叅鍘�',e); this.addContractFormdata.compName = e.compName; this.addContractFormdata.filedName = e.name; this.addContractFormdata.compId = e.compId; @@ -1325,7 +1329,14 @@ this.selectCoalFiledData = e; - this.coalFiledSelectShow = false; + // 鑾峰彇浠锋牸鍙傛暟 + this.getNewPriceData.compId = e.compId; + this.getNewPriceData.compName = e.compName; + this.getNewPriceData.filedId = e.id; + this.getNewPriceData.filedName = e.name; + + + this.coalFiledSelectShow = false; }, // 鏀惰揣浜� addContractConsigneeClose() { @@ -1405,7 +1416,7 @@ // this.currentCoal.type = 1; // } this.addContractFormdata.modifyId = data.modifyId; - this.addContractFormdata.id = data.id; + // this.addContractFormdata.id = data.id; } else { uni.$u.toast('鐓ょ浠锋牸鏈缃�'); } @@ -1477,11 +1488,14 @@ }, addContractSanConfirm() { if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) { - this.newFormData.contractOrders.push(this.addContractFormdata); - console.log('娣诲姞瀛愯鍗�',this.addContractFormdata); - this.$nextTick(() => { - this.addContractShow = false; - }); + 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) } else { uni.$u.toast('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�'); } @@ -1607,6 +1621,11 @@ 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('鏂板缓鍙戣繍鐢宠', this.newFormData); uni.showLoading({ @@ -1616,17 +1635,19 @@ uni.hideLoading(); console.log('鏂板缓鍙戣繍鐢宠', res); if (res.code == 0) { - uni.showToast({ - title: '娣诲姞鎴愬姛锛�', - icon: 'success', - duration: 2000 - }); - this.$nextTick(() => { - uni.navigateBack({ - // url: '/pages/my-application/my-application' - delta: 2 - }); - }); + // uni.showToast({ + // title: '娣诲姞鎴愬姛锛�', + // icon: 'success', + // duration: 1000 + // }); + this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�') + setTimeout(() => { + uni.navigateBack({ + // url: '/pages/my-application/my-application' + delta: 2 + }); + },2000) + } }); }, diff --git a/static/iconfont/iconfont.css b/static/iconfont/iconfont.css index af418df..c24279b 100644 --- a/static/iconfont/iconfont.css +++ b/static/iconfont/iconfont.css @@ -3,7 +3,7 @@ /* src: url('iconfont.woff2?t=1655880761622') format('woff2'), url('iconfont.woff?t=1655880761622') format('woff'), url('iconfont.ttf?t=1655880761622') format('truetype'); */ - src:url('/static/iconfont.ttf')format('truetype'); + src:url('@/static/iconfont/iconfont.ttf')format('truetype'); } diff --git a/utils/request.js b/utils/request.js index 2d29b5e..a9a4c2a 100644 --- a/utils/request.js +++ b/utils/request.js @@ -90,20 +90,22 @@ // 璇锋眰鎷︽埅 const fetch = (url, opt ,urlParam) => { + let baseUrl = 'http://192.168.3.159:9999'; let urls = (api[opt.url]?.url || api[url]?.url || jihua[opt.url]?.url || jihua[url]?.url); let params = opt.params ? ('?' + Object.keys(opt.params).map(key => key + '=' + opt.params[key]).join('&')) : ''; - opt.url = urlParam ? urls + `/${urlParam}` + params : urls + params + opt.url = urlParam ? baseUrl + urls + `/${urlParam}` + params : baseUrl + urls + params opt.method = opt.method || "GET"; var header = {} if (uni.getStorageSync('access_token')) { header = { "TENANT-ID": 5, Authorization: 'Bearer ' + uni.getStorageSync('access_token'), - VERSION: "zzl" + VERSION: "zzl", + Accept:'application/json, text/plain, */*' // 瀹㈡埛绔墍鑳芥帴鍙楃殑鏁版嵁绫诲瀷 } } - + opt.header = { ...opt.header, ...header -- Gitblit v1.9.1