xiaohaizhao 3 месяцев назад
Родитель
Сommit
932520bb70

+ 11 - 0
E-service/serviceBillList/detail.js

@@ -0,0 +1,11 @@
+Page({
+  data: {
+    type: "default"
+  },
+  onLoad(options) {
+    console.log("options", options)
+    this.setData({
+      options: options.type || "default"
+    })
+  },
+})

+ 3 - 0
E-service/serviceBillList/detail.json

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

+ 1 - 0
E-service/serviceBillList/detail.scss

@@ -0,0 +1 @@
+/* E-service/serviceBillList/detail.wxss */

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

@@ -0,0 +1,2 @@
+<!--E-service/serviceBillList/detail.wxml-->
+<text>E-service/serviceBillList/detail.wxml</text>

+ 143 - 0
E-service/serviceBillList/index.js

@@ -0,0 +1,143 @@
+const _Http = getApp().globalData.http;
+
+Page({
+  data: {
+    type: "default",
+    "id": 20230206091703,
+    "content": {
+      "pageNumber": 1,
+      "pageSize": 20,
+      "isManage": false, //服务申请管理,申请单管理 是传 true
+      "where": {
+        "condition": "",
+        "status": ['新建'], // 数组,状态
+        "service_level": "", //服务等级
+        "exception_type": "", //异常类型
+        "class2": "", //客诉大类
+        "servicetype": "", //服务类型
+        "begindate": "", //创建时间
+        "enddate": "", //创建时间
+        "begindate2": "", //提交日期
+        "enddate2": "" //提交日期
+      }
+    },
+    tabColorS: {
+      售前: {
+        bgColor: "#E1EAFE",
+        color: "#3874F6"
+      },
+      售中: {
+        bgColor: "#FEF0E1",
+        color: "#F69E38"
+      },
+      售后: {
+        bgColor: "#FCE4E4",
+        color: "#ED4949"
+      },
+    },
+    filtratelist: []
+  },
+  async onLoad(options) {
+    this.getList()
+    getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
+
+    let filtratelist = [{
+      label: "服务类型",
+      index: null,
+      showName: "value", //显示字段
+      valueKey: "servicetype", //返回Key
+      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: await _Http.basic({
+        id: 20230206112003,
+        "content": {},
+      }).then(res => {
+        console.log("获取服务类型", res)
+        return res.code == 1 ? res.data : []
+      })
+    }, {
+      label: "客诉大类",
+      index: null,
+      showName: "value", //显示字段
+      valueKey: "class2", //返回Key
+      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: await _Http.getTypes('customerclass', _Http)
+    }, {
+      label: "异常类型",
+      index: null,
+      showName: "value", //显示字段
+      valueKey: "exception_type", //返回Key
+      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: await _Http.getTypes('exceptiontype', _Http)
+    }, {
+      label: "服务等级",
+      index: null,
+      showName: "value", //显示字段
+      valueKey: "service_level", //返回Key
+      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: await _Http.getTypes('servicelevel', _Http)
+    }]
+    this.setData({
+      filtratelist,
+      type: options.type || this.data.type
+    })
+  },
+  getList(init = false) {
+    _Http.init(this.data.content, init).then(content => {
+      _Http.basic({
+        id: this.data.id,
+        content
+      }).then(res => {
+        console.log("服务申请单列表", res)
+        this.selectComponent('#ListBox').RefreshToComplete();
+        if (res.code != '1') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        })
+        this.setData({
+          content: _Http.paging(content, res),
+          list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+        })
+      })
+    })
+  },
+  onSearch({
+    detail
+  }) {
+    this.data.content.where.condition = detail;
+    this.getList(true)
+  },
+  onChangeTab({
+    detail
+  }) {
+    this.setData({
+      'content.where.status': [detail.title]
+    })
+    this.getList(true)
+  },
+  toAdd(e) {
+    wx.navigateTo({
+      url: `/E-service/serviceBillList/insert?type=${this.data.type}`
+    })
+  },
+  handleFilter({
+    detail
+  }) {
+    detail.condition = this.data.content.where.condition;
+    detail.status = this.data.content.where.status;
+    detail.begindate = detail.startdate;
+    detail.enddate = detail.enddate;
+    detail.begindate2 = detail.periodstart;
+    detail.enddate2 = detail.periodend;
+    delete detail.name;
+    delete detail.startdate;
+    delete detail.enddate;
+    delete detail.periodstart;
+    delete detail.periodend;
+    this.data.content.where = detail;
+    this.getList(true);
+  },
+})

+ 3 - 0
E-service/serviceBillList/index.json

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

+ 54 - 0
E-service/serviceBillList/index.scss

