Browse Source

工具借用单

zhaoxiaohai 2 years ago
parent
commit
910b7d5720

+ 373 - 0
packageA/borrow/detail.js

@@ -0,0 +1,373 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        loading: true,
+        sa_orderid: null,
+        tabsActive: 0,
+        tabsList: [{
+            label: "借用工具明细",
+            icon: "icon-tabchanpin",
+            model: "#Product"
+        }, {
+            label: "附件",
+            icon: "icon-tabfujian1",
+            model: "#Yl_Attachment"
+        }, {
+            label: "订单进度",
+            icon: "icon-tabcaozuojilu1",
+            model: "#Progress"
+        }],
+
+    },
+    onLoad(options) {
+        this.setData({
+            sa_orderid: options.id
+        });
+        this.getDetail(true);
+    },
+    /* 获取详情 */
+    getDetail(init = false, show = true) {
+        _Http.basic({
+            "id": 20230114140402,
+            "content": {
+                nocache: true,
+                "sa_orderid": this.data.sa_orderid
+            }
+        }, show).then(res => {
+            console.log("订单详情", res)
+            if (res.msg != '成功') return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            });
+            this.setData({
+                detail: res.data,
+                loading: false
+            });
+            if (init) this.partialRenewal(true)
+        })
+    },
+    /* 选择收货人 */
+    selectConsignee() {
+        if (this.isEdit()) return;
+        wx.navigateTo({
+            url: `/select/address/index?params=${JSON.stringify({ 
+				"id":20221009155803,
+				"content": {
+					nocache:true,
+					sys_enterpriseid:this.data.detail.sys_enterpriseid,
+					"pageNumber": 1, 
+					"pageTotal": 1, 
+					"pageSize": 20,
+					"where": {
+						"condition": "",
+						workaddress:1
+						}, 
+				}
+			 })}&radio=true`,
+        });
+        getApp().globalData.handleSelect = this.setConsignee.bind(this);
+    },
+    /* 设置收货人 */
+    setConsignee({
+        item
+    }) {
+        let that = this;
+        console.log("设置收货人", item)
+        wx.showModal({
+            title: '提示',
+            content: `是否确认设置"${item.name}"为收货人?`,
+            complete: (res) => {
+                if (res.confirm) {
+                    let rec_contactsid = that.data.detail.rec_contactsid;
+                    that.setData({
+                        "detail.rec_contactsid": item.contactsid
+                    });
+                    that.changeDetail().then(s => {
+                        if (s.msg == '成功') {
+                            wx.showToast({
+                                title: '设置成功',
+                                icon: "none"
+                            });
+                            setTimeout(() => {
+                                wx.navigateBack();
+                                that.getDetail();
+                            }, 500)
+                        } else {
+                            that.setData({
+                                "detail.rec_contactsid": rec_contactsid
+                            });
+                        }
+                    })
+                }
+            }
+        })
+    },
+    /* 选择财务信息 */
+    selectFinance() {
+        if (this.isEdit()) return;
+        wx.navigateTo({
+            url: `/select/finance/index?params=${JSON.stringify({ 
+				"id":20221013160602,
+				"content": {
+					nocache:true,
+					sys_enterpriseid:this.data.detail.sys_enterpriseid,
+					"pageNumber": 1, 
+					"pageTotal": 1, 
+					"pageSize": 20,
+					"where": {
+						"condition": "",
+					}, 
+				}
+			 })}&radio=true`,
+        });
+        getApp().globalData.handleSelect = this.setFinance.bind(this);
+    },
+    /* 设置财务信息 */
+    setFinance({
+        item
+    }) {
+        let that = this;
+        console.log("设置财务信息", item)
+        wx.showModal({
+            title: '提示',
+            content: `是否确认设置"${item.enterprisename}"为开票单位?`,
+            complete: (res) => {
+                if (res.confirm) {
+                    let sys_enterprise_financeid = that.data.detail.sys_enterprise_financeid;
+                    that.setData({
+                        "detail.sys_enterprise_financeid": item.sys_enterprise_financeid
+                    });
+                    that.changeDetail().then(s => {
+                        if (s.msg == '成功') {
+                            wx.showToast({
+                                title: '设置成功',
+                                icon: "none"
+                            });
+                            setTimeout(() => {
+                                wx.navigateBack();
+                                that.getDetail();
+                            }, 500)
+                        } else {
+                            that.setData({
+                                "detail.sys_enterprise_financeid": sys_enterprise_financeid
+                            });
+                        }
+                    })
+                }
+            }
+        })
+    },
+    //tabs 切换
+    tabsChange({
+        detail
+    }) {
+        this.setData({
+            tabsActive: detail
+        });
+        this.partialRenewal();
+    },
+    //局部数据更新 tabs
+    partialRenewal(init = false) {
+        let model = this.data.tabsList[this.data.tabsActive].model;
+        if (model) {
+            let Component = this.selectComponent(model),
+                {
+                    total,
+                    pageNumber,
+                    pageTotal
+                } = Component.data.content,
+                id = this.data.detail.sa_orderid;
+            if (model == '#Product') id = {
+                id: this.data.detail.sa_orderid,
+                toolcount: this.data.detail.toolcount || ""
+            };
+            if (total == null || init) {
+                Component.getList(id, init);
+            } else if (pageNumber < pageTotal) {
+                Component.getList(id, false);
+            }
+        }
+    },
+    onReachBottom() {
+        this.partialRenewal();
+    },
+    /* 更新数据 */
+    changeDetail() {
+        let data = this.data.detail,
+            content = {
+                "sa_orderid": data.sa_orderid,
+                "sys_enterpriseid": data.sys_enterpriseid, //订货企业id
+                "sa_accountclassid": data.accountclass.sa_accountclassid || 0, //营销账户类型ID
+                "sa_brandid": data.sa_brandid, //品牌ID
+                "sys_enterprise_financeid": data.sys_enterprise_financeid || 0, //合作企业财务信息ID(开票信息)
+                "sa_logiscompid": data.logiscomp.sa_logiscompid, //物流公司档案ID
+                "rec_contactsid": data.rec_contactsid || 0, //合作企业联系人表ID(收货信息)
+                "type": data.type, //订单类型
+                "typemx": data.typemx, // 明细分类,可选
+                "remarks": data.remarks,
+                "saler_hrid": data.saler_hrid, //销售人员hrid,业务员hrid
+                "tradefield": data.tradefield, //必选
+                "pay_enterpriseid": data.pay_enterpriseid, //结算单位
+                "rebate_userate": data.accountclass.rebate_userate, //返利金使用比例
+                "rebate_used": data.rebate_used, //默认0,是否使用返利金
+                "billdate": data.billdate, //单据日期,默认创建日期
+            };
+        return new Promise((resolve, reject) => {
+            _Http.basic({
+                "id": 20230116092702,
+                content
+            }).then(res => {
+                console.log("修改订单数据", res);
+                if (res.msg != '成功') wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                });
+                resolve(res)
+            })
+        })
+    },
+    /* 修改订单备注 */
+    changeRemarks(e) {
+        let value = e.detail.value,
+            remarks = this.data.detail.remarks,
+            that = this;
+        if (value == this.data.detail.remarks) return;
+        wx.showModal({
+            title: '提示',
+            content: '是否确定修改订单备注?',
+            complete: async (res) => {
+                if (res.cancel) that.setData({
+                    "detail.remarks": remarks
+                })
+                if (res.confirm) {
+                    this.data.detail.remarks = value;
+                    let res = await that.changeDetail();
+                    that.setData({
+                        "detail.remarks": res.msg == '成功' ? value : remarks
+                    })
+                }
+            }
+        })
+    },
+    /* 删除订单 */
+    deleteItem() {
+        let that = this;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除订单?',
+            complete: (res) => {
+                if (res.confirm) _Http.basic({
+                    "id": 20230116100002,
+                    "content": {
+                        "sa_orderids": [
+                            that.data.sa_orderid
+                        ]
+                    }
+                }).then(s => {
+                    console.log("删除订单", s)
+                    if (s.msg != '成功') return wx.showToast({
+                        title: s.msg,
+                        icon: "none"
+                    });
+                    wx.showToast({
+                        title: `成功删除${that.data.detail.sonum}订单`,
+                        icon: "none"
+                    });
+                    setTimeout(() => {
+                        /*  let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/index');
+                         if (page) page.setData({
+                             list: page.data.list.filter(v => v.sa_orderid != that.data.sa_orderid),
+                             "content.total": page.data.content.total - 1,
+                             amount: (page.data.amount - that.data.detail.amount).toFixed(2)
+                         }); */
+                        wx.navigateBack()
+                    }, 500)
+                })
+            }
+        })
+    },
+    /* 提交订单 */
+    submit() {
+        let that = this;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认提交订单?',
+            complete: (res) => {
+                if (res.confirm) _Http.basic({
+                    "id": 20230114160002,
+                    "content": {
+                        sa_orderid: that.data.sa_orderid
+                    },
+                }).then(s => {
+                    console.log("提交订单", s)
+                    wx.showToast({
+                        title: s.msg != '成功' ? s.msg : '提交成功',
+                        icon: "none"
+                    });
+                    if (s.msg == '成功') that.setData({
+                        "detail.status": "提交"
+                    })
+                })
+            }
+        })
+    },
+    /* 确认订单交期 */
+    notarize() {
+        let that = this;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认交期?',
+            complete: (res) => {
+                if (res.confirm) _Http.basic({
+                    "id": 20230129154102,
+                    "content": {
+                        sa_orderid: that.data.sa_orderid
+                    },
+                }).then(s => {
+                    console.log("确认交期", s)
+                    wx.showToast({
+                        title: s.msg != '成功' ? s.msg : '确认成功',
+                        icon: "none"
+                    });
+                    if (s.msg == '成功') {
+                        that.setData({
+                            "detail.status": "交期确认"
+                        })
+                    }
+                })
+            }
+        })
+    },
+    /* 判断是否可以编辑 */
+    isEdit() {
+        if (this.data.detail.status != '新建') wx.showToast({
+            title: '当前订单状态不可设置!',
+            icon: "none"
+        });
+        return this.data.detail.status != '新建';
+    },
+    /* 设置项目订单品牌领域 */
+    setBraned() {
+        wx.navigateTo({
+            url: './modules/setBrand/index?id=' + this.data.sa_orderid,
+        })
+    },
+    onUnload() {
+        let page = getCurrentPages().find(v => v.__route__ == 'packageA/borrow/index');
+        let content = JSON.parse(JSON.stringify(page.data.content));
+        content.pageNumber = 1;
+        content.pageSize = page.data.list.length <= 20 ? page.data.list.length + 3 : page.data.list.length;
+        _Http.basic({
+            "id": 20230114105002,
+            content
+        }).then(res => {
+            console.log("更新借用单", res)
+            page.setData({
+                list: res.data,
+                "content.total": res.total,
+            })
+            /* amount: res.tips.amount || 0 */
+        })
+    },
+})

