From 5c8906cc4aaa7fcf70ee37de2dd1069161d80a61 Mon Sep 17 00:00:00 2001
From: 819527061@qq.com <123456>
Date: 星期五, 24 十一月 2023 14:08:19 +0800
Subject: [PATCH] 收款明细页面及对接接口、详情页面

---
 pages/new-application-form-data/new-application-form-data.vue |   43 ++
 pages/home/home.vue                                           |   34 +
 utils/request.js                                              |    4 
 utils/api.js                                                  |   29 +
 pages/new-application/new-application.vue                     |   31 +
 pages/payment-form-data/payment-form-data.vue                 |  830 ++++++++++++++++++++++++++++++++++++++++++++++
 utils/smallToBig.js                                           |   87 ++++
 pages/my-application/my-application.vue                       |   17 
 8 files changed, 1,061 insertions(+), 14 deletions(-)

diff --git a/pages/home/home.vue b/pages/home/home.vue
index 8676b1f..3d73838 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -19,7 +19,7 @@
 					</view>
 				</template>
 				<template v-slot:center>
-					<view class="center-container">
+					<view class="center-container" @click="() => shenqingDetail(item)">
 						<view class="center-content__one center-margin">
 							<view class="">
 								<text>鎵�灞炴祦绋嬶細{{ item.processName }}</text>
@@ -102,7 +102,7 @@
 					</view>
 				</template>
 				<template v-slot:center>
-					<view class="center-container">
+					<view class="center-container" @click="() => daibanDetail(item)">
 						<view class="center-content__one center-margin">
 							<view class="">
 								<text>浠诲姟鍚嶇О锛歿{ item.name || '' }}</text>
@@ -156,7 +156,7 @@
 					</view>
 				</template>
 				<template v-slot:center>
-					<view class="center-container">
+					<view class="center-container" @click="() => shenqingDetail(item)">
 						<view class="center-content__one center-margin">
 							<view>
 								<text>浠诲姟鍚嶇О锛歿{ item.name }}</text>
@@ -491,6 +491,32 @@
 			this.doneList(); // 鎴戠殑宸插姙
 			this.xscarshippingdayplan(); // 鏃ヨ鍒�
 		},
+    //浠e姙璇︽儏
+    daibanDetail(item) {
+      if(item?.actBusiness?.actType == 'Offsetting') {  //鏀舵 actType = 鈥極ffsetting鈥�
+        uni.navigateTo({
+          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
+
+        })
+      }else if(item?.actBusiness?.actType == 'WAY_BILL') {
+        uni.navigateTo({
+          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
+        })
+      }
+    },
+    //浠e姙璇︽儏
+    shenqingDetail(item) {
+      if(item.actType == 'Offsetting') {  //鏀舵 actType = 鈥極ffsetting鈥�
+        uni.navigateTo({
+          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
+
+        })
+      }else if(item.actType == 'WAY_BILL') {
+        uni.navigateTo({
+          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
+        })
+      }
+    },
 		getUserInfo() {
 			this.$reqGet('getUserInfo').then(res => {
 				if (res.code == 0) {
@@ -1110,4 +1136,4 @@
 		}
 	}
 }
-</style>
+</style>
diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue
index 91d837b..1ccea61 100644
--- a/pages/my-application/my-application.vue
+++ b/pages/my-application/my-application.vue
@@ -55,7 +55,7 @@
         </view>
       </template>
       <template v-slot:center>
-        <view class="center-container">
+        <view class="center-container" @click="() => shenqingDetail(item)">
           <view class="center-content__one center-margin">
             <view class="">
               <text>鎵�灞炴祦绋嬶細{{ item.processName }}</text>
@@ -306,6 +306,19 @@
     this.init();
   },
   methods: {
+    shenqingDetail(item) { //璺宠浆璇︽儏椤甸潰
+      if(item.actType == 'Offsetting') {  //鏀舵 actType = 鈥極ffsetting鈥�
+        uni.navigateTo({
+          url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
+
+        })
+      }else if(item.actType == 'WAY_BILL') {
+        uni.navigateTo({
+          url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
+        })
+      }
+
+    },
     init() {
       this.myApplication.pageNumber = 1;
       this.loadingType = 0;
@@ -795,7 +808,7 @@
       right:vww(20)!important;
     }
   }
