Jelajahi Sumber

真因分析

xiaohaizhao 2 bulan lalu
induk
melakukan
bca8e4d3b9

+ 1 - 1
E-service/serviceBillList/product/index.wxml

@@ -1,6 +1,6 @@
 <view class="head">
   <view class="count">
-    总共{{content.total}}个
+    {{language['总共']||'总共'}} {{content.total}} {{language['']||'个'}}
   </view>
   <view class="expand">
     <van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />

+ 226 - 0
E-service/serviceImprovement/analysis/change.js

@@ -0,0 +1,226 @@
+const _Http = getApp().globalData.http;
+
+Page({
+  data: {
+    loading: false,
+    showAll: false,
+    disabled: false,
+    form: [{
+      label: "负责人",
+      error: false,
+      errMsg: "",
+      type: "route",
+      url: "/select/user/index",
+      params: {
+        "content": {
+          "isExport": 0,
+          isAll: 1,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": "",
+            isAll: 1,
+            "tablefilter": {},
+            "issale": 0,
+            "status": "0"
+          },
+          "departmentids": [],
+          "containssub": 1
+        },
+        "id": 20221102090303,
+      },
+      query: '&radio=true',
+      value: "",
+      placeholder: "请选择",
+      valueName: "userid_charge",
+      checking: "base",
+      required: true,
+      interrupt: true
+    }, {
+      label: "真因分析",
+      error: false,
+      errMsg: "",
+      type: "textarea",
+      value: "",
+      placeholder: "真因分析",
+      valueName: "main_reason",
+      required: true,
+      checking: "base"
+    }, {
+      label: "改善建议",
+      error: false,
+      errMsg: "",
+      type: "textarea",
+      value: "",
+      placeholder: "改善建议",
+      valueName: "suggestion",
+      required: true,
+      checking: "base"
+    }],
+    sa_service_improvementid: 0
+  },
+  onLoad(options) {
+    getApp().globalData.Language.getLanguagePackage(this, '确认信息');
+    let form = this.data.form,
+      data = getCurrentPages().find(v => v.__route__ == 'E-service/serviceImprovement/detail').data.detail;
+    console.log(data)
+    if (data.userid_charge) {
+      data.userid_charge = [3232, [data.userid_charge]]
+      data.departmentid = data.departmentid ? [data.depname_charge, [data.departmentid]] : ''
+
+      form.splice(1, 0, {
+        label: "责任部门",
+        error: false,
+        errMsg: "",
+        type: "route",
+        url: "/select/user/index",
+        params: {},
+        query: '&radio=true',
+        value: '',
+        placeholder: "请选择",
+        valueName: "departmentid",
+        checking: "base",
+        disabled: true
+      })
+    }
+    form = form.map(v => {
+      switch (v.valueName) {
+        default:
+          v.value = data[v.valueName]
+          break;
+      }
+      return v
+    })
+    this.setData({
+      form,
+      sa_service_improvementid: data.sa_service_improvementid
+    })
+    this.selectComponent("#Form").confirm()
+    try {
+      if (data.attinfos.length) this.selectComponent("#Yl_Files").handleFiles(data.attinfos);
+    } catch (error) {
+
+    }
+  },
+  interrupt({
+    detail
+  }) {
+    let {
+      form,
+      data,
+      temporary
+    } = detail;
+    if (temporary.item.valueName == 'userid_charge') {
+      form.find(v => v.valueName == "userid_charge").value = data.value;
+      form.splice(1, form.some(v => v.valueName == 'departmentid') ? 1 : 0, {
+        label: "责任部门",
+        error: false,
+        errMsg: "",
+        type: "route",
+        url: "/select/user/index",
+        params: {},
+        query: '&radio=true',
+        value: [data.item.depname, [data.item.departmentid]],
+        placeholder: "请选择",
+        valueName: "departmentid",
+        checking: "base",
+        disabled: true
+      })
+      wx.navigateBack()
+      this.setData({
+        form
+      })
+      this.selectComponent("#Form").confirm()
+    }
+  },
+  changeState({
+    detail
+  }) {
+    this.setData({
+      loading: detail
+    })
+  },
+  /* 绑定媒体 */
+  insertImgEdit({
+    detail
+  }) {
+    this.handleFileLink(detail)
+  },
+
+  handleFileLink(attachmentids, ownertable = "sa_service_improvement", ownerid = this.data.sa_service_improvementid) {
+    _Http.basic({
+      "classname": "system.attachment.Attachment",
+      "method": "createFileLink",
+      "content": {
+        ownertable,
+        ownerid,
+        usetype: 'default',
+        attachmentids
+      }
+    }).then(res => {
+      console.log('跟进记录绑定附件', res)
+      if (res.code != '1') return wx.showToast({
+        title: res.msg,
+        icon: "none"
+      })
+      this.selectComponent("#Yl_Files").handleFiles(res.data)
+    })
+  },
+  submit() {
+    this.setData({
+      loading: true
+    })
+    let content = {
+      sa_service_improvementid: this.data.sa_service_improvementid,
+      ...this.selectComponent("#Form").submit()
+    };
+    content.userid_charge = content.userid_charge[1][0]
+    content.departmentid = content.departmentid[1][0]
+    _Http.basic({
+      "id": 2026020209494502,
+      content
+    }).then(res => {
+      this.setData({
+        loading: false
+      })
+      console.log("编辑真因", res)
+      if (res.code == 1) {
+        if (res.msg != '成功') return;
+        wx.navigateBack({
+          success() {
+            wx.showToast({
+              title: getApp().globalData.Language.getMapText('保存成功'),
+              icon: "none",
+              mask: true
+            })
+          }
+        });
+      } else {
+        wx.showToast({
+          title: res.code != '1' ? res.msg : getApp().globalData.Language.getMapText('保存成功'),
+          icon: "none",
+          mask: true
+        })
+      }
+    })
+  },
+  // 是否显示全部
+  onChange({
+    detail
+  }) {
+    this.setData({
+      showAll: detail
+    })
+  },
+  /* 表单必填项是否完成 */
+  onConfirm({
+    detail
+  }) {
+    this.setData({
+      disabled: detail
+    })
+  },
+  onUnload() {
+    getCurrentPages().find(v => v.__route__ == 'E-service/serviceImprovement/detail').getDetail();
+  }
+})