@@ -0,0 +1,54 @@
+.item {
+	width: 690rpx;
+	background: #FFFFFF;
+	border-radius: 8rpx;
+	padding: 20rpx;
+	box-sizing: border-box;
+	margin: 20rpx auto 0;
+
+	.head {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		width: 100%;
+		padding-bottom: 18rpx;
+		border-bottom: 1px solid #DDDDDD;
+
+		.tabs {
+			display: flex;
+
+			.tab {
+				font-family: PingFang SC, PingFang SC;
+				font-size: 24rpx;
+				padding: 0 12rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx;
+				margin-right: 20rpx;
+				background-color: #E1EAFE;
+				color: #3874F6
+			}
+		}
+
+		.status {
+			font-family: PingFang SC, PingFang SC;
+			font-size: 28rpx;
+			color: #3874F6;
+		}
+	}
+
+	.address {
+		line-height: 40rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-size: 28rpx;
+		color: #333333;
+		margin-top: 8rpx;
+	}
+
+	.row {
+		line-height: 34rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-size: 24rpx;
+		color: #999999;
+		margin-top: 8rpx;
+	}
+}

+ 28 - 0
E-service/serviceBillList/index.wxml

@@ -0,0 +1,28 @@
+<Yl_Head2 tabs="{{[{title:'新建'},{title:'已提交'},{title:'已受理'},{title:'已中止'}]}}" bind:onSearch='onSearch' bind:onChangeTab='onChangeTab' />
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<navigator class="item" url="/E-service/serviceBillList/detail?id={{item.sa_serviceorderid}}&type={{type}}" wx:for="{{list}}" wx:key="sa_serviceorderid">
+		<view class="head">
+			<view class="tabs">
+				<view class="tab" style="background-color: {{tabColorS[item.servicetype].bgColor}};color:{{tabColorS[item.servicetype].color}};">
+					{{language[item.servicetype]||item.servicetype}}
+				</view>
+				<view class="tab">
+					{{language[item.class1]||item.class1}}
+				</view>
+			</view>
+			<view class="status" style="color:{{sColors[item.status]}};">{{language[item.status]||item.status}}</view>
+		</view>
+		<view class="address">{{item.province + item.city + item.county + item.address}}</view>
+		<view class="row">{{language['申请单号']||'申请单号'}}:{{item.billno}}</view>
+		<view class="row">
+			{{language['现场联系人']||'现场联系人'}}:{{item.scenecontact}}
+			<text style="margin-right: 20rpx;">{{language[item.scenecontactrole]||item.scenecontactrole}}</text>
+			<text style="margin-right: 20rpx;">{{item.scenecontactphonenumber}}</text>
+		</view>
+		<view class="row">{{language['客诉大类']||'客诉大类'}}:{{item.class2}}</view>
+		<view class="row">{{language['服务时间']||'服务时间'}}:{{item.begdate}} {{language['至']||'至'}} {{item.enddate}}</view>
+	</navigator>
+	<Yl_Empty wx:if="{{list.length==0}}" />
+</Yl_ListBox>
+<Yl_FloatingButton bindtap="toAdd" />
+<Yl_Filtrate id='Filtrate' list="{{filtratelist}}" bind:handle="handleFilter" dateRange dateRange1 dateRangeName='创建时间' dateRangeName='提交时间' />

+ 565 - 0
E-service/serviceBillList/insert.js

