Browse Source

Merge branch 'develop' of http://124.70.211.186:3000/zxh/E_WeChat into develop

codeMan 3 years ago
parent
commit
c7026577b1

+ 0 - 1
app.js

@@ -26,7 +26,6 @@ App({
         })
     },
     globalData: {
-        userrole: null, //角色身份
         http: new ApiModel(), //接口文件
         queryPer: require("./utils/queryPermissions"), //权限查询
         handleSelect: null, //处理选择结果  函数

+ 0 - 1
app.json

@@ -3,7 +3,6 @@
     "pages/login/phone",
     "pages/login/selectSite",
     "pages/login/retrievePassword",
-    "pages/base/index",
     "pages/tabbar/home/index",
     "pages/tabbar/mine/index",
     "pages/tabbar/message/index",

+ 65 - 2
packageA/invoice/detail.js

@@ -1,6 +1,7 @@
 const _Http = getApp().globalData.http;
 
 Page({
+    loading: true,
     data: {
         tabsActive: 2,
         sa_invoiceapplyid: "",
@@ -14,6 +15,10 @@ Page({
             label: "开票明细",
             icon: "icon-tabchanpin",
             model: "#DetailLine"
+        }, {
+            label: "发票",
+            icon: "icon-tabchanpin",
+            model: "#InvoiceList"
         }]
     },
     onLoad(options) {
@@ -36,7 +41,8 @@ Page({
                 icon: "none"
             })
             this.setData({
-                detail: res.data
+                detail: res.data,
+                loading: false
             });
             this.setPreview();
             this.partialRenewal();
@@ -123,6 +129,15 @@ Page({
             riseLine
         })
     },
+    //tabs 切换
+    tabsChange({
+        detail
+    }) {
+        this.setData({
+            tabsActive: detail
+        });
+        this.partialRenewal();
+    },
     //局部数据更新 tabs
     partialRenewal(init = false) {
         let model = this.data.tabsList[this.data.tabsActive].model;
@@ -141,10 +156,58 @@ Page({
             }
         }
     },
+    submit() {
+        if (this.selectComponent("#DetailLine").data.list.length == 0) {
+            wx.showToast({
+                title: '还未添加开票订单行不可提交!',
+                icon: "none"
+            });
+            this.setData({
+                tabsActive: 2
+            })
+        } else {
+            let that = this;
+            wx.showModal({
+                title: '提示',
+                content: '是否确认提交该申请单?',
+                complete: ({
+                    confirm
+                }) => {
+                    if (confirm) _Http.basic({
+                        "id": "20221219133803",
+                        "version": 1,
+                        "content": {
+                            "sa_invoiceapplyid": that.data.sa_invoiceapplyid
+                        }
+                    }).then(res => {
+                        console.log("提交申请单", res);
+                        if (res.msg != '成功') return wx.showToast({
+                            title: res.msg,
+                            icon: "none"
+                        });
+                        that.getDetail();
+                    })
+                }
+            })
+        }
+    },
     onReachBottom() {
         this.partialRenewal();
     },
     onUnload() {
-
+        let page = getCurrentPages().find(v => v.__route__ == 'packageA/invoice/index');
+        let content = JSON.parse(JSON.stringify(page.data.content));
+        content.pageNumber = 1;
+        content.pageSize = page.data.list.length;
+        _Http.basic({
+            "id": 20221219133703,
+            "version": 1,
+            content
+        }).then(res => {
+            console.log("开票列表", res)
+            page.setData({
+                list: res.data
+            })
+        })
     },
 })

+ 2 - 1
packageA/invoice/detail.json

@@ -2,6 +2,7 @@
   "usingComponents": {
     "Preview": "../shipment/modules/preview/index",
     "HeaderDetails": "./modules/headerDetails/index",
-    "DetailLine": "./modules/detailLine/index"
+    "DetailLine": "./modules/detailLine/index",
+    "InvoiceList": "./modules/InvoiceList/index"
   }
 }

+ 1 - 0
packageA/invoice/detail.scss