+ 7 - 0
packageA/borrow/detail.json

@@ -0,0 +1,7 @@
+{
+  "usingComponents": {
+    "Product": "./modules/product/index",
+    "Yl_Attachment": "/components/Yl_Attachment/index",
+    "Progress": "../orderForm/modules/progress/index"
+  }
+}

+ 167 - 0
packageA/borrow/detail.scss

@@ -0,0 +1,167 @@
+.intr {
+    position: relative;
+    width: 100vw;
+    box-sizing: border-box;
+    background-color: #fff;
+    padding: 20rpx 30rpx;
+
+    .num {
+        height: 40rpx;
+        line-height: 40rpx;
+        font-size: 32rpx;
+        font-family: PingFang SC-Bold, PingFang SC;
+        font-weight: bold;
+        color: #333333;
+    }
+
+    .tags {
+        margin-bottom: 15rpx;
+
+        text {
+            display: inline-block;
+            height: 40rpx;
+            line-height: 40rpx;
+            background: #E7EEFF;
+            border-radius: 20rpx;
+            padding: 0 15rpx;
+            font-size: 20rpx;
+            color: #fff;
+            margin-right: 10rpx;
+        }
+    }
+
+    .exp {
+        height: 34rpx;
+        line-height: 34rpx;
+        font-size: 26rpx;
+        margin-bottom: 8rpx;
+        color: #666;
+    }
+
+}
+
+.box {
+    width: 100vw;
+    padding: 20rpx 30rpx;
+    box-sizing: border-box;
+    background-color: #fff;
+    margin-top: 10rpx;
+
+    .row {
+        display: flex;
+        justify-content: space-between;
+        min-height: 60rpx;
+        align-items: center;
+
+        .label {
+            font-size: 28rpx;
+        }
+
+        checkbox {
+            width: 36rpx;
+            height: 36rpx;
+            margin-right: 6rpx;
+        }
+
+        checkbox .wx-checkbox-input {
+            width: 36rpx;
+            height: 36rpx;
+        }
+    }
+}
+
+/* 地址 */
+.location {
+    display: flex;
+    align-items: center;
+
+    .icon {
+        color: #FF9933;
+        font-size: 62rpx;
+        flex-shrink: 0;
+        margin-right: 10rpx;
+    }
+
+    .content {
+        flex: 1;
+
+        .name {
+            font-size: 30rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            font-weight: bold;
+
+            text {
+                font-size: 28rpx;
+                font-weight: 400;
+                margin-left: 20rpx;
+            }
+        }
+
+        .address {
+            font-size: 28rpx;
+            margin-top: 6rpx;
+            flex-shrink: 0;
+        }
+    }
+
+    .iconfont {
+        font-size: 40rpx;
+        margin-left: 20rpx;
+        color: #999;
+    }
+}
+
+/* 备注 */
+.remarks {
+    flex: 1;
+    margin-left: 30rpx;
+    border: 1rpx solid #ddd;
+    box-sizing: border-box;
+    padding-left: 15rpx;
+    color: #333;
+    font-size: 28rpx;
+}
+
+.placeholder {
+    font-size: 24rpx !important;
+}
+
+.footer {
+    display: flex;
+    justify-content: space-between;
+    padding: 0 30rpx;
+    position: fixed;
+    width: 100vw;
+    height: 130rpx;
+    background: #FFFFFF;
+    box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+    bottom: 0;
+    box-sizing: border-box;
+    z-index: 9999;
+    padding-top: 10rpx;
+
+    .count {
+        height: 90rpx;
+        line-height: 90rpx;
+        font-size: 32rpx;
+        font-weight: bold;
+        color: var(--error);
+    }
+
+    .but-box {
+        .but {
+            min-width: 156rpx;
+            height: 90rpx;
+            background: #3874F6;
+            border-radius: 8rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            font-weight: bold;
+            color: #FFFFFF;
+        }
+
+        .delete {
+            background: var(--warning);
+        }
+    }
+}

