linwenxin 1 éve
szülő
commit
e2007954ca
23 módosított fájl, 1019 hozzáadás és 944 törlés
  1. 12 12
      package-lock.json
  2. 1 1
      package.json
  3. 9 0
      src/api/common.js
  4. 84 0
      src/api/workOrderPool.js
  5. 0 0
      src/assets/logo.jpg
  6. 3 3
      src/components/template/rules_verify.js
  7. 4 37
      src/views/workOrder/workOrderPool/detailModule/CompletionDetails/index.vue
  8. 1 1
      src/views/workOrder/workOrderPool/detailModule/Evaluation/index.vue
  9. 1 1
      src/views/workOrder/workOrderPool/detailModule/OperationDetail/index.vue
  10. 4 41
      src/views/workOrder/workOrderPool/detailModule/Payment/index.vue
  11. 1 1
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/cloudCall.vue
  12. 8 9
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/commitSave.vue
  13. 1 1
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/processFeedback.vue
  14. 33 64
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue
  15. 68 66
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js
  16. 20 50
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/dispatchInfo.js
  17. 11 2
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/otherInfo.js
  18. 170 69
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/pandanxinxi.js
  19. 288 6
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/productColumns.js
  20. 94 62
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js
  21. 126 473
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js
  22. 0 25
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderSelectData.js
  23. 80 20
      src/views/workOrder/workOrderPool/index.vue

+ 12 - 12
package-lock.json

@@ -4405,12 +4405,13 @@
       }
     },
     "@vue/compiler-sfc": {
-      "version": "2.7.15",
-      "resolved": "http://121.41.110.30:4873/@vue%2fcompiler-sfc/-/compiler-sfc-2.7.15.tgz",
-      "integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==",
+      "version": "2.7.16",
+      "resolved": "http://121.41.110.30:4873/@vue%2fcompiler-sfc/-/compiler-sfc-2.7.16.tgz",
+      "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
       "requires": {
-        "@babel/parser": "^7.18.4",
+        "@babel/parser": "^7.23.5",
         "postcss": "^8.4.14",
+        "prettier": "^1.18.2 || ^2.0.0",
         "source-map": "^0.6.1"
       },
       "dependencies": {
@@ -4711,9 +4712,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.13.4",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.4.tgz",
-      "integrity": "sha512-V407QMV24BlmzHYsV7/u7/SuzJByPGqmV0ywCi53lwNJ5kf+3YSmgjHK/hjUBKK5vvXT63QRAurp8W5liIQR3g==",
+      "version": "2.13.6",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.6.tgz",
+      "integrity": "sha512-R5J+InHlzrwtIxNEDHpk4sdjOIjKjYGcwPZ12SUorkSTHkZFZccwj/rp3kz6yLx/b9/OkklkgXmQM194MzH9Lw==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",
@@ -16574,7 +16575,6 @@
       "version": "2.6.2",
       "resolved": "https://registry.npmmirror.com/prettier/-/prettier-2.6.2.tgz",
       "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==",
-      "dev": true,
       "optional": true
     },
     "pretty": {
@@ -20449,11 +20449,11 @@
       },
       "dependencies": {
         "vue": {
-          "version": "2.7.15",
-          "resolved": "http://121.41.110.30:4873/vue/-/vue-2.7.15.tgz",
-          "integrity": "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==",
+          "version": "2.7.16",
+          "resolved": "http://121.41.110.30:4873/vue/-/vue-2.7.16.tgz",
+          "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==",
           "requires": {
-            "@vue/compiler-sfc": "2.7.15",
+            "@vue/compiler-sfc": "2.7.16",
             "csstype": "^3.1.0"
           }
         }

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "@turf/turf": "^6.5.0",
     "@vue-office/excel": "^1.3.0",
     "@vue/composition-api": "^1.7.1",
-    "@zjlib/element-plugins": "^2.13.4",
+    "@zjlib/element-plugins": "^2.13.6",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 9 - 0
src/api/common.js

@@ -1,5 +1,14 @@
 import request, { postBlob, getBlob, handleImport } from '@/utils/request'
 
+//高德省市区街道
+export function lbsAmapRegion(params) {
+  return request({
+    url: '/common/region/list',
+    method: 'get',
+    params
+  })
+}
+
 // 模板下载
 export function commonTemplateDownload(params, name) {
   return getBlob({

+ 84 - 0
src/api/workOrderPool.js

@@ -0,0 +1,84 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function orderBaseSave(data) {
+  return request({
+    url: `/order/base/save`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderBaseProductList(params) {
+  return request({
+    url: `/order/base/product/list`,
+    method: 'post',
+    params
+  })
+}
+
+export function orderBaseProductAdd(data) {
+  return request({
+    url: `/order/base/product/add`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderBaseProductUpdate(data) {
+  return request({
+    url: `/order/base/product/update`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderBaseProductDelete(params) {
+  return request({
+    url: `/order/base/product/delete`,
+    method: 'post',
+    params
+  })
+}
+
+
+
+export function orderBaseList(data) {
+  return request({
+    url: `/order/base/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderBaseListExport(data, name) {
+  return postBlob({
+    url: '/order/base/list/export',
+    data,
+    name
+  })
+}
+
+export function orderBaseStatusCount(data) {
+  return request({
+    url: `/order/base/status/count`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderBaseLogList(params) {
+  return request({
+    url: `/order/base/log/list`,
+    method: 'post',
+    params
+  })
+}
+
+export function orderBaseDetail(params) {
+  return request({
+    url: `/order/base/detail`,
+    method: 'post',
+    params
+  })
+}
+

+ 0 - 0
src/assets/logo.png → src/assets/logo.jpg


+ 3 - 3
src/components/template/rules_verify.js

@@ -30,7 +30,7 @@ export const mobile = [{
 // 邮箱校验非必填
 export const email = [{
   validator: (rule, value, callback) => {
-	var result = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(value);
+    var result = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(value);
     if (value && !result) {
       callback(new Error('请输入正确的邮箱'))
     } else {
@@ -43,7 +43,7 @@ export const email = [{
 // 身份证号码校验非必填
 export const idcard = [{
   validator: (rule, value, callback) => {
-	var result = /^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}[\dXx]$/g.test(value);
+    var result = /^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}[\dXx]$/g.test(value);
     if (value && !result) {
       callback(new Error('请输入正确的身份证号'))
     } else {
@@ -56,7 +56,7 @@ export const idcard = [{
 // 网址校验非必填
 export const httpUrl = [{
   validator: (rule, value, callback) => {
-	var result = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/.test(value);
+    var result = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/.test(value);
     if (value && !result) {
       callback(new Error('请输入正确的网址'))
     } else {

+ 4 - 37
src/views/workOrder/workOrderPool/detailModule/CompletionDetails/index.vue

@@ -4,7 +4,7 @@
       <zj-form-container style="margin-bottom:40px">
         <!-- 完工明细 -->
         <zj-form-module v-if="!look" title="完工明细">
-          <zj-table ref="tableEl" :isDrop="true" :columns="completionDetailColumns" :tableData="completionDetailData"
+          <zj-table  :isDrop="true" :columns="completionDetailColumns" :tableData="completionDetailData"
             :tableAttributes="{
               border: true
             }"></zj-table>
@@ -20,7 +20,7 @@
             <el-button v-if="orderDetailFiles.length" type="primary" size="mini" @click="imgVisible = true"> 预览图片
             </el-button>
           </div>
-          <zj-table ref="tableEl" :isDrop="true" :columns="barcodeColumns" :tableData="barcodeData" :tableAttributes="{
+          <zj-table  :isDrop="true" :columns="barcodeColumns" :tableData="barcodeData" :tableAttributes="{
             border: true
           }"></zj-table>
         </zj-form-module>
@@ -84,16 +84,7 @@
 </template>
 
 <script>
-//完工明细--------------------------------------------
-// import otherMixin from '../createWorker/mixin/otherMixin'
-// import {
-//   orderInstallOverList,
-//   orderInstallOverDetail,
-//   orderRepairOverDetail,
-//   orderCancelInstallGatherDetail
-// } from '@/api/detailModule'
 export default {
-  // mixins: [otherMixin],
   props: {},
   filters: {
     imgTitleChange(value) {
@@ -304,15 +295,7 @@ export default {
           render: (h, { row, column, $index }) => {
             return (
               <div style="padding-left:6px">
-                {row.type == 'ALL'
-                  ? '一体机'
-                  : row.type == 'INSIDE'
-                    ? '内机'
-                    : row.type == 'OUT'
-                      ? '外机'
-                      : row.type == 'INSIDE_OUT'
-                        ? '一内一外'
-                        : ''}
+                
               </div>
             )
           }
@@ -332,7 +315,6 @@ export default {
           render: (h, { row, column, $index }) => {
             return (
               <div style="padding-left:6px">
-                {row.mainWorkerName}{row.assistWorkerName ? ',' : ''}{row.assistWorkerName}
               </div>
             )
           }
@@ -345,15 +327,7 @@ export default {
           render: (h, { row, column, $index }) => {
             return (
               <div style="padding-left:6px">
-                {row.status == 0
-                  ? '未采集'
-                  : row.status == 1
-                    ? '已采集'
-                    : row.status == 2
-                      ? '作废'
-                      : row.status == 3
-                        ? '临时保存'
-                        : ''}
+                
               </div>
             )
           }
@@ -372,7 +346,6 @@ export default {
           render: (h, { row, column, $index }) => {
             return (
               <div style="padding-left:6px">
-                {row.detailSource == 0 ? '总部' : row.detailSource == 2 ? '家盛茂' : '广佛'}
               </div>
             )
           }
@@ -417,12 +390,6 @@ export default {
             )
           }
         },
-        // {
-        //   columnAttributes: {
-        //     label: '外机条码',
-        //     prop: 'brandName'
-        //   }
-        // },
         {
           columnAttributes: {
             label: '开机密码',

+ 1 - 1
src/views/workOrder/workOrderPool/detailModule/Evaluation/index.vue

@@ -3,7 +3,7 @@
     <zj-page-fill class="neibuview">
       <zj-form-container>
         <zj-form-module title="评价信息">
-          <zj-table ref="tableEl" :is-drop="true" :columns="evaluationColumns" :table-data="evaluationData"
+          <zj-table  :is-drop="true" :columns="evaluationColumns" :table-data="evaluationData"
             :table-attributes="{
               border: true
             }" />

+ 1 - 1
src/views/workOrder/workOrderPool/detailModule/OperationDetail/index.vue

@@ -3,7 +3,7 @@
     <zj-page-fill class="neibuview">
       <zj-form-container>
         <zj-form-module title="操作明细">
-          <zj-table ref="tableEl" :columns="operationDetailColumns" :tableData="operationDetailData" :tableAttributes="{
+          <zj-table  :columns="operationDetailColumns" :tableData="operationDetailData" :tableAttributes="{
             border: true
           }"></zj-table>
         </zj-form-module>

+ 4 - 41
src/views/workOrder/workOrderPool/detailModule/Payment/index.vue

@@ -3,7 +3,7 @@
     <!-- 支付费用-安装 -->
     <zj-form-module v-if="~[1, 2, 3, 4].indexOf(this.orderType)" title="支付费用">
       <zj-table
-        ref="tableEl"
+        
         :is-drop="true"
         :columns="paymentColumns"
         :table-data="paymentData"
@@ -21,7 +21,7 @@
         :modal-append-to-body="false"
       >
         <zj-table
-          ref="tableEl"
+          
           :is-drop="true"
           :columns="installColumns"
           :table-data="installTableData"
@@ -35,14 +35,6 @@
     <zj-form-module v-else title="支付费用">
       <div class="ZF_header">维修费用信息</div>
       <el-descriptions class="margin-top" :column="3" :border="true" :label-style="{ width: '140px' }">
-        <!-- <el-descriptions-item>
-          <template slot="label"> 网点名称 </template>
-          {{ info.websitName }}
-        </el-descriptions-item>
-        <el-descriptions-item>
-          <template slot="label"> 工单号 </template>
-          {{ info.orderBaseId }}
-        </el-descriptions-item> -->
         <el-descriptions-item>
           <template slot="label"> 流水号 </template>
           {{ info.orderPayStreamWaterId }}
@@ -95,7 +87,7 @@
       <br>
       <div class="ZF_header">支付明细</div>
       <zj-table
-        ref="tableEl"
+        
         :is-drop="true"
         :columns="repairPaymentColumns"
         :table-data="repairPaymentData"
@@ -103,17 +95,6 @@
           border: true
         }"
       />
-      <!--  -->
-      <!-- <zj-table
-        v-if="~[6].indexOf(this.orderType)"
-        ref="tableEl"
-        :is-drop="true"
-        :columns="washPaymentColumns"
-        :table-data="washPaymentData"
-        :table-attributes="{
-          border: true
-        }"
-      /> -->
       <br>
       <el-descriptions class="margin-top" :column="1" :border="false" :label-style="{ width: '140px' }">
         <el-descriptions-item>
@@ -164,7 +145,7 @@
       <br>
       <div class="ZF_header">交易记录</div>
       <zj-table
-        ref="tableEl"
+        
         :is-drop="true"
         :columns="repairBusinessColumns"
         :table-data="repairBusinessData"
@@ -177,7 +158,6 @@
 </template>
 
 <script>
-// import { getOrderPayOutlayList, getOrderPayOutlayFileList, getOrderPayOutlayDetail } from '@/api/detailModule'
 export default {
   data() {
     return {
@@ -194,10 +174,6 @@ export default {
         chargeValue: '',
         remark: '',
         payTime: '',
-        // websitName:'',
-        // websitName:'',
-        // websitName:'',
-        // websitName:'',
         fileUrl: [],
         qty: ''
       },
@@ -211,13 +187,6 @@ export default {
   computed: {
     paymentColumns() {
       return [
-        // {
-        //   columnAttributes: {
-        //     label: 'ID',
-        //     prop: 'orderBaseId',
-        //     width: 200
-        //   }
-        // },
         {
           columnAttributes: {
             label: '辅材单号',
@@ -244,12 +213,6 @@ export default {
             prop: 'createBy'
           }
         },
-        // {
-        //   columnAttributes: {
-        //     label: '是否被删除',
-        //     prop: 'flag'
-        //   }
-        // },
         {
           columnAttributes: {
             label: '支付状态',

+ 1 - 1
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/cloudCall.vue

@@ -76,7 +76,7 @@ export default {
       }
     },
     rigClick() {
-      var { unicomIntegratedId, unicomIntegratedType } = JSON.parse(localStorage.getItem('supply_user'))
+      var { unicomIntegratedId, unicomIntegratedType } = JSON.parse(localStorage.getItem('greemall_user'))
       this.form.unicomIntegratedId = unicomIntegratedId || ''
       this.form.unicomIntegratedType = unicomIntegratedType || ''
       this.dialogbol = true

+ 8 - 9
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/commitSave.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="withinLine">
     <el-button type="primary" size="mini" @click="save">{{
-      orderInfo.orderStatus == 'A1101' || !orderInfo.orderStatus ? '下派工单' : '保存'
+      orderInfo.id ? '保存' : '下派工单'
     }}</el-button>
   </div>
 </template>
@@ -9,18 +9,17 @@
 <script>
 import buttonMixin from './button_mixin.js'
 import { EventBus } from '@/utils/eventBus'
+import { orderBaseSave } from "@/api/workOrderPool.js"
 export default {
   mixins: [buttonMixin],
-  props: {
-    cp_gpsAddress: {
-      type: String,
-      default: ''
-    }
-  },
   methods: {
     save() {
-      this.acquireVerify(this, 'allVerify')(() => {
-        
+      this.acquireVerify(this, 'allVerify')((v) => {
+        if (v) {
+          orderBaseSave(this.orderInfo).then(res => {
+            EventBus.$emit('handleOrderClone')
+          })
+        }
       })
     }
   }

+ 1 - 1
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/buttons/processFeedback.vue

@@ -77,7 +77,7 @@ export default {
   computed: {
     // 用户信息
     userInfo() {
-      return JSON.parse(localStorage.getItem('supply_user'))
+      return JSON.parse(localStorage.getItem('greemall_user'))
     },
     formItems() {
 return []

+ 33 - 64
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue

@@ -1,15 +1,15 @@
 <template>
-  <zj-page-container>
+  <zj-page-container v-if="orderInfo">
     <zj-page-fill class="neibuview">
       <zj-form-container ref="formRef" :form-data="orderInfo" :form-rules="formRules" :form-attributes="{ size: 'mini' }">
         <!-- 派工信息 创建不需要 -->
-        <zj-form-module title="派工信息" label-width="68px" :form-data="orderInfo" :form-items="dispatchInfo">
+        <zj-form-module v-if="id" title="派工信息" label-width="68px" :form-data="orderInfo" :form-items="dispatchInfo">
           <div slot="internal-bottom">
             <copy-info text="复制工单信息" :info="dispatchInfo" :order-info="orderInfo" />
           </div>
           <div slot="right" style="width: 55%; position: relative">
             <div class="pgxxTable">
-              <zj-table key="paigongxinxitable" :columns="pgxxColumns" :table-data="pgxxTableData" :table-attributes="{
+              <zj-table key="paigongxinxitable" :columns="logColumns" :table-data="logList" :table-attributes="{
                 height: '100%',
                 border: true
               }" />
@@ -17,17 +17,15 @@
           </div>
         </zj-form-module>
         <!-- 基本信息 -->
-        <zj-form-module title="基本信息" label-width="100px" :form-data="orderInfo" :form-items="basicInfo" />
+        <zj-form-module title="基本信息" :form-data="orderInfo" :form-items="basicInfo" />
         <!-- 服务信息 -->
-        <zj-form-module title="服务信息" label-width="100px" :form-data="orderInfo" :form-items="serviceInfo" />
+        <zj-form-module title="服务信息" label-width="110px" :form-data="orderInfo" :form-items="serviceInfo" />
         <!-- 产品信息 -->
-        <zj-form-module :title="`<span style='color:red'>*</span> ${orderInfo.serviceCategoryId == 1 ? '产品信息' : '服务内容'}`"
-          :form-data="orderInfo" :form-items="product">
-        </zj-form-module>
+        <zj-form-module title="产品信息" :form-data="orderInfo" :form-items="product" />
         <!-- 其它信息 -->
-        <zj-form-module title="其它信息" label-width="80px" :form-data="orderInfo" :form-items="otherInfo" />
+        <zj-form-module title="其它信息" :form-data="orderInfo" :form-items="otherInfo" />
         <!-- 派单信息 -->
-        <zj-form-module label-width="100px" title="派单信息" :form-data="orderInfo" :form-items="pandanxinxi" />
+        <zj-form-module title="派单信息" label-width="100px" :form-data="orderInfo" :form-items="pandanxinxi" />
       </zj-form-container>
     </zj-page-fill>
     <!-- 操作按钮 -->
@@ -35,44 +33,26 @@
       <div style="box-sizing: border-box;padding: 10px 10px 0;" v-if="id">
         <!-- 关闭 -->
         <close-button />
-        <!-- 临时保存 -->
-        <commit-temp-save v-if="~btnRestrict.indexOf(25)" :order-info="orderInfo" :order-type="orderType"
-          @upoptions="upoptions" />
-        <!-- 关闭工单 -->
-        <close-order v-if="~btnRestrict.indexOf(1)" :order-info="{ ...orderInfo }" :order-type="orderType"
-          @upoptions="upoptions" />
-        <!-- 过程反馈 -->
-        <process-feedback v-if="~btnRestrict.indexOf(11)" :order-info="orderInfo" :order-type="orderType"
-          @upoptions="upoptions" />
-        <!-- 驳回 -->
-        <div class="withinLine">
-          <rejectOrder v-if="~btnRestrict.indexOf(13)" :order-info="orderInfo" @upoptions="upoptions" />
-        </div>
-        <!-- 备注 -->
-        <process-feedback v-if="~btnRestrict.indexOf(14)" :order-info="orderInfo" :order-type="orderType"
-          resultCode_="999" resultCodeName="备注" @upoptions="upoptions" />
-        <!-- 作废 -->
-        <void-view v-if="~btnRestrict.indexOf(15)" :order-info="orderInfo" :order-type="orderType"
-          @upoptions="upoptions" />
-        <!-- 激活工单 -->
-        <activate v-if="~btnRestrict.indexOf(16)" :order-info="orderInfo" :order-type="orderType"
-          @upoptions="upoptions" />
+        <!-- 1,保存  -->
+        <commitSave :orderInfo="orderInfo" :orderType="orderType"/>
+        <!-- 2,过程反馈  -->
+        <!-- 3,设为异常  -->
+        <!-- 4,加急  -->
+        <!-- 5,不加急  -->
+        <!-- 6,取消工单  -->
+        <!-- 7,回访  -->
+        <!-- 8,新建工单 -->
       </div>
       <div style="box-sizing: border-box;padding: 10px 10px 0;" v-else>
         <!-- 关闭 -->
         <close-button />
-        <!-- 临时保存 -->
-        <commit-temp-save :order-info="orderInfo" :order-type="orderType" @upoptions="upoptions" />
-        <!-- 下派工单 -->
-        <commit-save :order-info="orderInfo" :order-type="orderType" :cp_gpsAddress="cp_gpsAddress"
-          @upoptions="upoptions" />
+        <commitSave :orderInfo="orderInfo" :orderType="orderType"/>
       </div>
     </div>
   </zj-page-container>
 </template>
 
 <script>
-import workOrderSelectData from './mixins/workOrderSelectData.js'
 import workOrderLogic from './mixins/workOrderLogic.js'
 import basicInfo from './mixins/basicInfo.js'
 import dispatchInfo from './mixins/dispatchInfo.js'
@@ -80,30 +60,17 @@ import otherInfo from './mixins/otherInfo.js'
 import productColumns from './mixins/productColumns.js'
 import serviceInfo from './mixins/serviceInfo.js'
 import pandanxinxi from './mixins/pandanxinxi.js'
-import commitSave from './buttons/commitSave.vue'
-import commitTempSave from './buttons/commitTempSave.vue'
-import voidView from './buttons/void.vue'
-import processFeedback from './buttons/processFeedback.vue'
-import closeButton from './buttons/closeButton.vue'
 import copyInfo from './buttons/copyInfo.vue'
-import closeOrder from './buttons/closeOrder.vue'
-import activate from './buttons/activate.vue'
-import rejectOrder from './buttons/rejectOrder.vue'
+import closeButton from './buttons/closeButton.vue'
+import commitSave from './buttons/commitSave.vue'
 
 export default {
   components: {
-    activate,
-    closeOrder,
-    commitSave,
-    commitTempSave,
-    voidView,
-    processFeedback,
-    closeButton,
     copyInfo,
-    rejectOrder,
+    closeButton,
+    commitSave
   },
   mixins: [
-    workOrderSelectData,
     workOrderLogic,
     basicInfo,
     dispatchInfo,
@@ -118,18 +85,13 @@ export default {
     },
     allVerify(cb) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
-        if (valid) {
-          cb && cb()
-        }
+        cb && cb(valid, invalidFields, errLabels)
       })
     },
     appointVerify(arr, cb) {
-      this.$refs.formRef.validateField_fx(arr, (valid, invalidFields, errLabels) => {
-          if (valid) {
-            cb && cb()
-          }
-        }
-      )
+      this.$refs.formRef.validateField(arr, (valid, invalidFields, errLabels) => {
+        cb && cb(valid, invalidFields, errLabels)
+      })
     }
   }
 }
@@ -167,4 +129,11 @@ export default {
     margin-bottom: 10px;
   }
 }
+
+.redbordererr {
+  ::v-deep .el-form-item {
+    margin: 0 !important;
+    overflow: hidden;
+  }
+}
 </style>

+ 68 - 66
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js

@@ -2,7 +2,12 @@ import { lbsAmapRegion } from '@/api/common.js'
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 export default {
   data() {
-    return { provinceList: [], cityList: [], areaList: [], streetList: [], centerDialogVisible: false, selListData: [] }
+    return {
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      streetList: [],
+    }
   },
   computed: {
     // 基本信息数据模型
@@ -62,15 +67,15 @@ export default {
             rules: this.formOptions.gpsAddress.isRules,
             errLabel: '省'
           },
-          options: this.provinceList.map((v, i) => ({ value: v.lbsId, label: v.name })),
+          options: this.provinceList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
             change: () => {
               // 获取省名称
-              this.orderInfo.province = this.provinceList.find(item => item.lbsId === val).name
+              this.orderInfo.province = this.provinceList.find(item => item.id === val)?.name || ''
               // 清除市区街道以及详细地址数据
               this.delDataK(1)
-              lbsAmapRegion({ parentLbsId: val }).then(res => {
+              lbsAmapRegion({ pid: val }).then(res => {
                 this.cityList = res.data
               })
             }
@@ -87,15 +92,15 @@ export default {
             rules: this.formOptions.gpsAddress.isRules,
             errLabel: '市'
           },
-          options: this.cityList.map((v, i) => ({ value: v.lbsId, label: v.name })),
+          options: this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
             change: () => {
               // 获取市名称
-              this.orderInfo.city = this.cityList.find(item => item.lbsId === val).name
+              this.orderInfo.city = this.cityList.find(item => item.id === val).name
               // 清除区街道以及详细地址数据
               this.delDataK(2)
-              lbsAmapRegion({ parentLbsId: val }).then(res => {
+              lbsAmapRegion({ pid: val }).then(res => {
                 this.areaList = res.data
               })
             }
@@ -112,15 +117,15 @@ export default {
             rules: this.formOptions.gpsAddress.isRules,
             errLabel: '区'
           },
-          options: this.areaList.map((v, i) => ({ value: v.lbsId, label: v.name })),
+          options: this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
             change: () => {
               // 获取区名称
-              this.orderInfo.area = this.areaList.find(item => item.lbsId === val).name
+              this.orderInfo.area = this.areaList.find(item => item.id === val).name
               // 清除街道以及详细地址数据
               this.delDataK(3)
-              lbsAmapRegion({ parentLbsId: val }).then(res => {
+              lbsAmapRegion({ pid: val }).then(res => {
                 this.streetList = res.data
               })
             }
@@ -137,12 +142,12 @@ export default {
             rules: this.formOptions.gpsAddress.isRules,
             errLabel: '街道'
           },
-          options: this.streetList.map((v, i) => ({ value: v.lbsId, label: v.name })),
+          options: this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
             change: () => {
               // 获取街道名称
-              this.orderInfo.street = this.streetList.find(item => item.lbsId === val).name
+              this.orderInfo.street = this.streetList.find(item => item.id === val).name
               // 清除详细地址数据
               this.delDataK(4)
             }
@@ -167,33 +172,34 @@ export default {
                   formData.lat = data.center[1]
                   // 获取定位的省市区街道
                   var { province, city, district, township } = data.data.addressComponent
+                  console.log(province, city, district, township)
                   // 获取选中省名称id
-                  var { lbsId, name } = this.provinceList.find(item => item.name === province)
-                  formData.provinceId = lbsId
+                  var { id, name } = this.provinceList.find(item => item.name === province)
+                  formData.provinceId = id
                   formData.province = name
                   // 请求市选项
-                  lbsAmapRegion({ parentLbsId: formData.provinceId }).then(res => {
+                  lbsAmapRegion({ pid: formData.provinceId }).then(res => {
                     // 赋值市选项
                     this.cityList = res.data
                     // 获取选中市名称id
-                    var { lbsId, name } = res.data.find(item => item.name === city)
-                    formData.cityId = lbsId
+                    var { id, name } = res.data.find(item => item.name === city)
+                    formData.cityId = id
                     formData.city = name
                     // 请求区选项
-                    lbsAmapRegion({ parentLbsId: formData.cityId }).then(res => {
+                    lbsAmapRegion({ pid: formData.cityId }).then(res => {
                       // 赋值区选项
                       this.areaList = res.data
                       // 获取选中区名称id
-                      var { lbsId, name } = res.data.find(item => item.name === district)
-                      formData.areaId = lbsId
+                      var { id, name } = res.data.find(item => item.name === district)
+                      formData.areaId = id
                       formData.area = name
                       // 请求街道选项
-                      lbsAmapRegion({ parentLbsId: formData.areaId }).then(res => {
+                      lbsAmapRegion({ pid: formData.areaId }).then(res => {
                         // 赋值街道选项
                         this.streetList = res.data
                         // 获取选中街道名称id
-                        var { lbsId, name } = res.data.find(item => item.name === township)
-                        formData.streetId = lbsId
+                        var { id, name } = res.data.find(item => item.name === township)
+                        formData.streetId = id
                         formData.street = name
                         // 赋值GPS详细地址
                         formData.gpsAddress = data.name
@@ -217,57 +223,53 @@ export default {
           attributes: { disabled: true, placeholder: 'GPS地址' }
         },
         {
-          isShow:this.formOptions.address.isShow,
+          isShow: this.formOptions.address.isShow,
           name: 'el-input',
           md: 11,
-          formItemAttributes: { label: '', prop: 'address', 'label-width': '0px', rules:this.formOptions.address.isRules },
-          attributes: { disabled: !this.formOptions.address.isEdit , placeholder: '详细地址' }
+          formItemAttributes: { label: '', prop: 'address', 'label-width': '0px', rules: this.formOptions.address.isRules },
+          attributes: { disabled: !this.formOptions.address.isEdit, placeholder: '详细地址' }
         },
       ]
     }
   },
-  watch: {
-    initBool(newVal) {
-      if (newVal) {
-        // 初始化请求省市区街道下拉选项数据
-        lbsAmapRegion().then(res => {
-          this.provinceList = res.data
-          // 创建工单时获取ip地址定位赋值
-          if (!this.id && this.$IpAdd.province) {
-            var item = this.provinceList.find(item => item.name === this.$IpAdd.province)
-            if (item) {
-              this.orderInfo.provinceId = item.lbsId
-              this.orderInfo.province = item.name
-            }
+  methods: {
+    getinitlbslist() {
+      // 初始化请求省市区街道下拉选项数据
+      lbsAmapRegion({ pid: 0 }).then(res => {
+        this.provinceList = res.data
+        // 创建工单时获取ip地址定位赋值
+        if (!this.id && this.$IpAdd.province) {
+          var item = this.provinceList.find(item => item.name === this.$IpAdd.province)
+          if (item) {
+            this.orderInfo.provinceId = item.id
+            this.orderInfo.province = item.name
           }
-          if (this.orderInfo.provinceId) {
-            lbsAmapRegion({ parentLbsId: this.orderInfo.provinceId }).then(res => {
-              this.cityList = res.data
-              // 创建工单时获取ip地址定位赋值
-              if (!this.id && this.$IpAdd.city) {
-                var item2 = this.cityList.find(item => item.name === this.$IpAdd.city)
-                if (item2) {
-                  this.orderInfo.cityId = item2.lbsId
-                  this.orderInfo.city = item2.name
-                }
-              }
-              if (this.orderInfo.cityId) {
-                lbsAmapRegion({ parentLbsId: this.orderInfo.cityId }).then(res => {
-                  this.areaList = res.data
-                })
-              }
-              if (this.orderInfo.areaId) {
-                lbsAmapRegion({ parentLbsId: this.orderInfo.areaId }).then(res => {
-                  this.streetList = res.data
-                })
+        }
+        if (this.orderInfo.provinceId) {
+          lbsAmapRegion({ pid: this.orderInfo.provinceId }).then(res => {
+            this.cityList = res.data
+            // 创建工单时获取ip地址定位赋值
+            if (!this.id && this.$IpAdd.city) {
+              var item2 = this.cityList.find(item => item.name === this.$IpAdd.city)
+              if (item2) {
+                this.orderInfo.cityId = item2.id
+                this.orderInfo.city = item2.name
               }
-            })
-          }
-        })
-      }
-    }
-  },
-  methods: {
+            }
+            if (this.orderInfo.cityId) {
+              lbsAmapRegion({ pid: this.orderInfo.cityId }).then(res => {
+                this.areaList = res.data
+              })
+            }
+            if (this.orderInfo.areaId) {
+              lbsAmapRegion({ pid: this.orderInfo.areaId }).then(res => {
+                this.streetList = res.data
+              })
+            }
+          })
+        }
+      })
+    },
     delDataK(num) {
       if (num <= 1) {
         // 删除市

+ 20 - 50
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/dispatchInfo.js

@@ -1,9 +1,10 @@
+import { orderBaseLogList } from "@/api/workOrderPool.js"
 import copyInfo from '../buttons/copyInfo.vue'
 export default {
   data() {
     return {
       // 派工信息列表
-      pgxxColumns: [
+      logColumns: [
         {
           columnAttributes: {
             label: '操作类别',
@@ -19,43 +20,7 @@ export default {
         },
         {
           columnAttributes: {
-            label: '附件',
-            prop: 'fileUrl',
-            width: 100
-          },
-          render: (h, { row, index }) => {
-            return (
-              <div style={{ padding: '0 6px' }}>
-                {row.fileUrl ? (
-                  <div>
-                    <el-button
-                      type="text"
-                      onClick={() => {
-                        window.open(this.$xdocUrl + encodeURIComponent(this.$imageUrl + row.fileUrl))
-                      }}
-                    >
-                      在线查看附件
-                    </el-button>
-                    <br />
-                    <el-button
-                      type="text"
-                      onClick={() => {
-                        window.open(this.$imageUrl + row.fileUrl)
-                      }}
-                    >
-                      下载附件
-                    </el-button>
-                  </div>
-                ) : (
-                  '无'
-                )}
-              </div>
-            )
-          }
-        },
-        {
-          columnAttributes: {
-            label: '最后操作时间',
+            label: '操作时间',
             prop: 'createTime',
             width: 140
           }
@@ -63,12 +28,12 @@ export default {
         {
           columnAttributes: {
             label: '操作人',
-            prop: 'operator',
+            prop: 'createBy',
             width: 140
           }
         }
       ],
-      pgxxTableData: []
+      logList: []
     }
   },
   computed: {
@@ -100,7 +65,7 @@ export default {
             var { formData } = props
             return (
               <el-input
-                value={`(${formData.createWebsitId || ''})-${formData.createWebsitName || ''}`}
+                value={`${formData.createWebsitId || ''}-${formData.createWebsitName || ''}`}
                 disabled={true}
                 size="mini"
                 placeholder="请输入"
@@ -112,37 +77,42 @@ export default {
           }
         },
         {
-          name: 'el-select',
-          options: [],
+          name: 'el-input',
           md: 24,
           attributes: { disabled: true, placeholder: '请选择' },
-          formItemAttributes: { label: '派工状态', prop: 'dispatchStatus' }
+          formItemAttributes: { label: '派工状态', prop: 'orderStatusText' }
         },
         {
           name: 'el-input',
           md: 24,
           attributes: { disabled: true, placeholder: '请输入' },
-          formItemAttributes: { label: '创建时间', prop: 'appraiseContent' }
+          formItemAttributes: { label: '创建时间', prop: 'createTime' }
         },
         {
           name: 'el-input',
           md: 24,
           attributes: { disabled: true, placeholder: '请输入' },
-          formItemAttributes: { label: '派单时间', prop: 'appraiseContent' }
+          formItemAttributes: { label: '派单时间', prop: 'dispatchTime' }
         },
         {
           name: 'el-input',
           md: 24,
           attributes: { disabled: true, placeholder: '请输入' },
-          formItemAttributes: { label: '接单时间', prop: 'appraiseContent' }
+          formItemAttributes: { label: '接单时间', prop: 'workerReceTime' }
         },
       ]
     }
   },
   methods: {
     // 获取操作记录
-    getCaozuojil() {
-
-    }
+    getOrderBaseLogList() {
+      if (this.id) {
+        orderBaseLogList({
+          orderBaseId: this.id
+        }).then(res => {
+          this.logList = res.data
+        })
+      }
+    },
   }
 }

+ 11 - 2
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/otherInfo.js

@@ -9,8 +9,17 @@ export default {
           isShow: this.formOptions.remark.isShow,
           name: 'el-input',
           md: 24,
-          attributes: { disabled: !this.formOptions.remark.isEdit, type: 'textarea', rows: 3, placeholder: '请输入' },
-          formItemAttributes: { label: '备注', prop: 'remark', rules: this.formOptions.remark.isRules }
+          attributes: {
+            disabled: !this.formOptions.remark.isEdit,
+            type: 'textarea',
+            rows: 3,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '备注',
+            prop: 'remark',
+            rules: this.formOptions.remark.isRules
+          }
         }
       ]
     }

+ 170 - 69
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/pandanxinxi.js

@@ -1,120 +1,197 @@
+import { getWebsit } from "@/api/customerManagement.js"
+import { memberListPageV2 } from "@/api/masterManagement";
+
 export default {
   data() {
     return {
-      customerWebsitRelaList: [],
-      orderColumns: [
-        {
-          columnAttributes: {
-            label: '信息编号',
-            prop: 'pgid'
-          }
-        },
-        {
-          columnAttributes: {
-            label: '工单类型',
-            prop: 'orderSmallType'
-          }
-        },
+      websitList: [],
+      workerList: []
+    }
+  },
+  computed: {
+    workersColumns() {
+      return [
         {
           columnAttributes: {
-            label: '工程师',
+            label: '工程师信息',
             prop: 'workerName'
           }
         },
         {
           columnAttributes: {
-            label: '客户名称',
-            prop: 'userName'
-          }
-        },
-        {
-          columnAttributes: {
-            label: '客户电话',
-            prop: 'userMobile'
-          }
-        },
-        {
-          columnAttributes: {
-            minWidth: '200px',
-            label: '客户地址(点击文字查看更新)',
-            prop: 'address'
-          }
-        }
-      ],
-      engineerListColumns: [
-        {
-          columnAttributes: {
             label: '工程师类型',
-            prop: 'workerType'
+            prop: 'isMaster'
           },
           render: (h, { row, column, index }) => {
             return (
               <div style="padding-left:10px">
-                {row.workerType === 'MASTER' ? '主要工程师' : row.workerType === 'SLAVE' ? '辅助工程师' : ''}
+                {row.isMaster == '1' ? '主要工程师' : row.isMaster == '0' ? '辅助工程师' : ''}
               </div>
             )
           }
         },
         {
           columnAttributes: {
-            label: '工程师信息',
-            prop: 'workerName'
-          }
-        },
-        {
-          columnAttributes: {
             label: '联系电话',
-            prop: 'mobile'
-          },
-          render: (h, { row, column, index }) => {
-            return <div style="padding-left:10px">{row.workerMobile || row.mobile}</div>
+            prop: 'workerMobile'
           }
         },
         {
           columnAttributes: {
-            label: '今日未完工数',
-            prop: 'todayUndone'
+            label: '身份证',
+            prop: 'workerIdcard'
           }
         },
-        {
-          columnAttributes: {
-            label: '总未完工数',
-            prop: 'totalUndone'
+        ...(() => {
+          if (this.formOptions.orderWorkers.isEdit) {
+            return [
+              {
+                columnAttributes: {
+                  label: '操作',
+                },
+                render: (h, { row, column, index }) => {
+                  return row.isMaster != 1 ? (
+                    <div style="padding-left:10px">
+                      <el-button type="text" onClick={() => {
+                        this.orderInfo.orderWorkers.splice(index, 1)
+                      }}>删除</el-button>
+                    </div>
+                  ) : null
+                }
+              },
+            ]
           }
-        }
+          return []
+        })()
       ]
-    }
-  },
-  computed: {
+    },
     pandanxinxi() {
       return [
         {
           isShow: this.formOptions.websitId.isShow,
           name: 'el-select',
-          options: [],
-          md: 6,
-          attributes: { disabled: this.formOptions.websitId.isEdit, placeholder: '请选择' },
-          formItemAttributes: { label: '网点名称', prop: 'websitId',rules: this.formOptions.websitId.isRules, }
+          options: this.websitList,
+          md: 8,
+          attributes: {
+            disabled: !this.formOptions.websitId.isEdit,
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
+          },
+          formItemAttributes: {
+            label: '网点名称',
+            prop: 'websitId',
+            rules: this.formOptions.websitId.isRules,
+          },
+          events: {
+            change: (val) => {
+              this.orderInfo.workerId = ""
+              this.orderInfo.workerName = ""
+              this.orderInfo.workerIdcard = ""
+              this.orderInfo.workerMobile = ""
+              this.workerList = []
+              this.orderInfo.orderWorkers = []
+              this.getWorkers()
+              if (val) {
+                this.orderInfo['websitName'] = this.websitList.find(item => item.value == val).name
+              } else {
+                this.orderInfo['websitName'] = ''
+              }
+            }
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 16,
+          formItemAttributes: { label: '', prop: '' },
+          render: (h, { props }) => {
+            return null
+          }
+        },
+        {
+          isShow: this.formOptions.workerId.isShow,
+          name: 'el-select',
+          options: this.workerList.filter(item => this.orderInfo.workerId == item.value || !~this.orderInfo.orderWorkers.map(item => item.workerId).indexOf(item.value)),
+          md: 8,
+          attributes: {
+            disabled: !this.formOptions.workerId.isEdit,
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
+          },
+          formItemAttributes: {
+            label: '主要工程师',
+            prop: 'workerId',
+            rules: this.formOptions.workerId.isRules,
+          },
+          events: {
+            change: (val) => {
+              var index = this.orderInfo.orderWorkers.map(item => item.isMaster).indexOf(1)
+              if (!!~index) {
+                this.orderInfo.orderWorkers.splice(index, 1)
+              }
+              if (val) {
+                var data = this.workerList.find(item => item.value == val).data
+                this.orderInfo.workerName = data.workerName
+                this.orderInfo.workerIdcard = data.workerIdcard
+                this.orderInfo.workerMobile = data.workerMobile
+                this.orderInfo.orderWorkers.unshift({ ...data, isMaster: 1 })
+                if (this.orderInfo.orderWorkers.length > 1) {
+                  this.orderInfo.orderWorkers.map((item, index) => {
+                    if (index > 0) {
+                      item.isMaster = 0
+                    }
+                  })
+                }
+              } else {
+                this.orderInfo.workerName = ""
+                this.orderInfo.workerIdcard = ""
+                this.orderInfo.workerMobile = ""
+              }
+            }
+          }
+        },
+        {
+          isShow: this.formOptions.orderWorkers.isEdit,
+          name: 'el-select',
+          options: this.workerList.filter(item => !~this.orderInfo.orderWorkers.map(item => item.workerId).indexOf(item.value)),
+          md: 8,
+          attributes: {
+            disabled: !this.formOptions.orderWorkers.isEdit,
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
+          },
+          formItemAttributes: {
+            label: '辅助工程师',
+            prop: 'workerId_fz',
+          },
+          events: {
+            change: (val) => {
+              if (val) {
+                var data = this.workerList.find(item => item.value == val).data
+                this.orderInfo.orderWorkers.push({ ...data, isMaster: 0 })
+                this.orderInfo.workerId_fz = ""
+              }
+            }
+          }
         },
         {
           isShow: this.formOptions.orderWorkers.isShow,
           name: 'slot-component',
           md: 24,
-          attributes: { disabled: this.formOptions.orderWorkers.isEdit },
           formItemAttributes: {
-            label: '工程师',
+            label: '已选工程师',
             prop: 'orderWorkers',
             rules: this.formOptions.orderWorkers.isRules,
-            errLabel: '工程师'
           },
           render: (h, { props }) => {
             var { formData } = props
             return (
               <div>
                 <zj-table
-                  ref="tableEl"
                   isDrop={true}
-                  columns={this.engineerListColumns}
+                  columns={this.workersColumns}
                   tableData={this.orderInfo.orderWorkers}
                 ></zj-table>
               </div>
@@ -124,7 +201,31 @@ export default {
       ]
     }
   },
+  created() {
+    getWebsit({ type: "C", status: true }).then(res => {
+      this.websitList = res.data.map(item => ({
+        label: item.name,
+        value: item.websitId
+      }))
+    })
+  },
   methods: {
-    
-  }
+    getWorkers() {
+      if (this.orderInfo.websitId) {
+        memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }, { "param": "b.websit_id", "compare": "=", "value": this.orderInfo.websitId }] }).then(res => {
+          this.workerList = res.data.records.map(item => ({
+            value: item.id,
+            label: item.nickName,
+            data: {
+              workerId: item.id,
+              workerName: item.nickName,
+              workerIdcard: item.idCard,
+              workerMobile: item.mobile,
+              ...item
+            }
+          }))
+        })
+      }
+    }
+  },
 }

+ 288 - 6
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/productColumns.js

@@ -1,29 +1,311 @@
+import { getClassifyList } from '@/api/goods'
+import { getDataDictionary } from '@/api/dataDictionary.js'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { orderBaseProductList, orderBaseProductAdd, orderBaseProductUpdate, orderBaseProductDelete } from "@/api/workOrderPool.js"
 export default {
   data() {
     return {
-      productColumns:[]
+      isEditIndex: -1,
+      orderBrands: [],
+      classifyList: [],
+      classifyListLv2: []
     }
   },
   computed: {
+    productColumns() {
+      return [
+        {
+          columnAttributes: {
+            label: '产品品牌',
+            prop: 'brandId'
+          },
+          render: (h, { row, column, index }) => {
+            return this.isEditIndex == index ? <div class="redbordererr">
+              <el-form-item label="" lebel-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-select
+                  disabled={!this.formOptions.orderProducts.isEdit}
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  onChange={(val) => {
+                    if (val) {
+                      var data = this.orderBrands.find(item => item.value == val)
+                      row.brandName = data.label
+                    } else {
+                      row.brandName = ""
+                    }
+                  }}
+                  placeholder="请选择">
+                  {this.orderBrands.map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+                </el-select>
+              </el-form-item>
+            </div> : <div style="padding-left:10px">{row.brandName}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品大类',
+            prop: 'mainId'
+          },
+          render: (h, { row, column, index }) => {
+            return this.isEditIndex == index ? <div class="redbordererr">
+              <el-form-item label="" lebel-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-select
+                  disabled={!this.formOptions.orderProducts.isEdit}
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  onChange={(val) => {
+                    row.smallId = ""
+                    row.smallName = ""
+                    if (val) {
+                      var data = this.classifyList.find(item => item.categoryId == val)
+                      row.mainName = data.name
+                    } else {
+                      row.mainName = ""
+                    }
+                  }}
+                  placeholder="请选择">
+                  {this.classifyList.map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
+                </el-select>
+              </el-form-item>
+            </div> : <div style="padding-left:10px">{row.mainName}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品小类',
+            prop: 'smallId'
+          },
+          render: (h, { row, column, index }) => {
+            return this.isEditIndex == index ? <div class="redbordererr">
+              <el-form-item label="" lebel-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-select
+                  disabled={!this.formOptions.orderProducts.isEdit}
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  onChange={(val) => {
+                    if (val) {
+                      var data = this.classifyListLv2.find(item => item.categoryId == val)
+                      row.smallName = data.name
+                    } else {
+                      row.smallName = ""
+                    }
+                  }}
+                  placeholder="请选择">
+                  {this.classifyListLv2.filter(item => item.parentId === row.mainId).map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
+                </el-select>
+              </el-form-item>
+            </div> : <div style="padding-left:10px">{row.smallName}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品机型',
+            prop: 'productName'
+          },
+          render: (h, { row, column, index }) => {
+            return this.isEditIndex == index ? <div class="redbordererr">
+              <el-form-item label="" lebel-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-input
+                  disabled={!this.formOptions.orderProducts.isEdit}
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                >
+                </el-input>
+              </el-form-item>
+            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '数量',
+            prop: 'num'
+          },
+          render: (h, { row, column, index }) => {
+            return this.isEditIndex == index ? <div class="redbordererr">
+              <el-form-item label="" lebel-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-input
+                  disabled={!this.formOptions.orderProducts.isEdit}
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                >
+                </el-input>
+              </el-form-item>
+            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '备注',
+            prop: 'remark'
+          },
+          render: (h, { row, column, index }) => {
+            return this.isEditIndex == index ? <div class="redbordererr">
+              <el-form-item label="" lebel-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`}>
+                <el-input
+                  disabled={!this.formOptions.orderProducts.isEdit}
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                >
+                </el-input>
+              </el-form-item>
+            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+          }
+        },
+        ...(() => {
+          if (this.formOptions.orderProducts.isEdit) {
+            return [
+              {
+                columnAttributes: {
+                  label: '操作',
+                },
+                render: (h, { row, column, index }) => {
+                  return <div style="padding-left:10px">
+                    <el-button type="text" onClick={()=>{
+                      this.delProduct(row.index)
+                    }}>删除</el-button>
+                    {this.isEditIndex == index && <el-button type="text" onClick={()=>{
+                      this.eidtProduct(row.index)
+                    }}>确定</el-button>}
+                    {this.isEditIndex == -1 && <el-button type="text" onClick={() => {
+                      this.isEditIndex = index
+                    }}>编辑</el-button>}
+                  </div>
+                }
+              },
+            ]
+          }
+          return []
+        })()
+      ]
+    },
     product() {
       return [{
+        isShow: this.formOptions.orderProducts.isShow,
         name: 'slot-component',
         md: 24,
         formItemAttributes: {
           label: '',
           'label-width': '0px',
-          prop: 'orderProductList',
-          errLabel: '产品信息'
+          prop: 'orderProducts',
+          errLabel: '产品信息',
+          rules: this.formOptions.orderProducts.isRules
         },
         render: (h, { props }) => {
           return (
-            <zj-table key="chanpinxinxitable" columns={this.productColumns} table-data={this.orderInfo.orderProductList} />
+            <div>
+              {this.formOptions.orderProducts.isEdit ? <div>
+                <el-button size="mini" type="primary" onClick={() => {
+                  this.appointVerify(this.getVfyKey(this.isEditIndex), (v) => {
+                    if (v || !this.orderInfo.orderProducts.length) {
+                      this.isEditIndex = 0
+                      this.orderInfo.orderProducts.unshift({
+                        "brandId": "",
+                        "brandName": "",
+                        "createBy": "",
+                        "createTime": "",
+                        "mainId": "",
+                        "mainName": "",
+                        "num": "",
+                        "orderBaseId": "",
+                        "productId": "",
+                        "productName": "",
+                        "remark": "",
+                        "smallId": "",
+                        "smallName": "",
+                      })
+                    }
+                  })
+                }}>新增</el-button>
+              </div> : null}
+              <zj-table
+                columns={this.productColumns}
+                table-data={this.orderInfo.orderProducts}
+              />
+            </div>
           )
         }
       }]
     },
   },
+  created() {
+    // 获取品牌
+    getDataDictionary({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.dict_type", "compare": "=", "value": "BRAND" }] }).then(res => {
+      this.orderBrands = res.data.records.map(item => ({
+        value: item.dictCode,
+        label: item.dictValue
+      }))
+    })
+    // 获取产品大类小类
+    getClassifyList({ type: 2, status: true }).then(res => {
+      var classifyListLv2 = []
+      this.classifyList = res.data.map(item => {
+        var { children, ...data } = item
+        classifyListLv2.push(...(children || []))
+        return {
+          ...data
+        }
+      });
+      this.classifyListLv2 = classifyListLv2
+    })
+  },
   methods: {
-    
-  }
+    getVfyKey(index) {
+      return [
+        "orderProducts",
+        ...(() => {
+          if (index > -1) {
+            return [
+              `orderProducts.${index}.brandId`,
+              `orderProducts.${index}.mainId`,
+              `orderProducts.${index}.smallId`,
+              `orderProducts.${index}.productName`,
+              `orderProducts.${index}.num`,
+              `orderProducts.${index}.remark`,
+            ]
+          }
+          return []
+        })()
+      ]
+    },
+    // 重新获取赋值
+    getOrderBaseProduct() {
+      if (this.id) {
+        orderBaseProductList({
+          orderBaseId: this.id
+        }).then((res) => {
+          this.orderInfo.orderProducts = res.data || []
+        })
+      }
+    },
+    eidtProduct(row) {
+      this.appointVerify(this.getVfyKey(this.isEditIndex), (v) => {
+        if (v) {
+          if (this.id) {
+            [orderBaseProductAdd, orderBaseProductUpdate][row.id ? 1 : 0](row).then(res => {
+              this.isEditIndex = -1
+              this.getOrderBaseProduct()
+            })
+          } else {
+            this.isEditIndex = -1
+          }
+        }
+      })
+    },
+    delProduct(row, index) {
+      this.appointVerify(this.getVfyKey(this.isEditIndex), (v) => {
+        if (v && this.id) {
+          orderBaseProductDelete({
+            orderProductId: row.id
+          }).then(res => {
+            this.getOrderBaseProduct()
+          })
+        } else {
+          this.orderInfo.orderProducts.splice(index, 1)
+        }
+      })
+    }
+  },
 }

+ 94 - 62
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js

@@ -1,30 +1,24 @@
+import { listPageV2 } from "@/api/workOrder/orderType";
+import { getDataDictionary } from '@/api/dataDictionary.js'
+
 export default {
   data() {
     return {
-      customerOptions: [],
-      BRAND: [],
-      SaleTypeList: [],
-      SON_TYPE: [],
       orderTypeData: [],
-      demandTypeData: [],
-      demandSmallTypeData: [],
-      MAIN_TYPE2: [],
-      serviceCategory: [],
+      orderChannels: []
     }
   },
   computed: {
     serviceInfo() {
       return [
         {
-          isShow: this.formOptions.orderType.isShow,
-          name: 'zj-select',
+          isShow: this.formOptions.orderType.isShow && !this.id,
+          name: 'el-select',
           md: 6,
           options: this.orderTypeData,
           attributes: {
-            selectFirstOne: true,
-            fillMode: 0,
-            placeholder: '请选择',
             disabled: !this.formOptions.orderType.isEdit,
+            placeholder: '请选择',
             clearable: true,
             filterable: true
           },
@@ -32,83 +26,121 @@ export default {
             label: '工单类型',
             prop: 'orderType',
             rules: this.formOptions.orderType.isRules
+          },
+          events: {
+            change: (val) => {
+              if (val) {
+                this.orderInfo.orderTypeText = this.orderTypeData.find(item => item.value == val).label
+              } else {
+                this.orderInfo.orderTypeText = ''
+              }
+            }
+          }
+        },
+        {
+          isShow: this.formOptions.orderType.isShow && this.id,
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !this.formOptions.orderType.isEdit,
+          },
+          formItemAttributes: {
+            label: '工单类型',
+            prop: 'orderTypeText',
+            rules: this.formOptions.orderType.isRules
           }
         },
 
         {
-          isShow: this.formOptions.infoSourceId.isShow,
+          isShow: this.formOptions.orderChannelId.isShow && !this.id,
           name: 'el-select',
           md: 6,
-          options: this.SOURCE,
+          options: this.orderChannels,
           attributes: {
-            disabled: !this.formOptions.infoSourceId.isEdit,
+            disabled: !this.formOptions.orderChannelId.isEdit,
             placeholder: '请选择',
             clearable: true,
             filterable: true
           },
           formItemAttributes: {
-            label: '消息来源',
-            prop: 'infoSourceId',
-            rules: this.formOptions.infoSourceId.isRules
+            label: '工单渠道',
+            prop: 'orderChannelId',
+            rules: this.formOptions.orderChannelId.isRules
+          },
+          events: {
+            change: (val) => {
+              if (val) {
+                this.orderInfo.orderChannelText = this.orderChannels.find(item => item.value == val).label
+              } else {
+                this.orderInfo.orderChannelText = ''
+              }
+            }
           }
         },
         {
-          isShow: this.formOptions.infoChannelId.isShow,
-          name: 'el-select',
+          isShow: this.formOptions.orderChannelId.isShow && this.id,
+          name: 'el-input',
           md: 6,
-          options: this.CHANNEL,
+          options: [],
           attributes: {
-            disabled: !this.formOptions.infoChannelId.isEdit,
-            placeholder: '请选择',
-            clearable: true,
-            filterable: true
+            disabled: !this.formOptions.orderChannelId.isEdit,
           },
           formItemAttributes: {
-            label: '消息渠道',
-            prop: 'infoChannelId',
-            rules: this.formOptions.infoChannelId.isRules
+            label: '工单渠道',
+            prop: 'orderChannelText',
+            rules: this.formOptions.orderChannelId.isRules
           }
         },
 
         {
-          isShow: this.formOptions.expectArrivalTime.isShow,
-          name: 'slot-component',
+          isShow: this.formOptions.appointmentTime.isShow,
+          name: 'el-date-picker',
           md: 6,
-          formItemAttributes: {
-            'label-width': '110px',
-            label: '预计到货时间',
-            prop: 'expectArrivalTime',
-            rules: this.formOptions.expectArrivalTime.isRules
+          attributes: {
+            disabled: !this.formOptions.appointmentTime.isEdit,
+            style: { width: '100%' },
+            placeholder: '请选择',
+            'value-format': 'yyyy-MM-dd HH:mm:ss',
           },
-          render: (h, { props }) => {
-            var { formData } = props
-            return <el-date-picker
-            style="width:100%"
-            placeholder="选择日期时间"
-            type="datetime"
-            valueFormat="yyyy-MM-dd HH:mm:ss"
-            disabled={!this.formOptions.expectArrivalTime.isEdit}
-            value={formData.expectArrivalTime}
-            onInput={val => {
-              formData.expectArrivalTime = val
-              this.orderInfo.expectTime = ''
-              this.orderInfo.expectStartTime = ''
-              this.orderInfo.expectEndTime = ''
-            }}
-            pickerOptions={{
-              disabledDate: time => {
-                let myDate = new Date(formData.buyTime || '')
-                let _beforeDay = myDate.setDate(new Date(formData.buyTime || '').getDate())
-                return time.getTime() < _beforeDay
-              }
-            }}
-          ></el-date-picker>
+          formItemAttributes: {
+            label: '预约上门日期',
+            prop: 'appointmentTime',
+            rules: this.formOptions.appointmentTime.isRules
           }
         },
+
+        {
+          isShow: this.formOptions.saleCompany.isShow,
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !this.formOptions.saleCompany.isEdit,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '销售单位',
+            prop: 'saleCompany',
+            rules: this.formOptions.saleCompany.isRules
+          }
+        }
+
       ]
     }
   },
-  methods: {
-
-  }
+  created() {
+    // 获取工单类型
+    listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "true" }] }).then(res => {
+      this.orderTypeData = res.data.records.map(item => ({
+        value: item.id,
+        label: item.orderSmallTypeText
+      }))
+    })
+    // 获取工单渠道
+    getDataDictionary({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.dict_type", "compare": "=", "value": "ORDER_CHANNEL" }] }).then(res => {
+      this.orderChannels = res.data.records.map(item => ({
+        value: item.dictCode,
+        label: item.dictValue
+      }))
+    })
+  },
 }

+ 126 - 473
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js

@@ -1,132 +1,79 @@
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { orderBaseDetail, orderBaseProductList } from "@/api/workOrderPool.js"
 var initdata_ = {
-  websitId_qdUse: '',
-  //基本信息
-  userName: '',
-  linkName: '',
-  userMobile: '',
-  userMobile2: '',
-  userAttrId: '1',
-  userAttr: '',
-  vip: '',
-  areaCode: '',
-  telPhone: '',
-  province: '',
-  provinceId: '',
-  city: '',
-  cityId: '',
-  area: '',
-  areaId: '',
-  street: '',
-  streetId: '',
-  address: '',
-  gpsAddress: '',
-  lat: '',
-  lng: '',
-  //服务信息
-  serviceCategoryId: '',
-  orderType: '',
-  orderSmallType: '',
-  brandId: '',
-  productBrandId: '',
-  mainId: '',
-  mainName: '',
-  zbSaleWebsitId: '', //总包商户参数
-  saleWebsitId: '',
-  saleWebsitName: '',
-  saleNo: '',
-  saleTypeId: '',
-  saleType: '',
-  saleLinkName: '',
-  saleLinkPhone: '',
-  infoSourceId: '2002',
-  infoChannelId: '101',
-  crossNo: '',
-  buyTime: '',
-  marketActivityId: '',
-  marketActivityName: '',
-  invoiceNo: '',
-  expectStartTime: '',
-  expectEndTime: '',
-  uploadFlag: true,
-  isOnsiteCharges: 'NO',
-  // 时间
-  expectTime: '',
-  //其他信息
-  remark: '',
-  //特殊要求
-  labels1: [],
-  labels2: [],
-  //派单信息
-  dispatchFlag: '',
-  websitId: '',
-  appointmentTime: '',
-  orderWorkers: [],
-  orderBaseRelaList: [],
-  orderProductList: [],
-  orderCleanItems: [],
-  orderMaterialList: [],
-  orderRepair: {
-    demandTypeId: '',
-    demandTypeName: '',
-    demandSmallTypeId: '',
-    demandSmallTypeName: '',
-    isOnsiteCharges: 'NO'
-  },
-  orderInstall: {
-    expectArrivalTime: '',
-    //其他信息
-    bracket: '',
-    pipe: '',
-    swithFlag: '',
-    highAltitude: '',
-    hole: '',
-    // 商城信息
-    shopOrderNo: '',
-    shopFlag: '',
-    shopNo: '',
-    shopName: '',
-    shopOrderPhone: '',
-    shopNewRetail: '',
-    enginName: '',
-    enginNo: '',
-    enginAdvanceType: '',
-    enginMaterialSupply1: ''
-  }
+  // 基础信息--------------------
+  // 客户名称
+  userName: "",
+  // 联系人
+  linkName: "",
+  // 客户电话
+  userMobile: "",
+  // 客户电话2
+  userMobile2: "",
+  // gps地址
+  gpsAddress: "",
+  // 详细地址
+  address: "",
+  // 服务信息--------------------------------
+  // 工单类型
+  orderType: "",
+  // 预约上门日期
+  appointmentTime: "",
+  // 工单渠道
+  orderChannelId: "",
+  // 销售单位
+  saleCompany: "",
+  // 产品信息------------------------
+  orderProducts: [],
+  // 其它信息------------------------
+  // 备注
+  remark: "",
+  // 派单信息-----------------------------
+  // 服务商网点
+  websitId: "",
+  // 主要工程师id
+  workerId: "",
+  // 工程师列表
+  orderWorkers: []
 }
 
 export default {
   props: {
     id: {
       type: [String, Number],
-      default: null
-    },
-    createWorkerData: {
-      type: Object,
-      default: null
-    },
-    isEnginInfo: {
-      type: Boolean,
-      default: false
+      default: null,
+
     }
   },
   data() {
     return {
-      orderInfo: {},
-      initBool: false,
-      userNameFocu: false,
-      linkNameFocu: false,
-      cp_gpsAddress: ''
+      orderInfo: null,
     }
   },
   watch: {
     orderType(newVal, oldVal) {
       this.$emit('updateOrderType', newVal)
     },
+    id: {
+      handler(newVal, oldVal) {
+        this.getorderDetail((data) => {
+          this.$nextTick(() => {
+            // 获取地址信息
+            this.getinitlbslist()
+            // 获取可选师傅
+            this.getWorkers()
+          })
+        })
+        this.getOrderBaseLogList()
+      },
+      deep: true,
+      immediate: true,
+    }
   },
   computed: {
     // 用户信息
     userInfo() {
-      return JSON.parse(localStorage.getItem('supply_user'))
+      return JSON.parse(localStorage.getItem('greemall_user'))
     },
     // 判断工单状态
     orderType() {
@@ -137,7 +84,31 @@ export default {
     },
     // 处理操作按钮是否可以操作
     btnRestrict() {
-      return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
+      // 1,保存 2,过程反馈 3,设为异常 4,加急 5,不加急 6,取消工单 7,回访 8,新建工单
+      var btns = []
+      if (this.orderInfo) {
+        btns = {
+          // 待预约
+          DYY: [],
+          // 待商户派工
+          DSHPG: [1, 2, 4, 5, 6],
+          // 待网点派工
+          DWDPG: [1, 2, 4, 5, 6],
+          // 待接单
+          DJD: [1, 2, 4, 5, 6],
+          // 服务中
+          FWZ: [1, 2, 3, 4, 5, 6],
+          // 异常单
+          YCD: [1, 2, 6],
+          // 已完工待结算
+          YWG: [7, 8],
+          // 已结算
+          YJS: [],
+          // 已取消
+          YQX: []
+        }[this.orderInfo.orderStatus]
+      }
+      return btns
     },
     // 处理每个字段是否可编辑
     formOptions() {
@@ -147,54 +118,31 @@ export default {
         userName: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
         // 联系人
         linkName: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
         // 客户电话
         userMobile: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...mobileRequired]
         },
         // 客户电话2
         userMobile2: {
           isEdit: true,
           isShow: true,
-          isRules: []
-        },
-        // 用户属性,总包服务商和平台超管可以编辑
-        userAttrId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // vip等级
-        vip: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 区号
-        areaCode: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 固话
-        telPhone: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
+          isRules: [...mobile]
         },
+        // gps地址
         gpsAddress: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
         // 详细地址
         address: {
@@ -202,85 +150,36 @@ export default {
           isShow: true,
           isRules: []
         },
-        orderWorkers: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 定位获取地址功能
-        geographicalPosi: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 商城信息-------------------
-        // 工单行号
-        shopOrderNo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 电商标识
-        shopFlag: {
-          isEdit: true,
+        // 服务信息--------------------------------
+        // 工单类型
+        orderType: {
+          isEdit: this.id ? false : true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
-        // 店铺编号
-        shopNo: {
+        // 预约上门日期
+        appointmentTime: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
-        // 店铺名称
-        shopName: {
-          isEdit: true,
+        orderChannelId: {
+          isEdit: this.id ? false : true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
-        // 下单电话
-        shopOrderPhone: {
+        saleCompany: {
           isEdit: true,
           isShow: true,
           isRules: []
         },
-        // 是否新零售
-        shopNewRetail: {
+        // 产品信息------------------------
+        orderProducts: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
         // 其它信息------------------------
-        // 支架
-        bracket: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 加长管
-        pipe: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 空气开关
-        swithFlag: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 高空作业
-        highAltitude: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 一次性成型墙孔
-        hole: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
         // 备注
         remark: {
           isEdit: true,
@@ -288,278 +187,21 @@ export default {
           isRules: []
         },
         // 派单信息-----------------------------
-        // 派工方式
-        dispatchFlag: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
         // 服务商网点
         websitId: {
           isEdit: true,
           isShow: true,
-          isRules: []
-        },
-        // 预约上门日期
-        appointmentTime: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 添加修改工程师
-        dispatched: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 产品信息-------------------------------
-        // 新增,报完工前并且没有作废没有关闭可以修改
-        addProductInfo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 删除,报完工前并且没有作废没有关闭可以修改
-        delProduct: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 编辑,报完工前并且没有作废没有关闭可以修改
-        endProductInfo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 故障信息-------------------------------
-        // 新增,报完工前并且没有作废没有关闭可以修改
-        addmalfunctionInfo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 删除,报完工前并且没有作废没有关闭可以修改
-        delmalfunction: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 编辑,报完工前并且没有作废没有关闭可以修改
-        endmalfunctionInfo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 清洗信息-------------------------------
-        // 新增,报完工前并且没有作废没有关闭可以修改
-        addcleanseInfo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 删除,报完工前并且没有作废没有关闭可以修改
-        delcleanse: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 编辑,报完工前并且没有作废没有关闭可以修改
-        endcleanseInfo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 服务信息--------------------------------
-        // 总包商户
-        brandId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 商户网点
-        saleWebsitId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 服务类目
-        serviceCategoryId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 工单类型
-        orderType: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 工单小类
-        orderSmallType: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        //
-        demandTypeId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        //
-        demandSmallTypeId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 品牌
-        productBrandId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 产品大类
-        mainId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 销售单号
-        saleNo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 销售类型
-        saleTypeId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 销售联系人
-        saleLinkName: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 销售联系人电话
-        saleLinkPhone: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 消息来源
-        infoSourceId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 消息渠道
-        infoChannelId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
+          isRules: [...required]
         },
-        // 跨区编号
-        crossNo: {
+        workerId: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
-        // 购买时间
-        buyTime: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 营销活动
-        marketActivityId: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 发票号码
-        invoiceNo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 用户期望上门时间
-        expectTime: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 妥投时间
-        properVoteTime: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        //预计到货时间
-        expectArrivalTime: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 首次上门预约日期
-        firstAppointmentTime: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 是否上传总部
-        uploadFlag: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 是否现场收费
-        isOnsiteCharges: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 是否脱机采集
-        isOfflineWorker: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 特殊技能标签---------------------------------
-        // 技能要求
-        labels1: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 特殊标签
-        labels2: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        enginName: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        enginNo: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 垫装类型
-        enginAdvanceType: {
-          isEdit: true,
-          isShow: true,
-          isRules: []
-        },
-        // 辅材提供方
-        enginMaterialSupply1: {
+        orderWorkers: {
           isEdit: true,
           isShow: true,
-          isRules: []
+          isRules: [...required]
         },
       }
     },
@@ -573,17 +215,28 @@ export default {
     getorderDetail(cb) {
       if (this.id) {
         // 编辑详情
-        orderDetail({
-          id: this.id
-        }).then(res => {
-          this.orderInfo = {
-            ...res.data,
-          }
-          cb && cb()
-        })
+        Promise.all([
+          orderBaseDetail({
+            orderBaseId: this.id
+          }),
+          orderBaseProductList({
+            orderBaseId: this.id
+          })
+        ])
+          .then(([res, res1]) => {
+            this.orderInfo = {
+              ...res.data,
+              orderProducts: res1.data || [],
+              workerId_fz: ""
+            }
+            cb && cb(this.orderInfo)
+          })
       } else {
         // 创建工单
-        this.orderInfo = Object.assign({}, initdata_, {})
+        this.orderInfo = Object.assign({}, initdata_, {
+          workerId_fz: ""
+        })
+        cb && cb(this.orderInfo)
       }
     }
   }

+ 0 - 25
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderSelectData.js

@@ -1,25 +0,0 @@
-export default {
-  data() {
-    return {
-      // 工单流程状态
-      orderStatusList: [],
-      // 营销活动
-      marketActivity: [],
-      // 技能标签
-      skillLabel: [],
-      // 特殊标签
-      messengerTable: [],
-      // 商户列表
-      customerPageList: [],
-      // 用户属性
-      USER_ATTR: [],
-      // 用户等级
-      USER_LEVEL: [],
-      SOURCE: [],
-      CHANNEL: []
-    }
-  },
-  watch: {
-    
-  }
-}

+ 80 - 20
src/views/workOrder/workOrderPool/index.vue

@@ -30,11 +30,13 @@
 </template>
 
 <script>
-import TemplatePage from '@/components/template/template-page-1.vue'
 import { EventBus } from '@/utils/eventBus'
+import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import workOrderInfo from './detailModule/workOrderInfo/index.vue'
 import Detail from './detail'
+import { orderBaseList, orderBaseListExport, orderBaseStatusCount } from "@/api/workOrderPool.js"
+import { listPageV2 } from "@/api/workOrder/orderType";
 export default {
   components: {
     TemplatePage,
@@ -46,9 +48,9 @@ export default {
     return {
       id: this.$route.query.id || '',
       // 创建表单
-      createFormBool:false,
+      createFormBool: false,
       // 详情
-      detailFormBool:false,
+      detailFormBool: false,
       // 表格属性
       tableAttributes: {
         // 启用勾选列
@@ -59,6 +61,7 @@ export default {
         'selection-change': this.selectionChange
       },
       recordSelected: [],
+      orderTypeList: []
     }
   },
   computed: {
@@ -68,19 +71,52 @@ export default {
           name: '工单类型',
           key: 'orderType',
           value: '',
-          conditions: []
+          conditions: [{
+            label: "全部",
+            value: ""
+          }, ...this.orderTypeList]
         },
         {
           name: '工单状态',
-          key: 'orderStatusParam',
+          key: 'orderStatus',
           value: '',
-          conditions: []
+          conditions: [{
+            label: "全部",
+            value: ""
+          }, {
+            label: "待预约",
+            value: "DYY"
+          }, {
+            label: "待商户派工",
+            value: "DSHPG"
+          }, {
+            label: "待网点派工",
+            value: "DWDPG"
+          }, {
+            label: "待接单",
+            value: "DJD"
+          }, {
+            label: "服务中",
+            value: "FWZ"
+          }, {
+            label: "异常单",
+            value: "YCD"
+          }, {
+            label: "已完工待结算",
+            value: "YWG"
+          }, {
+            label: "已结算",
+            value: "YJS"
+          }, {
+            label: "已取消",
+            value: "YQX"
+          }]
         }
       ]
     },
     // 用户信息
     userInfo() {
-      return JSON.parse(localStorage.getItem('supply_user'))
+      return JSON.parse(localStorage.getItem('greemall_user'))
     },
     // 事件组合
     optionsEvensGroup() {
@@ -90,7 +126,7 @@ export default {
             {
               name: '创建工单',
               click: () => {
-                this.detailFormBool = true
+                this.createFormBool = true
               }
             },
           ],
@@ -102,13 +138,13 @@ export default {
             {
               name: '批量下派工程师',
               click: () => {
-                
+
               }
             },
             {
               name: '批量改约',
               click: () => {
-                
+
               }
             },
           ],
@@ -117,9 +153,15 @@ export default {
     }
   },
   created() {
-    EventBus.$on('workOrderClone', val => {
-    })
     EventBus.$on('handleOrderClone', () => {
+      this.handleClose()
+    })
+    // 获取工单类型
+    listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "true" }] }).then(res => {
+      this.orderTypeList = res.data.records.map(item => ({
+        value: item.id,
+        label: item.orderSmallTypeText
+      }))
     })
   },
   methods: {
@@ -136,7 +178,7 @@ export default {
       }
       return row[column['property']] === value
     },
-    
+
     handleClose() {
       // this.$router.push({
       //   name: "workOrderPool",
@@ -151,19 +193,28 @@ export default {
     },
 
     // 列表请求函数
-    getList(p) {
+    getList(p, cb) {
       try {
-        this.pcs = JSON.parse(JSON.stringify(p))
-        return null
+        var pam = JSON.parse(JSON.stringify(p))
+        if (pam.orderStatus) {
+          pam.params.push({ "param": "a.order_status", "compare": "=", "value": pam.orderStatus })
+        }
+        if (pam.orderType) {
+          pam.params.push({ "param": "a.order_type", "compare": "=", "value": pam.orderType })
+        }
+        cb && cb(pam)
+        return orderBaseList(pam)
       } catch (err) {
       } finally {
         this.$nextTick(() => {
-          
+          orderBaseStatusCount().then(res => {
+            console.log(res)
+          })
         })
       }
     },
     // 列表导出函数
-    exportList(){},
+    exportList: orderBaseListExport,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -172,8 +223,17 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    operation() {
-
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+          <el-button type="text" onClick={() => {
+            this.id = row.id
+            this.$nextTick(() => {
+              this.detailFormBool = true
+            })
+          }}>编辑</el-button>
+        </div>
+      )
     }
   }
 }