@@ -1,3 +1,4 @@
+@import "./detail.skeleton.wxss";
 .intr {
     position: relative;
     width: 100vw;

+ 108 - 0
packageA/invoice/detail.skeleton.wxml

@@ -0,0 +1,108 @@
+<!--
+此文件为开发者工具生成,生成时间: 2023/1/31上午10:15:32
+使用方法:
+在 E:\云链项目\e-wechat\packageA\invoice\detail.wxml 引入模板
+
+```
+<import src="detail.skeleton.wxml"/>
+<template is="skeleton" wx:if="{{loading}}" />
+```
+
+在 E:\云链项目\e-wechat\packageA\invoice\detail.wxss 中引入样式
+```
+@import "./detail.skeleton.wxss";
+```
+
+更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
+-->
+<template name="skeleton">
+  <view class="sk-container">
+    <view class="intr">
+      <view class="num sk-transparent sk-text-10-0000-246 sk-text">
+        IB2023010400001
+      </view>
+      <view class="exp sk-transparent sk-text-11-7647-236 sk-text">状态:审核</view>
+      <view class="exp sk-transparent sk-text-11-7647-536 sk-text">创建日期:2023-01-04 11:03:54</view>
+      <view class="exp sk-transparent sk-text-11-7647-584 sk-text">开票单位:嘉兴市1号有限公司</view>
+      <view class="exp sk-transparent sk-text-11-7647-620 sk-text">备注:--</view>
+    </view>
+    <view is="components/Yl_FunTabs/index">
+      <scroll-view enable-flex="true" enable-passive="true" scroll-with-animation="true" scroll-x="true" class="scroll FunTabs-index--scroll" scroll-left="0">
+        <view class="item FunTabs-index--item" data-index="0">
+          <view class="icon FunTabs-index--icon">
+            <text class="iconfont FunTabs-index--iconfont icon-tabchanpin FunTabs-index--icon-tabchanpin sk-pseudo sk-pseudo-circle"></text>
+          </view>
+          <view class="label FunTabs-index--label line-1 FunTabs-index--line-1 sk-transparent sk-text-14-2857-956 sk-text" style="background-position-x: 50%;">详细信息</view>
+        </view>
+        <view class="item FunTabs-index--item" data-index="1">
+          <view class="icon FunTabs-index--icon">
+            <text class="iconfont FunTabs-index--iconfont icon-tabchanpin FunTabs-index--icon-tabchanpin sk-pseudo sk-pseudo-circle"></text>
+          </view>
+          <view class="label FunTabs-index--label line-1 FunTabs-index--line-1 sk-transparent sk-text-14-2857-274 sk-text" style="background-position-x: 50%;">开票单位</view>
+        </view>
+        <view class="item FunTabs-index--item active FunTabs-index--active" data-index="2" id="b1a74e56--active2">
+          <view class="icon FunTabs-index--icon">
+            <text class="iconfont FunTabs-index--iconfont icon-tabchanpin FunTabs-index--icon-tabchanpin sk-pseudo sk-pseudo-circle"></text>
+          </view>
+          <view class="label FunTabs-index--label line-1 FunTabs-index--line-1 sk-transparent sk-text-14-2857-446 sk-text" style="background-position-x: 50%;">开票明细</view>
+        </view>
+        <view class="item FunTabs-index--item" data-index="3">
+          <view class="icon FunTabs-index--icon">
+            <text class="iconfont FunTabs-index--iconfont icon-tabchanpin FunTabs-index--icon-tabchanpin sk-pseudo sk-pseudo-circle"></text>
+          </view>
+          <view class="label FunTabs-index--label line-1 FunTabs-index--line-1 sk-transparent sk-text-14-2857-865 sk-text" style="background-position-x: 50%;">发票</view>
+        </view>
+      </scroll-view>
+      <view class="slot-box FunTabs-index--slot-box">
+        <view is="packageA/invoice/modules/detailLine/index" id="DetailLine">
+          <view class="detailLine-index--head">
+            <view class="detailLine-index--count sk-transparent sk-text-14-2857-696 sk-text">开票订单行</view>
+            <view class="detailLine-index--expand"></view>
+          </view>
+          <view is="packageA/invoice/modules/detailLine/list/index">
+            <view class="product-item list-index--product-item">
+              <navigator class="product list-index--product" data-item="[object Object]">
+                <view class="mian list-index--mian">
+                  <view class="img list-index--img" data-file="[object Object],[object Object],[object Object],[object Object]">
+                    <view is="miniprogram_npm/@vant/weapp/image/index">
+                      <view class=" van-image image-index--van-image" style="width:100%;height:100%">
+                        <image class="van-image__img image-index--van-image__img sk-image" mode="scaleToFill" lazy-load="true"></image>
+                      </view>
+                    </view>
+                  </view>
+                  <view class="dec list-index--dec">
+                    <view class="title list-index--title">
+                      <text class="line-1 list-index--line-1 sk-transparent sk-text-14-2857-23 sk-text">测试新增</text>
+                    </view>
+                    <view class="subfield list-index--subfield sk-transparent sk-text-14-7059-728 sk-text">
+                      标准订单:SO202211300013
+                    </view>
+                    <view class="subfield list-index--subfield sk-transparent sk-text-14-7059-18 sk-text">
+                      可开票金额:300元
+                    </view>
+                    <view class="subfield list-index--subfield">
+                      <text class="line-1 list-index--line-1 sk-transparent sk-text-14-7059-840 sk-text" style="margin-right: 3px;">型号:S</text>
+                      <text class="line-1 list-index--line-1 sk-transparent sk-text-14-7059-329 sk-text">规格: --</text>
+                    </view>
+                  </view>
+                </view>
+              </navigator>
+              <view class="bot list-index--bot">
+                <view class="row list-index--row">
+                  <view>
+                    <view class="label list-index--label sk-transparent sk-text-14-2857-380 sk-text">开票金额(元):</view>
+                    <view class="input list-index--input sk-image" data-data="[object Object]" disabled="true" style="width: 120px;" type="digit" value="300"></view>
+                  </view>
+                  <view style="flex: 1; justify-content: flex-end;">
+                    <view class="label list-index--label line-1 list-index--line-1 sk-transparent sk-text-14-2857-145 sk-text">开票数量:1千克</view>
+                  </view>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view style="height: 70px;"></view>
+      </view>
+    </view>
+  </view>
+</template>

+ 129 - 0
packageA/invoice/detail.skeleton.wxss

@@ -0,0 +1,129 @@
+/*
+此文件为开发者工具生成,生成时间: 2023/1/31上午10:15:32
+
+在 E:\云链项目\e-wechat\packageA\invoice\detail.wxss 中引入样式
+```
+@import "./detail.skeleton.wxss";
+```
+
+更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
+*/
+.sk-transparent {
+    color: transparent !important;
+  }
+.sk-text-10-0000-246 {
+    background-image: linear-gradient(transparent 10.0000%, #EEEEEE 0%, #EEEEEE 90.0000%, transparent 0%) !important;
+    background-size: 100% 40.0000rpx;
+    position: relative !important;
+  }
+.sk-text {
+    background-origin: content-box !important;
+    background-clip: content-box !important;
+    background-color: transparent !important;
+    color: transparent !important;
+    background-repeat: repeat-y !important;
+  }
+.sk-text-11-7647-236 {
+    background-image: linear-gradient(transparent 11.7647%, #EEEEEE 0%, #EEEEEE 88.2353%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-11-7647-536 {
+    background-image: linear-gradient(transparent 11.7647%, #EEEEEE 0%, #EEEEEE 88.2353%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-11-7647-584 {
+    background-image: linear-gradient(transparent 11.7647%, #EEEEEE 0%, #EEEEEE 88.2353%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-11-7647-620 {
+    background-image: linear-gradient(transparent 11.7647%, #EEEEEE 0%, #EEEEEE 88.2353%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-956 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-274 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-446 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-865 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-696 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 42.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-23 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 39.2000rpx;
+    position: relative !important;
+  }
+.sk-text-14-7059-728 {
+    background-image: linear-gradient(transparent 14.7059%, #EEEEEE 0%, #EEEEEE 85.2941%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-7059-18 {
+    background-image: linear-gradient(transparent 14.7059%, #EEEEEE 0%, #EEEEEE 85.2941%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-7059-840 {
+    background-image: linear-gradient(transparent 14.7059%, #EEEEEE 0%, #EEEEEE 85.2941%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-7059-329 {
+    background-image: linear-gradient(transparent 14.7059%, #EEEEEE 0%, #EEEEEE 85.2941%, transparent 0%) !important;
+    background-size: 100% 34.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-380 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-145 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-image {
+    background: #EFEFEF !important;
+  }
+.sk-pseudo::before, .sk-pseudo::after {
+      background: #EFEFEF !important;
+      background-image: none !important;
+      color: transparent !important;
+      border-color: transparent !important;
+    }
+.sk-pseudo-rect::before, .sk-pseudo-rect::after {
+      border-radius: 0 !important;
+    }
+.sk-pseudo-circle::before, .sk-pseudo-circle::after {
+      border-radius: 50% !important;
+    }
+.sk-container {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    background-color: transparent;
+  }

+ 6 - 3
packageA/invoice/detail.wxml

@@ -1,3 +1,5 @@
+<import src="detail.skeleton.wxml"/>
+<template is="skeleton" wx:if="{{loading}}" />
 <view class="intr">
 	<view class="num">
 		{{detail.billno}}
@@ -10,10 +12,11 @@
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
 	<HeaderDetails slot='开票单位' list="{{riseLine}}" />
-	<DetailLine slot='开票明细' id='DetailLine' />
+	<DetailLine slot='开票明细' id='DetailLine' disabled='{{detail.status!="新建"}}' />
+	<InvoiceList slot='发票' id='InvoiceList' />
 	<view style="height: 140rpx;" />
 </Yl_FunTabs>
 
-<view class="footer" wx:if="{{detail.status=='审核'}}">
-	<van-button custom-class='but' bind:click="receiving">确认收货</van-button>
+<view class="footer" wx:if="{{detail.status=='新建'}}">
+	<van-button custom-class='but' bind:click="submit">提交申请单</van-button>
 </view>

+ 92 - 92
packageA/invoice/index.js

@@ -1,97 +1,97 @@
 const _Http = getApp().globalData.http;
 
 Page({
-  data: {
-    loading: true,
-    active: "新建",
-    "content": {
-      nocache: true,
-      "pageNumber": 1,
-      "pageTotal": 1,
-      "pageSize": 20,
-      total: 0,
-      "where": {
-        "condition": "",
-      },
-      sort: []
+    data: {
+        loading: true,
+        active: "新建",
+        "content": {
+            nocache: true,
+            "pageNumber": 1,
+            "pageTotal": 1,
+            "pageSize": 20,
+            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: []
+        }]
+    },
+    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": 20221219133703, //20221216143103
+            "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
+            })
+        })
+    },
+    /* 去新增 */
+    toAdd() {
+        wx.navigateTo({
+            url: '/packageA/invoice/update'
+        })
+    },
+    /* 搜索 */
+    onSearch({
+        detail
+    }) {
+        this.setData({
+            "content.where.condition": detail
+        });
+        this.getList(true)
+    },
+    /* 切换tabs */
+    tabsChange(e) {
+        this.setData({
+            active: e.detail.name
+        });
+        this.getList(true);
+    },
+    onReady() {
+        this.setListHeight()
+    },
+    /* 设置页面高度 */
+    setListHeight() {
+        this.selectComponent("#ListBox").setHeight(".total", this);
     },
-    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: []
-    }]
-  },
-  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": 20221219133703,
-      "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
-      })
-    })
-  },
-  /* 去新增 */
-  toAdd(){
-    wx.navigateTo({
-      url: '/packageA/invoice/update'
-    })
-  },
-  /* 搜索 */
-  onSearch({
-    detail
-  }) {
-    this.setData({
-      "content.where.condition": detail
-    });
-    this.getList(true)
-  },
-  /* 切换tabs */
-  tabsChange(e) {
-    this.setData({
-      "content.status": e.detail.name
-    });
-    this.getList(true);
-  },
-  onReady() {
-    this.setListHeight()
-  },
-  /* 设置页面高度 */
-  setListHeight() {
-    this.selectComponent("#ListBox").setHeight(".total", this);
-  },
 })