@@ -0,0 +1,565 @@
+const _Http = getApp().globalData.http,
+  getTime = require("../../utils/getTime");
+
+Page({
+  data: {
+    loading: false,
+    showAll: false,
+    disabled: true,
+    form: [{
+      label: "服务类型",
+      error: false,
+      errMsg: "",
+      hint: "",
+      type: "radio",
+      value: "",
+      interrupt: true,
+      radioList: [],
+      valueName: "servicetype", //绑定的字段名称
+      required: true, //必填
+      checking: `base`,
+    }, {
+      label: "单据日期",
+      error: false,
+      errMsg: "",
+      type: "date",
+      value: getTime.formatTime(new Date(), '-').split(' ')[0],
+      placeholder: "请选择日期",
+      valueName: "billdate",
+      required: true,
+    }, {
+      label: "省市县",
+      error: false,
+      errMsg: "",
+      type: "region",
+      value: [],
+      placeholder: "省,市,县",
+      valueName: "region",
+      required: true
+    }, {
+      label: "详细地址",
+      error: false,
+      errMsg: "",
+      type: "textarea",
+      value: "",
+      placeholder: "例: 科创园11栋1103室",
+      valueName: "address",
+      required: true,
+      checking: "base"
+    }, {
+      label: "现场联系人",
+      error: false,
+      errMsg: "",
+      type: "text",
+      value: "",
+      placeholder: "现场联系人",
+      valueName: "scenecontact",
+      required: true,
+      checking: "base"
+    }, {
+      label: "身份备注",
+      error: false,
+      errMsg: "",
+      type: "text",
+      value: "",
+      placeholder: "现场联系人身份备注",
+      valueName: "scenecontactrole",
+      required: false,
+      checking: "base"
+    }, {
+      label: "现场联系人电话",
+      error: false,
+      errMsg: "",
+      type: "number",
+      value: "",
+      placeholder: "联系人手机号码",
+      valueName: "scenecontactphonenumber",
+      required: true,
+      checking: "phone"
+    }, {
+      label: "应用系统",
+      error: false,
+      errMsg: "",
+      hint: "",
+      type: "radio",
+      value: "",
+      interrupt: false,
+      radioList: [],
+      valueName: "class1", //绑定的字段名称
+      required: true, //必填
+      checking: `base`,
+    }, {
+      label: "客诉大类",
+      error: false,
+      errMsg: "",
+      hint: "",
+      type: "radio",
+      value: "",
+      interrupt: false,
+      radioList: [],
+      valueName: "class2", //绑定的字段名称
+      required: true, //必填
+      checking: `base`,
+    }, {
+      label: "问题描述",
+      error: false,
+      errMsg: "",
+      type: "reason",
+      value: "",
+      placeholder: "请填写",
+      valueName: "reason",
+      required: true,
+      checking: "base"
+    }, {
+      label: "服务开始时间",
+      error: false,
+      errMsg: "",
+      type: "date",
+      value: '',
+      placeholder: "请选择服务开始时间",
+      valueName: "begdate",
+      required: true,
+    }, {
+      label: "服务结束时间",
+      error: false,
+      errMsg: "",
+      type: "date",
+      value: '',
+      placeholder: "请选择服务结束时间",
+      valueName: "enddate",
+      required: true,
+    }, {
+      label: "异常类型",
+      error: false,
+      errMsg: "",
+      hint: "",
+      type: "radio",
+      value: "",
+      interrupt: false,
+      radioList: [],
+      valueName: "exception_type", //绑定的字段名称
+      required: true, //必填
+      checking: `base`,
+    }, {
+      label: "服务等级",
+      error: false,
+      errMsg: "",
+      hint: "",
+      type: "radio",
+      value: "",
+      interrupt: false,
+      radioList: [],
+      valueName: "service_level", //绑定的字段名称
+      required: true, //必填
+      checking: `base`,
+    }, {
+      label: "评估意见",
+      error: false,
+      errMsg: "",
+      type: "textarea",
+      value: "",
+      placeholder: "请填写",
+      valueName: "evaluation_comment",
+      required: false,
+      checking: "base"
+    }, {
+      label: "备注",
+      error: false,
+      errMsg: "",
+      type: "textarea",
+      value: "",
+      placeholder: "请填写",
+      valueName: "remarks",
+      required: false,
+      checking: "base"
+    }],
+    "content": {
+      "sa_serviceorderid": "0"
+    }
+  },
+  onLoad(options) {
+    getApp().globalData.Language.getLanguagePackage(this, '新建申请单');
+    this.setData({
+      type: options.type || "default"
+    })
+    console.log("options.type", options.type)
+    if (options.type == 'admin') {
+      this.data.form.unshift({
+        label: "企业名称",
+        error: false,
+        errMsg: "",
+        type: "route",
+        url: "/select/agent/index",
+        params: {
+          "id": "20220920083901",
+          "content": {
+            "nocache": true,
+            "pageSize": 20,
+            "pageNumber": 1,
+            "where": {
+              "condition": "",
+              "type": 17
+            }
+          },
+        },
+        query: '&radio=true&idname=sys_enterpriseid',
+        value: "",
+        placeholder: "选择企业",
+        valueName: "sys_enterpriseid",
+        checking: "base",
+        required: true,
+        interrupt: true
+      })
+      this.setData({
+        form: this.data.form
+      })
+    }
+
+    this.getOptions()
+    this.setOrdeForm();
+  },
+  submit() {
+    this.setData({
+      loading: true
+    })
+    let content = {
+      ...this.data.content,
+      ...this.selectComponent("#Form").submit()
+    };
+    content.province = content.region[0] || "";
+    content.city = content.region[1] || "";
+    content.county = content.region[2] || "";
+    delete content.region
+    try {
+      if (content.sa_orderid.length) {
+        content.sa_orderid = content.sa_orderid[1][0]
+      } else {
+        content.sa_orderid = 0
+      }
+    } catch (error) {
+      content.sa_orderid = 0
+    }
+
+    try {
+      if (content.sys_enterpriseid.length) {
+        content.sys_enterpriseid = content.sys_enterpriseid[1][0]
+      } else {
+      }
+    } catch (error) {
+    }
+
+    _Http.basic({
+      "id": "20230206091403",
+      content
+    }).then(res => {
+      this.setData({
+        loading: false
+      })
+      console.log("创建申请单", res)
+      if (res.code == 1) {
+        wx.navigateTo({
+          url: `/E-service/serviceBillList/detail?id=${res.data.sa_serviceorderid}&type=${this.data.type}`,
+          success: () => {
+            wx.showToast({
+              title: getApp().globalData.Language.getMapText(content.sa_serviceorderid == 0 ? '创建成功' : '保存成功'),
+              icon: "none",
+            })
+          },
+        })
+
+      } else {
+        wx.showToast({
+          title: res.code != '1' ? res.msg : getApp().globalData.Language.getMapText('保存成功'),
+          icon: "none",
+          mask: true
+        })
+      }
+    })
+  },
+  interrupt({
+    detail
+  }) {
+    if (detail.data.valueName == "servicetype") {
+      detail.form[detail.form.findIndex(v => v.valueName == 'servicetype')] = detail.data;
+      this.setData({
+        form: detail.form
+      })
+      this.setOrdeForm();
+    } else if (detail.temporary.item.valueName == "sys_enterpriseid") {
+      detail.form[detail.form.findIndex(v => v.valueName == 'sys_enterpriseid')].value = detail.data.value;
+      this.setData({
+        form: detail.form
+      })
+      this.setOrdeForm();
+      wx.navigateBack()
+    }
+  },
+  setOrdeForm(e) {
+    let value = this.data.form.find(v => v.valueName == 'servicetype').value,
+      type = this.data.type,
+      form = this.data.form;
+    if (['售中', '售后'].includes(value)) {
+      if (type == 'default') {
+        // 选择自己企业的订单
+        if (!form.some(v => v.valueName == 'sa_orderid')) form.splice(form.findIndex(v => v.valueName == 'billdate'), 0, {
+          label: "订单号",
+          error: false,
+          errMsg: "",
+          type: "route",
+          url: "/packageA/toolBill/modules/selectOrder/index",
+          params: {
+            "id": "20230206091503",
+            "content": {
+              "pageSize": 20,
+              "pageNumber": 1
+            }
+          },
+          query: '&radio=true',
+          value: "",
+          placeholder: "选择订单号",
+          valueName: "sa_orderid",
+          checking: "base",
+          required: true
+        })
+      } else {
+        let sys_enterpriseid = form[0].value
+        // 选择其他其他的订单
+        form.splice(form.findIndex(v => v.valueName == 'servicetype') + 1, form.some(v => v.valueName == 'sa_orderid') ? 1 : 0, {
+          label: "订单号",
+          error: false,
+          errMsg: "",
+          type: "route",
+          url: "/packageA/toolBill/modules/selectOrder/index",
+          params: {
+            "id": "20230206091503",
+            "content": {
+              "pageSize": 20,
+              "pageNumber": 1,
+              "sys_enterpriseid": sys_enterpriseid.length ? sys_enterpriseid[1][0] : '',
+              "where": {
+                "condition": ""
+              }
+            }
+          },
+          query: '&radio=true',
+          value: "",
+          placeholder: "选择订单号",
+          valueName: "sa_orderid",
+          disabled: sys_enterpriseid.length == 0,
+          checking: "base",
+          required: true
+        })
+      }
+      this.setData({
+        form
+      })
+    } else {
+      this.setData({
+        form: this.data.form.filter(v => v.valueName != 'sa_orderid')
+      })
+    }
+  },
+  getOptions() {
+    let form = this.data.form;
+    // 服务类型
+    let servicetypes = _Http.servicetypes || [];
+    if (!servicetypes.length) {
+      _Http.basic({
+        "id": 20230206112003,
+        "content": {},
+      }).then(res => {
+        console.log("服务类型", res)
+        if (res.code == 1) {
+          servicetypes = res.data.map(v => {
+            return {
+              id: v.value,
+              name: v.value,
+            }
+          });
+          let data = form.find(v => v.valueName == 'servicetype');
+          data.radioList = servicetypes;
+          data.value = data.value || servicetypes[0].id;
+          _Http.servicetypes = servicetypes;
+          this.setData({
+            form
+          })
+        }
+      })
+    } else {
+      let data = form.find(v => v.valueName == 'servicetype');
+      data.radioList = servicetypes;
+      data.value = data.value || servicetypes[0].id;
+      this.setData({
+        form
+      })
+    }
+
+    // 应用系统
+    let class1s = _Http.class1s || [];
+    if (!class1s.length) {
+      _Http.basic({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 1000,
+          "typename": "systemapp",
+        },
+      }).then(res => {
+        console.log("应用系统", res)
+        if (res.code == 1) {
+          class1s = res.data.map(v => {
+            return {
+              id: v.value,
+              name: v.value,
+            }
+          });
+          let data = form.find(v => v.valueName == 'class1');
+          data.radioList = class1s;
+          data.value = data.value || class1s[0].id;
+          _Http.class1s = class1s;
+          this.setData({
+            form
+          })
+        }
+      })
+    } else {
+      let data = form.find(v => v.valueName == 'class1');
+      data.radioList = class1s;
+      data.value = data.value || class1s[0].id;
+      this.setData({
+        form
+      })
+    }
+
+    // 客诉大类
+    let class2s = _Http.class2s || [];
+    if (!class2s.length) {
+      _Http.basic({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 1000,
+          "typename": "customerclass",
+        },
+      }).then(res => {
+        console.log("客诉大类", res)
+        if (res.code == 1) {
+          class2s = res.data.map(v => {
+            return {
+              id: v.value,
+              name: v.value,
+            }
+          });
+          let data = form.find(v => v.valueName == 'class2');
+          data.radioList = class2s;
+          data.value = data.value || class2s[0].id;
+          _Http.class2s = class2s;
+          this.setData({
+            form
+          })
+        }
+      })
+    } else {
+      let data = form.find(v => v.valueName == 'class2');
+      data.radioList = class2s;
+      data.value = data.value || class2s[0].id;
+      this.setData({
+        form
+      })
+    }
+
+    // 异常类型
+    let exception_types = _Http.exception_types || [];
+    if (!exception_types.length) {
+      _Http.basic({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 1000,
+          "typename": "exceptiontype",
+        },
+      }).then(res => {
+        console.log("异常类型", res)
+        if (res.code == 1) {
+          exception_types = res.data.map(v => {
+            return {
+              id: v.value,
+              name: v.value,
+            }
+          });
+          let data = form.find(v => v.valueName == 'exception_type');
+          data.radioList = exception_types;
+          data.value = data.value || exception_types[0].id;
+          _Http.exception_types = exception_types;
+          this.setData({
+            form
+          })
+        }
+      })
+    } else {
+      let data = form.find(v => v.valueName == 'exception_type');
+      data.radioList = exception_types;
+      data.value = data.value || exception_types[0].id;
+      this.setData({
+        form
+      })
+    }
+
+    // 服务等级
+    let service_levels = _Http.service_levels || [];
+    if (!service_levels.length) {
+      _Http.basic({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 1000,
+          "typename": "servicelevel",
+        },
+      }).then(res => {
+        console.log("服务等级", res)
+        if (res.code == 1) {
+          service_levels = res.data.map(v => {
+            return {
+              id: v.value,
+              name: v.value,
+            }
+          });
+          let data = form.find(v => v.valueName == 'service_level');
+          data.radioList = service_levels;
+          data.value = data.value || service_levels[0].id;
+          _Http.service_levels = service_levels;
+          this.setData({
+            form
+          })
+        }
+      })
+    } else {
+      let data = form.find(v => v.valueName == 'service_level');
+      data.radioList = service_levels;
+      data.value = data.value || service_levels[0].id;
+      this.setData({
+        form
+      })
+    }
+  },
+  // 是否显示全部
+  onChange({
+    detail
+  }) {
+    this.setData({
+      showAll: detail
+    })
+  },
+  /* 表单必填项是否完成 */
+  onConfirm({
+    detail
+  }) {
+    this.setData({
+      disabled: detail
+    })
+  }
+})