-	
+
 	// 搴曢儴鍗犱綅
 	.empty-placeH{
 		height:vww(50);
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 0760daa..beedf8c 100644
--- a/pages/new-application-form-data/new-application-form-data.vue
+++ b/pages/new-application-form-data/new-application-form-data.vue
@@ -5,7 +5,7 @@
 		<!-- <page-meta :page-style="spanStyle"></page-meta> -->
 		<!-- 琛ㄥ崟 -->
 
-		<combination-title class="newApplicationTitle" title="鏂板"></combination-title>
+		<combination-title class="newApplicationTitle" :title="newFormData.id?'鏌ョ湅':'鏂板'"></combination-title>
 		<!-- 娉ㄦ剰锛屽鏋滈渶瑕佸吋瀹瑰井淇″皬绋嬪簭锛屾渶濂介�氳繃setRules鏂规硶璁剧疆rules瑙勫垯 -->
 		<!-- <u-notify :message="accountMsg" :show="trueMsg" :type="accountMsgType"></u-notify> -->
 		<!-- <u-alert :title="accountMsg" :type="accountMsgType" :description="accountMsgType"></u-alert> -->
@@ -590,7 +590,12 @@
 			<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="cardListIcon" @click="editApplicationClick(index)"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view>
+						<view
+                v-if="!newFormData.id"
+                class="cardListIcon"
+                @click="editApplicationClick(index)">
+              <u-icon name="edit-pen" color="#2979ff" size="35"></u-icon>
+            </view>
 						<view class="cardList-container">
 							<view class="cardList_item">
 								鏀惰揣浜猴細
@@ -635,12 +640,12 @@
 				</u-swipe-action-item>
 			</u-swipe-action>
 
-			<view class="addCard" @click="addContractClick">
+			<view class="addCard" @click="addContractClick" v-if="!newFormData.id">
 				<view class="addCard-icon"><u-icon name="plus" size="100"></u-icon></view>
 			</view>
 		</view>
 
-		<view class="new-application-button">
+		<view class="new-application-button" v-if="!newFormData.id">
 			<u-button text="鍙栨秷" :plain="true" type="primary" @click="backPage"></u-button>
 			<u-button text="纭畾" type="primary" @click="newApplicationFormDataClick"></u-button>
 		</view>
@@ -959,6 +964,10 @@
 		popupMenu,
 		combinationTitle
 	},
+  onLoad(e) {
+    console.log('鎴戞槸璇﹁杩樻槸鏂板----',e)
+    this.newFormData.id = e.id || 0
+  },
 	methods: {
 		async jisuanAmount() {
 			if (this.addContractFormdata.trainType == 2) {
@@ -990,6 +999,30 @@
 					this.selectContractTypeData[0].push(item.value);
 				});
 			});