+ 77 - 0
packageA/borrow/detail.wxml

@@ -0,0 +1,77 @@
+<import src="detail.skeleton.wxml" />
+<template is="skeleton" wx:if="{{loading}}" />
+<view class="intr">
+    <view class="num">
+        {{detail.sonum}}
+    </view>
+    <view class="tags">
+        <text wx:if="{{detail.brandname}}" style="background-color: #0079FE;">{{detail.brandname}}</text>
+        <text wx:if="{{detail.tradefield}}" style="background-color: #4BD863;">{{detail.tradefield}}</text>
+    </view>
+    <view class="exp">订单类型:{{detail.type}}</view>
+    <view class="exp">单据日期:{{detail.billdate || '暂无'}}</view>
+    <view class="exp">订单状态:{{detail.status}}</view>
+    <view wx:if="{{detail.sa_contractid}}" class="exp">借用套数:{{detail.toolcount}}套</view>
+    <view class="exp">订单金额:{{detail.amount}}元</view>
+</view>
+<navigator url="#" class="box location" bindtap="selectConsignee">
+    <van-icon custom-class='icon' name="location" />
+    <view class="content">
+        <view class="name">
+            {{detail.contacts.name || '暂无'}}<text>{{detail.contacts.phonenumber}}</text>
+        </view>
+        <view class="address">
+            {{detail.contacts.address}}
+        </view>
+    </view>
+    <view class="iconfont icon-dibu-bianji" />
+</navigator>
+<navigator url="#" class="box location" bindtap="selectFinance">
+    <view class="content">
+        <view class="name">
+            开票单位
+        </view>
+        <view class="address">
+            {{detail.finance.enterprisename || '暂无'}}
+        </view>
+    </view>
+    <view class="iconfont icon-dibu-bianji" />
+</navigator>
+<!-- 合同信息 -->
+<view wx:if="{{detail.sa_contractid}}" url="#" class="box location">
+    <view class="content">
+        <view class="name">
+            合同单号:{{detail.contract.billno}}
+        </view>
+        <view class="address">
+            有效期:{{detail.contract.begdate}}-{{detail.contract.enddate}}
+        </view>
+    </view>
+</view>
+<view class="box" style="padding: 10rpx 30rpx;">
+    <view class="row">
+        <view class="label">订单备注</view>
+        <textarea disabled="{{detail.status!='新建'}}" bindtap="isEdit" class="remarks" placeholder-class='placeholder' bindblur="changeRemarks" value="{{detail.remarks}}" auto-height placeholder="订单备注" />
+    </view>
+    <navigator url="#" class="row" style="font-size: 0;">
+        <view class="label">是否需要回签单</view>
+        <checkbox disabled="{{detail.status!='新建'}}" bindtap="isEdit" checked="{{true}}" color='var(--assist)' />
+    </navigator>
+</view>
+<view style="height: 20rpx;" />
+<Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
+    <Product slot='借用工具明细' id='Product' disabled="{{detail.status!='新建'}}" isAdd='{{detail.sa_contractid}}' />
+    <Yl_Attachment slot='附件' id='Yl_Attachment' ownertable="sa_order" ownerid="{{detail.sa_orderid}}" disabled="{{detail.status!='新建'}}" />
+    <Progress slot='订单进度' id='Progress' />
+</Yl_FunTabs>
+<view style="height: 130rpx;" />
+<view class="footer">
+    <view class="count">
+        ¥{{detail.amount}}元
+    </view>
+    <view class="but-box">
+        <van-button custom-class='but delete' wx:if="{{detail.status=='新建'}}" bind:click="deleteItem">删除订单</van-button>
+        <van-button custom-class='but' wx:if="{{detail.status=='新建'}}" bind:click="submit">提交订单</van-button>
+        <van-button custom-class='but' wx:if="{{detail.status=='交期待确认'}}" bind:click="notarize">确认交期</van-button>
+    </view>
+</view>