+ 6 - 0
E-service/serviceImprovement/analysis/change.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "Yl_Upload": "/components/Yl_Upload/index",
+    "Yl_Files": "/components/Yl_Files/index"
+  }
+}

+ 63 - 0
E-service/serviceImprovement/analysis/change.scss

@@ -0,0 +1,63 @@
+.box {
+	width: 100vw;
+	box-sizing: border-box;
+	margin-top: 20rpx;
+	background-color: #fff;
+
+	.content {
+			border-radius: 8rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+
+			.upload {
+					display: flex;
+					align-items: center;
+					width: 100%;
+					height: 88rpx;
+					box-sizing: border-box;
+
+					.title {
+							flex: 1;
+							font-size: 28rpx;
+							font-family: PingFang SC-Regular, PingFang SC;
+							color: #333333;
+							font-weight: bold;
+					}
+
+					navigator {
+							width: 100rpx;
+							height: 80rpx;
+							line-height: 80rpx;
+							text-align: center;
+							padding: 0;
+					}
+			}
+
+	}
+}
+
+
+.new-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	z-index: 9999;
+
+	.new-submit {
+			width: 156rpx;
+			height: 90rpx;
+			background: #3874F6;
+			border-radius: 8rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC-Bold, PingFang SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			margin-right: 30rpx;
+	}
+}

+ 24 - 0
E-service/serviceImprovement/analysis/change.wxml

