浏览代码

历史对账单

chenrui 2 年之前
父节点
当前提交
21cc2b9377
共有 8 个文件被更改,包括 318 次插入120 次删除
  1. 19 1
      api/user.js
  2. 35 0
      api/verify.js
  3. 1 1
      config/index.js
  4. 7 0
      pages.json
  5. 6 1
      pages/sales/billHistory.vue
  6. 173 33
      pages/sales/billHistoryDetail.vue
  7. 74 81
      pages/sales/billHistoryEdit.vue
  8. 3 3
      pages/sales/billListComponent.vue

+ 19 - 1
api/user.js

@@ -177,4 +177,22 @@ export const getUserInfo = params => {
     url: `user/userInfo`,
     url: `user/userInfo`,
     method: 'get'
     method: 'get'
   })
   })
-}
+}
+// 查询结算账户功能状态
+export const queryFunctionState = params => {
+  return axios.request({
+    url: `settleAccount/queryFunctionState`,
+    method: 'get'
+  })
+}
+//结算账户列表
+export const settleAccountList = (params) => {
+  const url = `settleAccount/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 35 - 0
api/verify.js

@@ -52,4 +52,39 @@ export const findBySn = (params) => {
     data: params,
     data: params,
     method: 'post'
     method: 'post'
   })
   })
+}
+
+//刷新历史对账单详情列表
+export const flushBill = (params) => {
+  return axios.request({
+    url: `verify/flushBill`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//批量删除历史对账单详情列表
+export const deleteDetails = (params) => {
+  return axios.request({
+    url: `verify/deleteDetails`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//校验确认收款弹窗
+export const settleVerify = (params) => {
+  return axios.request({
+    url: `verify/settleVerify`,
+    data: params,
+    method: 'post'
+  })
+}
+//确认收款
+export const settle = (params) => {
+  return axios.request({
+    url: `verify/settle`,
+    data: params,
+    method: 'post'
+  })
 }
 }

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.2.111:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.2.117:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{
 			loadText:{

+ 7 - 0
pages.json

@@ -393,6 +393,13 @@
 				"navigationBarTextStyle": "black"
 				"navigationBarTextStyle": "black"
 			}
 			}
 		},
 		},
+		{
+			"path": "pages/sales/billHistoryEdit", 
+			"style": {
+				"navigationBarTitleText": "对账单详情",
+				"navigationBarTextStyle": "black"
+			}
+		},
 		{
 		{
 			"path": "pages/sales/salesDetail", 
 			"path": "pages/sales/salesDetail", 
 			"style": {
 			"style": {

+ 6 - 1
pages/sales/billHistory.vue

@@ -54,14 +54,17 @@ export default {
 			tabsList: [
 			tabsList: [
 				{
 				{
 					id: 1,
 					id: 1,
+					billStatus:'',
 					name: '全部'
 					name: '全部'
 				},
 				},
 				{
 				{
 					id: 2,
 					id: 2,
+					billStatus:'UNSETTLE',
 					name: '未付款'
 					name: '未付款'
 				},
 				},
 				{
 				{
 					id: 3,
 					id: 3,
+					billStatus:'SETTLED',
 					name: '已结清'
 					name: '已结清'
 				}
 				}
 			],
 			],
@@ -84,6 +87,8 @@ export default {
 	methods: {
 	methods: {
 		change(index) {
 		change(index) {
 			this.current = index;
 			this.current = index;
+			 this.pageNo = 1
+			this.getList()
 		},
 		},
 		jumpPage(url) {
 		jumpPage(url) {
 			uni.navigateTo({
 			uni.navigateTo({
@@ -91,7 +96,7 @@ export default {
 			});
 			});
 		},
 		},
 		getList() {
 		getList() {
-			let params = { targetSn: this.targetSn, pageNo: this.pageNo, pageSize: this.pageSize };
+			let params = { targetSn: this.targetSn,billStatus:this.tabsList[this.current].billStatus, pageNo: this.pageNo, pageSize: this.pageSize };
 			this.status = 'loading';
 			this.status = 'loading';
 			queryPage(params).then(res => {
 			queryPage(params).then(res => {
 				if (res.status == 200) {
 				if (res.status == 200) {

+ 173 - 33
pages/sales/billHistoryDetail.vue

@@ -68,24 +68,31 @@
 			<view class="slot-content">
 			<view class="slot-content">
 				<view style="padding:50rpx 40rpx 20rpx;">
 				<view style="padding:50rpx 40rpx 20rpx;">
 					<u-form :model="form" ref="uForm" :label-width="150" :rules="rules" :label-style="{color:'#999'}">
 					<u-form :model="form" ref="uForm" :label-width="150" :rules="rules" :label-style="{color:'#999'}">
-						<u-form-item :border-bottom ="false" label="总单数:" prop="num">23</u-form-item>
-						<u-form-item :border-bottom ="false" label="结算方式:" prop="settleType">
-							<u-input type="text" placeholder="请选择结算方式" :disabled="true" :height="60"  v-model="form.settleType" @click="settleShow = true"/>
+						<u-form-item :border-bottom ="false" label="总单数:" prop="num" v-if="billArr">{{billArr.length}}</u-form-item>
+						<u-form-item :border-bottom ="false" label="结算方式:" prop="settleTypeName">
+							<u-input type="text" placeholder="请选择结算方式" :disabled="true" :height="60"  v-model="form.settleTypeName" @click="settleShow = true"/>
 							<u-icon :name="settleShow?'arrow-right':'arrow-down'" color="#e0e0e0" size="26"></u-icon>
 							<u-icon :name="settleShow?'arrow-right':'arrow-down'" color="#e0e0e0" size="26"></u-icon>
 						</u-form-item>
 						</u-form-item>
-						<u-form-item :border-bottom ="false" label="待收金额:" prop="num">¥23</u-form-item>
-						<u-form-item :border-bottom ="false" label="折让金额:" prop="money"><u-input type="number" placeholder="请输入实际收款金额(最多2位小数)" :border="true" :height="60"  v-model="form.money"/></u-form-item>
+						<u-form-item v-if="enableFundAccount" :border-bottom ="false" label="结算账户:" prop="settleAccountName">
+							<u-input type="text" placeholder="请选择结算账户" :disabled="true" :height="60"  v-model="form.settleAccountName" @click="openSettleAccount"/>
+							<u-icon :name="settleAccount?'arrow-right':'arrow-down'" color="#e0e0e0" size="26"></u-icon>
+						</u-form-item>
+						<u-form-item :border-bottom ="false" label="待收金额:" prop="num">¥{{ billInfo.totalAmount ||billInfo.totalAmount == 0 ? toThousands(billInfo.totalAmount,2):'--' }}</u-form-item>
+						<u-form-item :border-bottom ="false" label="折让金额:" prop="discountAmount"><u-input type="number" placeholder="请输入实际收款金额(最多2位小数)" :border="true" :height="60"  v-model="form.discountAmount"/></u-form-item>
 					</u-form>
 					</u-form>
 				</view>
 				</view>
 				<view class="costText">折让后金额</view>
 				<view class="costText">折让后金额</view>
-				<view class="costText1">¥520</view>
+				<view class="costText1">¥{{settlement<0?0:settlement}}</view>
 				<view class="paymentFooter flex algin-center">
 				<view class="paymentFooter flex algin-center">
-					<view @click="showPayment = false">取消</view>
+					<view @click="closePopup">取消</view>
 					<view @click="handlePay">确定</view>
 					<view @click="handlePay">确定</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</u-popup>
 		</u-popup>
-		<u-select v-model="settleShow" :list="settleList" @confirm="confirmSettle"></u-select>
+		<!-- 提示弹窗 -->
+		<u-modal v-model="showModal" confirm-text="知道了" :content="modalContent" :show-title="false"></u-modal>
+		<u-picker mode="selector" v-model="settleShow" @confirm="confirmSettle" :default-selector="[0]"  :range="settleList" range-key="dispName"></u-picker>
+		<u-picker mode="selector" v-model="settleAccount" @confirm="confirmSettleAccount" :default-selector="[0]"  :range="accountList" range-key="name"></u-picker>
 		<!-- 分享询问弹窗 -->
 		<!-- 分享询问弹窗 -->
 		<u-modal v-model="shareShow" :show-cancel-button="true" :content="shareContent" @confirm="handleShare" @cancel="shareShow = false;btnLoading = false;"></u-modal>
 		<u-modal v-model="shareShow" :show-cancel-button="true" :content="shareContent" @confirm="handleShare" @cancel="shareShow = false;btnLoading = false;"></u-modal>
 	</view>
 	</view>
@@ -93,9 +100,11 @@
 
 
 <script>
 <script>
 import billList from './billListComponent.vue';
 import billList from './billListComponent.vue';
-import { findBySn, insert } from '@/api/verify.js';
+import { findBySn, insert,settleVerify,settle } from '@/api/verify.js';
 import getDate from '@/libs/getDate.js';
 import getDate from '@/libs/getDate.js';
 import { toThousands } from '@/libs/tools.js'
 import { toThousands } from '@/libs/tools.js'
+import { getLookUpDatas } from '@/api/data';
+import { queryFunctionState,settleAccountList } from '@/api/user';
 export default {
 export default {
 	components: { billList },
 	components: { billList },
 	data() {
 	data() {
@@ -116,28 +125,35 @@ export default {
 			toThousands,
 			toThousands,
 			showPayment:false,
 			showPayment:false,
 			form:{
 			form:{
-				money:'',
-				settleType:''
+				receiptAmount:0,
+				discountAmount:undefined,
+				settleType:'',
+				settleTypeName:'',
+				settleAccountSn:'',
+				settleAccountName:''
 			},
 			},
-			settleList:[
-				{
-										value: '1',
-										label: '江'
-									},
-									{
-										value: '2',
-										label: '湖'
-									}
-			],
+			settleList:[],
 			rules: {
 			rules: {
-				money: [
+				settleTypeName: [
+					{ 
+						required: true, 
+						message: '请选择结算方式', 
+						trigger: 'change',
+					}
+				],
+				settleAccountName:[
 					{ 
 					{ 
 						required: true, 
 						required: true, 
-						message: '请输入实际收款金额', 
-						trigger: ['change','blur'],
+						message: '请选择结算账户', 
+						trigger: 'change',
 					}
 					}
 				]
 				]
-			}
+			},
+			showModal:false,
+			modalContent:'',
+			enableFundAccount:false,
+			accountList:[],//结算账户列表
+			settleAccount:false
 		};
 		};
 	},
 	},
 	onReady() {
 	onReady() {
@@ -156,6 +172,15 @@ export default {
 		//经销商信息
 		//经销商信息
 		userData() {
 		userData() {
 			return this.$store.state.vuex_userData;
 			return this.$store.state.vuex_userData;
+		},
+		settlement() {
+			let totalPrice=this.billInfo.totalAmount?this.billInfo.totalAmount:0;
+			let discountPrice=this.form.discountAmount?this.form.discountAmount:0
+			let priceNum=totalPrice - discountPrice;
+			const ret = priceNum.toFixed(2)
+			let endPay=Number(totalPrice)>=Number(discountPrice) ? ret : 0
+			this.form.receiptAmount = endPay
+			return endPay
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
@@ -173,26 +198,141 @@ export default {
 				}
 				}
 			});
 			});
 		},
 		},
+		// 关闭弹窗
+		closePopup(){
+			this.form={
+				receiptAmount:0,
+				discountAmount:undefined,
+				settleType:'',
+				settleTypeName:'',
+				settleAccountSn:'',
+				settleAccountName:''
+			}
+			this.showPayment = false
+		},
 		// 打开确认收款弹窗
 		// 打开确认收款弹窗
 		openPaymentModal(){
 		openPaymentModal(){
-			this.showPayment = true
-			this.$nextTick(()=>{
-				this.$refs.uForm.setRules(this.rules);
-			})
+			let _this=this
+			// 校验弹窗是否需要打开
+			settleVerify({ verifySn: _this.verifySn}).then(res => {
+				if (res.status == 200) {
+					if(!res.data.falg){
+						_this.modalContent = res.data.message
+						_this.$nextTick(()=>{
+							_this.showModal = true
+						})
+					}else{
+						// 判断是否显示结算类型
+						queryFunctionState().then(res => {
+						  if (res.status == 200) {
+						    _this.enableFundAccount = res.data.functionEnableFlag == 1
+						  }
+						})
+						// if(this.$hasPermissions('M_fundAccountList')&&this.$hasPermissions('B_fundAccountEnable')){
+						// 	queryFunctionState().then(res => {
+						// 	  if (res.status == 200) {
+						// 	    _this.enableFundAccount = res.data.functionEnableFlag == 1
+						// 	  }
+						// 	})
+						// }
+						_this.getPayType();
+						_this.showPayment = true
+						_this.$nextTick(()=>{
+							_this.$refs.uForm.setRules(_this.rules);
+						})
+					}
+				}
+			});
 		},
 		},
-		//结算方式
+		//获取结算类型列表
+		getPayType(){
+			getLookUpDatas({
+				lookupCode: 'SETTLE_STYLE',
+				pageNo: 1,
+				pageSize: 1000
+			}).then(result => {
+				if (result && result.status == 200) {
+					this.settleList = result.data.list;
+				}
+			});
+		},
+		//获取结算账户
+		getPayAccount(typeCode){
+			settleAccountList({settleStyleSn: typeCode,pageNo:1,pageSize:500,state:'ENABLE'}).then(result => {
+				if (result && result.status == 200) {
+					 result.data.list.forEach(item=>{
+						 item.name = item.accountName+'-'+item.accountNo
+					 })
+					this.accountList = result.data.list;
+				}
+			});
+		},
+		//结算类型 确定
 		confirmSettle(e){
 		confirmSettle(e){
-			this.form.settleType = e[0].label
+			let pos=e[0]
+			this.form.settleType = this.settleList[pos].code
+			this.form.settleTypeName = this.settleList[pos].dispName
+			if(this.enableFundAccount){
+				this.form.settleAccountSn=''
+				this.form.settleAccountName=''
+				this.getPayAccount(this.settleList[pos].code)
+			}
 		},
 		},
 		submitOrder() {
 		submitOrder() {
 			//发送对账单
 			//发送对账单
 			this.shareShow = true;
 			this.shareShow = true;
 		},
 		},
+		//结算账户弹窗
+		openSettleAccount(){
+			if(!this.form.settleTypeName){
+				uni.showToast({
+					title:'请先选择结算类型',
+					icon:'none'
+				})
+				return
+			}
+			this.settleAccount = true
+		},
+		//结算账户 确定
+		confirmSettleAccount(e){
+			let pos=e[0]
+			this.form.settleAccountSn=this.accountList[pos].settleAccountSn
+			this.form.settleAccountName=this.accountList[pos].name
+		},
 		//确认收款
 		//确认收款
 		handlePay(){
 		handlePay(){
-			this.$refs.uForm.validate(valid => {
+			let _this=this
+			_this.$refs.uForm.validate(valid => {
 				if (valid) {
 				if (valid) {
-					console.log('验证通过');
+					let totalPrice=this.billInfo.totalAmount?this.billInfo.totalAmount:0;
+					let discountPrice=this.form.discountAmount?this.form.discountAmount:0
+					if (discountPrice > totalPrice) {
+						uni.showToast({
+							title: '折让金额不能大于待收金额,请重新输入',
+							icon: 'none'
+						});
+						return;
+					}
+					let reg = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;
+					if(discountPrice && discountPrice!=0){
+						if (!reg.test(discountPrice)) {
+							uni.showToast({
+								title: '折让金额格式不正确,请重新输入',
+								icon: 'none'
+							});
+							return;
+						}
+					}
+					let ajaxData=JSON.stringify(_this.form)
+					let newAjaxData = JSON.parse(ajaxData)
+					newAjaxData.verifySn = _this.verifySn
+					delete newAjaxData.settleAccountName
+					settle(newAjaxData).then(result => {
+						if (result && result.status == 200) {
+							_this.closePopup()
+							_this.loadData({ verifySn: _this.verifySn });
+						}
+					});
 				} else {
 				} else {
 					console.log('验证失败');
 					console.log('验证失败');
 				}
 				}

+ 74 - 81
pages/sales/billHistoryEdit.vue

@@ -51,38 +51,22 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="detail_con"><billList ref="billBox" :list="billArr" :showCheck="isShowEdit" @allChecked="chooseBillList"></billList></view>
 		<view class="detail_con"><billList ref="billBox" :list="billArr" :showCheck="isShowEdit" @allChecked="chooseBillList"></billList></view>
-		<view class="footer flex align_center" v-if="billInfo.billStatus == 'UNSETTLE'">
+		<view class="footer flex align_center" v-if="billInfo.billStatus == 'UNSETTLE' && billArr&&billArr.length!=0">
 			<u-checkbox-group style="flex:1;">
 			<u-checkbox-group style="flex:1;">
 				<u-checkbox v-model="checkedAll" shape="circle" @change="chooseAll">{{checkedAll?'取消全选':'全选'}}</u-checkbox>
 				<u-checkbox v-model="checkedAll" shape="circle" @change="chooseAll">{{checkedAll?'取消全选':'全选'}}</u-checkbox>
 			</u-checkbox-group>
 			</u-checkbox-group>
 			<view class="u-flex u-row-right">
 			<view class="u-flex u-row-right">
-				<u-button type="error" shape="circle" :loading="btnLoading" @click="submitOrder" :custom-style="customStyle">删除</u-button>
-				<u-button type="warning" shape="circle" style="margin-left: 30rpx;" @click="openPaymentModal">一键刷新</u-button>	
+				<u-button type="error" shape="circle" :loading="btnLoading" @click="handleEvents('del')" :custom-style="customStyle">删除</u-button>
+				<u-button type="warning" shape="circle" style="margin-left: 30rpx;" @click="handleEvents('update')">一键刷新</u-button>	
 			</view>
 			</view>
 		</view>
 		</view>
-		<!-- 确认收款弹窗 -->
-		<u-popup v-model="showPayment" mode="center" :border-radius="20" width="82%">
-			<view class="slot-content">
-				<view style="padding:50rpx 40rpx;">
-					<u-form :model="form" ref="uForm" :label-width="190" :rules="rules" :label-style="{color:'#999'}">
-						<u-form-item :border-bottom ="false" label="总单数:" prop="num">23</u-form-item>
-						<u-form-item :border-bottom ="false" label="实际收款金额:" prop="money"><u-input type="number" placeholder="请输入实际收款金额(最多2位小数)" :border="true" :height="60"  v-model="form.money"/></u-form-item>
-					</u-form>
-				</view>
-				<view class="paymentFooter flex algin-center">
-					<view @click="showPayment = false">取消</view>
-					<view >确定</view>
-				</view>
-			</view>
-		</u-popup>
-		<!-- 分享询问弹窗 -->
-		<u-modal v-model="shareShow" :show-cancel-button="true" :content="shareContent" @confirm="handleShare" @cancel="shareShow = false;btnLoading = false;"></u-modal>
+		<u-modal v-model="modalShow" :show-title="false" :content="modalCon" :show-cancel-button="true" @confirm="handleConfirm"></u-modal>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
 import billList from './billListComponent.vue';
 import billList from './billListComponent.vue';
-import { findBySn, insert } from '@/api/verify.js';
+import { findBySn, insert,flushBill,deleteDetails } from '@/api/verify.js';
 import getDate from '@/libs/getDate.js';
 import getDate from '@/libs/getDate.js';
 import { toThousands } from '@/libs/tools.js'
 import { toThousands } from '@/libs/tools.js'
 export default {
 export default {
@@ -102,7 +86,6 @@ export default {
 			isShowEdit:true,//删除
 			isShowEdit:true,//删除
 			shareContent: `是否同意发送对账单给微信好友?`,
 			shareContent: `是否同意发送对账单给微信好友?`,
 			toThousands,
 			toThousands,
-			showPayment:false,
 			form:{
 			form:{
 				money:''
 				money:''
 			},
 			},
@@ -115,7 +98,11 @@ export default {
 						trigger: ['change','blur'],
 						trigger: ['change','blur'],
 					}
 					}
 				]
 				]
-			}
+			},
+			orderList:[],
+			modalShow:false,
+			modalCon:'刷新后,将删除对账单中已收款的订单,更新待收款单据。确定刷新吗?',
+			eventsType:'' //打开弹窗类型 del删除  update更新
 		};
 		};
 	},
 	},
 	onReady() {
 	onReady() {
@@ -130,6 +117,12 @@ export default {
 			this.loadData({ verifySn: options.billId });
 			this.loadData({ verifySn: options.billId });
 		}
 		}
 	},
 	},
+	onBackPress(e){
+		uni.redirectTo({
+			url: '/pages/sales/billHistoryDetail?billId=' + this.verifySn
+		})
+		return true;
+	},
 	computed: {
 	computed: {
 		//经销商信息
 		//经销商信息
 		userData() {
 		userData() {
@@ -137,6 +130,64 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		//一键刷新
+		handleUpdate(){
+			flushBill({verifySn:this.verifySn}).then(res => {
+				if (res.status == 200) {
+					this.loadData({ verifySn: this.verifySn })
+				}
+			});
+		},
+		//删除
+		deleteOrder(){
+			let that=this
+			deleteDetails({verifySn:that.verifySn,detailSnList:that.orderList}).then(res => {
+				if (res.status == 200) {
+					uni.showToast({
+						title:res.message,
+						duration: 2000
+					})
+					that.loadData({ verifySn: that.verifySn });
+				}
+			});
+		},
+		handleEvents(type){
+			this.eventsType=type
+			if(type == 'del'){
+				let allList=this.$refs.billBox.getAllData();
+				let newChooseList = []
+				let num = 0
+				allList.forEach(item=>{
+					if(item.checked){
+						newChooseList.push(item.detailSn)
+						num+=item.unsettleAmount
+					}
+				})
+				if(newChooseList.length == 0){
+					uni.showToast({
+						title:'请先选择要删除的对账单',
+						icon:'none'
+					})
+					return
+				}
+				this.orderList=newChooseList
+				let newNum=toThousands(num,2)
+				
+				this.modalCon = '选中'+newChooseList.length+'项,待收金额¥'+newNum+',确认删除吗?'
+			}
+			let that=this
+			that.$nextTick(()=>{
+				that.modalShow = true
+			})
+		},
+		//确定提交删除、刷新
+		handleConfirm(){
+			if(this.eventsType=='del'){
+				this.deleteOrder();
+			}else{
+				this.handleUpdate();
+			}
+		},
 		chooseBillList(flag){
 		chooseBillList(flag){
 			this.checkedAll = flag
 			this.checkedAll = flag
 		},
 		},
@@ -156,64 +207,6 @@ export default {
 					});
 					});
 				}
 				}
 			});
 			});
-		},
-		// 打开确认收款弹窗
-		openPaymentModal(){
-			this.showPayment = true
-			this.$nextTick(()=>{
-				this.$refs.uForm.setRules(this.rules);
-			})
-		},
-		submitOrder() {
-			//发送对账单
-			this.shareShow = true;
-		},
-		//确认收款
-		handlePay(){
-			this.$refs.uForm.validate(valid => {
-				if (valid) {
-					console.log('验证通过');
-				} else {
-					console.log('验证失败');
-				}
-			});
-		},
-		handleEdit(){
-			this.isShowEdit=!this.isShowEdit
-			this.$refs.billBox.allSelect(true)
-		},
-		// 分享图文
-		handleShare() {
-			let jumpUrl = getApp().globalData.baseUrl.replace('qpls-md/','')
-			let url = jumpUrl+'dzd/index.html?' + this.userData.orgSn + '&' + this.verifySn;
-			if (uni.getSystemInfoSync().platform == 'ios') {
-				uni.share({
-					provider: 'weixin',
-					scene: 'WXSceneSession',
-					type: 0,
-					href: url,
-					title: this.billInfo.customer.customerName + '的对账单',
-					summary: '共' + this.billInfo.settleAmount + '元,请您查阅',
-					imageUrl: '../../static/logo.png',
-					success: function(res) {
-						console.log('success:' + JSON.stringify(res));
-					},
-					fail: function(err) {
-						console.log('fail:' + JSON.stringify(err));
-					}
-				});
-			} else {
-				uni.shareWithSystem({
-					summary: this.billInfo.customer.customerName + '您好,您有一个对账单共' + this.billInfo.settleAmount + '元,请您查阅',
-					href: url,
-					success() {
-						console.log('调取微信列表成功,分享不一定成功');
-					},
-					fail() {
-						console.log('分享失败');
-					}
-				});
-			}
 		}
 		}
 	}
 	}
 };
 };

+ 3 - 3
pages/sales/billListComponent.vue

@@ -22,8 +22,8 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<view v-if="listData&&listData.length==0" @click="jumpPage('/pages/test')">
-			<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+		<view v-if="listData&&listData.length==0" @click="jumpPage('/pages/test')" style="padding-top:100rpx;">
+			<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list"></u-empty>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -52,7 +52,7 @@ export default {
 	},
 	},
 	methods: {
 	methods: {
 		setData(list){
 		setData(list){
-			this.listData = list
+			this.listData = list?list:[]
 		},
 		},
 		checkChange(e){
 		checkChange(e){
 			const row = this.listData.find(item => item.bizSn == e.name)
 			const row = this.listData.find(item => item.bizSn == e.name)