+      this.$nextTick(() => {
+        if(this.newFormData.id) {
+          this.$reqGet('formData',{},this.newFormData.id).then(res => {
+            console.log(res,'res====鏌ョ湅====')
+            this.newFormData = res.data
+            console.log(this.newFormData,'this.newFormData====----')
+            if(this.actions.length > 0) {  //浠樻鏂瑰紡鍥炴樉
+              this.actions.forEach(item => {
+                console.log(item,'item=====-----')
+                console.log(this.newFormData.payType,'payType')
+                 if(this.newFormData.payType == item.value) {
+                   this.selectValue = item.name
+                 }
+              })
+            }
+            if(this.newFormData.startDate && this.newFormData.endDate) { //鏃ユ湡
+              this.timeDataStr = `${this.newFormData.startDate} - ${this.newFormData.endDate}`
+            }
+
+          })
+        }else {
+
+        }
+      })
 		},
 		/**
 		 * 鑾峰彇鍒嗙被璐﹀
@@ -1769,7 +1802,7 @@
 						.searchResultList {
 							margin-top: vww(16);
 						}
-						
+
 						// 婊氬姩閫氱煡
 						.tapStyle{
 							margin-top: vww(30);
diff --git a/pages/new-application/new-application.vue b/pages/new-application/new-application.vue
index 4e138d5..bb029e0 100644
--- a/pages/new-application/new-application.vue
+++ b/pages/new-application/new-application.vue
@@ -31,6 +31,19 @@
 				</view>
 			</view>
 		</view>
+		<view class="newApplicationCard shoukuanDetailCard" @click="ToPaymentForm">
+			<view class="card">
+				<view class="card-left">
+					<view class="card-left_bottom">
+						<text>娣诲姞鏀舵鏄庣粏</text>
+					</view>
+				</view>
+				<view class="card-right">
+					<view class="icon"><image src="@/static/groupAppTotalImg/back_1.png" mode=""></image></view>
+				</view>
+			</view>
+		</view>
+		
 
 		<!-- 閫夋嫨鍣� -->
 		<u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker>
@@ -113,6 +126,12 @@
 			uni.navigateTo({
 				url: '/pages/new-application-form-data/new-application-form-data'
 			});
+		},
+		//鏂板鏀舵鏄庣粏
+		ToPaymentForm() {
+			uni.navigateTo({
+				url:'/pages/payment-form-data/payment-form-data'
+			})
 		}
 	}
 };
@@ -209,5 +228,17 @@
 			}
 		}
 	}
+	.shoukuanDetailCard{
+		.card{
+			height: auto;
+			.card-left_bottom {
+				font-size: vww(13);
+				margin: vww(12) 0;
+				text {
+					margin-right: vww(16);
+				}
+			}
+		}
+	}
 }
 </style>
diff --git a/pages/payment-form-data/payment-form-data.vue b/pages/payment-form-data/payment-form-data.vue
new file mode 100644
index 0000000..07d7420
--- /dev/null
+++ b/pages/payment-form-data/payment-form-data.vue
@@ -0,0 +1,830 @@
+<template>
+	<view class="payment-form-data-wrap">
+		<combination-title  class="newApplicationTitle" :title="dataForm.id?'鏌ョ湅':'鏂板'"> </combination-title>
+		<view class="payment-form-data-main">
+			<u--form
+					labelPosition="left"
+					labelWidth = "20vw"
+					:model="dataForm"
+					:rules="rules"
+					ref="dataForm">
+				<u-form-item
+						label="鏀舵鍗曠紪鍙�"
+						prop="number"
+						borderBottom
+						ref="item1"
+				>
+					<u--input
+						v-model="dataForm.number"
+						placeholder="鑷姩鐢熸垚"
+						disabled
+						border="none"
+					></u--input>
+				</u-form-item>
+				<u-form-item
+						label="璐﹀"
+						prop="ledgerName"
+						borderBottom
+						ref="item1"
+						readonly
+						@click="showLedger = true"
+				>
+					<u--input
+						v-model="dataForm.ledgerName"
+            placeholder="璇烽�夋嫨璐﹀"
+						border="none"
+					></u--input>
+				</u-form-item>
+				<u-form-item
+						label="鏀舵鏃ユ湡"
+						prop="inputDate"
+						borderBottom
+						ref="item1"
+						readonly
+						@click="showCalendar = true"
+				>
+					<u--input
+            readonly
+            v-model="dataForm.inputDate"
+            placeholder="璇烽�夋嫨鏀舵鏃ユ湡"
+						border="none"
+					></u--input>
+				</u-form-item>
+				<u-form-item
+						label="瀹㈡埛鍚嶇О"
+						prop="customerName"
+						borderBottom
+						ref="item1"
+						@click="handleCustomerNameOpen(1)"
+				>
+					<u--input
+					   readonly
+						v-model="dataForm.customerName"
+             placeholder="璇烽�夋嫨瀹㈡埛"
+						border="none"
+					></u--input>
+				</u-form-item>
+				<u-form-item
+						label="鐢ㄧ叅瀹㈡埛"
+						prop="customerAddressName"
+						borderBottom
+						ref="item1"
+            @click="handleCustomerNameOpen(2)"
+				>
+					<u--input
+						v-model="dataForm.customerAddressName"
+						border="none"
+            placeholder="璇烽�夋嫨鐢ㄧ叅瀹㈡埛"
+					></u--input>
+				</u-form-item>
+
+				<u-form-item
+						label="鑷骇鐓ゆ敹鍏�"
+						prop="money1"
+						borderBottom
+						ref="item1"
+				>
+					<u--input
+						v-model="dataForm.money1"
+						border="none"
+            placeholder="璇疯緭鍏ヨ嚜浜х叅鏀跺叆"
+					></u--input>
+				</u-form-item>
+        <view class="bigMoney">澶у啓锛歿{smallToBig(dataForm.money1)}}</view>
+
+				<u-form-item
+						label="澶栬喘鐓ゆ敹鍏�"
+						prop="money2"
+						borderBottom
+						ref="item1"
+				>
+					<u--input
+						v-model="dataForm.money2"
+						border="none"
+            placeholder="璇疯緭鍏ュ璐叅鏀跺叆"
+					></u--input>
+				</u-form-item>
+        <view class="bigMoney">澶у啓锛歿{smallToBig(dataForm.money2)}}</view>
+        <u-form-item
+            label="鏀舵閲戦"
+            prop="money"
+            borderBottom
+            ref="item1"
+        >
+          <u--input
+              v-model="money"
+              border="none"
+              disabled
+          ></u--input>
+        </u-form-item>
+        <view class="bigMoney">澶у啓锛歿{smallToBig(money)}}</view>
+				<u-form-item
+						label="鏀舵绫诲瀷"
+						prop="payName"
+						borderBottom
+						ref="item1"
+            @click="showPayType='true'"
+				>
+					<u--input
+						v-model="dataForm.payName"
+						border="none"
+            placeholder="璇烽�夋嫨鏀舵绫诲瀷"
+            readonly
+					></u--input>
+				</u-form-item>
+				<u-form-item
+            labelWidth = "22vw"
+						label="璐㈠姟绁ㄦ嵁缂栧彿"
+						prop="financialBillCode"
+						borderBottom
+						ref="item1"
+				>
+					<u--input
+						v-model="dataForm.financialBillCode"
+						border="none"
+            placeholder="璇疯緭鍏ヨ储鍔$エ鎹紪鍙�"
+					></u--input>
+				</u-form-item>
+				<u-form-item
+						label="澶囨敞"
+						prop="remark"
+						borderBottom
+						ref="item1"
+				>
+					<u--input
+						v-model="dataForm.remark"
+						border="none"
+            placeholder="澶囨敞"
+					></u--input>
+				</u-form-item>
+        <u-form-item
+            label="涓嶅悓姝C"
+            prop="checkBoxSendNC"
+            borderBottom
+            ref="item1"
+        >
+          <u-checkbox-group
+              placement="column"
+              @change="checkboxChangeNC"
+              v-model="checkBoxSendNC"
+          >
+            <u-checkbox
+                name="NC"
+                :customStyle="{marginBottom: '8px'}"
+                :checked="checkboxNC"
+            >
+            </u-checkbox>
+            <span>锛堥�夋嫨鍚庢敹娆句俊鎭笉浼氬彂閫佸埌NC绯荤粺锛�</span>
+          </u-checkbox-group>
+        </u-form-item>
+        <u-form-item
+            label="鎶垫姽璐�"
+            prop="checkBoxSendNC"
+            borderBottom
+            ref="item1"
+        >
+          <u-checkbox-group
+              placement="column"
+              @change="checkboxChangeDM"
+              v-model="checkBoxDM"
+          >
+          <u-checkbox
+              name="DM"
+              :customStyle="{marginBottom: '8px'}"
+              :checked="checkboxDM"
+          >
+          </u-checkbox>
+            <span>锛堥�夋嫨鍚庢敹娆句俊鎭笉浼氬彂閫佸埌NC绯荤粺锛�</span>
+          </u-checkbox-group>
+        </u-form-item>
+        <div class="submit-btn" v-if="!dataForm.id">
+          <u-button @click="dataFormSubmit()" size="small" type="primary">纭畾</u-button>
+        </div>
+			</u--form>
+			<!-- 璐﹀閫夋嫨 -->
+		    <u-action-sheet
+				:show="showLedger"
+				:actions="ledgerList"
+				title="璇烽�夋嫨璐﹀"
+				@close="showLedger = false"
+				@select="ledgerSelect"
+			>
+			</u-action-sheet>
+			<!-- 鏃ユ湡閫夋嫨 -->
+			<u-calendar :show="showCalendar" :mode="mode" @confirm="calendarConfirm" @close="showCalendar=false"></u-calendar>
+      <!-- 閫夋嫨瀹㈡埛寮规 -->
+      <!--  @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
+                      @click="
+										selectCustomerCompShow = true;
+									"
+                      labelWidth="12%"
+                      label="鍗曚綅"
+                      borderBottom
+                      ref="compRef"
+                  >
+                    <u--input v-model="searchCustomerForm.compName" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨鍗曚綅" border="none"></u--input>
+                    <!--									<u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.compName = ''"></u-icon>-->
+                  </u-form-item>
+                  <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
+                    <u--input v-model="selectCustomerData.customerFullName" border="none" placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
+                    <u-icon slot="right" name="close-circle-fill" @click="selectCustomerData.customerFullName = ''"></u-icon>
+                  </u-form-item>
+                  <u-form-item
+                      @click="
+										selectLevelShow = true;
+									"
+                      labelWidth="20%"
+                      label="瀹㈡埛绾у埆"
+                      borderBottom
+                  >
+                    <u--input border="none" v-model="searchCustomerForm.levelText" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
+                    <!--									<u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.levelText = ''"></u-icon>-->
+                  </u-form-item>
+                </u--form>
+              </view>
+              <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">
+                    <view slot="value" class="u-slot-value">
+                      <button
+                          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>
+                    </view>
+                  </u-cell>
+                </u-cell-group>
+              </view>
+              <view class="loadmoreClass">
+                <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="status" @loadmore="loadingCustomer" fontSize="20" height="30px" />
+              </view>
+              <!-- 閫夋嫨鐢ㄦ埛鑿滃崟椤� -->
+              <view class="selectCustomerCompSheet">
+                <u-action-sheet
+                    :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>
+
+      <!-- 鏀舵绫诲瀷 -->
+      <u-action-sheet
+          :show="showPayType"
+          :actions="payTypeList"
+          title="璇烽�夋嫨璐﹀"
+          @close="showPayType = false"
+          @select="payTypeSelect"
+      >
+      </u-action-sheet>
+    </view>
+	</view>
+</template>
+
+<script>
+	import combinationTitle from '@/components/common/combined-title/combined-title.vue';
+  import {smallToBig} from "../../utils/smallToBig";
+
+  export default{
+		name: 'payment-form-data',
+		components: {
+			combinationTitle
+		},
+		data() {
+			return {
+				showLedger: false,  //璐﹀閫夋嫨妗�
+				showCalendar: false, //鏃ュ巻閫夋嫨妗�
+        showPayType: false,  //鏀舵绫诲瀷寮规
+        payTypeList:[
+
+        ],
+        // 閫夋嫨鍗曚綅
+        selectCustomerShow: false, // 閫夋嫨鐢ㄦ埛寮规
+        selectCustomerActions: [],
+        searchCustomerForm: {
+          compName: '',
+          levelText: ''
+        },
+        customerData: [],
+        // 閫夋嫨鍗曚綅
+        selectCustomerCompShow: false,
+        // 閫夋嫨瀹㈡埛
+        selectCustomerData: {
+          compIds: '',
+          customerFullName: '',
+          level: '',
+          current: 1,
+          size: 10
+        },
+        searchContractForm: {
+          current: 1,
+          size: 50,
+          num: '',
+          startDate: '',
+          endDate: '',
+          result: 2,
+          type: '',
+          customerName: ''
+        },
+        // 绾у埆
+        levelList: [
+          { name: '涓�鏄熺骇', value: 'A' },
+          { name: '浜屾槦绾�', value: 'B' },
+          { name: '涓夋槦绾�', value: 'C' },
+          {
+            name: '鍥涙槦绾�',
+            value: 'D'
+          },
+          { name: '浜旀槦绾�', value: 'E' }
+        ],
+        selectLevelShow: false,
+        selCustomerType:null,  //鏄粨绠楃敤鎴�1杩樻槸鐢ㄧ叅鐢ㄦ埛2
+        customerDataAllNum: 0, //瀹㈡埛鍒楄〃鎬绘潯鏁�
+        accountDetails:{},
+        contractNumList: [],
+
+				mode: 'single',
+				dataForm: {
+				  id: '',
+				  customerId: '',
+				  financialBillCode: '',
+				  payType: 0,
+          payName:'',
+				  inputDate: '',
+				  leftMoney: '',
+				  managePerson: '',
+				  money: '',
+				  money1:null,
+				  money2:null,
+				  number: '',
+				  customerName: '',
+				  oppaccount: '',
+				  account: '',
+				  remark: '',
+				  sendNC: null,
+				  ncSkUserId: null,
+				  customerAddressName: null,
+				  ledgerId: null,
+          ledgerName:'', //璐﹀鍚嶅瓧
+				  isDiZhang: null,
+				},
+        checkBoxSendNC:[],  //鏄惁琚�変腑
+        checkBoxSendNameNC:'',  //鏄惁琚�変腑
+        checkBoxNameDM:'',  //鏄惁琚�変腑
+        checkBoxDM:[], //鏄惁琚�変腑
+        checkboxNC:false,
+        checkboxDM:false,
+				ledgerList:[],
+				rules: {
+					inputDate: [
+						{
+							required: true,
+							message: '璇烽�夋嫨鏀舵鏃ユ湡',
+							trigger: ['blur', 'change']
+						}
+					],
+					customerName: [
+						{
+							required: true,
+							message: '璇峰~鍐欏鎴峰悕绉�',
+							trigger: ['blur', 'change']
+						}
+					],
+					customerAddressName: [
+						{
+							required: true,
+							message: '璇烽�夋嫨鐢ㄧ叅瀹㈡埛',
+							trigger: ['blur', 'change']
+						}
+					],
+					money: [
+						{
+							required: true,
+							message: '璇峰~鍐欐敹娆鹃噾棰�',
+							trigger: ['blur', 'change']
+						}
+					]
+				}
+			}
+		},
+		onShow() {
+			this.init()
+		},
+    computed: {
+      money() {
+        if(this.dataForm.money1||this.dataForm.money2) {
+          this.dataForm.money = parseFloat(Number(this.dataForm.money1)+Number(this.dataForm.money2)).toFixed(2);
+        }
+        return this.dataForm.money;
+      }
+    },
+    onLoad(e) {
+      this.dataForm.id = e.id || 0
+    },
+		methods:{
+      smallToBig,
+      checkboxChangeNC(n) {
+      },
+      checkboxChangeDM(n) {
+      },
+			init() {
+        this.payType()  //鏀舵绫诲瀷
+				//璐﹀閫夋嫨
+				let compId = uni.getStorageSync('userInfo').compId;
+				this.$reqGet('getLedgerList',{compId:compId}).then(res => {
+					this.ledgerList = res?.data?.records?.map(e => {
+						return {
+							ledgerId: e.id,
+              name: e.name
+						}
+					})
+
+				})
+        this.$nextTick(() => {
+          this.$refs.dataForm.resetFields()
+          if(this.dataForm.id) { //淇敼
+            this.$reqGet('getObj',{},this.dataForm.id).then(res => {
+              this.dataForm = res.data
+              this.payTypeList.forEach(item => {
+                if(item.value == this.dataForm.payType) {
+                  this.dataForm.payName = item.name
+                }
+              })
+              // if(this.dataForm.payType)
+              // this.dataForm.payName =
+              if(this.dataForm.sendNC == 0) {
+                this.checkboxNC = true
+              }else {
+                this.checkboxNC = false
+              }
+              if(this.dataForm.isDiZhang) {
+                this.checkboxDM = true
+              }else {
+                this.checkboxDM = false
+              }
+            })
+          }else { //鏂板
+
+          }
+        })
+
+			},
+      getSKUser() { //璇︽儏鎺ュ彛
+        this.$reqGet('getListByComp',{ledgerId:this.dataForm.ledgerId}).then(res => {
+
+        })
+      },
+      payType() {  //鏀舵绫诲瀷
+        this.$reqGet('pay_type').then(res => {
+          this.payTypeList = res?.data?.map(item => {
+            return {
+              name: item.label,
+              value: item.value
+            }
+          })
+        })
+      },
+
+			//閫夋嫨璐﹀涓嬫媺鑿滃崟
+			ledgerSelect(e) {
+				this.dataForm.ledgerId = e.ledgerId
+				this.dataForm.ledgerName = e.name
+				this.$refs.dataForm.validateField('ledgerId')
+			},
+			calendarConfirm(e) {  //鏃ュ巻纭鎸夐挳
+        this.showCalendar = false
+				this.dataForm.inputDate = e[0]
+			},
+      payTypeSelect(e) {  //鏀舵绫诲瀷
+        this.dataForm.payName = e.name
+        this.dataForm.payType = e.value
+      },
+
+      /**瀹㈡埛寮规*/
+      // 閫夋嫨瀹㈡埛
+      handleCustomerNameOpen(t) { //鎵撳紑瀹㈡埛
+        this.selCustomerType = t
+        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;
+          }
+        });
+      },
+      selectCustomerOkClick(v) {
+        this.dataForm.customerId = v.id;
+        if(this.selCustomerType == 2){
+          this.dataForm.customerAddressName = v.customerFullName;  //鐢ㄧ叅瀹㈡埛
+        }else {
+          this.dataForm.customerName = v.customerFullName;
+          this.dataForm.customerId = v.id;
+        }
+        this.$nextTick(() => {
+          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);
+            });
+          }
+        });
+      },
+      // 娓呯┖閫夋嫨瀹㈡埛琛ㄥ崟
+      selectCustomerResetFields() {
+        this.$refs.selectformRef.resetFields(); // 涓嶈捣鏁堟灉
+        this.selectCustomerData.customerFullName = '';
+        this.searchCustomerForm.compName = '';
+        this.searchCustomerForm.levelText = '';
+        this.selectCustomer();
+      },
+      selectCustomerOpen() {
+
+      },
+      selectCustomerClose() {
+        this.selectCustomerShow = false;
+      },
+      // 瀹㈡埛閫夋嫨妗嗗崟浣嶉�夋嫨鑿滃崟
+      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;
+      },
+
+      dataFormSubmit() { //鎻愪氦琛ㄥ崟
+        this.$refs.dataForm.validate().then(e => {
+          if (this.checkBoxSendNC.length > 0) {
+            this.dataForm.sendNC = "0"
+          } else {
+            this.dataForm.sendNC = null;
+          }
+          if (this.checkBoxDM.length > 0) {
+            this.dataForm.isDiZhang = 1;
+          } else {
+            this.dataForm.isDiZhang = null;
+          }
+          uni.showLoading({
+            title: '鍔犺浇涓�...'
+          });
+          if(this.dataForm.id) {
+            this.$reqPut('putObj',this.dataForm).then(res => {
+            })
+          }else {
+            this.$reqPost('addObj',this.dataForm).then(res => {
+
+              uni.hideLoading();
+              this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�');
+              setTimeout(() => {
+                uni.navigateBack({
+                  // url: '/pages/my-application/my-application'
+                  delta: 2
+                });
+              }, 1500);
+            })
+          }
+        })
+      }
+		},
+		onReady() {
+			this.$refs.dataForm.setRules(this.rules)
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.payment-form-data-wrap{
+		width: 100%;
+		padding: 0 vww(10);
+		box-sizing: border-box;
+
+    // 閫夋嫨瀹㈡埛寮规
+    .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 {
+                .u-input {
+                  width: 90%;
+                }
+              }
+
+              .searchCustomerBtn {
+                margin-top: vww(10);
+                display: flex;
+
+                .u-button {
+                  width: 30%;
+                }
+              }
+
+              // 鏁版嵁鍒楄〃
+              .searchResultList {
+                margin-top: vww(16);
+              }
+
+              // 婊氬姩閫氱煡
+              .tapStyle{
+                margin-top: vww(30);
+              }
+
+              // 鍚堝悓琛ㄦ牸
+              .tableContract {
+                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;
+                      }
+
+                      .uni-table-td {
+                        line-height: vww(20);
+                        padding: vww(5) vww(10);
+                        color: #111111;
+                      }
+                    }
+                  }
+                }
+
+                .tableBody {
+                  width: 80%;
+                  .contractTableTd {
+                    width: vww(200);
+                    white-space: nowrap;
+                    text-overflow: ellipsis;
+                    overflow: hidden;
+                  }
+                }
+
+                .TableUtilBtn {
+                  width: 20%;
+                  overflow: hidden;
+
+                  .uni-table {
+                    min-width: 0 !important;
+                  }
+
+                  .TableUtilBtnContainer {
+                    .u-button {
+                      width: vww(20);
+                    }
+                  }
+                }
+              }
+
+              // 鍚堝悓绫诲瀷閫夋嫨鍣�
+              .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;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+    .submit-btn{
+      width: 60%;
+      position: fixed;
+      bottom: vww(40);
+      left: 50%;
+      transform: translateX(-50%);
+    }
+    ::v-deep{
+      .u-checkbox-group{
+        display: flex;
+        flex-direction: row!important;
+        align-items: center!important;
+      }
+    }
+    .bigMoney{
+      font-size: vww(12);
+      color: #222222;
+      margin-left: vww(80);
+    }
+	}
+</style>
diff --git a/utils/api.js b/utils/api.js
index 9f61e06..9e702f9 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -26,6 +26,15 @@
 		name: 'pig',
 		mehtod: 'GET'
 	},
+	//鏂板鏀舵鏄庣粏
+	//璐﹀鎺ュ彛鏌ヨ
+	getLedgerList: {
+		url: '/yunxiao/zhaccountledger/page',
+		name: 'pig',
+		mehtod: 'GET'
+	},
+
+
 	// 鎿嶄綔浜哄憳
 	operator: {
 		url: '/admin/dict/type/operator',
@@ -78,7 +87,7 @@
 
 	/**
 	 * @閫夋嫨瀹㈡埛
-	 */ 
+	 */
 	// 鎼滅储
 	customer: {
 		url: '/yunxiao/customer/page',
@@ -211,6 +220,24 @@
 	coalbunker: {
 		url: '/yunxiao/coalbunker/page',
 		method: 'GET'
+	},
+	//鏂板鏀舵鏄庣粏
+	addObj: {
+		url: '/yunxiao/gatheringbill',
+		method: 'post',
+	},
+	putObj: {
+		url: '/yunxiao/gatheringbill',
+		method: 'PUT',
+	},
+	//鏀舵鏄庣粏璇︽儏
+	getObj: {
+		url: '/yunxiao/gatheringbill',
+		method: 'GET',
+	},
+	getListByComp: {
+		url: '/yunxiao/jcncskuser/getListByComp',
+		method: 'GET',
 	}
 
 }
diff --git a/utils/request.js b/utils/request.js
index ce39c72..0977ae1 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -82,12 +82,12 @@
 	500: responseError
 }
 