@@ -0,0 +1,24 @@
+<Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
+<Yl_Field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
+<view class="box">
+    <view class="content">
+        <view class="upload">
+            <view class="title">{{language['附件']||'附件'}}</view>
+            <Yl_Upload accept='media' binduploadCallback="insertImgEdit" bindchangeState='changeState'>
+                <navigator url="#">
+                    <text class="iconfont icon-a-tonggaofujian" />
+                </navigator>
+            </Yl_Upload>
+            <Yl_Upload accept='file' binduploadCallback="insertImgEdit" bindchangeState='changeState'>
+                <navigator url="#">
+                    <text class="iconfont icon-a-biaoqianlanzhiku" />
+                </navigator>
+            </Yl_Upload>
+        </view>
+    </view>
+    <Yl_Files delete id="Yl_Files" strict ownertable="sa_service_improvement" />
+</view>
+<view style="height: 150rpx;" />
+<view class="new-footer">
+    <van-button custom-class='new-submit' disabled='{{disabled || loading}}' loading='{{loading}}' bindclick='submit'>{{language['确定']||'确定'}}</van-button>
+</view>

+ 27 - 0
E-service/serviceImprovement/analysis/index.js

@@ -0,0 +1,27 @@
+const _Http = getApp().globalData.http;
+
+Component({
+  properties: {
+    disabled: {
+      type: Boolean,
+      value: false
+    },
+    detail: {
+      type: Object
+    }
+  },
+  options: {
+    addGlobalClass: true
+  },
+  lifetimes: {
+    attached: function () {
+      getApp().globalData.Language.getLanguagePackage(this)
+    }
+  },
+  data: {},
+  methods: {
+    getList(id, init = false) {
+
+    },
+  }
+})

+ 6 - 0
E-service/serviceImprovement/analysis/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "Yl_Files": "/components/Yl_Files/index"
+  }
+}

+ 59 - 0
E-service/serviceImprovement/analysis/index.scss

@@ -0,0 +1,59 @@
+.head {
+	display: flex;
+	align-items: center;
+	width: 100vw;
+	height: 120rpx;
+	padding: 0 20rpx 0 30rpx;
+	box-sizing: border-box;
+
+	.count {
+		font-size: 28rpx;
+		font-family: PingFang SC-Regular, PingFang SC;
+		color: #333333;
+	}
+
+	.expand {
+		flex: 1;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+
+		.but {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			background: #FFFFFF;
+			border-radius: 8rpx;
+			border: 2rpx solid #CCCCCC;
+			margin-left: 20rpx;
+			color: #666666;
+		}
+	}
+}
+
+.box {
+	background-color: #fff;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+	width: 100vw;
+
+	.label {
+		line-height: 40rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #333333;
+		margin-bottom: 20rpx;
+	}
+
+	.value {
+		font-family: PingFang SC, PingFang SC;
+		font-size: 28rpx;
+		color: #333333;
+		line-height: 44rpx;
+		margin-bottom: 20rpx;
+	}
+}

+ 19 - 0
E-service/serviceImprovement/analysis/index.wxml

@@ -0,0 +1,19 @@
+<view class="head">
+  <view class="count">
+    {{language['真因分析']||'真因分析'}}
+  </view>
+  <view class="expand">
+    <navigator wx:if="{{!disabled}}" url="/E-service/serviceImprovement/analysis/change" class="but">
+      <text class="iconfont icon-bianji2"></text>
+    </navigator>
+  </view>
+</view>
+
+<view class="box">
+  <view class="label">{{language['真因分析']||'真因分析'}}</view>
+  <view class="value">{{detail.main_reason || '--'}}</view>
+  <view class="label">{{language['改善建议']||'改善建议'}}</view>
+  <view class="value">{{detail.suggestion || '--'}}</view>
+  <view class="label">{{language['附件']||'附件'}}</view>
+  <Yl_Files attinfos='{{detail.attinfos}}' />
+</view>

+ 4 - 2
E-service/serviceImprovement/detail.js