+ 198 - 0
packageA/borrow/index.js

@@ -0,0 +1,198 @@
+const _Http = getApp().globalData.http;
+
+Page({
+	data: {
+		loading: true,
+		active: "新建",
+		"content": {
+			nocache: true,
+			"pageNumber": 1,
+			"pageTotal": 1,
+			"pageSize": 20,
+			"isManage": 0, //默认是1,表示管理端,0表示非管理端,根据用户类型自动区分业务员还是经销商
+			"isExport": 0,
+			total: 0,
+			"where": {
+				"condition": "",
+			},
+			sort: []
+		},
+		filter: [{
+			label: "品牌",
+			index: null,
+			showName: "brandname", //显示字段
+			valueKey: "brandname", //返回Key
+			selectKey: "brandname", //传参 代表选着字段 不传参返回整个选择对象
+			value: "", //选中值
+			list: []
+		}, {
+			label: "领域",
+			index: null,
+			showName: "tradefield", //显示字段
+			valueKey: "tradefield", //返回Key
+			selectKey: "tradefield", //传参 代表选着字段 不传参返回整个选择对象
+			value: "", //选中值
+			list: []
+		}],
+		createShow: false,
+		types: [{
+			name: "按(套)计算"
+		}, {
+			name: "按(个)计算"
+		}, ]
+	},
+	onLoad(options) {
+		this.getList(true)
+	},
+	/* 处理筛选 */
+	handleFilter({
+		detail
+	}) {
+		console.log(detail)
+	},
+	getList(init = false) {
+		if (init.detail != undefined) init = init.detail;
+		let content = this.data.content;
+		if (init) content.pageNumber = 1;
+		if (content.pageNumber > content.pageTotal) return;
+		content.where.status = this.data.active;
+		_Http.basic({
+			"id": 20230114105002,
+			"version": 1,
+			content
+		}).then(res => {
+			console.log("工具借用列表", res)
+			this.selectComponent('#ListBox').RefreshToComplete();
+			this.setData({
+				list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+				"content.pageNumber": res.pageNumber + 1,
+				"content.pageTotal": res.pageTotal,
+				"content.sort": res.sort,
+				"content.total": res.total,
+				loading: false
+			})
+		})
+	},
+	/* 去新增 */
+	openAction() {
+		this.setData({
+			createShow: true
+		})
+	},
+	createBor({
+		detail
+	}) {
+		this.onCancel();
+		if (detail.name == '按(套)计算') {
+			wx.navigateTo({
+				url: `/select/contract/index?params=${JSON.stringify({
+                    "id": 20230114092502,
+                    "content": {
+                        sys_enterpriseid:2,
+                        nocache: true,
+                        "pageNumber": 1,
+                        "pageTotal": 1,
+                        "total": null,
+                        "pageSize": 20,
+                        "where": {
+                            "condition": ""
+                        }
+                    }
+                })}&radio=false`
+			})
+			getApp().globalData.handleSelect = this.handleCreated.bind(this);
+		} else {
+			_Http.basic({
+				"id": 20230116092702,
+				"content": {
+					"sa_orderid": 0
+				}
+			}).then(res => {
+				console.log("按个", res)
+				if (res.msg != '成功') return wx.showToast({
+					title: res.msg,
+					icon: "none"
+				});
+				wx.navigateTo({
+					url: '/packageA/borrow/detail?id=' + res.data.sa_orderid,
+				})
+			})
+		}
+	},
+	handleCreated(e) {
+		wx.showModal({
+			title: '提示',
+			content: `是否确认选择“${e.item.billno}”创建借用单`,
+			complete: ({
+				confirm
+			}) => {
+				if (confirm) _Http.basic({
+					"id": 20230116092702,
+					"content": {
+						"sa_contractid": e.id[0],
+						"sa_orderid": 0
+					}
+				}).then(res => {
+					console.log("按套", res)
+					if (res.msg != '成功') return wx.showToast({
+						title: res.msg,
+						icon: "none"
+					});
+					_Http.basic({
+						"id": 20230116142602,
+						"content": {
+							"sa_orderid": res.data.sa_orderid,
+							"sys_enterpriseid": res.data.sys_enterpriseid,
+							"sa_contractid": e.id[0]
+						}
+					}, false).then(s => {
+                        console.log("复制合同商品",s)
+						wx.redirectTo({
+							url: '/packageA/borrow/detail?id=' + res.data.sa_orderid,
+						})
+					})
+				})
+			}
+		})
+	},
+	onCancel() {
+		this.setData({
+			createShow: false
+		})
+	},
+	/* 搜索 */
+	onSearch({
+		detail
+	}) {
+		this.setData({
+			"content.where.condition": detail
+		});
+		this.getList(true)
+	},
+	/* 切换tabs */
+	tabsChange(e) {
+		let status = "";
+		switch (e.detail.title) {
+				case '全部':
+						status = "";
+						break;
+				case '待确认':
+						status = "交期待确认";
+						break;
+				default:
+						status = e.detail.title
+						break;
+		}
+		this.setData({
+			active: status
+		});
+		this.getList(true);
+	},
+	onReady() {
+		this.setListHeight()
+	},
+	/* 设置页面高度 */
+	setListHeight() {
+		this.selectComponent("#ListBox").setHeight(".total", this);
+	},
+})

+ 5 - 0
packageA/borrow/index.json

@@ -0,0 +1,5 @@
+{
+    "usingComponents": {
+        "List": "./modules/list/index"
+    }
+}

+ 0 - 0
packageA/borrow/index.scss


+ 19 - 0
packageA/borrow/index.wxml

@@ -0,0 +1,19 @@
+<Yl_HeadNav styleType="1" sort='{{content.sort}}' placeholder='搜索' bindonSearch="onSearch" />
+<van-tabs active="{{ active }}" color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
+	<van-tab title="全部" />
+	<van-tab title="新建" />
+	<van-tab title="提交" />
+	<van-tab title="待确认" />
+	<van-tab title="交期确认" />
+	<van-tab title="审核" />
+	<van-tab title="关闭" />
+</van-tabs>
+<view class="total" style="height: 20rpx;" />
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<List list="{{list}}" />
+</Yl_ListBox>
+<!-- 新建浮动按钮 -->
+<Yl_FloatingButton bindtap="openAction" />
+<!-- 筛选条件 -->
+<Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />
+<van-action-sheet show="{{ createShow }}" actions="{{ types }}" cancel-text="取消" bind:select='createBor' bind:cancel='onCancel' bind:click-overlay='onCancel' />