+ 3 - 0
E-service/serviceBillList/insert.json

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

+ 24 - 0
E-service/serviceBillList/insert.scss

@@ -0,0 +1,24 @@
+.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;
+	}
+}

+ 6 - 0
E-service/serviceBillList/insert.wxml

@@ -0,0 +1,6 @@
+<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 style="height: 150rpx;" />
+<view class="new-footer">
+    <van-button custom-class='new-submit' disabled='{{disabled || loading}}' loading='{{loading}}' bindclick='submit'>{{language['提交']||'提交'}}</van-button>
+</view>

+ 11 - 1
app.json

@@ -83,6 +83,14 @@
         "dataTeam/index"
       ]
     },
+    {
+      "root": "E-service",
+      "pages": [
+        "serviceBillList/index",
+        "serviceBillList/detail",
+        "serviceBillList/insert"
+      ]
+    },
     {
       "root": "Eservice",
       "pages": [
@@ -129,7 +137,8 @@
         "packageA",
         "Eservice",
         "select",
-        "Universal"
+        "Universal",
+        "E-service"
       ],
       "network": "all"
     }
@@ -145,6 +154,7 @@
     "Yl_Tabbar": "/components/Yl_Tabbar/index",
     "Yl_Field": "/components/Yl_Field/index",
     "Yl_Headline": "/components/Yl_Headline/index",