@@ -14,9 +14,11 @@ Page({
       },
     },
     tabsList: [{
-      label: "真因分析"
+      label: "真因分析",
+      model: "#Analysis"
     }, {
-      label: "改善方案"
+      label: "改善方案",
+      model: "#Scheme"
     }, {
       label: "方案执行"
     }, {

+ 3 - 1
E-service/serviceImprovement/detail.json

@@ -2,6 +2,8 @@
   "usingComponents": {
     "Preview": "../components/preview/index",
     "Improvement": "./improvement/index",
-    "Product": "./product/index"
+    "Product": "./product/index",
+    "Scheme": "./scheme/index",
+    "Analysis": "./analysis/index"
   }
 }

+ 2 - 0
E-service/serviceImprovement/detail.wxml

@@ -44,6 +44,8 @@
 	<Preview slot='改善单信息' list1='{{list1}}' list2='{{list2}}' />
 	<Improvement id="Improvement" slot='关联改善单' />
 	<Product id="Product" slot='影响产品范围' />
+	<Analysis detail='{{detail}}' id="Analysis" slot='真因分析' />
+	<Scheme id="Scheme" slot='改善方案' />
 	<view style="height: 180rpx;" />
 </Yl_FunTabs>
 

+ 1 - 1
E-service/serviceImprovement/improvement/index.wxml

@@ -1,6 +1,6 @@
 <view class="head">
   <view class="count">
-    总共{{content.total}}个
+    {{language['总共']||'总共'}} {{content.total}} {{language['']||'个'}}
   </view>
   <view class="expand">
     <van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />

+ 1 - 1
E-service/serviceImprovement/product/index.wxml

@@ -1,6 +1,6 @@
 <view class="head">
   <view class="count">
-    总共{{content.total}}个
+    {{language['总共']||'总共'}} {{content.total}} {{language['']||'个'}}
   </view>
   <view class="expand">
     <van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />

+ 111 - 0
E-service/serviceImprovement/scheme/index.js

@@ -0,0 +1,111 @@
+const _Http = getApp().globalData.http;
+
+Component({
+  properties: {
+    disabled: {
+      type: Boolean,
+      value: false
+    }
+  },
+  options: {
+    addGlobalClass: true
+  },
+  lifetimes: {
+    attached: function () {
+      getApp().globalData.Language.getLanguagePackage(this)
+      this.setData({
+        siteid: wx.getStorageSync('userMsg').siteid
+      })
+    }
+  },
+  data: {
+    sa_service_improvementid: 0,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageSize: 10,
+      pageTotal: 1,
+      total: null,
+      where: {
+        condition: ""
+      }
+    },
+    list: [],
+    showSearch: false,
+    focus: false,
+    condition: ""
+  },
+  methods: {
+    getList(id, init = false) {
+      console.log("getList", id)
+      let content = {
+        ...this.data.content,
+        sa_service_improvementid: id || this.data.sa_service_improvementid
+      };
+      if (init) {
+        content.pageNumber = 1
+        content.pageTotal = 1
+      }
+      _Http.basic({
+        "id": 2026020210235502,
+        content
+      }).then(res => {
+        console.log("方案", res)
+        if (res.code != '1') return wx.showToast({
+          title: res.data,
+          icon: "none"
+        });
+        let list = res.data.map(v => {
+          try {
+            v.cover = v.attinfos.length ? _Http.getSpecifiedImage(v.attinfos[0]) : ''
+          } catch (error) {
+
+          }
+          return v
+        })
+        this.setData({
+          "content.pageNumber": res.pageNumber + 1,
+          "content.pageTotal": res.pageTotal,
+          "content.total": res.total,
+          list: res.pageNumber == 1 ? list : this.data.list.concat(list),
+          sa_service_improvementid: content.sa_service_improvementid
+        })
+      })
+    },
+    /* 去添加产品 */
+    addProduct() {
+  
+    },
+    toSearch() {
+      if (this.data.showSearch && this.data.content.where.condition) {
+        this.data.content.where.condition = '';
+        this.getList("", true);
+      } else if (this.data.condition) {
+        this.data.content.where.condition = this.data.condition;
+        this.setData({
+          condition: this.data.condition
+        })
+        this.getList("", true);
+      }
+      this.setData({
+        showSearch: !this.data.showSearch
+      })
+      setTimeout(() => {
+        this.setData({
+          focus: this.data.showSearch
+        })
+      }, 300)
+    },
+    onChange({
+      detail
+    }) {
+      this.data.condition = detail;
+    },
+    onSearch({
+      detail
+    }) {
+      this.data.content.where.condition = detail;
+      this.getList("", true)
+    },
+  }
+})