+ 5 - 0
packageA/borrow/modules/list/index.js

@@ -0,0 +1,5 @@
+Component({
+    properties: {
+        list: Array
+    },
+})

+ 4 - 0
packageA/borrow/modules/list/index.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 64 - 0
packageA/borrow/modules/list/index.scss

@@ -0,0 +1,64 @@
+.item {
+    width: 100vw;
+    padding-left: 30rpx;
+    box-sizing: border-box;
+    margin-bottom: 20rpx;
+    background-color: #ffffff;
+
+    .top {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        height: 80rpx;
+        width: 100%;
+        border-bottom: 1rpx solid #ddd;
+        box-sizing: border-box;
+        padding-right: 30rpx;
+        font-size: 28rpx;
+    }
+
+    .content {
+        position: relative;
+
+        .num {
+            height: 40rpx;
+            line-height: 40rpx;
+            font-size: 28rpx;
+            color: #333333;
+            padding: 20rpx 0;
+        }
+
+        .exp {
+            height: 34rpx;
+            font-size: 24rpx;
+            margin-bottom: 8rpx;
+            color: #999999;
+        }
+
+        .amount {
+            position: absolute;
+            font-size: 28rpx;
+            color: #FF3B30;
+            bottom: 0;
+            right: 30rpx;
+        }
+    }
+
+    .bottom {
+        height: 72rpx;
+        line-height: 72rpx;
+        margin-top: 12rpx;
+        border-top: 1rpx solid #ddd;
+        box-sizing: border-box;
+        padding-right: 30rpx;
+        font-size: 24rpx;
+        color: #666666;
+    }
+}
+
+/* 文本行数限制 */
+.line-1 {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+}

+ 56 - 0
packageA/borrow/modules/list/index.wxml

@@ -0,0 +1,56 @@
+<navigator url="/packageA/borrow/detail?id={{item.sa_orderid}}" class="item" wx:for="{{list}}" wx:key="sonum">
+    <view class="top">
+        单据日期:{{item.billdate}}
+        <view style="color: {{set.color(item.status)}};">
+            {{item.status}}
+        </view>
+    </view>
+    <view class="content">
+        <view class="num">
+            单号:{{item.sonum}}
+        </view>
+        <view class="exp">
+            区域经理:{{item.name || ' --'}}
+        </view>
+        <view class="exp">
+            审核日期:{{item.checkdate || ' --'}}
+        </view>
+        <view class="exp">
+            合计数量:{{item.qty}}
+        </view>
+        <view class="amount">
+            合计:¥{{item.amount}}元
+        </view>
+    </view>
+
+    <view wx:if="{{item.contacts.length}}" class="bottom line-1">
+        <text style="margin-right: 10rpx;">{{item.contacts[0].name}}</text>
+        <text style="margin-right: 10rpx;">{{item.contacts[0].phonenumber}}</text>
+        <text style="margin-right: 10rpx;">{{item.contacts[0].address}}</text>
+    </view>
+    <view wx:else class="bottom">
+        暂无收货人
+    </view>
+</navigator>
+
+<Yl_Empty wx:if="{{list.length==0}}" />
+
+<wxs module="set">
+    module.exports = {
+        color: function (statu) {
+            var color = '#999999';
+            switch (statu) {
+                case "审核":
+                    color = '#FA8C16';
+                    break;
+                case "提交":
+                    color = '#52C41A';
+                    break;
+                case "新建":
+                    color = '#333333';
+                    break;
+            };
+            return color;
+        }
+    }
+</wxs>

+ 303 - 0
packageA/borrow/modules/product/index.js

@@ -0,0 +1,303 @@
+const _Http = getApp().globalData.http,
+    file = require("../../../../utils/FormatTheAttachment");
+let queue = [],
+    downCounter = null,
+    Counter = null;
+Component({
+    properties: {
+        disabled: Boolean, //禁用
+        isAdd: {
+            type: Boolean,
+            value: false
+        }
+    },
+    data: {
+        sa_orderid: 0,
+        "content": {
+            nocache: true,
+            "pageNumber": 1,
+            pageTotal: 1,
+            total: null
+        },
+        toolcount: 1
+    },
+    lifetimes: {
+        detached: function () {
+            if (downCounter) {
+                clearTimeout(downCounter);
+                this.changeItem(queue)
+            }
+        },
+    },
+    methods: {
+        /* 获取产品列表 */
+        getList(obj, init) {
+            let content = this.data.content;
+            content.sa_orderid = obj.id;
+            if (init) content.pageNumber = 1;
+            _Http.basic({
+                "id": "20230116104102",
+                content
+            }).then(res => {
+                console.log("工具借用列表", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                })
+                res.data = res.data.map(value => {
+                    if (value.attinfos.length != 0) {
+                        value.attinfos = file.fileList(value.attinfos)
+                        let image = value.attinfos.find(v => v.fileType == "image");
+                        value.cover = image ? image.cover : "";
+                    }
+                    value.amount = value.amount * obj.toolcount;
+                    value.qty = value.qty * obj.toolcount;
+                    return value;
+                })
+                let page = getCurrentPages().find(v => v.__route__ == 'packageA/borrow/detail').data.detail;
+                let base = {
+                    sa_orderid: page.sa_orderid,
+                    sys_enterpriseid: page.sys_enterpriseid,
+                    sa_contractid: page.sa_contractid,
+                    type: page.type,
+                };
+                this.setData({
+                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+                    "content.pageNumber": res.pageNumber + 1,
+                    "content.pageSize": res.pageSize,
+                    "content.pageTotal": res.pageTotal,
+                    "content.total": res.total,
+                    sa_orderid: obj.id,
+                    toolcount: obj.toolcount,
+                    base
+                })
+            })
+        },
+        /* 统一交期 */
+        dateChange(e) {
+            let that = this;
+            wx.showModal({
+                title: '提示',
+                content: `是否确定将当前产品列表交期统一设置为:${e.detail.value}`,
+                complete: (res) => {
+                    if (res.confirm) _Http.basic({
+                        "id": 20230104143802,
+                        "content": {
+                            "sa_orderid": that.data.sa_orderid,
+                            "needdate": e.detail.value
+                        }
+                    }).then(res => {
+                        console.log('统一设置交期', res)
+                        wx.showToast({
+                            title: res.msg == '成功' ? '设置成功' : res.msg,
+                            icon: "none"
+                        })
+                        if (res.msg == '成功') that.setData({
+                            list: that.data.list.map(v => {
+                                v.needdate = e.detail.value;
+                                return v
+                            })
+                        })
+                    })
+                }
+            })
+        },
+        /* 修改 */
+        changeProduct({
+            detail
+        }) {
+            let obj = detail,
+                index = this.data.list.findIndex(v => v.itemid == detail.itemid),
+                data = this.data.list[index],
+                calculatePrice = data.qty != obj.qty;
+            if (data.qty == obj.qty && data.remarks == obj.remarks && data.needdate == obj.needdate) return;
+            _Http.basic({
+                "id": 20230116101602,
+                "content": {
+                    ...this.data.base,
+                    "items": [detail]
+                }
+            }).then(res => {
+                console.log("产品修改", res)
+                if (res.msg != '成功') {
+                    wx.showToast({
+                        title: res.msg,
+                        icon: "none"
+                    });
+                    obj = data;
+                };
+                data = {
+                    ...data,
+                    ...obj
+                };
+                if (res.msg == '成功' && calculatePrice) {
+                    let page = getCurrentPages()[getCurrentPages().length - 1];
+                    if (page) {
+                        let amount = page.data.detail.amount - data.amount;
+                        data.amount = ((data.qty - 0) * (data.price - 0)).toFixed(2);
+                        amount = (amount + (data.amount - 0)).toFixed(2);
+                        page.setData({
+                            "detail.amount": amount - 0
+                        })
+                    }
+                }
+                this.setData({
+                    [`list[${index}]`]: data
+                })
+            })
+        },
+        /* 删除 */
+        deleteItem({
+            detail
+        }) {
+            let that = this;
+            wx.showModal({
+                title: '提示',
+                content: `是否确认删除“${detail.itemname}”?`,
+                complete: (res) => {
+                    if (res.confirm) _Http.basic({
+                        "id": 20230116103402,
+                        "content": {
+                            sa_orderid: detail.sa_orderid,
+                            "sa_orderitemsids": [
+                                detail.sa_orderitemsid
+                            ]
+                        }
+                    }).then(s => {
+                        if (s.msg != '成功') return wx.showToast({
+                            title: res.msg,
+                            icon: "none"
+                        });
+                        that.setData({
+                            list: that.data.list.filter(v => v.sa_orderitemsid != detail.sa_orderitemsid)
+                        });
+                        /* 更新金额 */
+                        let page = getCurrentPages()[getCurrentPages().length - 1];
+                        let amount = (page.data.detail.amount - detail.amount).toFixed(2);
+                        if (page) page.setData({
+                            "detail.amount": amount - 0
+                        })
+                    })
+                }
+            })
+        },
+        /* 去添加产品 */
+        addProduct() {
+            wx.navigateTo({
+                url: `/select/product/index?params=${JSON.stringify({
+					"id":20230116111602,
+					"content": {
+						nocache:true,
+						"sa_orderid": this.data.sa_orderid, //订单ID
+						"pageNumber": 1,
+						"pageTotal": 1,
+						"total": 0,
+						"pageSize": 20,
+						"where": {
+							"condition": ""
+						}
+					}
+				})}`
+            });
+            getApp().globalData.handleSelect = this.handleSelect.bind(this);
+        },
+        /* 处理新增产品 */
+        handleSelect(detail) {
+            let that = this;
+            wx.showModal({
+                title: '提示',
+                content: `是否确认添加${detail.result.length}件商品?`,
+                complete: (res) => {
+                    if (res.confirm) _Http.basic({
+                        "id": 20230116101602,
+                        "content": {
+                            ...that.data.base,
+                            "items": detail.list.map(v => {
+                                return {
+                                    sa_orderitemsid: 0,
+                                    "itemid": v.itemid, //商品ID
+                                    "qty": 1, //数量
+                                }
+                            })
+                        }
+                    }).then(s => {
+                        console.log('新增产品', s)
+                        wx.showToast({
+                            title: s.msg == '成功' ? '添加成功' : s.msg,
+                            icon: "none"
+                        });
+                        if (s.msg == '成功') setTimeout(() => {
+                            that.getList(that.data.sa_orderid, true);
+                            wx.navigateBack();
+                            that.updateThePrice();
+                        }, 300)
+                    })
+                }
+            });
+        },
+        /* 步进器数值改变 */
+        stepperChange(e) {
+            switch (e.type) {
+                case 'plus':
+                    this.data.toolcount += 1;
+                    break;
+                case 'minus':
+                    this.data.toolcount -= 1;
+                    break;
+                case 'blur':
+                    this.data.toolcount = e.detail.value;
+                    break;
+            }
+            console.log(this.data.toolcount)
+            this.setToolcount();
+        },
+        /* 设置总数 */
+        setToolcount() {
+            clearTimeout(Counter);
+            let page = getCurrentPages().find(v => v.__route__ == 'packageA/borrow/detail');
+            Counter = setTimeout(() => {
+                _Http.basic({
+                    "id": 20230116092702,
+                    "content": {
+                        "sa_orderid": this.data.sa_orderid,
+                        "sa_contractid": page.data.detail.sa_contractid,
+                        toolcount: this.data.toolcount
+                    }
+                }).then(res => {
+                    console.log("修改套数", res)
+                    console.log(page.data.detail.toolcount)
+                    if (res.msg != '成功') {
+                        wx.showToast({
+                            title: res.msg,
+                            icon: "none"
+                        });
+                        this.setData({
+                            toolcount: page.data.detail.toolcount
+                        })
+                    } else {
+                        page.getDetail(true);
+                    }
+                })
+            }, 300)
+        },
+        /* 使用接口更新总价 */
+        updateThePrice() {
+            _Http.basic({
+                "id": 20230105101102,
+                "content": {
+                    "sa_orderid": this.data.sa_orderid
+                },
+            }).then(res => {
+                console.log("获取列表总价", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: `产品总价更新失败`,
+                    icon: "none"
+                });
+                let page = getCurrentPages()[getCurrentPages().length - 1];
+                if (page) page.setData({
+                    "detail.amount": res.data.amount - 0
+                })
+            })
+        }
+    }
+})