+    "Yl_Head2": "/components/Yl_Head2/index",
     "van-button": "@vant/weapp/button/index",
     "van-cell": "@vant/weapp/cell/index",
     "van-action-sheet": "@vant/weapp/action-sheet/index",

+ 3 - 1
components/Yl_Field/index.wxml

@@ -108,7 +108,9 @@
             <view style="position: relative;">
                 <view class="content">
                     <van-radio-group value="{{ item.value }}" data-item="{{item}}" bind:change="radioChange">
-                        <van-radio wx:for="{{item.radioList}}" wx:for-item="it" wx:for-index="i" wx:key="it.name" icon-size="16" custom-class="radio {{i != 0 ? 'radio_margin_top' : '' }}" name="{{it.id}}">{{language[it.name]||it.name}}</van-radio>
+                        <view class="radio-group">
+                            <van-radio icon-size="16" wx:for="{{item.radioList}}" wx:for-item="it" wx:for-index="i" wx:key="it.name" custom-class="radio" name="{{it.id}}">{{language[it.name]||it.name}}</van-radio>
+                        </view>
                     </van-radio-group>
                 </view>
                 <view wx:if="{{item.errMsg}}" class="error-tips">{{language[item.errMsg]||item.errMsg}}</view>

+ 10 - 5
components/Yl_Field/index.wxss