+ 1 - 0
packageA/invoice/index.scss

@@ -0,0 +1 @@
+@import "./index.skeleton.wxss";

+ 166 - 0
packageA/invoice/index.skeleton.wxml

@@ -0,0 +1,166 @@
+<!--
+此文件为开发者工具生成,生成时间: 2023/1/31上午10:14:33
+使用方法:
+在 E:\云链项目\e-wechat\packageA\invoice\index.wxml 引入模板
+
+```
+<import src="index.skeleton.wxml"/>
+<template is="skeleton" wx:if="{{loading}}" />
+```
+
+在 E:\云链项目\e-wechat\packageA\invoice\index.wxss 中引入样式
+```
+@import "./index.skeleton.wxss";
+```
+
+更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
+-->
+<template name="skeleton">
+  <view class="sk-container">
+    <view is="components/Yl_HeadNav/index">
+      <view class="Yl_head_1 HeadNav-index--Yl_head_1">
+        <view class="search HeadNav-index--search">
+          <view class="iconfont HeadNav-index--iconfont icon-a-sousuolansousuo HeadNav-index--icon-a-sousuolansousuo sk-pseudo sk-pseudo-circle" style="padding-left:10px;margin-right: 5px;"></view>
+          <view class="input HeadNav-index--input sk-image" placeholder="搜索" style="flex: 1;" type="text" value="true"></view>
+        </view>
+        <navigator class="but HeadNav-index--but sk-transparent" data-id="sort">
+          <text class="iconfont HeadNav-index--iconfont icon-shengxu HeadNav-index--icon-shengxu sk-pseudo sk-pseudo-circle"></text>排序</navigator>
+        <navigator class="but HeadNav-index--but sk-transparent" data-id="filtrate">
+          <text class="iconfont HeadNav-index--iconfont icon-shaixuan HeadNav-index--icon-shaixuan sk-pseudo sk-pseudo-circle"></text>筛选</navigator>
+      </view>
+      <view is="miniprogram_npm/@vant/weapp/transition/index"></view>
+      <view is="miniprogram_npm/@vant/weapp/popup/index">
+        <view is="miniprogram_npm/@vant/weapp/overlay/index">
+          <view is="miniprogram_npm/@vant/weapp/transition/index"></view>
+        </view>
+      </view>
+    </view>
+    <view is="miniprogram_npm/@vant/weapp/tabs/index">
+      <view class=" van-tabs tabs-index--van-tabs van-tabs--line tabs-index--van-tabs--line">
+        <view is="miniprogram_npm/@vant/weapp/sticky/index">
+          <view class=" van-sticky sticky-index--van-sticky" style="z-index:1">
+            <view class="van-sticky-wrap sticky-index--van-sticky-wrap" style="z-index:1">
+              <view class="van-tabs__wrap tabs-index--van-tabs__wrap ">
+                <scroll-view class="van-tabs__scroll tabs-index--van-tabs__scroll van-tabs__scroll--line tabs-index--van-tabs__scroll--line" scroll-left="0" style="border-color: var(--assist)">
+                  <view class="van-tabs__nav tabs-index--van-tabs__nav van-tabs__nav--line tabs-index--van-tabs__nav--line " style="true">
+                    <view class="van-tabs__line tabs-index--van-tabs__line" style="width:40px;opacity:1;transform:translateX(42.5px);-webkit-transform:translateX(42.5px);background-color:var(--assist);transition-duration:0.3s;-webkit-transition-duration:0.3s"></view>
+                    <view class="  van-ellipsis tabs-index--van-ellipsis van-tab tabs-index--van-tab van-tab--active tabs-index--van-tab--active" data-index="0" style="color:var(--assist)">
+                      <view class="van-ellipsis tabs-index--van-ellipsis sk-transparent sk-text-34-0909-889 sk-text" style="background-position-x: 50%;">
+                        新建
+                      </view>
+                    </view>
+                    <view class=" van-ellipsis tabs-index--van-ellipsis van-tab tabs-index--van-tab" data-index="1" style="true">
+                      <view class="van-ellipsis tabs-index--van-ellipsis sk-transparent sk-text-34-0909-70 sk-text" style="background-position-x: 50%;">
+                        提交
+                      </view>
+                    </view>
+                    <view class=" van-ellipsis tabs-index--van-ellipsis van-tab tabs-index--van-tab" data-index="2" style="true">
+                      <view class="van-ellipsis tabs-index--van-ellipsis sk-transparent sk-text-34-0909-173 sk-text" style="background-position-x: 50%;">
+                        审核
+                      </view>
+                    </view>
+                  </view>
+                </scroll-view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="van-tabs__content tabs-index--van-tabs__content">
+          <view class="van-tabs__track tabs-index--van-tabs__track van-tabs__track tabs-index--van-tabs__track" style="true">
+            <view is="miniprogram_npm/@vant/weapp/tab/index">
+              <view class=" van-tab__pane tab-index--van-tab__pane van-tab__pane--active tab-index--van-tab__pane--active" style="true"></view>
+            </view>
+            <view is="miniprogram_npm/@vant/weapp/tab/index"></view>
+            <view is="miniprogram_npm/@vant/weapp/tab/index"></view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="total" style="height: 10px;"></view>
+    <view is="components/Yl_ListBox/index" id="ListBox">
+      <scroll-view scroll-y="true" class="ListBox-index--scroll-view" refresher-enabled="true" style="height: 620px;">
+        <view is="packageA/invoice/modules/list/index">
+          <navigator class="list-index--item">
+            <view class="list-index--top sk-transparent">
+              提交日期: --
+              <text class="sk-transparent sk-text-14-2857-165 sk-text">新建</text>
+            </view>
+            <view class="list-index--content">
+              <view class="list-index--num sk-transparent sk-text-15-0000-925 sk-text">
+                申请单号:IB2023012900003
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-191 sk-text">
+                税号:000303030
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-425 sk-text">
+                开票单位:测试购物车开票
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-938 sk-text">
+                开票地址:测试购物车开票
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-423 sk-text">
+                开票订单金额:20
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-443 sk-text">
+                审核时间: --
+              </view>
+            </view>
+          </navigator>
+          <navigator class="list-index--item">
+            <view class="list-index--top sk-transparent">
+              提交日期: --
+              <text class="sk-transparent sk-text-14-2857-679 sk-text">新建</text>
+            </view>
+            <view class="list-index--content">
+              <view class="list-index--num sk-transparent sk-text-15-0000-116 sk-text">
+                申请单号:IB2023013000001
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-372 sk-text">
+                税号:2500738956
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-434 sk-text">
+                开票单位:123
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-869 sk-text">
+                开票地址:天心街道
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-516 sk-text">
+                开票订单金额: --
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-192 sk-text">
+                审核时间: --
+              </view>
+            </view>
+          </navigator>
+          <navigator class="list-index--item">
+            <view class="list-index--top sk-transparent">
+              提交日期: --
+              <text class="sk-transparent sk-text-14-2857-359 sk-text">新建</text>
+            </view>
+            <view class="list-index--content">
+              <view class="list-index--num sk-transparent sk-text-15-0000-430 sk-text">
+                申请单号:IB2023013000002
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-142 sk-text">
+                税号:2500738956
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-921 sk-text">
+                开票单位:123
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-154 sk-text">
+                开票地址:天心街道
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-125 sk-text">
+                开票订单金额: --
+              </view>
+              <view class="list-index--exp sk-transparent sk-text-14-2857-832 sk-text">
+                审核时间: --
+              </view>
+            </view>
+          </navigator>
+        </view>
+        <view class="ListBox-index--safety"></view>
+      </scroll-view>
+    </view>
+  </view>
+</template>