+ 4 - 0
E-service/serviceImprovement/scheme/index.json

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

+ 40 - 0
E-service/serviceImprovement/scheme/index.scss

@@ -0,0 +1,40 @@
+.head {
+	display: flex;
+	align-items: center;
+	width: 100vw;
+	height: 120rpx;
+	padding: 0 20rpx 0 30rpx;
+	box-sizing: border-box;
+
+	.count {
+		font-size: 28rpx;
+		font-family: PingFang SC-Regular, PingFang SC;
+		color: #333333;
+	}
+
+	.expand {
+		flex: 1;
+		display: flex;
+		align-items: center;
+		justify-content: flex-end;
+
+		.but {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			background: #FFFFFF;
+			border-radius: 8rpx;
+			border: 2rpx solid #CCCCCC;
+			margin-left: 20rpx;
+			color: #666666;
+		}
+	}
+}
+
+.custom-class {
+	--search-background-color: #fff !important;
+	padding-right: 10rpx !important;
+}

+ 16 - 0
E-service/serviceImprovement/scheme/index.wxml

@@ -0,0 +1,16 @@
+<view class="head">
+  <view class="count">
+    {{language['总共']||'总共'}} {{content.total}} {{language['个']||'个'}}
+  </view>
+  <view class="expand">
+    <van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />
+    <navigator url="#" class="but" bindtap="toSearch">
+      <van-icon name="search" />
+    </navigator>
+    <navigator wx:if="{{!disabled}}" url="#" class="but" bindtap="addProduct">
+      <van-icon name="plus" />
+    </navigator>
+  </view>
+</view>
+
+<Yl_Empty wx:if="{{list.length==0}}" />

+ 1 - 1
E-service/workOrder/detail.wxml

@@ -62,7 +62,7 @@
 	<view slot='工序详情' style="padding: 20rpx; background-color: #fff;">
 		<Nodes id='Nodes' wx:if="{{detail}}" nodes='{{detail.nodes}}' sa_workorderid='{{detail.sa_workorderid}}' status="{{detail.status}}" />
 	</view>
-	<Team slot='服务团队' list='{{detail.team}}' projectleader='{{detail.projectleader}}' sa_workorderid='{{detail.sa_workorderid}}' disabled="{{detail.status != '进行中' && (isLeader || isworkleader)}}" />
+	<Team slot='服务团队' list='{{detail.team}}' projectleader='{{detail.projectleader}}' sa_workorderid='{{detail.sa_workorderid}}' disabled="{{detail.status != '进行中' && (!isLeader || !isworkleader)}}" />
 	<Product slot='服务商品' id='Product' disabled="{{detail.status != '进行中'}}" />
 	<Material slot='工单物料' id='Material' />
 	<NotarizeBill slot='服务确认单' billData='{{detail}}' id='NotarizeBill' disabled="{{detail.status != '进行中'}}" />

+ 1 - 1
E-service/workOrder/material/index.wxml

@@ -1,6 +1,6 @@
 <view class="head">
   <view class="count">
-    总共{{content.total}}个
+    {{language['总共']||'总共'}} {{content.total}} {{language['']||'个'}}
   </view>
   <view class="expand">
     <van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />

+ 1 - 1
E-service/workOrder/notarizeBill/index.wxml

@@ -1,6 +1,6 @@
 <view class="head">
 	<view class="count">
-		总共{{content.total}}个
+		{{language['总共']||'总共'}} {{content.total}} {{language['']||'个'}}
 	</view>
 	<view class="expand">
 		<van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />

+ 1 - 1
Eservice/workOrder/index.js