+ 7 - 0
packageA/borrow/modules/product/index.json

@@ -0,0 +1,7 @@
+{
+    "component": true,
+    "usingComponents": {
+        "List": "./list/index",
+        "van-stepper": "@vant/weapp/stepper/index"
+    }
+}

+ 19 - 0
packageA/borrow/modules/product/index.scss

@@ -0,0 +1,19 @@
+@import "../../../../static/common-head.scss";
+
+.count {
+	font-size: 30rpx !important;
+}
+
+.stepper {
+	background-color: #F4F5F7 !important;
+	border: 0 !important;
+	width: 340rpx !important;
+
+	.ste {
+		margin: 0 10rpx;
+	}
+
+	.back{
+		background-color: #fff !important;
+	}
+}

+ 19 - 0
packageA/borrow/modules/product/index.wxml

@@ -0,0 +1,19 @@
+<view class="head">
+  <view class="count">工具列表</view>
+  <view class="expand">
+    <view wx:if="{{isAdd}}" class="but stepper">
+      借用
+      <van-stepper custom-class='ste' integer value="{{ toolcount }}" bind:blur="stepperChange" bind:plus="stepperChange" bind:minus="stepperChange" input-class='back' plus-class='back' minus-class='back' />套
+    </view>
+    <picker wx:if="{{!disabled && list.length!=0}}" mode="date" bindchange='dateChange'>
+      <navigator url="#" class="but">
+        <van-icon name="clock-o" />
+      </navigator>
+    </picker>
+    <navigator wx:if="{{!disabled && !isAdd}}" url="#" class="but" bindtap="addProduct">
+      <van-icon name="plus" />
+    </navigator>
+  </view>
+</view>
+
+<List list='{{list}}' disabled='{{disabled}}' isAdd='{{isAdd}}' bindchangeProduct='changeProduct' binddeleteItem="deleteItem" />

+ 63 - 0
packageA/borrow/modules/product/list/index.js

@@ -0,0 +1,63 @@
+Component({
+	properties: {
+		list: Array,
+		deleteItem: Function,
+		changeProduct: Function, //修改队列
+		disabled: Boolean,
+		isAdd: Boolean
+	},
+	options: {
+		addGlobalClass: true
+	},
+	methods: {
+		toProductDetail(e) {
+			const {
+				item
+			} = e.currentTarget.dataset;
+			console.log(item)
+			/* wx.navigateTo({
+				url: `/packageA/market/detail?id=${item.sa_itemgroupid}&itemno=${item.itemno}`,
+			}) */
+
+		},
+		onBlur(e) {
+			let {
+				data,
+				name
+			} = e.currentTarget.dataset;
+			this.triggerEvent("changeProduct", {
+				"sa_orderitemsid": data.sa_orderitemsid,
+				"itemid": data.itemid,
+				"qty": name == 'qty' ? e.detail.value : data.qty,
+				"remarks": name == 'remarks' ? e.detail.value : data.remarks,
+				needdate: data.needdate || "",
+				deliverydate: data.deliverydate || ""
+			})
+		},
+		changeDate(e) {
+			let {
+				data
+			} = e.currentTarget.dataset;
+			this.triggerEvent("changeProduct", {
+				"sa_orderitemsid": data.sa_orderitemsid,
+				"itemid": data.itemid,
+				"qty": data.qty,
+				"remarks": data.remarks,
+				needdate: e.detail.value || "",
+				deliverydate: data.deliverydate || ""
+			})
+		},
+		deleteProduct(e) {
+			let {
+				item
+			} = e.currentTarget.dataset;
+			this.triggerEvent("deleteItem", item)
+		},
+		isEdit() {
+			if (this.data.disabled) wx.showToast({
+				title: '当前状态不可编辑!',
+				icon: "none"
+			})
+		}
+	}
+})

+ 5 - 0
packageA/borrow/modules/product/list/index.json

@@ -0,0 +1,5 @@
+{
+    "component": true,
+    "usingComponents": {
+    }
+}

+ 168 - 0
packageA/borrow/modules/product/list/index.scss

@@ -0,0 +1,168 @@
+.product-item {
+  background-color: #fff;
+  box-sizing: border-box;
+  border-bottom: 1rpx solid #DDDDDD;
+  margin-bottom: 20rpx;
+
+  .product {
+    padding: 20rpx 30rpx;
+    box-sizing: border-box;
+
+    .mian {
+      position: relative;
+      display: flex;
+      width: 100%;
+      box-sizing: border-box;
+
+      .img {
+        flex-shrink: 0;
+        width: 112rpx;
+        height: 112rpx;
+        border-radius: 16rpx;
+        margin-right: 20rpx;
+        overflow: hidden;
+
+        .err {
+          display: flex;
+          width: 100%;
+          height: 100%;
+          align-items: center;
+          justify-content: center;
+          font-size: 22rpx;
+          border: 1px solid #ddd;
+          box-sizing: border-box;
+          color: #666;
+        }
+      }
+
+      .dec {
+        flex: 1;
+        width: 0;
+        min-height: 128rpx;
+        height: 100%;
+        font-size: 24rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+        color: #999999;
+
+        .title {
+          display: flex;
+          width: 90%;
+          height: 40rpx;
+          font-size: 28rpx;
+          font-weight: 600;
+          color: #333333;
+
+          .line-1 {
+            max-width: 380rpx;
+          }
+
+          .tag {
+            display: inline-block;
+            color: #fff;
+            background-color: #F80700;
+            padding: 0 20rpx;
+            margin-left: 20rpx;
+            border-radius: 20rpx;
+            font-weight: normal;
+            font-size: 22rpx;
+            line-height: 40rpx;
+          }
+        }
+
+        .subfield {
+          display: flex;
+          margin-top: 8rpx;
+          height: 34rpx;
+          line-height: 34rpx;
+
+          text {
+            display: inline-block;
+            width: 48%;
+          }
+        }
+
+        .price {
+          font-size: 30rpx;
+          color: #FF3B30;
+        }
+
+        .old-price {
+          font-size: 24rpx;
+          font-family: PingFang SC-Regular, PingFang SC;
+          color: #999999;
+          margin-left: 8rpx;
+          text-decoration-line: line-through;
+        }
+
+      }
+
+      .delete {
+        position: absolute;
+        width: 68rpx;
+        height: 68rpx;
+        line-height: 68rpx;
+        right: -30rpx;
+        top: -20rpx;
+        text-align: center;
+        font-size: 32rpx;
+        color: #999;
+      }
+    }
+  }
+
+  .bot {
+    width: 690rpx;
+    border-top: 1rpx solid #ddd;
+    margin: 0 auto;
+    padding-bottom: 20rpx;
+
+    .row {
+      display: flex;
+      width: 100%;
+      margin-top: 20rpx;
+
+      view {
+        display: flex;
+        height: 54rpx;
+        align-items: center;
+
+        .label {
+          width: 144rpx;
+          font-size: 24rpx;
+          font-family: PingFang SC-Regular, PingFang SC;
+          color: #666666;
+          text-align-last: justify;
+        }
+      }
+
+      .input {
+        height: 54rpx;
+        background: #FFFFFF;
+        border-radius: 8rpx;
+        border: 1rpx solid #CCCCCC;
+        font-size: 28rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+        color: #333333;
+        line-height: 44px;
+        text-align: center;
+      }
+
+      .money {
+        flex: 1;
+        display: flex;
+        justify-content: flex-end;
+        font-size: 24rpx;
+        font-family: PingFang SC-Medium, PingFang SC;
+        color: #666666;
+        margin-right: 20rpx;
+
+        text {
+          font-size: 28rpx;
+          color: #FF3B30;
+          font-weight: 600;
+        }
+      }
+
+    }
+  }
+}