+ 164 - 0
packageA/invoice/index.skeleton.wxss

@@ -0,0 +1,164 @@
+/*
+此文件为开发者工具生成,生成时间: 2023/1/31上午10:14:33
+
+在 E:\云链项目\e-wechat\packageA\invoice\index.wxss 中引入样式
+```
+@import "./index.skeleton.wxss";
+```
+
+更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
+*/
+.sk-transparent {
+    color: transparent !important;
+  }
+.sk-text-34-0909-889 {
+    background-image: linear-gradient(transparent 34.0909%, #EEEEEE 0%, #EEEEEE 65.9091%, transparent 0%) !important;
+    background-size: 100% 88.0000rpx;
+    position: relative !important;
+  }
+.sk-text {
+    background-origin: content-box !important;
+    background-clip: content-box !important;
+    background-color: transparent !important;
+    color: transparent !important;
+    background-repeat: repeat-y !important;
+  }
+.sk-text-34-0909-70 {
+    background-image: linear-gradient(transparent 34.0909%, #EEEEEE 0%, #EEEEEE 65.9091%, transparent 0%) !important;
+    background-size: 100% 88.0000rpx;
+    position: relative !important;
+  }
+.sk-text-34-0909-173 {
+    background-image: linear-gradient(transparent 34.0909%, #EEEEEE 0%, #EEEEEE 65.9091%, transparent 0%) !important;
+    background-size: 100% 88.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-165 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 39.2000rpx;
+    position: relative !important;
+  }
+.sk-text-15-0000-925 {
+    background-image: linear-gradient(transparent 15.0000%, #EEEEEE 0%, #EEEEEE 85.0000%, transparent 0%) !important;
+    background-size: 100% 40.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-191 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-425 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-938 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-423 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-443 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-679 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 39.2000rpx;
+    position: relative !important;
+  }
+.sk-text-15-0000-116 {
+    background-image: linear-gradient(transparent 15.0000%, #EEEEEE 0%, #EEEEEE 85.0000%, transparent 0%) !important;
+    background-size: 100% 40.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-372 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-434 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-869 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-516 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-192 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-359 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 39.2000rpx;
+    position: relative !important;
+  }
+.sk-text-15-0000-430 {
+    background-image: linear-gradient(transparent 15.0000%, #EEEEEE 0%, #EEEEEE 85.0000%, transparent 0%) !important;
+    background-size: 100% 40.0000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-142 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-921 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-154 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-125 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-text-14-2857-832 {
+    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
+    background-size: 100% 33.6000rpx;
+    position: relative !important;
+  }
+.sk-pseudo::before, .sk-pseudo::after {
+      background: #EFEFEF !important;
+      background-image: none !important;
+      color: transparent !important;
+      border-color: transparent !important;
+    }
+.sk-pseudo-rect::before, .sk-pseudo-rect::after {
+      border-radius: 0 !important;
+    }
+.sk-pseudo-circle::before, .sk-pseudo-circle::after {
+      border-radius: 50% !important;
+    }
+.sk-image {
+    background: #EFEFEF !important;
+  }
+.sk-container {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    background-color: transparent;
+  }

+ 1 - 1
packageA/invoice/index.wxml

@@ -1,4 +1,4 @@
-<import src="index.skeleton.wxml" />
+<import src="index.skeleton.wxml"/>
 <template is="skeleton" wx:if="{{loading}}" />
 <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">

+ 116 - 0
packageA/invoice/modules/InvoiceList/index.js

@@ -0,0 +1,116 @@
+const _Http = getApp().globalData.http;
+Component({
+    properties: {
+        disabled: Boolean
+    },
+    data: {
+        show: false,
+        sa_invoiceapplyid: 0,
+        "content": {
+            nocache: true,
+            pageNumber: 1,
+            pageTotal: 1,
+            total: null,
+        },
+        actions: null
+    },
+    methods: {
+        /* 获取发票列表 */
+        getList(id, init) {
+            let content = this.data.content;
+            content.sa_invoiceapplyid = id;
+            if (init) content.pageNumber = 1;
+            _Http.basic({
+                "id": "20221223153403",
+                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 : "";
+                  }
+                  return value;
+                }) */
+                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_invoiceapplyid: id
+                })
+            })
+        },
+        previewpdf(e) {
+            let {
+                pdfurl,
+                paperpdfurl
+            } = e.currentTarget.dataset.item;
+            if (!pdfurl && !paperpdfurl) {
+                wx.showToast({
+                    title: '暂无可预览文件',
+                    icon: "none"
+                })
+            } else if (pdfurl && paperpdfurl) {
+                this.setData({
+                    actions: [{
+                            name: '查看发票',
+                            url: pdfurl
+                        },
+                        {
+                            name: '查看纸质发票',
+                            url: paperpdfurl
+                        }
+                    ],
+                    show: true
+                })
+            } else {
+                this.handleOpen(pdfurl || paperpdfurl)
+            }
+        },
+        onClose() {
+            this.setData({
+                show: false
+            });
+        },
+        onSelect(event) {
+            this.handleOpen(event.detail.url)
+        },
+        handleOpen(url) {
+            wx.showLoading({
+                title: '加载中...',
+                mask: true
+            })
+            wx.downloadFile({
+                url,
+                success: function (res) {
+                    const filePath = res.tempFilePath
+                    wx.openDocument({
+                        filePath: filePath,
+                        complete(res) {
+                            console.log("打开文档", res)
+                            wx.hideLoading()
+                            if (res.errMsg != 'openDocument:ok') wx.showToast({
+                                title: '打开失败',
+                                icon: "none"
+                            })
+                        }
+                    })
+                },
+                fail(err) {
+                    wx.hideLoading()
+                    wx.showToast({
+                        title: '打开失败',
+                        icon: "none"
+                    })
+                }
+            })
+        },
+    }
+})

+ 1 - 0
pages/base/index.json → packageA/invoice/modules/InvoiceList/index.json

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

+ 41 - 0
packageA/invoice/modules/InvoiceList/index.scss

@@ -0,0 +1,41 @@
+@import "../../../../static/common-head.scss";
+
+.count {
+	font-size: 30rpx !important;
+	font-weight: bold;
+}
+
+.item {
+	width: 100vw;
+	display: flex;
+	background-color: #ffffff;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+	margin-bottom: 20rpx;
+
+	.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;
+		}
+
+		.subfield {
+			display: flex;
+			margin-top: 8rpx;
+			height: 34rpx;
+			line-height: 34rpx;
+		}
+	}
+}