@@ -56,7 +56,7 @@ Page({
                 "pageNumber": this.data.pageNumber,
                 "pageSize": this.data.pageSize,
                 "where": {
-                    "status": this.data.status,
+                    "status": [this.data.status],
                     "condition": ""
                 }
             }

+ 4 - 2
app.json

@@ -74,7 +74,8 @@
         "orderFormLine/index",
         "contacts/index",
         "address/addAndEdit",
-        "project/index"
+        "project/index",
+        "user/index"
       ]
     },
     {
@@ -100,7 +101,8 @@
         "workOrder/takeOrder",
         "serviceBillList/transferWorkOrder/progress",
         "serviceImprovement/edit",
-        "workOrder/nodes/work"
+        "workOrder/nodes/work",
+        "serviceImprovement/analysis/change"
       ]
     },
     {

+ 8 - 1
project.private.config.json

@@ -25,12 +25,19 @@
     "miniprogram": {
       "list": [
         {
-          "name": "改善单详情",
+          "name": "E-service/serviceImprovement/detail",
           "pathName": "E-service/serviceImprovement/detail",
           "query": "id=3",
           "scene": null,
           "launchMode": "default"
         },
+        {
+          "name": "改善单详情",
+          "pathName": "E-service/serviceImprovement/detail",
+          "query": "id=3",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "E-service/workOrder/detail",
           "pathName": "E-service/workOrder/detail",

+ 124 - 0
select/user/index.js

@@ -0,0 +1,124 @@
+const _Http = getApp().globalData.http;
+import currency from "../../utils/currency";
+const CNY = num => currency(num, {
+    symbol: "¥",
+    precision: 2
+}).format();
+
+Page({
+    data: {
+        loading: true,
+        params: {}, //请求体
+        result: [], //返回结果
+        radio: false, //是否为单选
+        idname: "userid", //idkey
+        showName: "name"
+    },
+    onLoad(options) {
+        if (options.item) {
+            let item = JSON.parse(options.item);
+            this.setData({
+                item,
+                params: item.params
+            });
+        }
+        if (options.params) this.setData({
+            params: JSON.parse(options.params)
+        });
+        this.setData({
+            radio: options.radio ? true : false,
+            idname: options.idname || this.data.idname,
+            showName: options.showName || this.data.showName,
+        });
+        this.getList()
+        getApp().globalData.Language.getLanguagePackage(this, '选择人员');
+    },
+    getList(init = false) {
+        //init 用于初始化分页
+        if (init.detail != undefined) init = init.detail;
+        let params = this.data.params;
+        if (init) params.content.pageNumber = 1
+        if (params.content.pageNumber > params.content.pageTotal) return;
+
+        _Http.basic(params).then(res => {
+            console.log("选择人员列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            if (res.code != '1') return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            })
+            res.data = res.data.map(v => {
+                v.signamount_due = CNY(v.signamount_due)
+                return v
+            })
+
+            this.setData({
+                'params.content.pageNumber': res.pageNumber + 1,
+                'params.content.pageTotal': res.pageTotal,
+                'params.content.total': res.total,
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+                loading: false
+            })
+        })
+    },
+    /* 选中 */
+    changeResult(e) {
+        let {
+            id
+        } = e.currentTarget.dataset, result = this.data.result;
+        if (this.data.radio) {
+            result = [id];
+        } else {
+            result.some(v => v == id) ? result = result.filter(v => v != id) : result.push(id)
+        }
+        this.setData({
+            result
+        });
+        if (this.data.radio) this.submit();
+    },
+    /* 提交 */
+    submit() {
+        let result = this.data.result,
+            obj = this.data.radio ? {
+                id: result,
+                item: this.data.list.find(value => value[this.data.idname] == result),
+                value: [this.data.list.find(value => value[this.data.idname] == result)[this.data.showName], result]
+            } : {
+                result,
+                list: result.map(v => this.data.list.find(value => value[this.data.idname] == v)),
+                value: [result.map(v => {
+                    let data = this.data.list.find(value => value[this.data.idname] == v);
+                    return data ? data[this.data.showName] : ""
+                }), result]
+            }
+        getApp().globalData.handleSelect && getApp().globalData.handleSelect(obj)
+    },
+    /* 开始搜索 */
+    startSearch({
+        detail
+    }) {
+        let condition = this.data.content ? this.data.content.where.condition : this.data.params.content.where.condition;
+        if (detail == condition) return;
+        this.setData({
+            'content.where.condition': detail,
+            'params.content.where.condition': detail
+        });
+        this.getList(true);
+    },
+    /* 取消搜索 */
+    onClear() {
+        this.setData({
+            'content.where.condition': "",
+            'params.content.where.condition': ""
+        });
+        this.getList(true);
+    },
+    onReady() {
+        this.selectComponent("#ListBox").setHeight(".total", this);
+    },
+    onUnload() {
+        //回收数据
+        getApp().globalData.handleSelect = null;
+
+    }
+})

+ 3 - 0
select/user/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 83 - 0
select/user/index.scss

@@ -0,0 +1,83 @@
+page {
+	height: 100vh;
+	overflow: hidden;
+}
+
+.total {
+	height: 60rpx;
+	line-height: 60rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	color: #666666;
+	padding-left: 30rpx;
+}
+
+.item {
+	display: flex;
+	align-items: center;
+	width: 100vw;
+	padding: 20rpx 30rpx;
+	background-color: #FFFFFF;
+	box-sizing: border-box;
+	border-bottom: 1rpx solid #DDDDDD;
+	margin-bottom: 20rpx;
+	overflow: hidden;
+
+	.main {
+		width: 100%;
+		padding-right: 20rpx;
+		box-sizing: border-box;
+
+		.title {
+			line-height: 40rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-size: 28rpx;
+			color: #333333;
+
+			text {
+				font-family: PingFang SC, PingFang SC;
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
+
+		.subfield {
+			line-height: 34rpx;
+			font-family: PingFang SC, PingFang SC;
+			font-size: 24rpx;
+			color: #999999;
+			margin-top: 8rpx
+		}
+	}
+}
+
+.footer {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	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;
+
+	.count {
+		font-size: 28rpx;
+		font-family: PingFang SC-Regular, PingFang SC;
+		color: #333333;
+	}
+
+	.but {
+		width: 156rpx;
+		height: 90rpx;
+		background: #3874F6;
+		border-radius: 8rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+}

+ 32 - 0
select/user/index.wxml

@@ -0,0 +1,32 @@
+<van-search class="search" value="{{ params.content.where.condition }}" shape="round" placeholder="{{language['关键字']||'请输入搜索关键词'}}" bind:search='startSearch' bind:clear='onClear' />
+<view class="total">{{language['共']||'共'}}{{params.content.total}}{{language['个']||'个'}}</view>
+
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<navigator class="item" url="#" wx:for="{{list}}" wx:key="userid" data-id="{{item[idname]}}" bindtap="changeResult">
+		<van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
+		<view class="main" style="padding-left: {{!radio?'10rpx':''}};">
+			<view class="title line-1">{{item.name}} <text wx:if="{{item.phonenumber}}">{{item.phonenumber}}</text></view>
+			<view class="subfield">{{language[item.depname]||item.depname}} <text>{{language[item.position]||item.position}}</text></view>
+		</view>
+	</navigator>
+	<view wx:if="{{!radio}}" style="height: 130rpx;" />
+	<Yl_Empty wx:if="{{list.length==0}}" />
+</Yl_ListBox>
+
+<block wx:if="{{!radio}}">
+	<view class="footer">
+		<view class="count">
+			{{language['已选']||'已选'}}:{{result.length}}
+		</view>
+		<van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['确定']||'确定'}}</van-button>
+	</view>
+	<wxs module="handle">
+		module.exports = {
+			isCheck: function (id, list) {
+				return list.some(function (v) {
+					return v == id
+				});
+			},
+		}
+	</wxs>
+</block>