@@ -46,10 +46,15 @@
   right: -30rpx;
 }
 
-.radio{
-    margin-right: 26rpx;
-}
 
-.radio_margin_top {
-    margin-top: 10px;
+.radio-group{
+  display: flex;
+  flex-wrap: wrap;
+  padding-top: -10rpx;
 }
+
+.radio{
+  margin-right: 26rpx;
+  flex-shrink: 0;
+  margin-top: 10rpx;
+}

+ 18 - 10
components/Yl_Filtrate/index.js

@@ -40,6 +40,10 @@ Component({
             type: String,
             value: "日期范围"
         },
+        dateRangeName1: {
+            type: String,
+            value: "日期范围"
+        },
         dateRange1: {
             type: Boolean
         }, //是否开启日期范围筛选
@@ -163,16 +167,20 @@ Component({
                 if (MultilevelClass) MultilevelClass.clearChild()
             };
             let obj = {};
-            this.data.list.forEach(v => {
-                if (v.type == 'multilevelClass') {
-                    obj[v.valueKey] = getApp().globalData.temporaryId;
-                    delete(getApp().globalData.temporaryId);
-                } else if (v.type == 'checkbox') {
-                    obj[v.valueKey] = v.value || [];
-                } else {
-                    obj[v.valueKey] = v.value;
-                }
-            });
+            try {
+                this.data.list.forEach(v => {
+                    if (v.type == 'multilevelClass') {
+                        obj[v.valueKey] = getApp().globalData.temporaryId;
+                        delete(getApp().globalData.temporaryId);
+                    } else if (v.type == 'checkbox') {
+                        obj[v.valueKey] = v.value || [];
+                    } else {
+                        obj[v.valueKey] = v.value;
+                    }
+                });
+            } catch (error) {
+
+            }
             if (this.data.dateRange) {
                 obj.startdate = this.data.startdate;
                 obj.enddate = this.data.enddate;

+ 1 - 1
components/Yl_Filtrate/index.wxml

@@ -33,7 +33,7 @@
         </view>
         <view wx:if="{{dateRange1}}" class="groud">
             <view class="label">
-                {{language['预测时间']||'预测时间'}}
+                {{language[dateRangeName1]||dateRangeName1}}
             </view>
             <view class="content time">
                 <picker mode="date" bindchange='changeDate' data-name="periodstart">

+ 154 - 0
components/Yl_Head2/index.js

@@ -0,0 +1,154 @@
+Component({
+  options: {
+    addGlobalClass: true
+  },
+  lifetimes: {
+    attached() {
+      if (wx.getStorageSync('SearchHistory')) this.setData({
+        history: wx.getStorageSync('SearchHistory')
+      })
+      getApp().globalData.Language.getLanguagePackage(this)
+    }
+  },
+  properties: {
+    active: {
+      type: [Number, String],
+      value: 0
+    },
+    tabs: {
+      type: Array,
+      value: [{
+        title: "中止"
+      }]
+    },
+    onChangeTab: {
+      type: Function
+    },
+    onSearch: {
+      type: Function
+    }
+  },
+  data: {
+
+  },
+  methods: {
+    onChange({
+      detail
+    }) {
+      this.triggerEvent("onChangeTab", detail)
+    },
+    /* 开启关闭搜索 */
+    clickSearch() {
+      this.setData({
+        startUsing: !this.data.startUsing
+      });
+      setTimeout(this.setListHeight, 400)
+    },
+    /* 搜索 */
+    confirmSearch(e) {
+      if (this.data.condition == e.detail.value) return;
+      this.setData({
+        condition: e.detail.value
+      })
+      this.triggerEvent("onSearch", e.detail.value)
+    },
+    /* 开始搜索 */
+    startSearch({
+      detail
+    }) {
+      if (this.data.condition == detail) return;
+      this.setData({
+        condition: detail
+      })
+      this.triggerEvent("onSearch", detail)
+      if (this.data.record || detail == '') {
+        let list = this.data.history;
+        if (list.findIndex(v => v == detail) == -1) {
+          list.push(detail)
+          this.setData({
+            history: list
+          });
+          wx.setStorageSync("SearchHistory", list)
+        }
+      }
+    },
+    /* 取消搜索 */
+    endSearch() {
+      this.setData({
+        condition: ""
+      })
+      this.triggerEvent("onSearch", "")
+    },
+    /* 删除搜索历史 */
+    deleteHistory(e) {
+      let that = this;
+      wx.showModal({
+        cancelText: getApp().globalData.Language.getMapText('取消'),
+        confirmText: getApp().globalData.Language.getMapText('确定'),
+        title: getApp().globalData.Language.getMapText('提示'),
+        content: getApp().globalData.Language.getMapText('是否删除所有搜索历史'),
+        complete: ({
+          confirm
+        }) => {
+          if (confirm) {
+            wx.setStorageSync("SearchHistory", [])
+            that.setData({
+              history: []
+            });
+            this.setListHeight();
+          }
+        }
+      })
+    },
+    /* 快速搜索 */
+    clickTag(e) {
+      const {
+        name
+      } = e.currentTarget.dataset;
+      this.setData({
+        condition: name
+      });
+      this.triggerEvent("onSearch", name)
+    },
+    /* 单独删除 */
+    delteTag(e) {
+      const {
+        name
+      } = e.currentTarget.dataset;
+      this.setData({
+        history: this.data.history.filter(v => v != name)
+      });
+      wx.setStorageSync('SearchHistory', this.data.history);
+      this.setListHeight();
+    },
+    /* 设置列表高度 */
+    setListHeight() {
+      let pages = getCurrentPages()[getCurrentPages().length - 1].selectComponent("#ListBox");
+      if (pages) pages.automaticSetHei();
+    },
+    /* 搜索框焦点 */
+    onFocus() {
+      this.setData({
+        showHistory: true
+      });
+      setTimeout(this.setListHeight, 50);
+    },
+    /* 搜索框失焦 */
+    onBlur() {
+      this.setData({
+        showHistory: false
+      })
+      setTimeout(this.setListHeight, 50);
+    },
+    clickFiltration() {
+      let page = getCurrentPages()[getCurrentPages().length - 1].selectComponent("#Filtrate");
+      if (page) {
+        page.setData({
+          show: true
+        })
+      } else {
+        this.triggerEvent("onClick", item)
+      }
+    }
+  }
+})

+ 6 - 0
components/Yl_Head2/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-transition": "@vant/weapp/transition/index"
+  }
+}

+ 25 - 0
components/Yl_Head2/index.scss

@@ -0,0 +1,25 @@
+.tabs {
+	display: flex;
+	width: 100vw;
+	overflow: hidden;
+	background-color: #fff;
+
+	.tab-active-class {
+		font-size: 28rpx;
+		color: #3874F6;
+		text-transform: none;
+	}
+
+	.right {
+		display: flex;
+		align-items: center;
+
+		.option {
+			width: 100rpx;
+			height: 88rpx;
+			text-align: center;
+			line-height: 88rpx;
+			color: #666666;
+		}
+	}
+}

+ 32 - 0
components/Yl_Head2/index.wxml

@@ -0,0 +1,32 @@
+<view class="tabs">
+	<view style="flex: 1;">
+		<van-tabs active="{{ active }}" tab-active-class='tab-active-class' color='#3874F6' bind:change="onChange">
+			<van-tab wx:for="{{tabs}}" wx:key="title" title="{{language[item.title]||item.title}}" />
+		</van-tabs>
+	</view>
+
+	<view class="right">
+		<view class="option" hover-class="navigator-hover" bind:tap="clickSearch">
+			<text class="iconfont icon-a-sousuolansousuo" />
+		</view>
+		<view class="option" hover-class="navigator-hover" bind:tap="clickFiltration">
+			<text class="iconfont icon-shaixuan_xianxing" />
+		</view>
+	</view>
+</view>
+
+<van-transition show="{{ startUsing }}" custom-class="block">
+	<van-search custom-class='Yl_search' value="{{ condition }}" bindfocus='onFocus' bind:blur='onBlur' shape="round"
+		placeholder="{{language['关键字']||'请输入搜索关键词'}}" bind:search='startSearch' bind:clear='endSearch' />
+	<view class="Yl_history" wx:if="{{record}}">
+		<view class="label" wx:if="{{showHistory && history.length}}">
+			<text>{{language['最近搜索记录']||'最近搜索记录'}}</text>
+		</view>
+		<view class="content" wx:if="{{showHistory}}">
+			<van-tag wx:for="{{history}}" style="margin-left: 6rpx;" wx:key="item" size="medium" round data-name="{{item}}"
+				catch:close="delteTag" catchtap="clickTag">
+				{{language[item]||item}}
+			</van-tag>
+		</view>
+	</view>
+</van-transition>

+ 56 - 2
project.private.config.json

@@ -1,6 +1,6 @@
 {
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "projectname": "E_WeChat",
+  "projectname": "班尼戈E订单",
   "setting": {
     "compileHotReLoad": true,
     "urlCheck": false,
@@ -21,5 +21,59 @@
     "useIsolateContext": true
   },
   "libVersion": "3.13.0",
-  "condition": {}
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "新申请单管理",
+          "pathName": "E-service/serviceBillList/index",
+          "query": "type=admin",
+          "scene": null,
+          "launchMode": "default"
+        },
+        {
+          "name": "新申请单",
+          "pathName": "E-service/serviceBillList/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "老申请单管理",
+          "pathName": "/Eservice/workerLeader/serviceBillList/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "老申请单",
+          "pathName": "/Eservice/agent/serviceBillList/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "新申请单创建",
+          "pathName": "E-service/serviceBillList/insert",
+          "query": "type=default",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "首页",
+          "pathName": "pages/tabbar/home/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "/Eservice/agent/serviceBillList/index",
+          "pathName": "Eservice/workOrder/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
 }

+ 91 - 1
utils/Http.js

@@ -15,6 +15,7 @@ class HTTP {
             // this.baseUrl = "https://oms.idcgroup.com.cn:8079";
         }
 
+
         this.init = (content, init = false) => {
             return new Promise((resolve, reject) => {
                 if (init.detail != undefined) init = init.detail;
@@ -23,16 +24,105 @@ class HTTP {
             })
         }
 
-        this.paging = (data, res) => {
+        this.paging = (data, res, that, ownertable, list = [], _Http) => {
             let content = JSON.parse(JSON.stringify(data))
             content.pageNumber = res.pageNumber + 1;
             content.pageTotal = res.pageTotal;
             content.total = res.total;
             content.sort = res.sort;
             if (this.isShowEmpty) this.empty = res.total == 0;
+            if (list.length) this.getTabs(that, ownertable, list, _Http)
             return content;
         }
 
+        //得到缩略图或者压缩图  getType默认得到缩略图传true得到压缩图
+        this.getSpecifiedImage = (obj, getType = false) => {
+            obj.url = this.getImageUrl(obj.url)
+            try {
+                let type = getType ? 'compressed' : 'thumbnail';
+                let imgObj = obj.subfiles.find(v => v.type == type);
+                return this.getImageUrl(imgObj.url || obj.url);
+            } catch (error) {
+                return this.getImageUrl(obj.url);
+            }
+        }
+
+        // 判断图片是本地还是云存储
+        this.getImageUrl = (url) => {
+            if (!url) return '';
+            //判断url中是否存在http,没有的话要拼接 this.baseUrl
+            if (!/^https?:\/\//.test(url)) {
+                url = _Http.baseUrl + url + wx.getStorageSync('userMsg').token;
+            }
+            return url;
+        }
+
+        this.getTabs = (that, ownertable, list = [], _Http) => {
+            if (list.length) _Http.basic({
+                "id": 20221018102001,
+                "content": {
+                    ownertable,
+                    ownerids: list.map(v => v[ownertable + 'id'])
+                }
+            }).then(res => {
+                if (res.code != 1) return;
+                list.forEach(item => item.tags = res.data[item[`${ownertable}id`]] || []);
+                let newList = that.data.list;
+                newList.splice(newList.length - list.length, list.length, ...list);
+                that.setData({
+                    list: newList
+                })
+            })
+        }
+
+        this.getTypes = async (name, _Http) => {
+            let params = null;
+            if (name == 'tags') {
+                params = {
+                    "id": 20221013104401,
+                    "content": {
+                        "nochace": true,
+                        "isExport": 1,
+                        "pageNumber": 1,
+                        sys_systemtagid: 2,
+                        "pageSize": 1000,
+                        "where": {
+                            "condition": ""
+                        }
+                    }
+                }
+            } else {
+                params = {
+                    "classname": "sysmanage.develop.optiontype.optiontype",
+                    "method": "optiontypeselect",
+                    "content": {
+                        "nochace": true,
+                        "pageNumber": 1,
+                        "pageSize": 1000,
+                        "typename": name,
+                        "parameter": {
+                            "siteid": wx.getStorageSync('userMsg').siteid
+                        }
+                    }
+                }
+            }
+            if (!params) return;
+            let res = await _Http.basic(params);
+            return res.code == '1' ? res.data : [];
+        }
+
+        // 千位符格式化金额
+        this.formatMoney = (num, decimalPlaces = 2, prefix = '', removeTrailingZeros = true) => {
+            if (isNaN(num)) return '';
+            let fixedNum = Number(num).toFixed(decimalPlaces);
+            if (removeTrailingZeros) {
+                fixedNum = parseFloat(fixedNum).toString();
+            }
+            let parts = fixedNum.split('.');
+            parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+            return prefix + parts.join('.');
+        }
+
 
     }
     request({

+ 4 - 2
utils/work/apps.js

@@ -312,12 +312,14 @@ function geteservice() {
 		objectname: "sa_workorder"
 	}, {
 		name: "申请单",
-		path: "/Eservice/agent/serviceBillList/index",
+		// path: "/Eservice/agent/serviceBillList/index",
+		path: "/E-service/serviceBillList/index",
 		icon: "work-shenqingdan",
 		// objectname: "sa_serviceorder"
 	}, {
 		name: "申请单管理",
-		path: "/Eservice/workerLeader/serviceBillList/index",
+		// path: "/Eservice/workerLeader/serviceBillList/index",
+		path: "/E-service/serviceBillList/index?type=admin",
 		icon: "work-shenqingdanguanli",
 		// objectname: "sa_serviceorder"
 	}, {