+ 86 - 0
packageA/borrow/modules/product/list/index.wxml

@@ -0,0 +1,86 @@
+<view class="product-item" wx:for="{{list}}" wx:key="itemid">
+	<navigator class="product" url="#" data-item="{{item}}" bindtap="toProductDetail">
+		<view class="mian">
+			<view class="img" data-file="{{item.attinfos}}" catchtap="viewImage">
+				<van-image width="100%" height="100%" wx:if="{{item.cover}}" src="{{item.cover}}" use-loading-slot lazy-load>
+					<van-loading slot="loading" type="spinner" size="20" vertical />
+				</van-image>
+				<text wx:else class="err">暂无图片</text>
+			</view>
+			<view class="dec">
+				<view class="title">
+					<text class="line-1">{{item.itemname}}</text>
+					<text class="tag" wx:if="{{item.stockstatus}}">{{item.stockstatus}}</text>
+				</view>
+				<view class="subfield">
+					编号:{{item.itemno}}
+				</view>
+				<view class="subfield">
+					<text class="line-1" style="margin-right: 6rpx;">型号:{{item.model||' --'}}</text>
+					<text class="line-1">规格:{{item.spec||' --'}}</text>
+				</view>
+				<view class="subfield">
+					<text class="line-1" style="margin-right: 6rpx;">材质:{{item.material||' --'}}</text>
+					<text class="line-1">标准:{{item.standards||' --'}}</text>
+				</view>
+				<view class="subfield">
+					<text class="line-1" style="margin-right: 6rpx;">已发数量:{{item.deliedqty||' --'}}</text>
+					<text class="line-1" style="margin-right: 6rpx;">可退数量:{{item.returnqty||' --'}}</text>
+				</view>
+				<view style="margin-top: 8rpx;" wx:if="{{!isAdd}}">
+					<text class="price">¥{{item.price}}元</text>
+					<text class="old-price" wx:if="{{item.price<item.marketprice}}">¥{{item.marketprice}}元</text>
+				</view>
+				<view style="margin-top: 8rpx;" wx:else>
+					单套配置:{{item.qty +item.auxunit}}/{{item.price}}元
+				</view>
+			</view>
+			<view wx:if="{{!disabled && !isAdd}}" class="delete" data-item="{{item}}" catchtap="deleteProduct">
+				<text class="iconfont icon-guanlian-shanchu" />
+			</view>
+		</view>
+	</navigator>
+	<view class="bot">
+		<view class="row">
+			<view style="width: 100%;">
+				<view class="label">产品备注:</view>
+				<input disabled='{{disabled}}' bindtap="isEdit" class="input" style="flex: 1; text-align: left;padding-left: 10rpx;" type="text" placeholder="备注" value="{{item.remarks}}" data-name="remarks" data-data="{{item}}" bindblur="onBlur" />
+			</view>
+		</view>
+		<view class="row">
+			<view>
+				<view class="label">期望交期:</view>
+				<picker disabled='{{disabled}}' bindtap="isEdit" mode="date" data-data="{{item}}" bindchange='changeDate'>
+					<view class="input" style="width: 240rpx;display: flex;justify-content: center;">
+						<text wx:if="{{item.needdate }}">{{item.needdate}}</text>
+						<text wx:else style="color: #999;">期望交期</text>
+					</view>
+				</picker>
+			</view>
+			<view class="money">
+				回复交期:{{item.deliverydate || ' --'}}
+			</view>
+		</view>
+		<view class="row" wx:if="{{!isAdd}}">
+			<view>
+				<view class="label">数量<text wx:if="{{item.auxunit}}">({{item.auxunit}})</text>:</view>
+				<input disabled='{{disabled}}' bindtap="isEdit" class="input" style="width: 240rpx;" type="digit" value="{{item.qty}}" data-name="qty" data-data="{{item}}" bindblur="onBlur" />
+			</view>
+			<view class="money">
+				金额:<text>¥{{item.amount}}元</text>
+			</view>
+		</view>
+		<view class="row" wx:else>
+			<view style="font-size: 24rpx;color: #666666;">
+				借用数量:{{item.qty}}<text wx:if="{{item.auxunit}}">({{item.auxunit}})</text>
+			</view>
+			<view class="money">
+				总金额:<text>¥{{item.amount}}元</text>
+			</view>
+		</view>
+	</view>
+</view>
+<block wx:if="{{list.length==0}}">
+	<Yl_Empty />
+	<view style="height: 150rpx;" />
+</block>