From 8fc8838a441ae3d3b1616f4fc003b16292978b54 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期一, 19 十二月 2022 11:19:45 +0800
Subject: [PATCH] 注册,登录,主页,日计划的修改
---
pages/new-application-form-data/new-application-form-data.vue | 4044 ++++++++++++++++++++---------------------
pages/home/home.vue | 271 +-
utils/jihua.js | 6
pages/login/login.vue | 155 +
pages/register/register.vue | 4
pages.json | 4
pages/my-have-todo/my-have-todo.vue | 17
utils/api.js | 229 +-
pages/approval-history/approval-history.vue | 4
pages/check-the-schedule/check-the-schedule.vue | 6
pages/edit-my-application/edit-my-application.vue | 176 +
utils/tool.js | 36
utils/request.js | 22
static/cursor.gif | 0
manifest.json | 2
pages/jihua/jihua.vue | 427 +++-
pages/new-application/new-application.vue | 4
pages/my-todo/my-todo.vue | 50
api/global.js | 2
pages/my-application/my-application.vue | 202 +-
20 files changed, 3,049 insertions(+), 2,612 deletions(-)
diff --git a/api/global.js b/api/global.js
index 4b4916e..c8be2af 100644
--- a/api/global.js
+++ b/api/global.js
@@ -29,6 +29,8 @@
// const baseUrl = 'http://192.168.3.159:9999'
// const baseUrl = 'https://mx.jzeg.cn:443/app';
+// let baseUrl = 'http://192.168.0.114:9999';
+
const baseUrl = "https://mx.jzeg.cn:9998"; // 姝e紡鏈嶅姟
// POST璇锋眰
diff --git a/manifest.json b/manifest.json
index 3e5f70f..2e48f6f 100644
--- a/manifest.json
+++ b/manifest.json
@@ -53,7 +53,7 @@
"appid" : "wx69ae2830c7d22d5a",
"setting" : {
"urlCheck" : false,
- "es6" : true,
+ "es6" : false,
"minified" : true
},
"usingComponents" : true
diff --git a/pages.json b/pages.json
index e27aa1f..b91175e 100644
--- a/pages.json
+++ b/pages.json
@@ -3,8 +3,8 @@
{
"path": "pages/login/login",
"style": {
- // "navigationStyle": "custom"
- "navigationBarTitleText": "璇风櫥褰�",
+ "navigationStyle": "custom",
+ // "navigationBarTitleText": "璇风櫥褰�",
"enablePullDownRefresh": false
}
},
diff --git a/pages/approval-history/approval-history.vue b/pages/approval-history/approval-history.vue
index 62e16f6..bf6cdff 100644
--- a/pages/approval-history/approval-history.vue
+++ b/pages/approval-history/approval-history.vue
@@ -29,7 +29,7 @@
</uni-tr>
<uni-tr>
<uni-th align="center">瀹℃壒鎰忚</uni-th>
- <uni-td>{{ item.comment == null ? '' : item.comment }}</uni-td>
+ <uni-td>{{ item.comment=='undefined'?item.endTime?'鏈~鍐�':'':item.comment|| item.endTime?'鏈~鍐�':'' }}</uni-td>
</uni-tr>
<uni-tr>
<uni-th align="center">鑰楁椂</uni-th>
@@ -48,7 +48,7 @@
</uni-tr>
<uni-tr>
<uni-th align="center">瀹屾垚鏃堕棿</uni-th>
- <uni-td>{{ item.endTime == null ? '' : item.endTime }}</uni-td>
+ <uni-td>{{ item.endTime ||'' }}</uni-td>
</uni-tr>
<uni-tr>
<uni-th align="center">鐘舵��</uni-th>
diff --git a/pages/check-the-schedule/check-the-schedule.vue b/pages/check-the-schedule/check-the-schedule.vue
index 09732bc..7852000 100644
--- a/pages/check-the-schedule/check-the-schedule.vue
+++ b/pages/check-the-schedule/check-the-schedule.vue
@@ -19,11 +19,11 @@
</uni-tr>
<uni-tr>
<uni-th align="center">瀹℃壒鎿嶄綔</uni-th>
- <uni-td>{{ item.deleteReason == null ? '' : item.deleteReason }}</uni-td>
+ <uni-td>{{ item.deleteReason || '' }}</uni-td>
</uni-tr>
<uni-tr>
<uni-th align="center">瀹℃壒鎰忚</uni-th>
- <uni-td>{{ item.comment == null ? '' : item.comment }}</uni-td>
+ <uni-td>{{ item.comment=='undefined'?'鏈~鍐�':item.comment|| '鏈~鍐�' }}</uni-td>
</uni-tr>
<uni-tr>
<uni-th align="center">鑰楁椂</uni-th>
@@ -44,7 +44,7 @@
</uni-tr>
<uni-tr>
<uni-th align="center">瀹屾垚鏃堕棿</uni-th>
- <uni-td>{{ item.endTime == null ? '' : item.endTime }}</uni-td>
+ <uni-td>{{ item.endTime ||'' }}</uni-td>
</uni-tr>
<uni-tr>
<uni-th align="center">鐘舵��</uni-th>
diff --git a/pages/edit-my-application/edit-my-application.vue b/pages/edit-my-application/edit-my-application.vue
index 380cf20..8d27101 100644
--- a/pages/edit-my-application/edit-my-application.vue
+++ b/pages/edit-my-application/edit-my-application.vue
@@ -4,6 +4,9 @@
<combination-title class="newApplicationTitle" title="鏂板"></combination-title>
<view class="formDataContaniner">
<u--form labelPosition="left" :model="newFormData" ref="formRef">
+ <u-form-item @click="selectLedger" labelWidth="20%" label="璐﹀" borderBottom>
+ <u--input disabled disabledColor="#ffffff" v-model="ledgerName" border="none"></u--input>
+ </u-form-item>
<u-form-item labelWidth="20%" label="缁撶畻瀹㈡埛" borderBottom ref="customerNameRef">
<u--input v-model="newFormData.customerName" disabled disabledColor="#ffffff" border="none"></u--input>
</u-form-item>
@@ -27,8 +30,19 @@
</u--form>
</view>
+ <!-- 閫夋嫨璐﹀ -->
+ <u-picker
+ @change="selectLedgerChange"
+ @confirm="selectLedgerConfirm"
+ @cancel="selectLedgerCancel"
+ @close="selectLedgerClose"
+ :show="selectLedgerShow"
+ :columns="ledgerList"
+ keyName="name"
+ ></u-picker>
+
<!-- 鐢宠鏃ュ巻銆佽寖鍥存椂闂� -->
- <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" :maxDate="maxDate"></u-calendar>
+ <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110"></u-calendar>
<!-- 娣诲姞鍚堝悓瀛愰」 -->
<view class="addContractContainer">
<u-popup :show="addContractShow" @close="addContractClose" @open="addContractOpen" mode="bottom" round="22">
@@ -381,6 +395,7 @@
<script>
import combinationTitle from '@/components/common/combined-title/combined-title.vue';
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
+import { BaseUrl } from '@/utils/request.js';
// 鏈�澶ф樉绀虹殑鏃ユ湡
const d = new Date();
@@ -391,6 +406,10 @@
export default {
data() {
return {
+ // 璐﹀閫夋嫨鍣�
+ selectLedgerShow: false,
+ ledgerList: [],
+ ledgerName: '',
applicationOrderIndex: null,
tdStyle: 'max-height: 30px;overflow: scroll;',
spanStyle: 'overflow:auto',
@@ -408,7 +427,6 @@
// 鏃堕棿
timeShow: false,
mode: 'range',
- maxDate: `${year}-${month}-${date + 70}`,
// 閫夋嫨瀹㈡埛
selectCustomerData: {
compIds: '',
@@ -637,6 +655,7 @@
}
},
init() {
+ this.getLedgerList(); // 璐﹀鍒楄〃
this.jcfavouredpolicyitem();
this.coalfiled();
this.coalprice();
@@ -646,6 +665,76 @@
this.fetchCompTree();
this.getFavouredPolicyItem();
this.editApplicationFormData(); // 淇敼鐢宠琛ㄥ崟璇︽儏
+ },
+ /**
+ * 鑾峰彇鍒嗙被璐﹀
+ */
+ getLedgerList() {
+ this.$reqGet('zhaccountledger', { compId: uni.getStorageSync('userInfo').compId }).then(res => {
+ this.ledgerList.push(res.data.records);
+ // console.log('璐﹀鍒楄〃',this.ledgerList);
+ // if (res.data.records) {
+ // this.newFormData.ledgerId = res.data.records[0].id;
+ // this.ledgerName = res.data.records[0].name;
+ // }
+ });
+ },
+ selectLedger() {
+ this.selectLedgerShow = true;
+ },
+ selectLedgerChange(index) {
+ console.log('璐﹀閫夋嫨鍣�', index);
+
+
+
+ // if(this.newFormData.customerName||this.newFormData.contractNum||this.newFormData.contractName){
+ // this.newFormData.customerName = '';
+ // this.newFormData.contractNum = '';
+ // this.newFormData.contractName = '';
+ // }
+ },
+ async selectLedgerConfirm(index) {
+ console.log('閫夋嫨璐﹀鐐瑰嚮纭畾', index);
+ this.selectLedgerShow = false;
+
+ await this.$reqGet('getAccount', { customerId: this.newFormData.customerId, ledgerId: index.value[0].id }).then(res => {
+ let accountReq = res.data;
+ let amountPrice = 0;
+ this.newFormData.contractOrders.forEach(item => {
+ amountPrice += Number(item.amount);
+ });
+ console.log('浠锋牸鍚堣', amountPrice);
+ if (this.newFormData.payType == 0) {
+ if (accountReq.balance > amountPrice) {
+ this.ledgerName = index.value[0].name;
+ this.newFormData.ledgerId = index.value[0].id;
+ this.accountDetails = accountReq;
+ } else {
+ uni.showToast({
+ title: '璐︽埛鍐呯幇姹囦綑棰濓細' + accountReq.balance +'锛屼笉瓒虫敮浠樼幇鍦ㄨ鍗�',
+ icon: 'none'
+ });
+ }
+ } else if (this.newFormData.payType == 1) {
+ if (accountReq.balance2 > amountPrice) {
+ this.ledgerName = index.value[0].name;
+ this.newFormData.ledgerId = index.value[0].id;
+ this.accountDetails = accountReq;
+ } else {
+ uni.showToast({
+ title: '璐︽埛鍐呮壙鍏戜綑棰濓細'+accountReq.balance2+'锛屼笉瓒虫敮浠樼幇鍦ㄨ鍗�',
+ icon: 'none'
+ });
+ }
+ }
+ });
+
+ },
+ selectLedgerCancel() {
+ this.selectLedgerShow = false;
+ },
+ selectLedgerClose() {
+ this.selectLedgerShow = false;
},
// 鍒濆鍖栫敵璇疯〃鍗�
async editApplicationFormData() {
@@ -658,6 +747,7 @@
console.log('鏁翠綋璇︽儏', res.data);
this.newFormData = res.data;
this.timeDataStr = this.newFormData.startDate;
+ this.ledgerName = res.data.ledgerName;
});
// 鑾峰彇鍚堝悓璇︽儏锛岀叅绉�
@@ -665,7 +755,7 @@
// 鍒濆鍖栧綋鍓嶇敵璇峰鎴疯处鎴锋儏鍐�
if (this.newFormData.customerId) {
- await this.$reqGet('getAccount', { customerId: this.newFormData.customerId }).then(res => {
+ await this.$reqGet('getAccount', { customerId: this.newFormData.customerId, ledgerId: this.newFormData.ledgerId }).then(res => {
this.accountDetails = res.data;
});
}
@@ -821,7 +911,7 @@
selectCustomerOkClick(v) {
this.newFormData.customerName = v.customerName;
this.newFormData.customerId = v.id;
- this.$reqGet('getAccount', { customerId: v.id }).then(res => {
+ this.$reqGet('getAccount', { customerId: v.id,ledgerId: this.newFormData.ledgerId }).then(res => {
this.accountDetails = res.data;
this.searchContractForm.customerName = res.data.customerName;
@@ -893,7 +983,9 @@
quant: '',
toStation: '',
trainType: 1,
- type: ''
+ type: '',
+ ledgerId:null,
+ ledgerName:''
};
// 杩愯緭绫诲瀷鍒濆鍖�
switch (this.addContractFormdata.trainType) {
@@ -949,21 +1041,11 @@
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;
@@ -983,6 +1065,7 @@
}
this.addContractCoalData.push(a);
});
+ this.addContractConsigneeShow = false;
},
// 鍝佺閫夋嫨鍣�
addContractCoalConfirm(e) {
@@ -1183,40 +1266,43 @@
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;
- this.$u.toast('瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg);
- } else {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.editShenQing();
- // this.xswaybill();
+ console.log(typeof this.newFormData.payType);
+ if (this.newFormData.contractOrders.length > 0) {
+ if (this.newFormData.payType == 0) {
+ if (this.accountDetails.balance < amount) {
+ let msg = this.accountDetails.balance == null ? 0 : this.accountDetails.balance;
+ this.$u.toast('瀹㈡埛璐︽埛鐜版眹浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg);
+ } else {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.editShenQing();
+ // this.xswaybill();
+ }
+ } else if (this.newFormData.payType == 1) {
+ if (this.accountDetails.balance2 < amount) {
+ let msg = this.accountDetails.balance2 == null ? 0 : this.accountDetails.balance2;
+ this.$u.toast('瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg);
+ } else {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.editShenQing();
+ }
}
} 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;
- this.$u.toast('瀹㈡埛璐︽埛鎵垮厬浣欓涓嶈冻锛屾壙鍏戜綑棰�:' + msg);
- } else {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.editShenQing();
- }
+ uni.showToast({
+ title: '璇锋坊鍔犺鍗曞瓙椤癸紒',
+ icon: 'none'
+ });
}
},
// 淇敼鐢宠淇℃伅
editShenQing() {
+ console.log('editApp-------');
uni
.request({
- url: this.baseUrl + '/yunxiao/xswaybill',
+ url: BaseUrl + '/yunxiao/xswaybill',
method: 'PUT',
data: this.newFormData,
header: {
@@ -1227,7 +1313,11 @@
})
.then(res => {
uni.hideLoading();
- this.$u.toast('淇敼鎴愬姛');
+ uni.showToast({
+ title:'淇敼鎴愬姛!',
+ icon:'none',
+ duration:1500
+ })
this.$nextTick(() => {
uni.navigateBack({
delta: 1
diff --git a/pages/home/home.vue b/pages/home/home.vue
index e3b171d..77b20e8 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -50,7 +50,7 @@
<view class="bottom-container">
<!-- 鎸夐挳鍖哄煙 -->
<view class="bottom-content__chulizhong bottom-content__item">
- <view @click="withDrawClick(item.id)" v-if="item.status == 1">
+ <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
<image src="@/static/home/cehui.png" mode=""></image>
<view>鎾ゅ洖</view>
</view>
@@ -58,21 +58,25 @@
<image src="@/static/home/jindu.png" mode=""></image>
<view>鏌ョ湅杩涘害</view>
</view>
- <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2) && item.procDefId == 'WAY_BILL:4:87504'">
+ <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 || item.status == 3) && item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/biaodan.png" mode=""></image>
- <view>琛ㄥ崟鏁版嵁</view>
+ <view>鐢宠璇︽儏</view>
</view>
- <view @click="apply(item)" v-if="item.status == 3">
+ <!-- <view @click="apply(item)" v-if="item.status == 3">
<image src="@/static/home/history.png" mode=""></image>
<view>閲嶆柊鐢宠</view>
- </view>
- <view @click="editMyApplication(item)" v-if="item.status == 3 && item.procDefId == 'WAY_BILL:4:87504'">
+ </view> -->
+ <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
<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 @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
+ <image src="@/static/home/delete.png" mode=""></image>
+ <view>鍒犻櫎</view>
</view>
</view>
<!-- 宸茬粨鏉熷皬缁勬寜閽� -->
@@ -120,10 +124,10 @@
<view class="bottom-container">
<!-- 寰呭姙鎸夐挳 -->
<view class="bottom-content__item">
- <!-- <view @click="theFormDataClick">
+ <view @click="theFormDataClick(item.tableId)">
<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>
@@ -163,7 +167,7 @@
</view>
<view class="center-content__two center-margin">
<view>
- <text>鍙戣捣浜猴細{{ item.actBusiness.createByName }}</text>
+ <text>鍙戣捣浜猴細{{ item.actBusiness.createByName || '' }}</text>
</view>
<view>
<text>瀹℃壒鎿嶄綔锛歿{ item.deleteReason }}</text>
@@ -171,7 +175,7 @@
</view>
<view class="center-content__three center-margin">
<view class="">
- <text>瀹℃壒鎰忚锛歿{ item.comment || '' }}</text>
+ <text>瀹℃壒鎰忚锛歿{ item.comment=='undefined'?'鏈~鍐�':item.comment || '鏈~鍐�' }}</text>
</view>
<view class="">
<text>
@@ -194,7 +198,7 @@
<view class="bottom-container">
<!-- 宸插姙鎸夐挳 -->
<view class="bottom-content__item">
- <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'">
+ <view @click="theFormDataClick(item.tableId)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/biaodan.png" mode=""></image>
<view>琛ㄥ崟鏁版嵁</view>
</view>
@@ -245,8 +249,11 @@
<!-- 鎾ゅ洖妯℃�佹 -->
<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 width="684rpx" :show="withDrawShow" title="鎻愮ず" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel">
+ <view class="slot-content">
+ <!-- <u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea> -->
+ <text>纭鎾ゅ洖璇ョ敵璇峰悧锛�</text>
+ </view>
</u-modal>
</view>
@@ -309,10 +316,10 @@
<view class="top"><u-icon name="backspace" color="#FF4233" size="70"></u-icon></view>
<view class="bottom-text"><text>閫�鍑�</text></view>
</view>
- <view class="utils-container-body" @click="huanBang">
+ <!-- <view class="utils-container-body" @click="huanBang">
<view class="top"><u-icon name="lock-open" color="#1987FF" size="70"></u-icon></view>
<view class="bottom-text"><text>鎹㈢粦</text></view>
- </view>
+ </view> -->
</view>
</view>
<u-gap height="60" bgColor="#eeeeee"></u-gap>
@@ -368,8 +375,8 @@
withDrawShow: false,
fyData: [],
withDrawData: {
- reason: '',
- id: '', // 鎾ゅ洖鐢宠ID
+ // reason: '',
+ // id: '', // 鎾ゅ洖鐢宠ID
procInstId: ''
},
withDrawContent: '',
@@ -594,18 +601,12 @@
this.menuShow = e;
},
// 鎾ゅ洖妯℃�佹
- withDrawClick(id) {
+ withDrawClick(procInstId) {
this.withDrawShow = true;
- this.withDrawData.id = id;
+ this.withDrawData.procInstId = procInstId;
},
withDrawConfirm() {
- this.shenqingData.forEach(i => {
- if (i.id == this.withDrawData.id) {
- this.withDrawData.procInstId = i.procInstId;
- }
- });
- if (this.withDrawData.reason.length >= 2) {
- this.$reqPost('withDraw', this.withDrawData, 'form').then(res => {
+ this.$reqPost('cancel', this.withDrawData).then(res => {
this.withDrawShow = false;
if (res.code == 0) {
uni.showToast({
@@ -613,14 +614,14 @@
duration: 2000
});
}
+ // 鍒锋柊鍒楄〃
this.getProcessDataList();
+ this.todoList();
+ this.doneList();
});
- } else {
- uni.showToast({
- title: '璇疯鑼冭緭鍏�',
- duration: 2000
- });
- }
+ },
+ withDrawCancel() {
+ this.withDrawShow = false;
},
// 閫氳繃
adopClick(v) {
@@ -637,13 +638,14 @@
adoptModalConfirm() {
this.adoptModalShow = false;
this.adoptForm.comment = this.adoptModalContent;
-
- this.$reqPost('passAll', this.adoptForm, 'form').then(res => {
+ this.$reqPost('passAll', this.adoptForm).then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛!');
} else {
- this.$u.toast('娣诲姞澶辫触!!');
+ this.$u.toast('閫氳繃澶辫触!!');
}
+ this.todoList(); // 鎴戠殑寰呭姙
+ this.doneList();
});
},
adoptModalCancel() {
@@ -659,20 +661,24 @@
rejectModalConfirm() {
this.rejectModalShow = false;
- this.$reqPost('backAll', this.rejectForm, 'form').then(res => {
+ this.$reqPost('backAll', this.rejectForm).then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛锛�');
} else {
this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�');
}
this.todoList(); // 鎴戠殑寰呭姙
+ this.doneList();
});
},
rejectModalCancel() {
this.rejectModalShow = false;
},
- withDrawCancel() {
- this.withDrawShow = false;
+ // 鍒犻櫎鐢宠
+ deleteApplicationClick(id) {
+ this.deleteApplicationModalShow = true;
+ this.procInstId = id;
+ console.log(id);
},
// 鍒犻櫎鐢宠妯℃�佹
deleteApplicationModalConfirm() {
@@ -702,83 +708,112 @@
url: `/pages/the-form-data/the-form-data?index=${v}`
});
},
- // 閲嶆柊鐢宠
- 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;
+ // 鍒犻櫎鎾ゅ洖鐢宠
+ deleteWithDrawApplication(id){
+ uni
+ .request({
+ url: `${BaseUrl}/yunxiao/xswaybill/${id}`,
+ method: 'DELETE',
+ header: {
+ 'TENANT-ID': 5,
+ Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
+ VERSION: 'zzl'
}
- 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();
- this.getProcessDataList();
- });
- } else {
- this.form.assignees = [];
- this.showAssign = true;
- this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�';
- }
- }
- }
- console.log(this.form);
- });
-
- this.modalVisible = true;
+ })
+ .then(res => {
+ uni.showToast({
+ title:'鍒犻櫎鎴愬姛',
+ icon:'none'
+ })
+
+ // 鍒锋柊鍒楄〃
+ this.getProcessDataList();
+
+ })
+ .catch(err => {
+ uni.showToast({
+ title:'鍒犻櫎鍑洪敊',
+ icon:'none'
+ })
+ });
},
+ // 閲嶆柊鐢宠
+ // 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();
+ // this.getProcessDataList();
+ // });
+ // } else {
+ // this.form.assignees = [];
+ // this.showAssign = true;
+ // this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�';
+ // }
+ // }
+ // }
+ // console.log(this.form);
+ // });
+
+ // this.modalVisible = true;
+ // },
// 淇敼
editMyApplication(v) {
console.log('淇敼鐢宠');
@@ -792,12 +827,7 @@
url: `/pages/approval-history/approval-history?index=${v}`
});
},
- // 鍒犻櫎鐢宠
- deleteApplicationClick(id) {
- this.deleteApplicationModalShow = true;
- this.procInstId = id;
- console.log(id);
- },
+
redirectLogin() {
redirectLogin();
},
@@ -820,7 +850,8 @@
.utils {
.utils-container {
display: flex;
- justify-content: space-between;
+ // justify-content: space-between;
+ justify-content: center;
width: 66%;
margin: 0 auto;
.utils-container-body {
diff --git a/pages/jihua/jihua.vue b/pages/jihua/jihua.vue
index 6ae6f05..d63f84f 100644
--- a/pages/jihua/jihua.vue
+++ b/pages/jihua/jihua.vue
@@ -1,5 +1,6 @@
<template>
<view class="jihua-wrap">
+ <u-overlay :show="overlayShow" @click="overlayShow = false"></u-overlay>
<view class="qiehuan-box"><u-tabs :list="tabList" @click="tabClick"></u-tabs></view>
<view class="jihua-main">
<view class="shaixuan-box">
@@ -11,14 +12,8 @@
</view>
<view class="main-inside">
<view v-if="isTomJihua == '鍏ㄩ儴'">
- <u-empty
- v-if="fyData.length == 0"
- mode="data"
- icon="http://cdn.uviewui.com/uview/empty/data.png"
- class="empty-container"
- >
- </u-empty>
- <view class="main-block-box" v-for="(item, index) in fyData" :key="item.id">
+ <u-empty v-if="fyData.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" class="empty-container"></u-empty>
+ <view id="u-dropdown" class="main-block-box" v-for="(item, index) in fyData" :key="item.id" ref="planViewRef">
<view class="jihua-main-line">
<!-- <view class="name">瀹㈡埛鍚嶇О锛歿{item.customerName || ''}}</view> -->
<view class="name">鏀惰揣鍗曚綅锛歿{ item.customerAddressName || '' }}</view>
@@ -33,22 +28,35 @@
<view class="main-flex">
<view class="carNum-box">
<view>璁″垝杞︽暟锛�</view>
- <u--input placeholder="璇疯緭鍏ュ彂杩愯溅鏁�" border="surround" v-model="item.numPlan" @change="inputChange"></u--input>
+ <!-- <u--input placeholder="璇疯緭鍏ュ彂杩愯溅鏁�" border="surround" v-model="item.numPlan" @change="inputChange" @focus="faYunPlanCarsFocus(item)"></u--input> -->
+ <view class="planCars" :style="{color:item.numPlan ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
+ <text v-model="item.numPlan">{{ item.numPlan || '鐐瑰嚮杈撳叆鏁伴噺' }}</text>
+ <view class="cursor" v-if="isCursor && fayunPlanFocusId == item.id"><image src="@/static/cursor.gif" mode=""><image></view>
+ </view>
</view>
- <view>瀹為檯鍙戣溅鏁帮細{{ item.numReal || '' }}</view>
+ <view>瀹為檯鍙戣溅鏁帮細{{ item.numReal || '鏆傛棤' }}</view>
</view>
</view>
+ <u-keyboard
+ @change="valChange"
+ @backspace="backspace"
+ @confirm="keyBoardConfirm"
+ @cancel="keyBoardCancel"
+ @close="keyBoardClose"
+ :show="keyBoardShow"
+ ref="uKeyboard"
+ mode="number"
+ :overlay="false"
+ :closeOnClickOverlay="false"
+ :dotDisabled="true"
+ zIndex="100000"
+ ></u-keyboard>
</view>
- <u-button class="xiugai-btn" type="primary" text="鎻愪氦" @click="dataFormSubmit"></u-button>
+
+ <u-button class="xiugai-btn" type="primary" text="鎻愪氦" @click="submit"></u-button>
</view>
<view v-if="isTomJihua == '宸茶缃殑璁″垝'">
- <u-empty
- v-if="fyData.length == 0"
- mode="data"
- icon="http://cdn.uviewui.com/uview/empty/data.png"
- class="empty-container"
- >
- </u-empty>
+ <u-empty v-if="fyData.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" class="empty-container"></u-empty>
<view class="main-block-box" v-for="(item, index) in fyData" :key="item.id">
<view class="jihua-main-line">
<view class="name">瀹㈡埛鍚嶇О锛歿{ item.customerName || '' }}</view>
@@ -56,27 +64,45 @@
<view class="jihua-main-line">
<view class="main-flex">
<view>鐓ょ锛歿{ item.order.coalName || '' }}</view>
- <view>鍓╀綑閲忥細{{ item.order.executiveSurplus || '' }}</view>
+ <view>鍓╀綑閲忥細{{ item.order.executiveSurplus || '' }}</view>
</view>
</view>
<view class="jihua-main-line">
<view class="main-flex">
<view class="carNum-box">
<view>璁″垝杞︽暟锛�</view>
- <u--input placeholder="璇疯緭鍏ュ彂杩愯溅鏁�" border="surround" v-model="item.numPlan" @change="inputTotalChange(item)"></u--input>
+ <!-- <u--input placeholder="璇疯緭鍏ュ彂杩愯溅鏁�" border="surround" v-model="item.numPlan" @change="inputTotalChange(item)" @focus="faYunPlanCarsFocus(item)"></u--input> -->
+ <view class="planCars" :style="{color:item.numPlan ? '#111':'#ccc'}" @click="faYunPlanCarsFocus(item)">
+ <text v-model="item.numPlan">{{ item.numPlan || '鐐瑰嚮杈撳叆鏁伴噺' }}</text>
+ <view class="cursor" v-if="isCursor && fayunPlanFocusId == item.id">
+ <image src="@/static/cursor.gif" mode="" />
+ </view>
+ </view>
</view>
<view>瀹為檯鍙戣溅鏁帮細{{ item.order.numReal == null ? '鏆傛棤' : item.order.numReal }}</view>
</view>
</view>
+ <u-keyboard
+ @change="valChange"
+ @backspace="backspace"
+ @confirm="keyBoardConfirm"
+ @cancel="keyBoardCancel"
+ @close="keyBoardClose"
+ :show="keyBoardShow"
+ ref="uKeyboard"
+ mode="number"
+ :overlay="false"
+ :closeOnClickOverlay="false"
+ :dotDisabled="true"
+ zIndex="100000"
+ ></u-keyboard>
</view>
- <u-button class="xiugai-btn" type="primary" text="淇敼" @click="getOrderCarNum"></u-button>
+ <u-button class="xiugai-btn" type="primary" text="淇敼" @click="editPlan"></u-button>
</view>
-
</view>
</view>
- <view class="back-top-container">
- <u-back-top :scroll-top="scrollTop" icon="arrow-up" mode='square'></u-back-top>
- </view>
+
+ <view class="back-top-container"><u-back-top :scroll-top="scrollTop" icon="arrow-up" mode="square"></u-back-top></view>
<!-- 鑿滃崟鏍� -->
<popup-menu @menuShow="menushow" ref="menuRef"></popup-menu>
</view>
@@ -84,6 +110,7 @@
<script>
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
+import tool from '@/utils/tool.js';
export default {
components: {
popupMenu
@@ -92,7 +119,7 @@
return {
radioValue: '鍏ㄩ儴',
tabList: [
- {
+ {
name: '浠婃棩鍙戣繍璁″垝'
},
{
@@ -108,7 +135,13 @@
isTomJihua: '鍏ㄩ儴',
editRow: '', //淇敼琛岀殑琛�
menuShow: false,
- scrollTop: 0 // 杩斿洖椤堕儴鎸夐挳缁戝畾
+ scrollTop: 0, // 杩斿洖椤堕儴鎸夐挳缁戝畾,
+ // 閿洏
+ keyBoardShow: false,
+ keyBoardValue: '',
+ fayunPlanFocusId: null,
+ isCursor: false ,// 鏃ヨ鍒掕溅杈嗚緭鍏ユ鐒︾偣鍔ㄧ敾
+ overlayShow:false // 閬僵灞�
};
},
onShow() {
@@ -118,12 +151,57 @@
this.init();
},
onPageScroll(e) {
+ // 浼犲叆scrollTop鍊煎苟瑙﹀彂鎵�鏈塭asy-loadimage缁勪欢涓嬬殑婊氬姩鐩戝惉浜嬩欢
this.scrollTop = e.scrollTop;
- },
+ },
// 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗
onNavigationBarButtonTap(e) {
// console.log(e);
this.$refs.menuRef.menuClick();
+ },
+ mounted() {
+ // setInterval(() => {
+ // uni.hideKeyboard();
+ // }, 1);
+ },
+ watch: {
+ isTomJihua: {
+ handler: function(newV, oldV) {
+ if (newV != oldV) {
+ this.keyBoardShow = false;
+ }
+ },
+ deep: true,
+ immediate: true
+ },
+ keyBoardValue: {
+ handler: function(newV, oldV) {
+ console.log('閿洏杈撳叆鍊�', newV, oldV);
+ this.fyData.map(item => {
+ if (item.id == this.fayunPlanFocusId) {
+ if (item.numPlan && item.numPlan != newV) {
+ item.numPlan = this.keyBoardValue;
+ if (this.isTomJihua == '宸茶缃殑璁″垝') {
+ this.editRow = item;
+ }
+ }
+ }
+ });
+ },
+ deep: true,
+ immediate: true
+ },
+ scrollTop: {
+ handler: function(newV, oldV) {
+ // console.log('椤甸潰婊戝姩', newV);
+ if (newV != oldV) {
+ this.keyBoardClose();
+ // this.keyBoardShow = false;
+ }
+ }
+ },
+ deep: true,
+ immediate: true
},
methods: {
init() {
@@ -132,22 +210,30 @@
menushow(e) {
this.menuShow = e;
},
+ //鎻愪氦
dataFormSubmit() {
- //鎻愪氦璁㈠崟
- this.fyData.forEach(e => {
- e.shippingDate = this.info.shippingDate;
- if (e.planId && !e.numPlan) {
- e.numPlan = -1; //鍒犻櫎璁剧疆涓虹┖鐨勮鍒�
- }
- let orderId = e.id;
- e.id = e.planId;
- e.orderId = orderId;
- });
- this.$reqPost('addObj', this.fyData).then(res => {
- this.$u.toast('娣诲姞鎴愬姛');
- this.fyList();
- });
+ console.log('鏃ュ彂杩愯鍒掓洿鏂版暟鎹彁浜�',this.fyData);
+ this.overlayShow = true;
+ this.fyData.forEach(e => {
+ e.shippingDate = this.info.shippingDate;
+ if (e.planId && !e.numPlan) {
+ e.numPlan = -1; // 鍒犻櫎璁剧疆涓虹┖鐨勮鍒�
+ }
+ let orderId = e.id; // 璁㈠崟id
+ e.orderId = orderId;
+ // e.id = e.planId;
+ });
+ this.$reqPost('addObj', this.fyData).then(res => {
+ console.log('addObj鎺ュ彛杩斿洖',res);
+ this.$u.toast('娣诲姞鎴愬姛');
+ this.fyList();
+ });
},
+ // 鍏ㄩ儴鏃ヨ鍒掓彁浜ゆ寜閽槻鎶�
+ submit:tool.throttle(function(){
+ this.dataFormSubmit();
+ }),
+ // 淇敼鏃ヨ鍒掓寜閽�
getOrderCarNum() {
//淇敼
this.$reqPost('setCarNums', this.editRow).then(res => {
@@ -155,6 +241,11 @@
this.xscarshippingdayplan();
});
},
+ // 淇敼鏃ヨ鍒掗槻鎶栨寜閽�
+ editPlan:tool.throttle(function(){
+ this.getOrderCarNum();
+ }),
+ // 鍒囨崲鍏ㄩ儴鍜屽凡璁剧疆
groupChange(n) {
console.log(n, 'n================');
this.isTomJihua = n;
@@ -163,6 +254,140 @@
} else {
this.fyList();
}
+ },
+ fyList() {
+ this.overlayShow = true;
+ //鍒楄〃鏌ヨ
+ uni.showLoading({
+ title: '姝e湪鍔犺浇...'
+ });
+ let compId = uni.getStorageSync('userInfo').compId;
+ let params = {
+ current: 1,
+ size: 100,
+ status: 2,
+ trainType: 1,
+ compId: compId
+ };
+ this.$reqGet('fyList', params).then(res => {
+ if (res.code == 0) {
+ console.log('fylist--------',res.data);
+ this.xscarshippingdayplan(res.data);
+ }
+ });
+ },
+ xscarshippingdayplan(allList) {
+ uni.showLoading({
+ title: '姝e湪鍔犺浇...'
+ });
+ this.overlayShow = true;
+ //宸茬粡璁剧疆鐨�
+ let params = {
+ current: 1,
+ size: 50,
+ shippingDate: this.info.shippingDate
+ };
+ this.$reqGet('xscarshippingdayplan', params)
+ .then(res => {
+ console.log('涓嶇煡閬撴槸浠�涔�---------------',res);
+ if (res.code == 0) {
+ if (allList) {
+ let selectFyData = res.data.records;
+ allList.forEach(e => {
+ selectFyData.forEach(ee => {
+ if (e.id == ee.orderId) {
+ e.numPlan = ee.numPlan;
+ e.numReal = ee.numReal;
+ // e.planId = ee.id;
+ console.log('淇敼planid鎿嶄綔',`planId:${ee.id}`);
+ if (ee.carNums != null) {
+ e.carNums = ee.carNums;
+ }
+ }
+ });
+ });
+ this.fyData = allList;
+ } else {
+ this.fyData = res.data.records;
+ }
+ uni.hideLoading();
+ this.overlayShow = false;
+ }
+ })
+ .catch(e => {
+ uni.hideLoading();
+ this.overlayShow = false;
+ });
+ },
+ //鍒囨崲浠婃棩鍜屾槑鏃�
+ tabClick(item) {
+ console.log(item, 'item==========');
+ if (item.index == 1) {
+ this.info.shippingDate = this.tomorrowDate();
+ if (this.isTomJihua == '宸茶缃殑璁″垝') {
+ this.xscarshippingdayplan();
+ } else {
+ this.fyList();
+ }
+ } else {
+ this.info.shippingDate = this.todayDate();
+ if (this.isTomJihua == '宸茶缃殑璁″垝') {
+ this.xscarshippingdayplan();
+ } else {
+ this.fyList();
+ }
+ }
+ },
+ inputChange(val) {
+ console.log('鍏ㄩ儴璁″垝', val);
+ },
+ inputTotalChange(val) {
+ console.log(val, 'val2=======val2,宸茶缃鍒�');
+ this.editRow = val;
+ },
+ // input鑾峰彇鐒︾偣
+ faYunPlanCarsFocus(item) {
+ // 鑾峰彇璇ョ劍鐐瑰湪椤甸潰鐨勪綅缃�
+ // let boxBottom = document.getElementById('#u-dropdown');
+ // console.log('鍏冪礌',boxBottom);
+ // let bottom = this.$refs.planViewRef.offsetHeight
+
+ this.fayunPlanFocusId = item.id;
+ this.keyBoardShow = true;
+ this.isCursor = true;
+ this.keyBoardValue = item.numPlan + '';
+ },
+ // 閿洏
+ valChange(val) {
+ // this.keyBoardValue += val;
+ // 灏嗘瘡娆℃寜閿殑鍊兼嫾鎺ュ埌value鍙橀噺涓紝娉ㄦ剰+=鍐欐硶
+ this.fyData.map(item => {
+ if (item.id == this.fayunPlanFocusId) {
+ if (item.numPlan) {
+ item.numPlan = this.keyBoardValue += val + '';
+ this.keyBoardValue = item.numPlan;
+ } else {
+ item.numPlan = val;
+ this.keyBoardValue = item.numPlan;
+ }
+ }
+ });
+ },
+ backspace() {
+ this.keyBoardValue = this.keyBoardValue.substr(0, this.keyBoardValue.length - 1);
+ },
+ keyBoardConfirm(val) {
+ console.log('閿洏鐐瑰嚮纭畾鐨勫��', val);
+ this.keyBoardClose();
+ },
+ keyBoardCancel() {
+ this.keyBoardClose();
+ },
+ keyBoardClose() {
+ console.log('閿洏鍏抽棴浜�');
+ this.fayunPlanFocusId = null;
+ this.keyBoardShow = false;
+ this.isCursor = false;
},
todayDate() {
let yes = new Date().getTime();
@@ -187,92 +412,6 @@
const time = y + '-' + m + '-' + d;
console.log('tomorrowDate---------222', time);
return time;
- },
-
- fyList() {
- //鍒楄〃鏌ヨ
- uni.showLoading({
- title: '姝e湪鍔犺浇...'
- });
- let compId = uni.getStorageSync('userInfo').compId;
-
- let params = {
- current: 1,
- size: 100,
- status: 2,
- trainType: 1,
- compId: compId
- };
- this.$reqGet('fyList', params).then(res => {
- if (res.code == 0) {
- this.xscarshippingdayplan(res.data);
- }
- });
- },
- xscarshippingdayplan(allList) {
- //宸茬粡璁剧疆鐨�
- console.log(allList, 'allList==========');
- let params = {
- current: 1,
- size: 50,
- shippingDate: this.info.shippingDate
- };
- this.$reqGet('xscarshippingdayplan', params)
- .then(res => {
- if (res.code == 0) {
- if (!allList) {
- this.fyData = res.data.records;
- console.log(this.fyData, 'this.fyData=========11111111');
- } else {
- let l = res.data.records;
- allList.forEach(e => {
- l.forEach(ee => {
- if (e.id == ee.orderId) {
- e.numPlan = ee.numPlan;
- e.numReal = ee.numReal;
- e.planId = ee.id;
- if (ee.carNums != null) {
- e.carNums = ee.carNums;
- }
- }
- });
- });
- this.fyData = allList;
- console.log(this.fyData, 'this.fyData=========22222222');
- }
- console.log(this.fyData, 'this.fyData=========333333333');
- uni.hideLoading();
- }
- })
- .catch(e => {
- uni.hideLoading();
- });
- },
- tabClick(item) {
- //鍒囨崲浠婃棩鍜屾槑鏃�
- console.log(item, 'item==========');
- if (item.index == 1) {
- this.info.shippingDate = this.tomorrowDate();
- if (this.isTomJihua == '宸茶缃殑璁″垝') {
- this.xscarshippingdayplan();
- } else {
- this.fyList();
- }
- } else {
- this.info.shippingDate = this.todayDate();
- if (this.isTomJihua == '宸茶缃殑璁″垝') {
- this.xscarshippingdayplan();
- } else {
- this.fyList();
- }
- }
- },
- inputChange(val) {
- console.log(val);
- },
- inputTotalChange(val) {
- console.log(val, 'val2=======val2');
- this.editRow = val;
}
}
};
@@ -324,9 +463,9 @@
font-size: vww(12) !important;
line-height: vww(12) !important;
}
- .u-empty{
- width:100%;
- height:vww(300);
+ .u-empty {
+ width: 100%;
+ height: vww(300);
}
}
@@ -412,6 +551,30 @@
}
.carNum-box {
display: flex;
+ .planCars {
+ display: flex;
+ box-sizing: border-box;
+ overflow: auto;
+ width: vww(120);
+ border: 1px solid #dddddd;
+ border-radius: vww(4);
+ padding: vww(1) vww(10);
+
+
+ // 杈撳叆鐒︾偣鍥剧墖
+ .cursor {
+ // float: left;
+ width: vww(1);
+ height: vww(15);
+ vertical-align: middle;
+ align-self: center;
+ image {
+ width: vww(1);
+ display: block;
+ height: vww(15);
+ }
+ }
+ }
view {
font-size: vww(14);
line-height: vww(32);
@@ -421,4 +584,4 @@
}
}
}
-</style>
+</style>
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index fe8c0c7..2b7adac 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -1,11 +1,10 @@
-<template>
+<!-- <template>
<view class="login">
<image src="@/static/login/banner.png" class="background"></image>
<view class="login-container">
<view class="loginBtn"><u-button text="寰俊璐﹀彿蹇嵎鐧诲綍" type="success" shape="circle" icon="weixin-fill" @click="toGrantAuthorization"></u-button></view>
<view class="utils"><text @click="toBindPage">缁戝畾绯荤粺璐﹀彿</text></view>
</view>
- <!-- 鐗瑰畾鑼冨洿璇存槑 -->
<view class="loginBottom"><text>灏忕▼搴忎粎渚涘凡鎷ユ湁绯荤粺璐﹀彿鐗瑰畾鍐呴儴浜哄憳浣跨敤</text></view>
<u-modal
@confirm="wxLoginConfirm"
@@ -201,3 +200,155 @@
}
}
</style>
+ -->
+
+ <template>
+ <view class="login">
+ <u-overlay :show="show" @click="show = false"></u-overlay>
+ <image src="@/static/login/banner.png" class="background"></image>
+ <view class="inputBox">
+ <view class="phone">
+ <image src="@/static/login/phone.png" mode="鍔犺浇閿欒"></image>
+ <input type="text" placeholder="璇疯緭鍏ョ敤鎴峰悕/鎵嬫満鍙�" v-model="formData.username" />
+ </view>
+ <view class="password">
+ <image src="@/static/login/lock.png" mode="鍔犺浇閿欒" />
+ <input type="password" placeholder="璇疯緭鍏ヨ处鍙峰瘑鐮�" v-model="formData.password" />
+ </view>
+ <view class="loginBtn"><button type="default" @click="loginSubmit">鐧诲綍</button></view>
+ </view>
+ </view>
+ </template>
+
+ <script>
+ import { setAccessToken, setTokenType, setRefreshToken, setClientId, setScope, redirectHome, redirectLogin } from '@/utils/status.js';
+ export default {
+ name: 'login',
+ data() {
+ return {
+ show:false,
+ formData: {
+ // username: 'zhangjialiang',
+ // password: '123456aaa',
+ // username: 'gequan',
+ // password: 'gequan!@#$',
+ username: '',
+ password: ''
+ },
+ bindData: {
+ state: 'MINI',
+ code: ''
+ }
+ };
+ },
+ onShow() {
+ // 娓呴櫎缂撳瓨
+ if (uni.getStorageSync('userInfo') || uni.getStorageSync('access_token') || uni.getStorageSync('refresh_token')) {
+ uni.clearStorageSync();
+ }
+ },
+ methods: {
+ loginSubmit() {
+ if(this.formData.username == ''){
+ uni.showToast({
+ title:'璇疯緭鍏ョ敤鎴峰悕锛�',
+ icon:'none'
+ })
+ } else if(this.formData.password == ''){
+ uni.showToast({
+ title:'璇疯緭鍏ュ瘑鐮侊紒',
+ icon:'none'
+ })
+ } else {
+ this.show = true;
+ uni.showLoading({
+ title: '鐧诲綍涓�...'
+ });
+ this.apiLogin(this.formData)
+ .then(this.saveUserInfo)
+ .catch(this.loginFail);
+ }
+ },
+ saveUserInfo(response) {
+ uni.hideLoading();
+ this.show = false;
+ if (response.statusCode === 200) {
+ const { access_token, refresh_token, token_type, scope } = response.data;
+ try {
+ setAccessToken(access_token);
+ setTokenType(token_type);
+ setRefreshToken(refresh_token);
+ setScope(scope);
+ this.$store.dispatch('menus');
+ uni.hideLoading();
+ redirectHome();
+ } catch (e) {
+ console.log('妫�娴嬪埌閿欒',e);
+ }
+ } else {
+ uni.showToast({
+ title: response.data.msg,
+ icon:'none',
+ duration: 2000
+ });
+ }
+ },
+ loginFail(err) {
+ this.show = false;
+ console.log('鐧诲綍鎺ュ彛閿欒', err);
+ }
+ }
+ };
+ </script>
+
+ <style lang="scss" scoped>
+ .login {
+ .background {
+ width: 100%;
+ height: vww(289);
+ // height: vww(246);
+ }
+ .inputBox {
+ width: vww(280);
+ margin: vww(40) auto;
+ input {
+ width: vww(240);
+ margin-left: vww(8);
+ }
+ .phone {
+ width: vww(280);
+ height: vww(36);
+ display: flex;
+ align-items: center;
+ border-bottom: vww(1) solid #cccccc;
+ image {
+ width: vww(20);
+ height: vww(20);
+ }
+ }
+ .password {
+ width: vww(280);
+ height: vww(36);
+ display: flex;
+ align-items: center;
+ margin-top: vww(40);
+ border-bottom: vww(1) solid #cccccc;
+ image {
+ width: vww(20);
+ height: vww(20);
+ }
+ }
+ .loginBtn {
+ margin-top: vww(80);
+
+ button {
+ background-color: #007aff;
+ color: #ffffff;
+ font-size: vww(16);
+ border-radius: vww(22);
+ }
+ }
+ }
+ }
+ </style>
+
\ No newline at end of file
diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue
index 2efb3c6..1a486b0 100644
--- a/pages/my-application/my-application.vue
+++ b/pages/my-application/my-application.vue
@@ -61,7 +61,7 @@
<text>鎵�灞炴祦绋嬶細{{ item.processName }}</text>
</view>
<view class="">
- <text>瀹℃壒鐜妭锛歿{ item.currTaskName == null ? '' : item.currTaskName }}</text>
+ <text>瀹℃壒鐜妭锛歿{ item.currTaskName ||'' }}</text>
</view>
</view>
<view class="center-content__two center-margin">
@@ -86,7 +86,7 @@
<view class="bottom-container">
<!-- 鎸夐挳鍖哄煙 -->
<view class="bottom-content__chulizhong bottom-content__item">
- <view @click="withDrawClick(item.id)" v-if="item.status == 1">
+ <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
<image src="@/static/home/cehui.png" mode=""></image>
<view>鎾ゅ洖</view>
</view>
@@ -94,15 +94,15 @@
<image src="@/static/home/jindu.png" mode=""></image>
<view>鏌ョ湅杩涘害</view>
</view>
- <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 )&& (item.procDefId == 'WAY_BILL:4:87504')">
+ <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 || item.status == 3 ) && (item.processName == '鍙戣繍閫氱煡鍗�')">
<image src="@/static/home/biaodan.png" mode=""></image>
<view>鐢宠璇︽儏</view>
</view>
- <view v-if="item.status == 3" @click="apply(item)">
+ <!-- <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)">
+ </view> -->
+ <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/history.png" mode=""></image>
<view>缂栬緫</view>
</view>
@@ -110,6 +110,10 @@
<image src="@/static/home/history.png" mode=""></image>
<view>瀹℃壒鍘嗗彶</view>
</view>
+ <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
+ <image src="@/static/home/delete.png" mode=""></image>
+ <view>鍒犻櫎</view>
+ </view>
</view>
</view>
</template>
@@ -118,10 +122,11 @@
<!-- 鎾ゅ洖妯℃�佹 -->
<view class="wodeshenqingMotai">
- <u-modal width="684rpx" :show="withDrawShow" title="鎾ゅ洖鍘熷洜" :showCancelButton="true" @confirm="withDrawConfirm"
+ <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>
+ <!-- <u--textarea v-model="withDrawData.reason" placeholder="璇疯緭鍏ユ挙鍥炲師鍥�"></u--textarea> -->
+ <text>纭鎾ゅ洖璇ョ敵璇峰悧锛�</text>
</view>
</u-modal>
</view>
@@ -143,7 +148,7 @@
<u-back-top :scroll-top="scrollTop" style="position:fixed;bottom:100px;right:100px;"></u-back-top>
</view>
- <view class="" style="height:50px;">
+ <view class="empty-placeH">
</view>
@@ -193,8 +198,8 @@
// 鎾ゅ洖妯℃�佹
withDrawShow: false,
withDrawData: {
- reason: '',
- id: '', // 鎾ゅ洖鐢宠ID
+ // reason: '',
+ // id: '', // 鎾ゅ洖鐢宠ID
procInstId: ''
},
// 閲嶆柊鐢宠
@@ -403,17 +408,12 @@
this.init();
},
// 鎾ゅ洖妯℃�佹
- withDrawClick(id) {
+ withDrawClick(procInstId) {
this.withDrawShow = true;
- this.withDrawData.id = id;
+ this.withDrawData.procInstId = procInstId;
},
withDrawConfirm() {
- this.shenqingData.forEach(i => {
- if (i.id == this.withDrawData.id) {
- this.withDrawData.procInstId = i.procInstId;
- }
- });
- this.$reqPost('withDraw', this.withDrawData, 'form').then(res => {
+ this.$reqPost('cancel', this.withDrawData).then(res => {
console.log('res', res);
if (res.code == 0) {
uni.showToast({
@@ -428,95 +428,86 @@
this.getMoreNews();
});
- 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);
- });
+ // 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;
- // }
- },
+ // this.modalVisible = true;
+ // // }
+ // },
// 淇敼鐢宠
editMyApplication(v) {
console.log('淇敼鐢宠');
@@ -796,6 +787,11 @@
right:vww(20)!important;
}
}
+
+ // 搴曢儴鍗犱綅
+ .empty-placeH{
+ height:vww(50);
+ }
// 搴曢儴
diff --git a/pages/my-have-todo/my-have-todo.vue b/pages/my-have-todo/my-have-todo.vue
index e6f6b9e..00280e5 100644
--- a/pages/my-have-todo/my-have-todo.vue
+++ b/pages/my-have-todo/my-have-todo.vue
@@ -51,7 +51,7 @@
</view>
<view class="center-content__two center-margin">
<view>
- <text>鍙戣捣浜猴細{{ item.actBusiness.createByName }}</text>
+ <text>鍙戣捣浜猴細{{ item.actBusiness.createByName || '' }}</text>
</view>
<view>
<text>瀹℃壒鎿嶄綔锛歿{ item.deleteReason }}</text>
@@ -59,7 +59,7 @@
</view>
<view class="center-content__three center-margin">
<view class="">
- <text>瀹℃壒鎰忚锛歿{ item.comment == 'undefined' ? '' : item.comment || '' }}</text>
+ <text>瀹℃壒鎰忚锛歿{ item.comment == 'undefined' ? '鏈~鍐�' : item.comment || '鏈~鍐�' }}</text>
</view>
<view class="">
<text>
@@ -82,7 +82,7 @@
<view class="bottom-container">
<!-- 宸插姙鎸夐挳 -->
<view class="bottom-content__item">
- <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'">
+ <view @click="theFormDataClick(item.tableId)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/biaodan.png" mode=""></image>
<view>鐢宠璇︽儏</view>
</view>
@@ -99,6 +99,10 @@
</template>
</combination-card>
</u-checkbox-group>
+ </view>
+
+ <view class="empty-placeH">
+
</view>
<!-- 搴曢儴鍏ㄩ�� -->
<view class="bottomTabbar">
@@ -387,6 +391,8 @@
<style lang="scss" scoped>
::v-deep.my-have-todo {
+ width: 100%;
+ height: 100%;
// 鎼滅储鍖哄煙
.searchContainer {
width: 94%;
@@ -600,6 +606,11 @@
right: vww(20) !important;
}
}
+
+ // 搴曢儴绔欎綅
+ .empty-placeH{
+ height:vww(5);
+ }
// 搴曢儴
.bottomTabbar {
diff --git a/pages/my-todo/my-todo.vue b/pages/my-todo/my-todo.vue
index 0f57734..c58cdf1 100644
--- a/pages/my-todo/my-todo.vue
+++ b/pages/my-todo/my-todo.vue
@@ -81,7 +81,7 @@
<view class="bottom-container">
<!-- 寰呭姙鎸夐挳 -->
<view class="bottom-content__item">
- <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'">
+ <view @click="theFormDataClick(item.tableId)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/jindu.png" mode=""></image>
<view>鐢宠璇︽儏</view>
</view>
@@ -89,7 +89,7 @@
<image src="@/static/home/tongguo.png" mode=""></image>
<view>閫氳繃</view>
</view>
- <view @click="rejectModalShow = true">
+ <view @click="rejectClick(item)">
<image src="@/static/home/bohui.png" mode=""></image>
<view>椹冲洖</view>
</view>
@@ -192,6 +192,7 @@
<script>
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
import combinationCard from '@/components/common/combination-card/combination-card.vue';
+import { callWithErrorHandling } from "vue";
export default {
data() {
@@ -422,6 +423,7 @@
},
// 閫氳繃
adopClick(v) {
+ console.log('閫氳繃',v);
this.adoptModalShow = true;
this.adoptForm.ids = v.id;
this.modalType = 0;
@@ -436,47 +438,61 @@
// 閫氳繃妯℃�佹
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 => {
+ if(this.checkBoxValue.length >= 1){
+ this.checkBoxValue.forEach(item => {
+ this.adoptDataBox.push(item.slice(0, 6))
+ })
+ this.adoptForm.ids = this.adoptDataBox.toString();
+ }
+ this.$reqPost('passAll', this.adoptForm).then(res => {
console.log('鏄惁杩樺師', this.adoptForm.ids, this.rejectForm.procInstIds);
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛!');
} else {
this.$u.toast('娣诲姞澶辫触!!');
}
+ // 鍒濆鍖�
+ this.checkBoxValue = []
+ this.adoptForm.ids = '';
+ this.adoptForm.comment = '';
this.init();
});
},
adoptModalCancel() {
this.adoptModalShow = false;
},
+ // 椹冲洖鐐瑰嚮
+ rejectClick(v) {
+ this.modalType = 1;
+ this.rejectModalShow = true;
+ this.rejectForm.procInstIds = v.procInstId;
+ },
// 椹冲洖妯℃�佹
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(this.checkBoxValue.length >= 1){
+ this.checkBoxValue.forEach(item => {
+ this.rejectDataBox.push(item.slice(6, 12))
+ })
+ this.rejectForm.procInstIds = this.rejectDataBox.toString();
+ }
+ this.$reqPost('backAll', this.rejectForm).then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛锛�');
} else {
this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�');
}
+ // 鍒濆鍖�
+ this.rejectForm.procInstIds = '';
+ this.rejectForm.comment = '';
+ this.checkBoxValue = []
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;
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 cb85960..0760daa 100644
--- a/pages/new-application-form-data/new-application-form-data.vue
+++ b/pages/new-application-form-data/new-application-form-data.vue
@@ -1,93 +1,112 @@
<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 @click="selectCustomer" labelWidth="20%" label="缁撶畻瀹㈡埛" prop="customerName" borderBottom
- ref="customerNameRef">
- <u--input disabled disabledColor="#ffffff" v-model="newFormData.customerName" border="none"></u--input>
- </u-form-item>
- <u-form-item @click="selectContract" labelWidth="20%" label="鍚堝悓缂栧彿" prop="contractNum" borderBottom
- ref="contractNumRef">
- <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractNum" border="none"></u--input>
- </u-form-item>
- <u-form-item labelWidth="20%" label="鍚堝悓鍚嶇О" borderBottom ref="contractNameRef">
- <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractName" border="none"></u--input>
- </u-form-item>
- <u-form-item @click="showPayType = true" prop="payType" labelWidth="20%" label="浠樻鏂瑰紡" borderBottom
- ref="payTypeRef">
- <u--input v-model="selectValue" 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" disabled disabledColor="#ffffff"
- placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
- <u-form-item labelWidth="20%" label="缂栧彿" borderBottom>
- <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" :rules="rules" ref="formRef">
+ <u-form-item @click="selectLedger" labelWidth="20%" label="璐﹀" borderBottom>
+ <u--input disabled disabledColor="#ffffff" v-model="ledgerName" border="none"></u--input>
+ </u-form-item>
+ <u-form-item @click="selectCustomer" labelWidth="20%" label="缁撶畻瀹㈡埛" prop="customerName" borderBottom ref="customerNameRef">
+ <u--input disabled disabledColor="#ffffff" v-model="newFormData.customerName" border="none"></u--input>
+ </u-form-item>
+ <u-form-item @click="selectContract" labelWidth="20%" label="鍚堝悓缂栧彿" prop="contractNum" borderBottom ref="contractNumRef">
+ <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractNum" border="none"></u--input>
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="鍚堝悓鍚嶇О" borderBottom ref="contractNameRef">
+ <u--input disabled disabledColor="#ffffff" v-model="newFormData.contractName" border="none"></u--input>
+ </u-form-item>
+ <u-form-item @click="showPayType = true" prop="payType" labelWidth="20%" label="浠樻鏂瑰紡" borderBottom ref="payTypeRef">
+ <u--input v-model="selectValue" 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" disabled disabledColor="#ffffff" placeholder="璇烽�夋嫨鑼冨洿鏃ユ湡"></u--input>
+ <u-icon slot="right" name="arrow-right"></u-icon>
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="缂栧彿" borderBottom>
+ <u--input border="none" disabled disabledColor="#ffffff" value="鑷姩鐢熸垚" 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-picker
+ @change="selectLedgerChange"
+ @confirm="selectLedgerConfirm"
+ @cancel="selectLedgerCancel"
+ @close="selectLedgerClose"
+ :show="selectLedgerShow"
+ :columns="ledgerList"
+ keyName="name"
+ :closeOnClickOverlay="true"
+ ></u-picker>
- <!-- 閫夋嫨瀹㈡埛寮规 -->
- <!-- @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;hideKeyboard() " labelWidth="12%" label="鍗曚綅"
- borderBottom ref="compRef">
- <u--input v-model="searchCustomerForm.compName" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨鍗曚綅"
- border="none"></u--input>
- <!-- <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.compName = ''"></u-icon>-->
- </u-form-item>
- <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
- <u--input v-model="selectCustomerData.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;hideKeyboard()" labelWidth="20%" label="瀹㈡埛绾у埆" borderBottom>
- <u--input border="none" v-model="searchCustomerForm.levelText" disabled disabledColor="#ffffff"
- placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
- <!-- <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.levelText = ''"></u-icon>-->
- </u-form-item>
- </u--form>
- </view>
- <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;
+ <!-- 鐢宠鏃ュ巻銆佽寖鍥存椂闂� -->
+ <u-calendar :show="timeShow" :mode="mode" @confirm="confirmTime" @close="timeClose" rowHeight="110" ></u-calendar>
+ <!-- 鐢宠浠樻鏂瑰紡寮瑰嚭鑿滃崟 -->
+ <u-action-sheet :show="showPayType" :actions="actions" title="璇烽�夋嫨浠樻鏂瑰紡" @close="showPayType = false" @select="sexSelect"></u-action-sheet>
+
+ <!-- 閫夋嫨瀹㈡埛寮规 -->
+ <!-- @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;
+ hideKeyboard();
+ "
+ labelWidth="12%"
+ label="鍗曚綅"
+ borderBottom
+ ref="compRef"
+ >
+ <u--input v-model="searchCustomerForm.compName" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨鍗曚綅" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.compName = ''"></u-icon>-->
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
+ <u--input v-model="selectCustomerData.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;
+ hideKeyboard();
+ "
+ labelWidth="20%"
+ label="瀹㈡埛绾у埆"
+ borderBottom
+ >
+ <u--input border="none" v-model="searchCustomerForm.levelText" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" @click="searchCustomerForm.levelText = ''"></u-icon>-->
+ </u-form-item>
+ </u--form>
+ </view>
+ <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;
@@ -95,433 +114,383 @@
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>
+ @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>
+ <!-- 绾у埆鑿滃崟椤� -->
+ <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"
- @click="searchContractFormTypeFocus">
- <u--input v-model="searchContractForm.type" disabled disabledColor="#ffffff" placeholder="璇疯緭鍏ュ悎鍚岀被鍨�"
- border="none"></u--input>
- <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.type != ''" @click="searchContractForm.type = ''"></u-icon>-->
- </u-form-item>
- <u-form-item labelWidth="18%" label="绛捐鏃ユ湡" borderBottom ref="compRef"
- @click="selectContractStartTimeShow = true">
- <u--input v-model="searchContractForm.startDate" disabled disabledColor="#ffffff"
- placeholder="鐐瑰嚮閫夋嫨绛捐鏃ユ湡" border="none"></u--input>
- <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.startDate != ''" @click="searchContractForm.startDate = ''"></u-icon>-->
- </u-form-item>
- <u-form-item labelWidth="18%" label="缁撴潫鏃ユ湡" borderBottom ref="compRef"
- @click="selectContractEndTimeShow = true">
- <u--input v-model="searchContractForm.endDate" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨缁撴潫鏃ユ湡"
- border="none"></u--input>
- <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.endDate != ''" @click="searchContractForm.endDate = ''"></u-icon>-->
- </u-form-item>
- </u--form>
- </view>
- <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 class="contractTableTd">{{ item.customerName }}</view>
- </uni-td>
- <uni-td align="center">
- <view class="contractTableTd">{{ 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="20%" label="鍚堝悓缂栧彿" borderBottom ref="compRef">
+ <u--input v-model="searchContractForm.num" placeholder="璇疯緭鍏ュ悎鍚岀紪鍙�" border="none"></u--input>
+ <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.num != ''" @click="searchContractForm.num = ''"></u-icon>
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="compRef">
+ <u--input v-model="searchContractForm.customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" border="none"></u--input>
+ <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.customerName != ''" @click="searchContractForm.customerName = ''"></u-icon>
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="鍚堝悓绫诲瀷" borderBottom ref="compRef" @click="searchContractFormTypeFocus">
+ <u--input v-model="searchContractForm.type" disabled disabledColor="#ffffff" placeholder="璇疯緭鍏ュ悎鍚岀被鍨�" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.type != ''" @click="searchContractForm.type = ''"></u-icon>-->
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="绛捐鏃ユ湡" borderBottom ref="compRef" @click="selectContractStartTimeShow = true">
+ <u--input v-model="searchContractForm.startDate" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨绛捐鏃ユ湡" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.startDate != ''" @click="searchContractForm.startDate = ''"></u-icon>-->
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="缁撴潫鏃ユ湡" borderBottom ref="compRef" @click="selectContractEndTimeShow = true">
+ <u--input v-model="searchContractForm.endDate" disabled disabledColor="#ffffff" placeholder="鐐瑰嚮閫夋嫨缁撴潫鏃ユ湡" border="none"></u--input>
+ <!-- <u-icon slot="right" name="close-circle-fill" v-show="searchContractForm.endDate != ''" @click="searchContractForm.endDate = ''"></u-icon>-->
+ </u-form-item>
+ </u--form>
+ </view>
+ <view class="searchCustomerBtn">
+ <u-button text="鎼滅储" type="primary" @click="selectContractOpen()"></u-button>
+ <u-button text="娓呯┖" @click="selectContractResetFields"></u-button>
+ </view>
+ <!-- 鍚堝悓鍒楄〃 -->
+ <!-- 婊氬姩閫氱煡 -->
+ <view class="tapStyle">
+ <u-notice-bar :text="noticeText" fontSize="24"></u-notice-bar>
+ </view>
+ <view class="tableContract">
+ <view class="tableBody">
+ <uni-table border emptyText="鏆傛棤鏇村鏁版嵁">
+ <uni-tr>
+ <uni-th width="130" align="center">鐓ょ鍚嶇О</uni-th>
+ <uni-th width="250" align="center">瀹㈡埛鍚嶇О</uni-th>
+ <uni-th width="230" align="center">鍚堝悓缂栧彿</uni-th>
+ <uni-th width="100" align="center">鍚堝悓绫诲瀷</uni-th>
+ <uni-th width="130" align="center">绛捐鏃ユ湡</uni-th>
+ <uni-th width="130" align="center">缁堟鏃ユ湡</uni-th>
+ <uni-th width="100" align="center">鍚堝悓鎬婚噺</uni-th>
+ <uni-th width="120" align="center">鍚堝悓閲戦</uni-th>
+ <uni-th width="70" align="center">鐘舵��</uni-th>
+ <uni-th width="130" align="center">缁勭粐缁撴瀯</uni-th>
+ </uni-tr>
+ <uni-tr v-for="(item, index) in contractData" :key="index">
+ <uni-td align="center">
+ <view :style="tdStyle">{{ item.coalNames }}</view>
+ </uni-td>
+ <uni-td align="left">
+ <view class="contractTableTd">{{ item.customerName }}</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-td align="center">
+ <view :style="tdStyle">{{ item.compName }}</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="loadmoreClass">
- <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="statusContractLoading" @loadmore="loadingContract"
- fontSize="20" height="30px"/>
- </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="loadmoreClass">
+ <u-loadmore loadmoreText="鐐瑰嚮鍔犺浇鏇村" nomoreText="鏃犳洿澶氭暟鎹�!!!" :status="statusContractLoading" @loadmore="loadingContract" fontSize="20" height="30px" />
+ </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">
- <uni-table ref="priceTableRef" :loading="loading" border stripe type="selection"
- emptyText="鏆傛棤鏇村鏁版嵁" @selection-change="selectionChange">
- <uni-tr>
- <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>{{ 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>
- </view>
- </view>
- </view>
- </template>
- <u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1">
- <u--input v-model="addContractTransport" disabled disabledColor="#ffffff"></u--input>
- </u-form-item>
- </view>
- <view class="formDownCard">
- <u-form-item label="鍗曚环" labelWidth="20%" ref="item1">
- <u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff"
- border="none"></u--input>
- </u-form-item>
- <u-form-item label="璁㈠崟閲戦" labelWidth="20%" ref="item1">
- <u--input :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="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">
+ <uni-table ref="priceTableRef" :loading="loading" border stripe type="selection" emptyText="鏆傛棤鏇村鏁版嵁" @selection-change="selectionChange">
+ <uni-tr>
+ <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>{{ 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>
+ </view>
+ </view>
+ </view>
+ </template>
+ <u-form-item @click="addContractTransportShow = true" label="杩愯緭" labelWidth="20%" ref="item1">
+ <u--input v-model="addContractTransport" disabled disabledColor="#ffffff"></u--input>
+ </u-form-item>
+ </view>
+ <view class="formDownCard">
+ <u-form-item label="鍗曚环" labelWidth="20%" ref="item1">
+ <u--input v-model="addContractFormdata.price" disabled disabledColor="#ffffff" border="none"></u--input>
+ </u-form-item>
+ <u-form-item label="璁㈠崟閲戦" labelWidth="20%" ref="item1">
+ <u--input :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.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>
+ </u--form>
- <view class="addContractConfirm">
- <u-button :text="editApplicationIndex != null ? '娣诲姞淇敼':'娣诲姞'" type="primary"
- @click="addContractSanConfirm"></u-button>
- </view>
- </view>
+ <view class="addContractConfirm"><u-button :text="editApplicationIndex != null ? '娣诲姞淇敼' : '娣诲姞'" 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 == null ? '' : item.remark }}</view>
- </uni-td>
- </uni-tr>
- </uni-table>
- </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 == null ? '' : 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="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-if="searchCustomerForm.compName != ''"
- @click="searchCustomerForm.compName = ''"></u-icon>
- </u-form-item>
- <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
- <u--input v-model="selectCustomerData.customerFullName" border="none"
- placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-if="selectCustomerData.customerFullName != ''"
- @click="selectCustomerData.customerName = ''"></u-icon>
- </u-form-item>
- <u-form-item labelWidth="20%" label="瀹㈡埛绾у埆" borderBottom>
- <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText"
- placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
- <u-icon slot="right" name="close-circle-fill" v-if="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">
- <view 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-if="searchCustomerForm.compName != ''" @click="searchCustomerForm.compName = ''"></u-icon>
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="瀹㈡埛鍚嶇О" borderBottom ref="timeDataRef">
+ <u--input v-model="selectCustomerData.customerFullName" border="none" placeholder="杈撳叆瀹㈡埛鍚嶇О"></u--input>
+ <u-icon slot="right" name="close-circle-fill" v-if="selectCustomerData.customerFullName != ''" @click="selectCustomerData.customerName = ''"></u-icon>
+ </u-form-item>
+ <u-form-item labelWidth="20%" label="瀹㈡埛绾у埆" borderBottom>
+ <u--input @focus="selectLevelShow = true" border="none" v-model="searchCustomerForm.levelText" placeholder="鐐瑰嚮閫夋嫨绾у埆"></u--input>
+ <u-icon slot="right" name="close-circle-fill" v-if="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">
+ <view slot="value" class="u-slot-value">
+ <button
+ class="mini-btn"
+ type="default"
+ size="mini"
+ style="background: #007aff;
color: #ffffff;
margin: auto 0;
height: 20px;
@@ -529,71 +498,69 @@
width: 43px;
font-size: 10px;
padding: 0;"
- @click="addContractConsigneeConfirm(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>
+ @click="addContractConsigneeConfirm(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>
- <!-- 鍝佺閫夋嫨鍣� -->
- <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="鏆傛棤鏇村鏁版嵁">
+ <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>
@@ -611,87 +578,82 @@
</uni-td>
</uni-tr>
</uni-table> -->
- <view class="balanceNo" v-if="accountDetails.balanceTotal < 0">
- <text style="color:red;">瀹㈡埛璐︽埛褰撳墠澶勪簬娆犳鐘舵��</text>
- </view>
+ <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.balance == null || undefined ? 0 : accountDetails.balance.toFixed(2)
- }},鎵垮厬浣欓锛歿{ accountDetails.balance2 == null || undefined ? 0 : accountDetails.balance2 }}
- </text>
- </view>
- <u-swipe-action>
- <u-swipe-action-item @click="deleteContractCardClick" :options="options1"
- v-for="(item, index) in newFormData.contractOrders" :key="index">
- <view class="cardList">
- <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">
- 鏀惰揣浜猴細
- <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.balance == null || undefined ? 0 : accountDetails.balance.toFixed(2) }},鎵垮厬浣欓锛歿{
+ accountDetails.balance2 == null || undefined ? 0 : accountDetails.balance2
+ }}
+ </text>
+ </view>
+ <u-swipe-action>
+ <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index">
+ <view class="cardList">
+ <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">
+ 鏀惰揣浜猴細
+ <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="">
+ <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>
+ </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>
import combinationTitle from '@/components/common/combined-title/combined-title.vue';
import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
+import { callWithErrorHandling } from 'vue';
// 鏈�澶ф樉绀虹殑鏃ユ湡
const d = new Date();
@@ -700,1520 +662,1476 @@
month = month < 10 ? `0${month}` : month;
const date = d.getDate();
export default {
- data() {
- return {
- // accountMsgType: 'error',
- tdStyle: 'max-height: 30px;overflow: auto;',
- 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: '',
- customerFullName: '',
- 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: 50,
- num: '',
- startDate: '',
- endDate: '',
- result: 2,
- type: '',
- customerName: ''
- },
- statusContractLoading: 'loadmore',
- contractDataAllNum:0, // 鍚堝悓鎬绘暟
- contractData: [],
- contractNumList: [],
- // 绫诲瀷
- 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 {
+ noticeText:'宸﹀彸婊戝姩琛ㄦ牸鍙煡鐪嬫洿澶氳鎯�',
+ // 璐﹀閫夋嫨鍣�
+ selectLedgerShow: false,
+ ledgerList: [],
+ ledgerName: '',
+ // accountMsgType: 'error',
+ tdStyle: 'max-height: 30px;overflow: auto;',
+ 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: '',
+ ledgerId: null
+ // ledgerName:''
+ },
+ 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',
+ // 閫夋嫨瀹㈡埛
+ selectCustomerData: {
+ compIds: '',
+ customerFullName: '',
+ 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: 50,
+ num: '',
+ startDate: '',
+ endDate: '',
+ result: 2,
+ type: '',
+ customerName: ''
+ },
+ statusContractLoading: 'loadmore',
+ contractDataAllNum: 0, // 鍚堝悓鎬绘暟
+ contractData: [],
+ contractNumList: [],
+ // 绫诲瀷
+ selectContractTypeShow: false,
+ selectContractTypeData: [[]],
+ // 鏃堕棿
+ selectContractTimeMode: 'single',
+ selectContractStartTimeShow: false,
+ selectContractEndTimeShow: false,
+ // 娣诲姞鍚堝悓
+ addContractShow: false,
+ // 娣诲姞鍚堝悓琛ㄥ崟
+ addContractRules: {},
+ addContractFormdata: {},
+ contractDetails: [], // 閫夋嫨鐨勫悎鍚岃鎯�
+ // 閫夋嫨鐓ゅ巶
+ coalFiledSelectShow: false,
+ coalfiledData: [],
+ coalfiledParams: { current: 1, size: 10 },
+ selectCoalFiledData: {},
+ // 閫夋嫨鏀惰揣浜�
+ addContractConsigneeShow: false,
+ // 鍝佺閫夋嫨鍣�
+ addContractCoalShow: false,
+ addContractCoalData: [[]],
+ // 杩愯緭绫诲瀷
- // 浼樻儬
- favouredpolicyListAll: [], //浼樻儬鏀跨瓥鍒楄〃鎵�鏈夌殑
- favouredpolicyList: [], // 浼樻儬鏀跨瓥鍒楄〃
- multipleSelection: [], //閫変腑鐨勪紭鎯犳斂绛�
- // 鍗曢�夋
- 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: '鍒犻櫎'
- }
- ],
- editApplicationIndex: null
- };
- },
- onShow() {
- if (this.menuShow == true) {
- this.$refs.menuRef.menuClick();
- }
- this.init();
- },
- // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗
- onNavigationBarButtonTap(e) {
- // console.log(e);
- this.$refs.menuRef.menuClick();
- },
- computed: {
- afterPrice() {
- let temp = Object.assign({}, this.currentCoal);
- 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;
- }
- }
+ // 浼樻儬
+ favouredpolicyListAll: [], //浼樻儬鏀跨瓥鍒楄〃鎵�鏈夌殑
+ favouredpolicyList: [], // 浼樻儬鏀跨瓥鍒楄〃
+ multipleSelection: [], //閫変腑鐨勪紭鎯犳斂绛�
+ // 鍗曢�夋
+ addContractTransport: '鍦伴攢',
+ // 鍝佺浠锋牸琛ㄦ牸
+ loading: false,
+ // 浠锋牸璇锋眰鍙傛暟
+ getNewPriceData: {},
+ 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: '鍒犻櫎'
+ }
+ ],
+ editApplicationIndex: null
+ };
+ },
+ onShow() {
+ if (this.menuShow == true) {
+ this.$refs.menuRef.menuClick();
+ }
+ this.init();
+ },
+ // 鐐瑰嚮瀵艰埅鏍忚彍鍗曞悗
+ onNavigationBarButtonTap(e) {
+ // console.log(e);
+ this.$refs.menuRef.menuClick();
+ },
+ computed: {
+ afterPrice() {
+ let temp = Object.assign({}, this.currentCoal);
+ 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;
+ }
+ }
+ return temp;
+ },
+ showPrice() {
+ if (this.addContractFormdata) {
+ let row = this.addContractFormdata;
+ if (row.compId && row.customerAddressId && row.coalId) {
+ // console.log('鐪嬭浠锋牸', this.showPrice);
+ // 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;
+ return true;
+ },
+ async currentRowComputed() {
+ this.changePriceMode(this.addContractFormdata.priceMode); //鍙樹环鏍肩敤鐨�
+ //鍙樿鍗曢噺
+ 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); //鎶戝皹璐�
- return temp;
- },
- showPrice() {
- if (this.addContractFormdata) {
- let row = this.addContractFormdata;
- if (row.compId && row.customerAddressId && row.coalId) {
- // console.log('鐪嬭浠锋牸', this.showPrice);
- // 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;
+ let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
+ console.log(amount);
+ this.addContractFormdata.amount = amount.toFixed(2);
+ // console.log('杩愯垂锛屾姂灏樿垂锛�', this.addContractFormdata.cost1, this.addContractFormdata.cost2);
+ }
+ } else {
+ this.addContractFormdata.quant = null;
+ }
+ return true;
+ }
+ },
+ watch: {
+ // 绔嬪嵆澶勭悊 杩涘叆椤甸潰灏辫Е鍙� // immediate: true,
+ // 娣卞害鐩戝惉 灞炴�х殑鍙樺寲// deep: true
+ // 閫夋嫨瀹㈡埛鏌ヨ鏉′欢
+ 'searchCustomerForm.compName'(newV, oldV) {
+ if (newV == '') {
+ this.selectCustomerData.compIds = '';
+ }
+ },
+ 'searchCustomerForm.levelText'(newV, oldV) {
+ if (newV == '') {
+ this.selectCustomerData.level = '';
+ }
+ }
+ },
+ 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);
+ console.log(amount);
+ this.addContractFormdata.amount = amount.toFixed(2);
+ }
+ },
+ init() {
+ this.getLedgerList();
+ this.jcfavouredpolicyitem();
+ this.coalfiled();
+ this.coalprice();
+ this.operato();
+ this.pay_type();
+ this.others_params();
+ this.fetchCompTree();
+ this.getFavouredPolicyItem();
+ this.$reqGet('contract_type').then(res => {
+ console.log('鍚堝悓绫诲瀷', res);
+ res.data.forEach(item => {
+ this.selectContractTypeData[0].push(item.value);
+ });
+ });
+ },
+ /**
+ * 鑾峰彇鍒嗙被璐﹀
+ */
+ getLedgerList() {
+ this.$reqGet('zhaccountledger', { compId: uni.getStorageSync('userInfo').compId }).then(res => {
+ this.ledgerList.push(res.data.records);
+ console.log('璐﹀鍒楄〃', this.ledgerList);
+ if (res.data.records) {
+ this.newFormData.ledgerId = res.data.records[0].id;
+ // this.newFormData.ledgerName = res.data.records[0].name;
+ this.ledgerName = res.data.records[0].name;
+ }
+ });
+ },
+ selectLedger() {
+ this.selectLedgerShow = true;
+ },
+ selectLedgerChange(index) {
+ console.log('璐﹀閫夋嫨鍣�', index);
+ this.ledgerName = index.value[0].name;
+ this.newFormData.ledgerId = index.value[0].id;
+ // this.newFormData.ledgerName = index.value[0].name;
+ if (this.newFormData.customerName || this.newFormData.contractNum || this.newFormData.contractName) {
+ this.newFormData.customerName = '';
+ this.newFormData.contractNum = '';
+ this.newFormData.contractName = '';
+ }
+ },
+ selectLedgerConfirm(index) {
+ console.log('閫夋嫨璐﹀鐐瑰嚮纭畾', index);
+ this.selectLedgerShow = false;
+ },
+ selectLedgerCancel() {
+ this.selectLedgerShow = false;
+ },
+ selectLedgerClose() {
+ this.selectLedgerShow = false;
+ },
+ // 閫夋嫨瀹㈡埛
+ selectCustomer() {
+ 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.customerFullName = '';
+ this.searchCustomerForm.compName = '';
+ this.searchCustomerForm.levelText = '';
+ this.selectCustomer();
+ },
+ selectCustomerOkClick(v) {
+ console.log('澶栧眰瀹㈡埛閫夋嫨', v);
+ this.newFormData.customerName = v.customerName;
+ this.newFormData.customerId = v.id;
+ this.$reqGet('getAccount', { customerId: v.id, ledgerId: this.newFormData.ledgerId }).then(res => {
+ console.log('瀹㈡埛閫夋嫨璐︽埛', res);
+ this.accountDetails = res.data;
+ this.searchContractForm.customerName = res.data.customerName;
+ this.reqContract();
+ this.$nextTick(() => {
+ console.log('zhezhezhe');
+ this.contractData.forEach(item => {
+ this.contractNumList.push(item.num);
+ });
+ console.log('鍚堝悓鍙风爜鍒楄〃', this.contractNumList);
+ // 妫�鏌ユ崲瀹㈡埛鍚庡搴旂殑鍚堝悓
+ if (this.contractNumList.indexOf(this.newFormData.contractNum) > -1) {
+ this.newFormData.contractNum = '';
+ this.newFormData.contractName = '';
+ }
+ });
+ });
+ this.$nextTick(() => {
+ this.selectCustomerShow = false;
+ });
+ },
+ loadingCustomer() {
+ console.log('鍔犺浇鏇村浜嬩欢');
+ if (this.selectCustomerData.current >= this.customerDataAllNum / 10) return;
+ this.status = 'loading';
+ this.selectCustomerData.current = ++this.selectCustomerData.current;
+ this.$reqGet('customer', this.selectCustomerData).then(res => {
+ if (this.selectCustomerData.current >= this.customerDataAllNum / 10) {
+ this.status = 'nomore';
+ this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
+ }
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.customerDataAllNum = res.data.total;
+ this.customerData = this.customerData.concat(res.data.records);
+ this.status = 'loadmore';
+ console.log(this.selectCustomerData);
+ }
+ });
+ },
+ // 鏃堕棿
+ confirmTime(v) {
+ this.timeShow = false;
+ console.log('鏃堕棿', v);
+ v.forEach(e => {
+ this.newFormData.startDate = v[0];
+ this.newFormData.endDate = v[v.length - 1];
+ this.timeDataStr = v[0] + ' 鑷� ' + v[v.length - 1];
+ });
+ },
- return true;
- },
- async currentRowComputed() {
- console.log('currentRowComputed');
- //鍙樹环鏍肩敤鐨�
- this.changePriceMode(this.addContractFormdata.priceMode);
+ // 閫夋嫨鍚堝悓
+ selectContract() {
+ if (this.newFormData.customerName != '') {
+ if (this.newFormData.contractOrders != []) {
+ uni.showToast({
+ title: '娣诲姞璁㈠崟鍚庯紝涓嶈兘淇敼鍚堝悓锛�',
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ this.selectContractShow = true;
+ } else {
+ this.$refs.formRef
+ .validate()
+ .then(res => {
+ uni.$u.toast('鏍¢獙鎴愬姛');
+ })
+ .catch(err => {
+ uni.$u.toast('璇烽�夋嫨缁撶畻瀹㈡埛');
+ });
+ }
+ },
+ // 閫夋嫨鍚堝悓绫诲瀷杈撳叆妗嗚幏鍙栫劍鐐硅Е鍙�
+ searchContractFormTypeFocus() {
+ // 绫诲瀷寮瑰嚭妗�
+ this.selectContractTypeShow = true;
+ },
+ // 閫夋嫨鍚堝悓寮规
+ selectContractOpen() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ console.log('鍚堝悓寮规open');
+ this.$reqGet('contract_status').then(res => {
+ console.log('鐘舵��', res);
+ });
+ this.reqContract();
+ },
+ // 鍚堝悓璇锋眰
+ reqContract() {
+ this.searchContractForm.current = 1;
+ this.$reqGet('contract', this.searchContractForm).then(res => {
+ uni.hideLoading();
+ if (res.code == 0) {
+ console.log('鍚堝悓', res);
+ this.contractData = res.data.records;
+ this.contractDataAllNum = res.data.total;
+ }
+ });
+ },
+ // 鍚堝悓鍔犺浇鏇村
+ loadingContract() {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ console.log('鍚堝悓鍔犺浇鏇村浜嬩欢', this.statusContractLoading);
+ if (this.searchContractForm.current >= this.contractDataAllNum / 50) return;
+ this.statusContractLoading = 'loading';
+ this.searchContractForm.current = ++this.searchContractForm.current;
+ this.$reqGet('contract', this.searchContractForm).then(res => {
+ if (this.searchContractForm.current >= this.contractDataAllNum / 50) {
+ this.statusContractLoading = 'nomore';
+ this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
+ }
+ uni.hideLoading();
+ if (res.code == 0) {
+ this.contractDataAllNum = res.data.total;
+ this.contractData = this.contractData.concat(res.data.records);
+ this.statusContractLoading = 'loadmore';
+ console.log(this.searchContractForm);
+ }
+ });
+ },
+ 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] = [];
- //鍙樿鍗曢噺
- 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); //鎶戝皹璐�
-
- let amount = Number(price * this.addContractFormdata.quant) + Number(this.addContractFormdata.cost1) + Number(this.addContractFormdata.cost2);
- console.log(amount);
- this.addContractFormdata.amount = amount.toFixed(2);
- // console.log('杩愯垂锛屾姂灏樿垂锛�', this.addContractFormdata.cost1, this.addContractFormdata.cost2);
- }
- } else {
- this.addContractFormdata.quant = null;
- }
- 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 = '';
- }
- }
- },
- 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);
- console.log(amount);
- 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.$reqGet('contract_type').then(res => {
- console.log('鍚堝悓绫诲瀷', res);
- res.data.forEach(item => {
- this.selectContractTypeData[0].push(item.value);
- });
- });
- },
- // 閫夋嫨瀹㈡埛
- selectCustomer() {
- this.selectLevelShow = false;
- this.selectCustomerCompShow = false;
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- this.selectCustomerShow = true;
- this.selectCustomerData.current = 1;
- this.$reqGet('customer', this.selectCustomerData).then(res => {
- console.log('瀹㈡埛鍛靛懙鍝堝搱鍝堟垨', res);
- uni.hideLoading();
- if (res.code == 0) {
- this.customerData = res.data.records;
- 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.customerFullName = '';
- this.searchCustomerForm.compName = '';
- this.searchCustomerForm.levelText = '';
- this.selectCustomer();
- },
- selectCustomerOkClick(v) {
- console.log('澶栧眰瀹㈡埛閫夋嫨', v);
- this.newFormData.customerName = v.customerName;
- this.newFormData.customerId = v.id;
- this.$reqGet('getAccount', {customerId: v.id}).then(res => {
- console.log('瀹㈡埛閫夋嫨璐︽埛', res);
- this.accountDetails = res.data;
- this.searchContractForm.customerName = res.data.customerName;
- this.reqContract();
- this.$nextTick(() => {
- this.contractData.forEach(item => {
- this.contractNumList.push(item.num);
- });
- console.log('鍚堝悓鍙风爜鍒楄〃', this.contractNumList);
- // 妫�鏌ユ崲瀹㈡埛鍚庡搴旂殑鍚堝悓
- if (this.contractNumList.indexOf(this.newFormData.contractNum) > -1) {
- this.newFormData.contractNum = '';
- this.newFormData.contractName = '';
- }
- });
- });
- this.$nextTick(() => {
- this.selectCustomerShow = false;
- });
- },
- loadingCustomer() {
- console.log('鍔犺浇鏇村浜嬩欢');
- if (this.selectCustomerData.current >= this.customerDataAllNum / 10) return;
- this.status = 'loading';
- this.selectCustomerData.current = ++this.selectCustomerData.current;
- this.$reqGet('customer', this.selectCustomerData).then(res => {
- if (this.selectCustomerData.current >= this.customerDataAllNum / 10) {
- this.status = 'nomore';
- this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
- }
- uni.hideLoading();
- if (res.code == 0) {
- this.customerDataAllNum = res.data.total;
- this.customerData = this.customerData.concat(res.data.records);
- this.status = 'loadmore';
- console.log(this.selectCustomerData);
- }
- });
- },
- // 鏃堕棿
- confirmTime(v) {
- this.timeShow = false;
- 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(() => {
-
- // });
- },
- // 閫夋嫨鍚堝悓寮规
- selectContractOpen() {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- console.log('鍚堝悓寮规open');
- this.$reqGet('contract_status').then(res => {
- console.log('鐘舵��', res);
- });
- this.reqContract();
- },
- // 鍚堝悓璇锋眰
- reqContract() {
- this.searchContractForm.current = 1;
- this.$reqGet('contract', this.searchContractForm).then(res => {
- uni.hideLoading();
- if (res.code == 0) {
- console.log('鍚堝悓', res);
- this.contractData = res.data.records;
- this.contractDataAllNum = res.data.total;
- }
- });
- },
- // 鍚堝悓鍔犺浇鏇村
- loadingContract(){
- uni.showLoading({
- title: '鍔犺浇涓�...'
- });
- console.log('鍚堝悓鍔犺浇鏇村浜嬩欢',this.statusContractLoading);
- if (this.searchContractForm.current >= this.contractDataAllNum / 50) return;
- this.statusContractLoading = 'loading';
- this.searchContractForm.current = ++this.searchContractForm.current;
- this.$reqGet('contract', this.searchContractForm).then(res => {
- if (this.searchContractForm.current >= this.contractDataAllNum / 50) {
- this.statusContractLoading = 'nomore';
- this.$u.toast('娌℃湁鏇村鏁版嵁浜嗭紒');
- }
- uni.hideLoading();
- if (res.code == 0) {
- this.contractDataAllNum = res.data.total;
- this.contractData = this.contractData.concat(res.data.records);
- this.statusContractLoading = 'loadmore';
- console.log(this.searchContractForm);
- }
- });
- },
- 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.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.newFormData.type = e.type;
- this.selectContractShow = false;
+ this.selectContractShow = false;
- // 浠锋牸鍙傛暟璧嬪��
- this.getNewPriceData.type = e.type;
- // 閫夊畾鍚堝悓璇︽儏
- uni.showLoading({
- title: '鍔犺浇涓�...'
- })
- this.$reqGet('getByContractId', {}, e.id).then(res => {
- uni.hideLoading();
- this.contractDetails = res.data
- this.contractDetails.forEach(item => {
- let a = [{label: '', id: ''}];
- a[0].label = item.coalName;
- a[0].id = item.coalId;
- if (this.addContractCoalData[0]) {
- this.addContractCoalData = [];
- }
- this.addContractCoalData.push(a);
- });
- }).catch(err => {
- console.log(err);
- })
+ // 浠锋牸鍙傛暟璧嬪��
+ this.getNewPriceData.type = e.type;
+ // 閫夊畾鍚堝悓璇︽儏
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqGet('getByContractId', {}, e.id)
+ .then(res => {
+ uni.hideLoading();
+ this.contractDetails = res.data;
+ this.contractDetails.forEach(item => {
+ let a = [{ label: '', id: '' }];
+ a[0].label = item.coalName;
+ a[0].id = item.coalId;
+ if (this.addContractCoalData[0]) {
+ this.addContractCoalData = [];
+ }
+ this.addContractCoalData.push(a);
+ });
+ })
+ .catch(err => {
+ console.log(err);
+ });
- // 娣诲姞鐓ょ閫夐」
+ // 娣诲姞鐓ょ閫夐」
+ },
+ // 娣诲姞鍚堝悓鎸夐挳
+ addContractClick() {
+ // 鎵撳嵃true鎴杅alse
+ this.$refs.formRef
+ .validate()
+ .then(res => {
+ if (this.accountDetails.balanceType == '璐�') {
+ uni.showToast({
+ title: '瀹㈡埛璐︽埛浣欓褰撳墠澶勪簬娆犳鐘舵�侊紒',
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+ if (this.accountDetails.balance == 0 || (null && this.accountDetails.balance2 == 0) || null) {
+ uni.showToast({
+ title: '璐︽埛浣欓涓嶈冻锛�',
+ icon: 'error',
+ duration: 2000
+ });
+ } else {
+ console.log('娣诲姞鍚堝悓鎸夐挳鐐瑰嚮', res);
+ 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.multipleSelection = [];
+ console.log('鏂板缓鍙戣繍鐢宠璁㈠崟', this.addContractFormdata);
+ }
+ }
+ })
+ .catch(err => {
+ uni.$u.toast('鏁堥獙澶辫触');
+ });
+ },
+ // 娣诲姞鍚堝悓寮瑰嚭妗�
+ addContractClose() {
+ this.addContractShow = false;
+ this.addContractFormdata = {};
+ this.editApplicationIndex = null;
+ },
+ addContractOpen() {
+ console.log('娣诲姞璁㈠崟鎵撳紑');
+ },
+ // 閫夋嫨鐓ゅ巶
+ coalFiledSelectOpen(e) {
+ console.log('coalfiledSelect: ', e);
+ },
+ coalFiledSelectClose() {
+ this.coalFiledSelectShow = false;
+ },
+ // 閫夋嫨鐨勭叅鍘�
+ coalFiledSelectClick(e) {
+ console.log('閫夋嫨鐨勭叅鍘�', 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;
- },
- // 娣诲姞鍚堝悓鎸夐挳
- 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 {
- console.log('娣诲姞鍚堝悓鎸夐挳鐐瑰嚮', res);
- 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.multipleSelection = [];
- console.log('鏂板缓鍙戣繍鐢宠璁㈠崟', this.addContractFormdata);
- }
- }
- })
- .catch(err => {
- uni.$u.toast('鏁堥獙澶辫触');
- });
- },
- // 娣诲姞鍚堝悓寮瑰嚭妗�
- addContractClose() {
- this.addContractShow = false;
- this.addContractFormdata = {};
- this.editApplicationIndex = null;
- },
- addContractOpen() {
- console.log('娣诲姞璁㈠崟鎵撳紑');
- },
- // 閫夋嫨鐓ゅ巶
- coalFiledSelectOpen(e) {
- console.log('coalfiledSelect: ', e);
- },
- coalFiledSelectClose() {
- this.coalFiledSelectShow = false;
- },
- // 閫夋嫨鐨勭叅鍘�
- coalFiledSelectClick(e) {
- console.log('閫夋嫨鐨勭叅鍘�', 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.selectCoalFiledData = e;
+ // 鑾峰彇浠锋牸鍙傛暟
+ this.getNewPriceData.compId = e.compId;
+ this.getNewPriceData.compName = e.compName;
+ this.getNewPriceData.filedId = e.id;
+ this.getNewPriceData.filedName = e.name;
- // 鑾峰彇浠锋牸鍙傛暟
- this.getNewPriceData.compId = e.compId;
- this.getNewPriceData.compName = e.compName;
- this.getNewPriceData.filedId = e.id;
- this.getNewPriceData.filedName = e.name;
+ this.coalFiledSelectShow = false;
+ },
+ // 鏀惰揣浜�
+ addContractConsigneeClose() {
+ this.addContractConsigneeShow = false;
+ },
+ // 娣诲姞鍚堝悓瀛愰」鏀惰揣浜烘墦寮�
+ addContractConsigneeOpen() {},
+ addContractConsignee() {
+ this.addContractConsigneeShow = true;
+ },
+ addContractConsigneeConfirm(v) {
+ this.addContractFormdata.toStation = v.toStation;
+ this.addContractFormdata.customerName = v.customerName;
+ this.addContractFormdata.customerId = v.id;
+ // 璧嬪�肩粰鍙栦环鏍艰姹傚弬鏁�
+ this.getNewPriceData.customerAddressName = v.customerFullName;
+ this.getNewPriceData.customerAddressId = v.id;
+ this.getNewPriceData.toStation = v.toStation;
- this.coalFiledSelectShow = false;
- },
- // 鏀惰揣浜�
- addContractConsigneeClose() {
- this.addContractConsigneeShow = false;
- },
- // 娣诲姞鍚堝悓瀛愰」鏀惰揣浜烘墦寮�
- addContractConsigneeOpen() {
- },
- 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.addContractFormdata.toStation = v.toStation;
+ this.addContractFormdata.customerAddressId = v.id;
+ this.addContractConsigneeShow = false;
+ },
+ // 鍝佺閫夋嫨鍣�
+ addContractCoalConfirm(e) {
+ console.log('鍝佺閫夋嫨鍣�', e);
- // 璧嬪�肩粰鍙栦环鏍艰姹傚弬鏁�
- this.getNewPriceData.customerAddressName = v.customerFullName;
- this.getNewPriceData.customerAddressId = v.id;
- this.getNewPriceData.toStation = v.toStation;
+ 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.addContractFormdata.toStation = v.toStation;
- this.addContractFormdata.customerAddressId = v.id;
+ // this.selectCoalFiledData.compId = e.compId;
+ // this.selectCoalFiledData.compName = e.compName;
+ // this.selectCoalFiledData.toStation = e.fromStation;
+ this.$reqGet('getNewPrice', this.getNewPriceData).then(res => {
+ if (res.code == 0) {
+ 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;
- },
- // 鍝佺閫夋嫨鍣�
- 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.$reqGet('getNewPrice', this.getNewPriceData).then(res => {
- if (res.code == 0) {
- 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;
- // if (data.coalPath && data.coalPath.indexOf('鍔ㄥ姏鐓�') > -1) {
- // this.currentCoal.type = 0;
- // } else {
- // this.currentCoal.type = 1;
- // }
- 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;
- this.addContractFormdata.priceMode = e;
- 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) {
- 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.editApplicationIndex != null) {
- this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata;
- } else {
- this.addContractFormdata.type = this.newFormData.type
- this.newFormData.contractOrders.push(this.addContractFormdata);
- console.log('娣诲姞瀛愯鍗�', this.addContractFormdata);
- }
- this.addContractShow = false;// 鍏抽棴寮瑰嚭妗�
- console.log('this.newFormData.contractOrders褰撳墠鍏抽棴鍚�', this.newFormData.contractOrders)
- } else {
- uni.$u.toast('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�');
- }
- },
- // 鍒濆鏁版嵁璇锋眰
- operato() {
- this.$reqGet('operator').then(res => {
- // console.log('operator', 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 {
- console.log('鎻愪氦鏁翠綋', this.newFormData);
- 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 {
- console.log('鎻愪氦鏁翠綋', this.newFormData);
- this.xswaybill();
- }
- }
- })
- .catch(err => {
- uni.$u.toast('鏍¢獙澶辫触');
- });
- },
- // 鍒犻櫎璁㈠崟鍗$墖
- deleteContractCardClick(e) {
- 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({
- title: '鍔犺浇涓�...'
- });
- this.$reqPost('xswaybill', this.newFormData).then(res => {
- uni.hideLoading();
- console.log('鏂板缓鍙戣繍鐢宠', res);
- if (res.code == 0) {
- // uni.showToast({
- // title: '娣诲姞鎴愬姛锛�',
- // icon: 'success',
- // duration: 1000
- // });
- this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�')
- setTimeout(() => {
- uni.navigateBack({
- // url: '/pages/my-application/my-application'
- delta: 2
- });
- }, 2000)
-
- }
- });
- },
- backPage() {
- uni.navigateBack({
- delta: 1
- });
- }
- }
+ this.addContractFormdata.price = data.steelMillPrice;
+ // if (data.coalPath && data.coalPath.indexOf('鍔ㄥ姏鐓�') > -1) {
+ // this.currentCoal.type = 0;
+ // } else {
+ // this.currentCoal.type = 1;
+ // }
+ 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;
+ this.addContractFormdata.priceMode = e;
+ 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) {
+ 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.editApplicationIndex != null) {
+ this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata;
+ } else {
+ this.addContractFormdata.type = this.newFormData.type;
+ this.newFormData.contractOrders.push(this.addContractFormdata);
+ console.log('娣诲姞瀛愯鍗�', this.addContractFormdata);
+ }
+ this.addContractShow = false; // 鍏抽棴寮瑰嚭妗�
+ console.log('this.newFormData.contractOrders褰撳墠鍏抽棴鍚�', this.newFormData.contractOrders);
+ } else {
+ uni.$u.toast('璇疯鑼冭緭鍏ユ墍鏈変俊鎭�');
+ }
+ },
+ // 鍒濆鏁版嵁璇锋眰
+ operato() {
+ this.$reqGet('operator').then(res => {
+ // console.log('operator', 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: 'none',
+ duration: 2000
+ });
+ } else {
+ console.log('鎻愪氦鏁翠綋', this.newFormData);
+ 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: 'none',
+ duration: 2000
+ });
+ } else {
+ console.log('鎻愪氦鏁翠綋', this.newFormData);
+ this.xswaybill();
+ }
+ }
+ })
+ .catch(err => {
+ uni.$u.toast('鏍¢獙澶辫触');
+ });
+ },
+ // 鍒犻櫎璁㈠崟鍗$墖
+ deleteContractCardClick(e) {
+ 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({
+ title: '鍔犺浇涓�...'
+ });
+ this.$reqPost('xswaybill', this.newFormData).then(res => {
+ uni.hideLoading();
+ console.log('鏂板缓鍙戣繍鐢宠', res);
+ if (res.code == 0) {
+ this.$u.toast('娣诲姞鎴愬姛锛屽嵆灏嗚繑鍥炵敵璇烽〉锛侊紒锛�');
+ setTimeout(() => {
+ uni.navigateBack({
+ // url: '/pages/my-application/my-application'
+ delta: 2
+ });
+ }, 1500);
+ }
+ });
+ },
+ 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;
- }
+ width: 100%;
+ padding-bottom: vww(40);
+ // 鏍囬
+ .newApplicationTitle {
+ margin-bottom: 0;
+ }
- // 琛ㄥ崟
- .formDataContaniner {
- .u-form {
- width: 91%;
- margin: 0 auto 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 {
+ .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 {
- }
- }
- }
- }
- }
- }
- }
+ .u-form-item__body__right {
+ .u-form-item__body__right__content {
+ .u-form-item__body__right__content__slot {
+ }
+ }
+ }
+ }
+ }
+ }
+ }
- // 閫夋嫨瀹㈡埛寮规
- .selectCustomerPopup {
- .u-popup {
- .u-transition {
- height: 95%;
+ // 閫夋嫨瀹㈡埛寮规
+ .selectCustomerPopup {
+ .u-popup {
+ .u-transition {
+ height: 95%;
- .u-popup__content {
- overflow: scroll !important;
+ .u-popup__content {
+ overflow: scroll !important;
- .selectCustomerTitle {
- margin-bottom: 0;
- }
+ .selectCustomerTitle {
+ margin-bottom: 0;
+ }
- .selectCustomerContainer {
- padding: 0 4%;
- // .loadmoreClass{
- // .u-loadmore{
- // .u-loadmore__content{
- // .u-loadmore__content__text{
- // }
- // }
- // }
- // }
- .searchContainer {
- .u-input {
- width: 90%;
- }
- }
+ .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;
+ .searchCustomerBtn {
+ margin-top: vww(10);
+ display: flex;
- .u-button {
- width: 30%;
- }
- }
+ .u-button {
+ width: 30%;
+ }
+ }
- // 鏁版嵁鍒楄〃
- .searchResultList {
- margin-top: vww(16);
- }
+ // 鏁版嵁鍒楄〃
+ .searchResultList {
+ margin-top: vww(16);
+ }
+
+ // 婊氬姩閫氱煡
+ .tapStyle{
+ margin-top: vww(30);
+ }
- // 鍚堝悓琛ㄦ牸
- .tableContract {
- margin-top: vww(30);
- display: flex;
- justify-content: center;
+ // 鍚堝悓琛ㄦ牸
+ .tableContract {
+ display: flex;
+ justify-content: center;
- .uni-table-scroll {
- min-width: 0 !important;
+ .uni-table-scroll {
+ min-width: 0 !important;
- .uni-table {
- .uni-table-tr {
- padding: 0;
- font-size: vww(13);
+ .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-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;
- }
- }
- }
- }
+ .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;
- }
- }
+ .tableBody {
+ width: 80%;
+ .contractTableTd {
+ width: vww(200);
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
- .TableUtilBtn {
- width: 20%;
- overflow: hidden;
+ .TableUtilBtn {
+ width: 20%;
+ overflow: hidden;
- .uni-table {
- min-width: 0 !important;
- }
+ .uni-table {
+ min-width: 0 !important;
+ }
- .TableUtilBtnContainer {
- .u-button {
- width: vww(20);
- }
- }
- }
- }
+ .TableUtilBtnContainer {
+ .u-button {
+ width: vww(20);
+ }
+ }
+ }
+ }
- // 鍚堝悓绫诲瀷閫夋嫨鍣�
- .selectContractTypePicker {
- .u-popup {
- .u-transition {
- height: auto;
- }
- }
- }
+ // 鍚堝悓绫诲瀷閫夋嫨鍣�
+ .selectContractTypePicker {
+ .u-popup {
+ .u-transition {
+ height: auto;
+ }
+ }
+ }
- .selectCustomerCompSheet {
- .u-popup {
- .u-transition {
- height: auto;
- }
- }
- }
+ .selectCustomerCompSheet {
+ .u-popup {
+ .u-transition {
+ height: auto;
+ }
+ }
+ }
- .selectLevelSheet {
- .u-popup {
- .u-transition {
- height: auto;
- }
- }
- }
+ .selectLevelSheet {
+ .u-popup {
+ .u-transition {
+ height: auto;
+ }
+ }
+ }
- // 鏃堕棿閫夋嫨鍣�
- .selectContractStartTime {
- .u-popup {
- .u-transition {
- height: auto;
- }
- }
- }
+ // 鏃堕棿閫夋嫨鍣�
+ .selectContractStartTime {
+ .u-popup {
+ .u-transition {
+ height: auto;
+ }
+ }
+ }
- .selectContractEndTime {
- .u-popup {
- .u-transition {
- height: auto;
- }
- }
- }
- }
- }
- }
- }
- }
+ .selectContractEndTime {
+ .u-popup {
+ .u-transition {
+ height: auto;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
- // 鐓ゅ巶
- .addContractContainer {
- .u-popup {
- .u-transition {
- height: 95%;
+ // 鐓ゅ巶
+ .addContractContainer {
+ .u-popup {
+ .u-transition {
+ height: 95%;
- .u-popup__content {
- overflow: scroll !important;
+ .u-popup__content {
+ overflow: scroll !important;
- .addContractFormTitle {
- margin-bottom: 0;
- }
+ .addContractFormTitle {
+ margin-bottom: 0;
+ }
- // 鎼滅储
- .coalFiledSelectSearch {
- }
+ // 鎼滅储
+ .coalFiledSelectSearch {
+ }
- // 閫夋嫨鐓ょ
- .coalFiledSelectPopup {
- .u-popup {
- .u-transition {
- height: 80%;
+ // 閫夋嫨鐓ょ
+ .coalFiledSelectPopup {
+ .u-popup {
+ .u-transition {
+ height: 80%;
- .u-popup__content {
- overflow: scroll !important;
- // 琛ㄦ牸
- .coalFiledTable {
- width: 92%;
- display: flex;
- justify-content: center;
- margin: 0 auto;
+ .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-scroll {
+ min-width: 0 !important;
- .uni-table {
- .uni-table-tr {
- padding: 0;
- font-size: vww(13);
+ .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-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;
- }
- }
- }
- }
+ .uni-table-td {
+ line-height: vww(20);
+ padding: vww(5) vww(10);
+ color: #111111;
+ }
+ }
+ }
+ }
- .tableBody {
- width: 80%;
- }
+ .tableBody {
+ width: 80%;
+ }
- .TableUtilBtn {
- width: 20%;
- overflow: hidden;
+ .TableUtilBtn {
+ width: 20%;
+ overflow: hidden;
- .uni-table {
- min-width: 0 !important;
- }
+ .uni-table {
+ min-width: 0 !important;
+ }
- .TableUtilBtnContainer {
- .u-button {
- width: vww(20);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ .TableUtilBtnContainer {
+ .u-button {
+ width: vww(20);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
- // 娣诲姞鍚堝悓
- .addContractContainer {
- .u-popup {
- .u-transition {
- height: 95%;
+ // 娣诲姞鍚堝悓
+ .addContractContainer {
+ .u-popup {
+ .u-transition {
+ height: 95%;
- .u-popup__content {
- // background-color: rgb(247, 247, 247);
- overflow: scroll !important;
+ .u-popup__content {
+ // background-color: rgb(247, 247, 247);
+ overflow: scroll !important;
- .addContractForm {
- width: 92%;
- margin: 0 auto;
+ .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{
+ // 琛ㄥ崟
+ // .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;
+ .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;
- }
- }
+ .currentPriceContainer {
+ .currentPriceBox {
+ width: 92%;
+ margin: 0 auto;
+ }
+ }
- .selectPriceContainer {
- .selectPricebox {
- width: 92%;
- margin: 0 auto;
+ .selectPriceContainer {
+ .selectPricebox {
+ width: 92%;
+ margin: 0 auto;
- .selectPriceboxItem {
- display: flex;
- justify-content: space-between;
- }
- }
- }
- }
- }
+ .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;
- }
+ .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);
- }
- }
+ .addContractConfirm {
+ margin-top: vww(30);
+ }
+ }
- // 鍝佺閫夋嫨鍣�
- .addContractCoalPicker {
- .u-popup {
- .u-transition {
- height: auto;
- }
- }
- }
- }
- }
- }
- }
+ // 鍝佺閫夋嫨鍣�
+ .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;
+ // 琛ㄦ牸
+ .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 {
+ .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;
- }
- }
- }
- }
- }
+ .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;
+ .cardList {
+ height: vww(130);
+ border-radius: vww(4);
+ padding: vww(10);
+ position: relative;
- .cardListIcon {
- position: absolute;
- right: vww(20);
- top: vww(20);
- }
+ .cardListIcon {
+ position: absolute;
+ right: vww(20);
+ top: vww(20);
+ }
- .cardList-container {
- .cardList_item {
- margin-top: vww(12);
- font-size: 14px;
- display: flex;
+ .cardList-container {
+ .cardList_item {
+ margin-top: vww(12);
+ font-size: 14px;
+ display: flex;
- view {
- width: 50%;
+ view {
+ width: 50%;
- &:nth-child(2) {
- margin-left: vww(20);
- }
- }
- }
- }
- }
+ &: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;
- }
- }
+ .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;
+ // button
+ .new-application-button {
+ display: flex;
- .u-button {
- width: vww(120);
- height: vww(40);
- }
- }
+ .u-button {
+ width: vww(120);
+ height: vww(40);
+ }
+ }
}
</style>
diff --git a/pages/new-application/new-application.vue b/pages/new-application/new-application.vue
index 85d1002..4e138d5 100644
--- a/pages/new-application/new-application.vue
+++ b/pages/new-application/new-application.vue
@@ -23,7 +23,7 @@
</view>
<view class="card-left_bottom">
<text>鐗堟湰锛歷{{ item.version }}</text>
- <text>鎵�灞炲垎绫伙細{{ item.categoryTitle }}</text>
+ <text>鎵�灞炲垎绫伙細{{ item.categoryTitle|| '' }}</text>
</view>
</view>
<view class="card-right">
@@ -93,7 +93,7 @@
uni.hideLoading();
if (res.code === 0) {
res.data.records.forEach(item => {
- if (item.id == 'WAY_BILL:4:87504') {
+ if (item.name == '鍙戣繍閫氱煡鍗�'||item.description == '鍙戣繍閫氱煡鍗�') {
this.newApplicationData.push(item);
}
});
diff --git a/pages/register/register.vue b/pages/register/register.vue
index 30c5849..392e9de 100644
--- a/pages/register/register.vue
+++ b/pages/register/register.vue
@@ -51,9 +51,9 @@
setTokenType(token_type);
setRefreshToken(refresh_token);
setScope(scope);
- // this.$store.dispatch('menus');
- // redirectHome();
+ this.$store.dispatch('menus');
uni.hideLoading();
+ // redirectHome();
this.bindWx(); // 鐧诲綍鎴愬姛鍚庤幏鍙朿ode鐮侊紝杩旂粰鍚庣
} catch (e) {
// error
diff --git a/static/cursor.gif b/static/cursor.gif
new file mode 100644
index 0000000..a095a06
--- /dev/null
+++ b/static/cursor.gif
Binary files differ
diff --git a/utils/api.js b/utils/api.js
index 12c341e..9f61e06 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -1,83 +1,93 @@
export const api = {
// 寰俊缁戝畾瀹㈡埛
- bindWx:{
- url:'/admin/social/bind',
- method:"POST"
+ bindWx: {
+ url: '/admin/social/bind',
+ method: "POST"
},
-
+
// 鑾峰彇鍗曚綅鏍�
- fetchCompTree:{
- url:'/admin/dept/compTree',
- method:'GET'
+ fetchCompTree: {
+ url: '/admin/dept/compTree',
+ method: 'GET'
},
// 鎴戠殑鐢宠
- getProcessDataList:{
- url:'/oa/actBusiness/getByCondition',
- name:'pig',
- method:'GET'
+ getProcessDataList: {
+ url: '/oa/actBusiness/getByCondition',
+ name: 'pig',
+ method: 'GET'
},
// 鏂板鐢宠
- getNewProcessDataList:{
- url:'/oa/actProcess/getByCondition',
- name:'pig',
- mehtod:'GET'
+ getNewProcessDataList: {
+ url: '/oa/actProcess/getByCondition',
+ name: 'pig',
+ mehtod: 'GET'
},
// 鎿嶄綔浜哄憳
- operator:{
- url:'/admin/dict/type/operator',
- name:'pig',
- method:'GET'
+ operator: {
+ url: '/admin/dict/type/operator',
+ name: 'pig',
+ method: 'GET'
},
// 浠樻绫诲瀷
- pay_type:{
- url:'/admin/dict/type/pay_type',
- name:'pig',
- method:'GET'
+ pay_type: {
+ url: '/admin/dict/type/pay_type',
+ name: 'pig',
+ method: 'GET'
},
// 鍏朵粬鍙傛暟
- others_params:{
- url:'/admin/dict/type/others_params',
- name:'pig',
- method:'GET'
+ others_params: {
+ url: '/admin/dict/type/others_params',
+ name: 'pig',
+ method: 'GET'
},
// 椤甸潰鍙傛暟
- coalprice:{
- url:'/yunxiao/coalprice/page',
- name:'pig',
- method:'GET'
+ coalprice: {
+ url: '/yunxiao/coalprice/page',
+ name: 'pig',
+ method: 'GET'
},
- jcfavouredpolicyitem:{
- url:'/yunxiao/jcfavouredpolicyitem/page',
- name:'pig',
- method:'GET'
+ jcfavouredpolicyitem: {
+ url: '/yunxiao/jcfavouredpolicyitem/page',
+ name: 'pig',
+ method: 'GET'
},
// 鑾峰彇鍏ㄩ儴浼樻儬鏀跨瓥
- getFavouredPolicyItem:{
- url:'/yunxiao/jcfavouredpolicyitem/page',
- method:'GET'
+ getFavouredPolicyItem: {
+ url: '/yunxiao/jcfavouredpolicyitem/page',
+ method: 'GET'
},
// 鐓ゅ満
- coalfiled:{
- url:'/yunxiao/coalfiled/page',
- name:'pig',
- method:'GET'
+ coalfiled: {
+ url: '/yunxiao/coalfiled/page',
+ name: 'pig',
+ method: 'GET'
+ },
+
+ /**
+ * @Ledger 鍒嗙被璐﹀
+ */
+ zhaccountledger: {
+ url: '/yunxiao/zhaccountledger/page',
+ method: 'GET'
},
- // 閫夋嫨瀹㈡埛
+ /**
+ * @閫夋嫨瀹㈡埛
+ */
// 鎼滅储
- customer:{
- url:'/yunxiao/customer/page',
- method:'GET'
+ customer: {
+ url: '/yunxiao/customer/page',
+ method: 'GET'
},
// 鑾峰彇璐︽埛
- getAccount:{
- url:'/yunxiao/account/getAccount',
- method:'GET'
+ getAccount: {
+ url: '/yunxiao/account/getAccount',
+ method: 'GET'
},
// 閫夋嫨瀹㈡埛鍥炶皟
// customerAccount:{
@@ -87,80 +97,85 @@
// 閫夋嫨鍚堝悓
- contract:{
- url:'/yunxiao/contract/page',
- method:'GET'
+ contract: {
+ url: '/yunxiao/contract/page',
+ method: 'GET'
},
// 鍚堝悓绫诲瀷&鐘舵��
- contract_status:{
- url:'/admin/dict/type/contract_status',
- method:'GET'
+ contract_status: {
+ url: '/admin/dict/type/contract_status',
+ method: 'GET'
},
- contract_type:{
- url:'/admin/dict/type/contract_type',
- method:'GET'
+ contract_type: {
+ url: '/admin/dict/type/contract_type',
+ method: 'GET'
},
- trainFreightFind:{
- url:"/yunxiao/trainFreight/find",
- mehtod:"GET"
+ trainFreightFind: {
+ url: "/yunxiao/trainFreight/find",
+ mehtod: "GET"
},
// 鍚堝悓璇︽儏
- getByContractId:{
- url:'/yunxiao/contractitem/getByContractId',
- method:'GET'
+ getByContractId: {
+ url: '/yunxiao/contractitem/getByContractId',
+ method: 'GET'
},
// 娣诲姞鐢宠
- xswaybill:{
- url:'/yunxiao/xswaybill',
- method:'POST'
+ xswaybill: {
+ url: '/yunxiao/xswaybill',
+ method: 'POST'
},
// 鐓ょ浠锋牸淇敼淇℃伅
- getNewPrice:{
- url:'/yunxiao/coalpricemodifyinfo/getNewPrice',
- method:'GET'
+ getNewPrice: {
+ url: '/yunxiao/coalpricemodifyinfo/getNewPrice',
+ method: 'GET'
},
// 鎾ゅ洖
- withDraw:{
- url:'/oa/actBusiness/cancel',
+ // withDraw: {
+ // url: '/oa/actBusiness/cancel',
+ // method: 'POST'
+ // },
+ // 淇敼杩囩殑鎾ゅ洖
+ cancel:{
+ url:'/oa/actRemote/cancel',
method:'POST'
},
// 鑾峰彇鎿嶄綔浜�
- getFirstNode:{
- url:'/oa/actProcess/getFirstNode',
- method:'GET'
+ getFirstNode: {
+ url: '/oa/actProcess/getFirstNode',
+ method: 'GET'
},
// 閲嶆柊鐢宠
- apply:{
- url:'/oa/actBusiness/apply',
- method:'POST'
+ apply: {
+ url: '/oa/actBusiness/apply',
+ method: 'POST'
},
// 鎴戠殑寰呭姙
- todoList:{
- url:'/oa/actTask/todoList',
- name:'pig',
- method:'GET'
+ todoList: {
+ url: '/oa/actTask/todoList',
+ name: 'pig',
+ method: 'GET'
},
// 鎴戠殑宸插姙
- doneList:{
- url:'/oa/actTask/doneList',
- name:'pig',
- method:'GET'
+ doneList: {
+ url: '/oa/actTask/doneList',
+ name: 'pig',
+ method: 'GET'
},
// 琛ㄥ崟鏁版嵁
- formData:{
- url:'/yunxiao/xswaybill',
- method:'GET'
+ formData: {
+ url: '/yunxiao/xswaybill',
+ method: 'GET'
},
// 鏌ョ湅杩涘害
- historicFlow:{
- url:'/oa/actTask/historicFlow',
- method:'GET'
+ historicFlow: {
+ url: '/oa/actTask/historicFlow',
+ method: 'GET'
},
// 寰呭姙閫氳繃
// getNextNode:{
@@ -168,23 +183,23 @@
// method:'GET'
// },
// 鎵归噺閫氳繃
- passAll:{
- url:'/oa/actTask/passAll',
- method:'POST'
+ passAll: {
+ url: '/oa/actTask/passAll',
+ method: 'POST'
},
// 鎵归噺椹冲洖
- backAll:{
- url:'/oa/actTask/backAll',
- method:"POST"
+ backAll: {
+ url: '/oa/actTask/backAll',
+ method: "POST"
},
- deleteHistoric:{
- url:'/oa/actTask/deleteHistoric',
- method:"POST"
+ deleteHistoric: {
+ url: '/oa/actTask/deleteHistoric',
+ method: "POST"
},
// 淇敼椹冲洖鐢宠淇℃伅
- editXswaybill:{
- url:'/yunxiao/xswaybill',
- method:'PUT'
+ editXswaybill: {
+ url: '/yunxiao/xswaybill',
+ method: 'PUT'
},
// 閫�鍑烘竻绌虹紦瀛�
// logout:{
@@ -193,9 +208,9 @@
// }
// 鐓や粨褰撳墠鍓╀綑閲�
- coalbunker:{
- url:'/yunxiao/coalbunker/page',
- method:'GET'
+ coalbunker: {
+ url: '/yunxiao/coalbunker/page',
+ method: 'GET'
}
}
diff --git a/utils/jihua.js b/utils/jihua.js
index 3082da2..1090277 100644
--- a/utils/jihua.js
+++ b/utils/jihua.js
@@ -13,6 +13,12 @@
url: '/yunxiao/xscarshippingdayplan/page',
method: 'GET'
},
+
+ // xscarshippingdayplan: {
+ // url: '/yunxiao/contractorder/page',
+ // method: 'GET'
+ // },
+
// /yunxiao/xscarshippingdayplan
addObj: {
url: '/yunxiao/xscarshippingdayplan',
diff --git a/utils/request.js b/utils/request.js
index d9517b4..3f3cdea 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -23,11 +23,11 @@
duration: 2000
});
setTimeout(() => {
- uni.clearStorageSync();
- // 閲嶅畾鍚戠櫥褰�
- uni.redirectTo({
- url: '/pages/login/login'
- })
+ uni.clearStorageSync();
+ // 閲嶅畾鍚戠櫥褰�
+ uni.redirectTo({
+ url: '/pages/login/login'
+ })
}, 2000);
return false;
}
@@ -84,14 +84,16 @@
// let BaseUrl = 'http://192.168.3.159:9999';
// const BaseUrl = 'https://mx.jzeg.cn:443/app';
-const BaseUrl = "https://mx.jzeg.cn:9998"; // 姝e紡鏈嶅姟
+// let BaseUrl = 'http://192.168.0.114:9999';
+
+const BaseUrl = "https://mx.jzeg.cn:9998"; // 姝e紡鏈嶅姟
// 璇锋眰鎷︽埅
-const fetch = (url, opt ,urlParam) => {
-
+const fetch = (url, opt, urlParam) => {
+
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 ? BaseUrl + urls + `/${urlParam}` + params : BaseUrl + urls + params
opt.method = opt.method || "GET";
var header = {}
@@ -100,7 +102,7 @@
"TENANT-ID": 5,
Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
VERSION: "zzl",
- Accept:'application/json, text/plain, */*' // 瀹㈡埛绔墍鑳芥帴鍙楃殑鏁版嵁绫诲瀷
+ // Accept: 'application/json, text/plain, */*' // 瀹㈡埛绔墍鑳芥帴鍙楃殑鏁版嵁绫诲瀷
}
}
diff --git a/utils/tool.js b/utils/tool.js
new file mode 100644
index 0000000..2b25c7f
--- /dev/null
+++ b/utils/tool.js
@@ -0,0 +1,36 @@
+/*鍑芥暟鑺傛祦
+ 鍑芥暟鑺傛祦鏄噺灏戝嚱鏁扮殑瑙﹀彂棰戠巼
+*/
+function throttle(fn, interval) {
+ var enterTime = 0;//瑙﹀彂鐨勬椂闂�
+ var gapTime = interval || 1000 ;//闂撮殧鏃堕棿锛屽鏋渋nterval涓嶄紶锛屽垯榛樿300ms
+ return function() {
+ var context = this;
+ var backTime = new Date();//绗竴娆″嚱鏁皉eturn鍗宠Е鍙戠殑鏃堕棿
+ if (backTime - enterTime > gapTime) {
+ fn.call(context,arguments);
+ enterTime = backTime;//璧嬪�肩粰绗竴娆¤Е鍙戠殑鏃堕棿锛岃繖鏍峰氨淇濆瓨浜嗙浜屾瑙﹀彂鐨勬椂闂�
+ }
+ };
+}
+
+/*鍑芥暟闃叉姈
+鍑芥暟闃叉姈鍒欐槸寤惰繜鍑芥暟鎵ц锛屽苟涓斾笉绠¤Е鍙戝灏戞閮藉彧鎵ц鏈�鍚庝竴娆�
+*/
+function debounce(fn, interval) {
+ var timer;
+ var gapTime = interval || 1000;//闂撮殧鏃堕棿锛屽鏋渋nterval涓嶄紶锛屽垯榛樿1000ms
+ return function() {
+ clearTimeout(timer);
+ var context = this;
+ var args = arguments;//淇濆瓨姝ゅ鐨刟rguments锛屽洜涓簊etTimeout鏄叏灞�鐨勶紝arguments涓嶆槸闃叉姈鍑芥暟闇�瑕佺殑銆�
+ timer = setTimeout(function() {
+ fn.call(context,args);
+ }, gapTime);
+ };
+}
+
+export default {
+ throttle,
+ debounce
+};
\ No newline at end of file
--
Gitblit v1.9.1