+ 38 - 0
packageA/invoice/modules/InvoiceList/index.wxml

@@ -0,0 +1,38 @@
+<view class="head">
+	<view class="count">发票清单</view>
+</view>
+
+<navigator url="#" class="item" wx:for="{{list}}" wx:key="index" data-item="{{item}}" bindtap="previewpdf">
+	<view class="dec">
+		<view class="title line-1">
+			发票ID:{{item.sa_invoiceapplyid}}
+		</view>
+		<view class="subfield">
+			红蓝字:{{item.rb==1?'蓝':'红'}}
+		</view>
+		<view class="subfield">
+			发票流水号:{{item.invoiceserialnum||" --"}}
+		</view>
+		<view class="subfield">
+			开票金额:{{item.sumtaxincludedamount}}元
+		</view>
+		<view class="subfield">
+			发票代码:{{item.invoicecode||" --"}}
+		</view>
+		<view class="subfield">
+			发票号码:{{item.invoiceno||" --"}}
+		</view>
+		<view class="subfield">
+			发票状态:{{item.status||" --"}}
+		</view>
+		<view class="subfield">
+			备注:{{item.remarks||" --"}}
+		</view>
+	</view>
+</navigator>
+<block wx:if="{{list.length==0}}">
+	<Yl_Empty />
+	<view style="height: 150rpx;" />
+</block>
+
+<van-action-sheet show="{{ show }}" actions="{{ actions }}" z-index="99999999" cancel-text="取消" bind:close="onClose" bind:select="onSelect" bind:click-overlay='onClose' />