-// let BaseUrl = 'http://192.168.3.159:9999';
+ let BaseUrl = 'http://192.168.0.159:9999';
 // const BaseUrl = 'https://mx.jzeg.cn:443/app';
 // let BaseUrl = 'http://192.168.0.114:9999';
 // const BaseUrl = 'http://192.168.0.102:9999'; // 椋炲摜
 
-const BaseUrl = "https://mx.jzeg.cn:9998"; // 姝e紡鏈嶅姟
+//const BaseUrl = "https://mx.jzeg.cn:9998"; // 姝e紡鏈嶅姟
 
 // 璇锋眰鎷︽埅
 const fetch = (url, opt, urlParam) => {
diff --git a/utils/smallToBig.js b/utils/smallToBig.js
new file mode 100644
index 0000000..5c7497d
--- /dev/null
+++ b/utils/smallToBig.js
@@ -0,0 +1,87 @@
+export const smallToBig = (money) => {
+    //  灏嗘暟瀛楅噾棰濊浆鎹负澶у啓閲戦
+    var cnNums = new Array(
+        "闆�",
+        "澹�",
+        "璐�",
+        "鍙�",
+        "鑲�",
+        "浼�",
+        "闄�",
+        "鏌�",
+        "鎹�",
+        "鐜�"
+    ); //姹夊瓧鐨勬暟瀛�
+    var cnIntRadice = new Array("", "鎷�", "浣�", "浠�"); //鍩烘湰鍗曚綅
+    var cnIntUnits = new Array("", "涓�", "浜�", "鍏�"); //瀵瑰簲鏁存暟閮ㄥ垎鎵╁睍鍗曚綅
+    var cnDecUnits = new Array("瑙�", "鍒�", "姣�", "鍘�"); //瀵瑰簲灏忔暟閮ㄥ垎鍗曚綅
+    var cnInteger = "鏁�"; //鏁存暟閲戦鏃跺悗闈㈣窡鐨勫瓧绗�
+    var cnIntLast = "鍏�"; //鏁存暟瀹屼互鍚庣殑鍗曚綅
+    //鏈�澶у鐞嗙殑鏁板瓧
+    var maxNum = 999999999999999.9999;
+    var integerNum; //閲戦鏁存暟閮ㄥ垎
+    var decimalNum; //閲戦灏忔暟閮ㄥ垎
+    //杈撳嚭鐨勪腑鏂囬噾棰濆瓧绗︿覆
+    var chineseStr = "";
+    var parts; //鍒嗙閲戦鍚庣敤鐨勬暟缁勶紝棰勫畾涔�
+    if (money == null || money == "") {
+        return "";
+    }
+
+    money = parseFloat(money);
+    if (money >= maxNum) {
+        //瓒呭嚭鏈�澶у鐞嗘暟瀛�
+        return "瓒呭嚭鏈�澶у鐞嗘暟瀛�";
+    }
+    if (money == 0) {
+        chineseStr = cnNums[0] + cnIntLast + cnInteger;
+        return chineseStr;
+    }
+
+    //鍥涜垗浜斿叆淇濈暀涓や綅灏忔暟,杞崲涓哄瓧绗︿覆
+    money = Math.round(money * 100).toString();
+    integerNum = money.substr(0, money.length - 2);
+    decimalNum = money.substr(money.length - 2);
+
+    //鑾峰彇鏁村瀷閮ㄥ垎杞崲
+    if (parseInt(integerNum, 10) > 0) {
+        var zeroCount = 0;
+        var IntLen = integerNum.length;
+        for (var i = 0; i < IntLen; i++) {
+            var n = integerNum.substr(i, 1);
+            var p = IntLen - i - 1;
+            var q = p / 4;
+            var m = p % 4;
+            if (n == "0") {
+                zeroCount++;
+            } else {
+                if (zeroCount > 0) {
+                    chineseStr += cnNums[0];
+                }
+                //褰掗浂
+                zeroCount = 0;
+                chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
+            }
+            if (m == 0 && zeroCount < 4) {
+                chineseStr += cnIntUnits[q];
+            }
+        }
+        chineseStr += cnIntLast;
+    }
+    //灏忔暟閮ㄥ垎
+    if (decimalNum != "") {
+        var decLen = decimalNum.length;
+        for (var i = 0; i < decLen; i++) {
+            var n = decimalNum.substr(i, 1);
+            if (n != "0") {
+                chineseStr += cnNums[Number(n)] + cnDecUnits[i];
+            }
+        }
+    }
+    if (chineseStr == "") {
+        chineseStr += cnNums[0] + cnIntLast + cnInteger;
+    } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
+        chineseStr += cnInteger;
+    }
+    return chineseStr;
+}

--
Gitblit v1.9.1