+ 3 - 0
packageA/invoice/modules/detailLine/index.js

@@ -1,6 +1,9 @@
 const _Http = getApp().globalData.http,
   file = require("../../../../utils/FormatTheAttachment");
 Component({
+  properties: {
+    disabled: Boolean
+  },
   data: {
     sa_invoiceapplyid: 0,
     "content": {

+ 9 - 10
packageA/invoice/modules/detailLine/list/index.js

@@ -35,20 +35,19 @@ Component({
 					title: `开票金额不可为0`,
 					icon: "none"
 				});
-				if (i != -1) this.setData({
+				if (i != -1) return this.setData({
 					[`list[${i}].invoiceamount`]: this.data.list[i].invoiceamount,
 					[`list[${i}].invoiceaqty`]: this.data.list[i].invoiceaqty,
 				})
-			} else {
-				if (e.detail.value != data.invoiceamount) this.triggerEvent("changeProduct", {
-					"sa_invoiceapply_orderid": data.sa_invoiceapply_orderid,
-					"saorderid": data.sa_orderid,
-					"sa_orderitemsid": data.sa_orderitemsid,
-					"price": data.price,
-					"invoiceamount": e.detail.value - 0,
-					"invoiceaqty": (e.detail.value - 0) / data.price
-				})
 			}
+			if (e.detail.value != data.invoiceamount) this.triggerEvent("changeProduct", {
+				"sa_invoiceapply_orderid": data.sa_invoiceapply_orderid,
+				"saorderid": data.sa_orderid,
+				"sa_orderitemsid": data.sa_orderitemsid,
+				"price": data.price,
+				"invoiceamount": e.detail.value - 0,
+				"invoiceaqty": (e.detail.value - 0) / data.price
+			})
 		},
 		deleteProduct(e) {
 			let {

+ 85 - 26
packageA/invoice/update.js

@@ -5,6 +5,55 @@ Page({
         showAll: false,
         disabled: true,
         form: [{
+            label: "备注",
+            error: false,
+            errMsg: "",
+            type: "textarea",
+            value: "",
+            placeholder: "备注",
+            valueName: "remarks",
+            required: false
+        }, ],
+        content: {
+            sa_invoiceapplyid: 0,
+            byhand: false,
+            enterprisename: "", //抬头
+            taxno: "", //税号
+            bank: "", //开户行
+            phonenumber: "", //手机号
+            bankcardno: "", //开户账号
+            address: "", //开票地址
+            quota: 0,
+        }
+    },
+    onLoad(options) {
+        console.log(wx.getStorageSync('userrole'))
+        if (wx.getStorageSync('userrole') == '业务员') {
+            this.data.form.unshift({
+                label: "开票经销商",
+                error: false,
+                errMsg: "",
+                type: "route",
+                url: "/select/agent/index",
+                params: {
+                    "id": "20221216145803",
+                    "version": 1,
+                    "content": {
+                        nocache: true,
+                        "where": {
+                            "condition": ""
+                        }
+                    }
+                },
+                interrupt: true,
+                query: '&radio=true',
+                value: "",
+                placeholder: "选择开票经销商",
+                valueName: "sys_enterpriseid",
+                required: true
+            })
+        } else {
+            this.data.form.unshift({
                 label: "开票抬头",
                 error: false,
                 errMsg: "",
@@ -20,38 +69,18 @@ Page({
                         },
                     },
                 },
+                interrupt: true,
                 query: '&radio=true',
                 value: "",
                 placeholder: "选择开票抬头信息",
                 valueName: "principal",
                 checking: "base",
                 required: true
-            },
-            {
-                label: "备注",
-                error: false,
-                errMsg: "",
-                type: "textarea",
-                value: "",
-                placeholder: "备注",
-                valueName: "remarks",
-                required: false
-            },
-        ],
-        content: {
-            sa_invoiceapplyid: 0,
-            byhand: false,
-            enterprisename: "", //抬头
-            taxno: "", //税号
-            bank: "", //开户行
-            phonenumber: "", //手机号
-            bankcardno: "", //开户账号
-            address: "", //开票地址
-            quota: 0,
+            })
         }
-    },
-    onLoad(options) {
-        console.log(wx.getStorageSync('userMsg').usertype == 1)
+        this.setData({
+            form: this.data.form
+        })
     },
     /* 打断处理form */
     interrupt({
@@ -63,7 +92,6 @@ Page({
             detail.data.value[0] = `抬头:${item.enterprisename}\n税号:${item.taxno}\n地址:${item.address}`;
             detail.form[detail.temporary.index].value = detail.data.value;
             this.setData({
-                form: detail.form,
                 "content.enterprisename": item.enterprisename,
                 "content.taxno": item.taxno,
                 "content.bank": item.bank,
@@ -71,13 +99,44 @@ Page({
                 "content.bankcardno": item.bankcardno,
                 "content.address": item.address,
             })
+        } else if (detail.temporary.item.label == "开票经销商") {
+            detail.form[0].value = detail.data.value;
+            detail.form.splice(1, detail.form.length == 2 ? 0 : 1, {
+                label: "开票抬头",
+                error: false,
+                errMsg: "",
+                type: "route",
+                url: "/select/finance/index",
+                params: {
+                    "id": 20221013160602,
+                    "content": {
+                        nocache: true,
+                        sys_enterpriseid: detail.data.id[0],
+                        "pageSize": 20,
+                        "where": {
+                            "condition": "",
+                        },
+                    },
+                },
+                interrupt: true,
+                query: '&radio=true',
+                value: "",
+                placeholder: "选择开票抬头信息",
+                valueName: "principal",
+                checking: "base",
+                required: true
+            })
         }
+        this.setData({
+            form: detail.form,
+        })
         this.selectComponent("#Form").confirm();
         wx.navigateBack()
     },
     submit() {
         let data = this.selectComponent("#Form").submit();
         let content = this.data.content;
+        data.sys_enterpriseid && (content.sys_enterpriseid = data.sys_enterpriseid[1][0]);
         content.remarks = data.remarks;
         wx.showModal({
             title: '提示',

+ 1 - 1
packageA/orderForm/detail.js

@@ -463,7 +463,7 @@ Page({
     },
     onUnload() {
         let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/index');
-        let content = page.data.content;
+        let content = JSON.parse(JSON.stringify(page.data.content));
         content.pageNumber = 1;
         content.pageSize = page.data.list.length;
         _Http.basic({

+ 0 - 140
pages/base/index.js

@@ -1,140 +0,0 @@
-const _Http = getApp().globalData.http;
-
-Page({
-    data: {
-        classShow: false,
-        classActions: [{
-                name: '全部',
-                index: 0
-            }, {
-                name: '我负责的',
-                index: 1
-            },
-            {
-                name: '我参与的',
-                index: 2
-            },
-            {
-                name: "我下属负责的",
-                index: 3
-            }, {
-                name: "我下属参与的",
-                index: 4
-            }
-        ],
-        content: {
-            nocache: true,
-            "type": 0,
-            "pageNumber": 1,
-            "pageSize": 20,
-            "where": {
-                "condition": "", //模糊搜索
-            },
-            "sort": []
-        }
-    },
-    onLoad(options) {
-        this.getList();
-    },
-    /* 获取列表 */
-    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;
-        _Http.basic({
-            "id": 20221020143502,
-            content
-        }).then(res => {
-            console.log("客户商机列表", res)
-            this.selectComponent('#ListBox').RefreshToComplete();
-            if (res.msg != '成功') return wx.showToast({
-                title: res.msg,
-                icon: "none"
-            })
-            this.setData({
-                'content.pageNumber': res.pageNumber + 1,
-                'content.pageTotal': res.pageTotal,
-                'content.total': res.total,
-                'content.sort': res.sort,
-                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
-            });
-            this.getTags();
-        })
-    },
-    /* 获取列表标签 */
-    getTags() {
-        let list = this.data.list,
-            ownerids = list.map(v => v.sa_projectid);
-        _Http.basic({
-            "id": 20221018102001,
-            "content": {
-                nocache: true,
-                "ownertable": "sa_project",
-                ownerids
-            }
-        }).then(res => {
-            console.log("标签", res)
-            for (let key in res.data) {
-                let index = list.findIndex(v => v.sa_projectid == key);
-                list[index].tags = res.data[key]
-            };
-            console.log(list)
-            this.setData({
-                list
-            })
-        })
-    },
-    /* 处理筛选 */
-    handleFilter({
-        detail
-    }) {
-        console.log(detail)
-    },
-    /* 处理搜索 */
-    onSearch({
-        detail
-    }) {
-        this.setData({
-            "content.where.condition": detail
-        });
-        this.getList(true);
-    },
-    /* 顶部条件导航回调 */
-    navClick({
-        detail
-    }) {
-        switch (detail.id) {
-            case '1':
-                this.setData({
-                    classShow: true
-                })
-                break;
-        }
-    },
-    /* 选择分类 */
-    classSelect({
-        detail
-    }) {
-        if (this.data.content.type == detail.index) return this.classClose();
-        this.setData({
-            "content.type": detail.index,
-            'navList[0].label': detail.name
-        })
-        this.classClose();
-        this.getList(true)
-    },
-    classClose() {
-        this.setData({
-            classShow: false
-        })
-    },
-    onReady() {
-        this.setListHeight()
-    },
-    /* 设置页面高度 */
-    setListHeight() {
-        this.selectComponent("#ListBox").setHeight(".total", this);
-    },
-    onShareAppMessage() {}
-})

+ 0 - 4
pages/base/index.scss

@@ -1,4 +0,0 @@
-page{
-	position: relative;
-	overflow: hidden;
-}

+ 0 - 15
pages/base/index.wxml

@@ -1,15 +0,0 @@
-<Yl_HeadNav search sort='{{content.sort}}' bind:onClick='navClick' bindonSearch="onSearch" />
-<!-- 显示类型 -->
-<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:cancel="classClose" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
-<view class="total">共{{content.total}}个</view>
-
-<Yl_ListBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
-    <List list='{{list}}' />
-</Yl_ListBox>
-
-<!-- 筛选条件 -->
-<Yl_Filtrate id='Filtrate' bind:handle="handleFilter" />
-
-
-<!-- 浮动按钮 -->
-<Yl_FloatingButton bindtap="toAdd" />

+ 1 - 1
pages/login/modules/login.js

@@ -5,7 +5,7 @@ function loginMsg(res) {
     wx.setStorageSync('account_list', res.account_list);
     if (res.account_list.length == 1) {
         let item = res.account_list[0];
-        getApp().globalData.userrole = item.usertype == 1 ? '业务员' : '经销商';
+        wx.setStorageSync('userrole', item.usertype == 1 ? '业务员' : '经销商');
         wx.setStorageSync('userMsg', item)
         query_userauth();
     } else {

+ 1 - 1
pages/login/selectSite.js

@@ -16,7 +16,7 @@ Page({
         const {
             item
         } = e.currentTarget.dataset;
-        getApp().globalData.userrole = item.usertype == 1 ? '业务员' : '经销商';
+        wx.setStorageSync('userrole', item.usertype == 1 ? '业务员' : '经销商');
         wx.setStorageSync('userMsg', item);
         login.query_userauth();
     },

+ 7 - 0
project.private.config.json

@@ -92,6 +92,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "发票列表",
+          "pathName": "packageA/invoice/detail",
+          "query": "id=4",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }