Ver Fonte

Merge branch 'linwenxin_dev' of https://gogs.zfire.top/zfire-front/zfire-newmall-admin

linwenxin há 1 ano atrás
pai
commit
e788c94e02
22 ficheiros alterados com 2899 adições e 167 exclusões
  1. 33 0
      src/api/basicEngineeringData.js
  2. 49 0
      src/api/penaltyWorkOrder.js
  3. 1 0
      src/components/template/operation_mixin.js
  4. 29 0
      src/main.js
  5. 1 0
      src/views/salesPurchasing/mixins/storage_goods.js
  6. 99 61
      src/views/setting/account/index.vue
  7. 14 14
      src/views/setting/organizationManagement/settledManagement/index.vue
  8. 16 16
      src/views/setting/organizationManagement/tenantDetails/index.vue
  9. 1188 0
      src/views/workOrder/basicEngineeringData/index.vue
  10. 295 0
      src/views/workOrder/penaltyWorkOrder/index.vue
  11. 306 0
      src/views/workOrder/penaltyWorkOrder/mixins/basicInfo.js
  12. 45 0
      src/views/workOrder/penaltyWorkOrder/mixins/common_form.js
  13. 133 0
      src/views/workOrder/penaltyWorkOrder/mixins/czpandanxinxi.js
  14. 281 0
      src/views/workOrder/penaltyWorkOrder/mixins/pandanxinxi.js
  15. 207 0
      src/views/workOrder/penaltyWorkOrder/mixins/productColumns.js
  16. 8 8
      src/views/workOrder/workOrderPool/detailModule/Payment/index.vue
  17. 10 31
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue
  18. 89 7
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js
  19. 2 2
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/pandanxinxi.js
  20. 35 4
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js
  21. 37 9
      src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js
  22. 21 15
      src/views/workOrder/workOrderPool/index.vue

+ 33 - 0
src/api/basicEngineeringData.js

@@ -0,0 +1,33 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function orderEnginbaseList(data) {
+  return request({
+    url: `/order/engin/base/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderEnginBaseListExport(data, name) {
+  return postBlob({
+    url: '/order/engin/base/list/export',
+    data,
+    name
+  })
+}
+
+export function orderEnginBaseSave(data) {
+  return request({
+    url: '/order/engin/base/save',
+    method: 'post',
+    data: data
+  })
+}
+
+export function orderEnginBaseDetail(params) {
+  return request({
+    url: '/order/engin/base/detail',
+    method: 'post',
+    params
+  })
+}

+ 49 - 0
src/api/penaltyWorkOrder.js

@@ -0,0 +1,49 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function orderPunishList(data) {
+  return request({
+    url: `/order/punish/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function orderPunishListExport(data, name) {
+  return postBlob({
+    url: '/order/punish/list/export',
+    data,
+    name
+  })
+}
+
+export function orderPunishExamine(params) {
+  return request({
+    url: '/order/punish/examine',
+    method: 'post',
+    params
+  })
+}
+
+export function orderPunishDelete(params) {
+  return request({
+    url: '/order/punish/delete',
+    method: 'post',
+    params
+  })
+}
+
+export function orderPunishDetail(params) {
+  return request({
+    url: '/order/punish/detail',
+    method: 'post',
+    params
+  })
+}
+
+export function orderPunishSave(data) {
+  return request({
+    url: `/order/punish/save`,
+    method: 'post',
+    data
+  })
+}

+ 1 - 0
src/components/template/operation_mixin.js

@@ -29,6 +29,7 @@ export default {
   methods: {
     optionsEvensAuth(key, obj) {
       var roleItems = this.$route.meta.roleItems
+      console.log(roleItems)
       if (!roleItems || !roleItems.length) {
         return { isRole: false }
       }

+ 29 - 0
src/main.js

@@ -150,6 +150,35 @@ if (process.env.NODE_ENV === 'production') {
 // Vue.use(ElementUI, { locale })
 // 如果想要中文版 element-ui,按如下方式声明
 Vue.use(ElementUI)
+
+import { Message } from 'element-ui';
+//定义一个新的Message方法,多传入一个offset参数
+const $message = options => {
+  return Message({
+    ...options,
+    offset: 80
+  });
+};
+ 
+//重写方法,将offset写入options
+['success', 'warning', 'info', 'error'].forEach(type => {
+  $message[type] = options => {
+    if (typeof options === 'string') {
+      options = {
+        message: options,
+        offset: 80
+      };
+    }
+    options.type = type;
+    return Message(options);
+  };
+});
+//将$message挂载到this上
+Vue.prototype.$message = $message;
+//不加这行代码运行this.$message.closeAll时会报错
+Vue.prototype.$message.closeAll = Message.closeAll;
+
+
 // register global utility filters
 Object.keys(filters).forEach(key => {
   Vue.filter(key, filters[key])

+ 1 - 0
src/views/salesPurchasing/mixins/storage_goods.js

@@ -212,6 +212,7 @@ export default {
                         row['factoryNo'] = ''
                       }
                     }}
+                    filterable={true}
                     placeholder="请选择"
                   >
                     {this.goodsMaterialList

+ 99 - 61
src/views/setting/account/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
     <template slot-scope="{activeKey, data}">
       <div :style="{
         width: '100%',
@@ -58,6 +58,7 @@
                     </el-popconfirm>
                     <el-button type="text" @click="addOrEdit('edit', scope.row.adminUserId)">编辑</el-button>
                     <el-button type="text" @click="handleReset(scope.row.adminUserId)">重置密码</el-button>
+                    <el-button v-if="userName == 'admin'" type="text" @click="dengluLogin(scope.row)">登入</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -74,46 +75,64 @@
         </div>
       </div>
       <div v-if="~['add', 'edit'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
-        <el-form ref="addForm" :model="addForm" :rules="addFormRules" label-position="left" label-width="120px">
-          <el-form-item label="账号" prop="account">
-            <el-input v-model="addForm.account" autocomplete="off" placeholder="请输入账号"></el-input>
-          </el-form-item>
-          <el-form-item label="用户名" prop="nickName">
-            <el-input v-model="addForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
-          </el-form-item>
-          <el-form-item label="手机号" prop="linkPhone">
-            <el-input v-model="addForm.linkPhone" autocomplete="off" placeholder="请输入手机号"></el-input>
-          </el-form-item>
-          <el-form-item label="角色组" prop="role">
-            <el-select v-model="addForm.role" placeholder="请选择角色组" style="width: 100%;">
-              <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList"
-                :key="index"></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="网点" prop="adminWebsitId">
-            <el-cascader style="width: 100%" :options="departmentList"
-              :props="{ checkStrictly: true, value: 'websitId', label: 'name' }" v-model="addForm.adminWebsitId"
-              clearable>
-            </el-cascader>
-          </el-form-item>
-          <el-form-item label="密码" prop="newPassword">
-            <el-input v-model="addForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码"
-              :type="passwordType1"></el-input>
-            <span class="show-pwd" @click="showPwd(1)">
-              <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
-            </span>
-          </el-form-item>
-          <el-form-item label="确认密码" prop="confirmPassword">
-            <el-input v-model="addForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码"
-              :type="passwordType2"></el-input>
-            <span class="show-pwd" @click="showPwd(2)">
-              <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
-            </span>
-          </el-form-item>
-          <el-form-item label="是否公众号通知" prop="pubNotice">
-            <el-switch v-model="addForm.pubNotice" active-color="#13ce66" inactive-color="#ff4949">
-            </el-switch>
-          </el-form-item>
+        <el-form ref="addForm" :model="addForm" :rules="addFormRules" label-position="left" label-width="80px">
+          <el-row :gutter="20">
+            <el-col :md="6">
+              <el-form-item label="账号" prop="account">
+                <el-input v-model="addForm.account" autocomplete="off" placeholder="请输入账号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="用户名" prop="nickName">
+                <el-input v-model="addForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="手机号" prop="linkPhone">
+                <el-input v-model="addForm.linkPhone" autocomplete="off" placeholder="请输入手机号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="角色组" prop="role">
+                <el-select v-model="addForm.role" placeholder="请选择角色组" style="width: 100%;">
+                  <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList"
+                    :key="index"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="网点" prop="adminWebsitId">
+                <el-cascader style="width: 100%" :options="departmentList"
+                  :props="{ checkStrictly: true, value: 'websitId', label: 'name' }" v-model="addForm.adminWebsitId"
+                  clearable>
+                </el-cascader>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="密码" prop="newPassword">
+                <el-input v-model="addForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码"
+                  :type="passwordType1"></el-input>
+                <span class="show-pwd" @click="showPwd(1)">
+                  <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
+                </span>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="确认密码" prop="confirmPassword">
+                <el-input v-model="addForm.confirmPassword" ref="password2" autocomplete="off" placeholder="请再次输入密码"
+                  :type="passwordType2"></el-input>
+                <span class="show-pwd" @click="showPwd(2)">
+                  <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
+                </span>
+              </el-form-item>
+            </el-col>
+            <el-col :md="6">
+              <el-form-item label="是否公众号通知" prop="pubNotice" label-width="120px">
+                <el-switch v-model="addForm.pubNotice" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="data.removeTab()">取 消</el-button>
@@ -193,6 +212,7 @@ export default {
       }
     };
     return {
+      userName: JSON.parse(localStorage.getItem("greemall_user")).userName,
       dataList: null, // 列表数据
       listLoading: true, // 列表加载loading
       screenForm: { // 筛选表单数据
@@ -390,19 +410,19 @@ export default {
     // 重置密码
     handleReset(id) {
       this.$refs.tabPage.addTab({
-				activeKey: "resetpassword",
-				key: "resetpassword",
-				label: "重置密码",
-				triggerEvent: () => {
-					this.cancelResetForm()
-					this.$nextTick(() => {
-						this.resetId = id;
-					})
-				},
-				closeEvent: () => {
+        activeKey: "resetpassword",
+        key: "resetpassword",
+        label: "重置密码",
+        triggerEvent: () => {
+          this.cancelResetForm()
+          this.$nextTick(() => {
+            this.resetId = id;
+          })
+        },
+        closeEvent: () => {
           this.cancelResetForm()
-				}
-			})
+        }
+      })
     },
 
     // 取消重置密码
@@ -432,12 +452,12 @@ export default {
     // 新增编辑 账户
     async addOrEdit(type, id) {
       this.$refs.tabPage.addTab({
-				activeKey: type,
+        activeKey: type,
         key: type,
         label: ({ add: "新增", edit: "编辑" })[type],
-				triggerEvent: async () => {
+        triggerEvent: async () => {
           this.cancelAddForm()
-					this.addFormType = type;
+          this.addFormType = type;
           this.departmentList = await this.getDepartmentList();
           if (type == 'edit') {
             this.editId = id;
@@ -452,11 +472,11 @@ export default {
               }
             })
           }
-				},
-				closeEvent: () => {
-          
-				}
-			})
+        },
+        closeEvent: () => {
+
+        }
+      })
     },
 
     // 取消 新增编辑账户
@@ -504,6 +524,24 @@ export default {
       })
     },
 
+    async dengluLogin(row) {
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      this.$store
+        .dispatch('user/login', { username: row.userName })
+        .then(() => {
+          setTimeout(() => {
+            loading.close();
+            window.location.href = process.env.NODE_ENV === 'staging' ? '/zfmanager' : '/'
+          }, 1000);
+        })
+        .catch(() => { })
+    }
+
   }
 }
 </script>

+ 14 - 14
src/views/setting/organizationManagement/settledManagement/index.vue

@@ -253,20 +253,20 @@
 
         <el-card shadow="never" class="my-card">
           <div class="title" style="margin-bottom: 20px;">1.其他基础配置</div>
-          <el-form-item label="小程序appId" prop="appId">
-            <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入小程序appId"></el-input>
+          <el-form-item label="服务商appId" prop="appId">
+            <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入服务商appId"></el-input>
           </el-form-item>
-          <el-form-item label="商户号Id" prop="merchantId">
-            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入商户号Id"></el-input>
+          <el-form-item label="服务商商户号" prop="merchantId">
+            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入服务商商户号"></el-input>
           </el-form-item>
-          <el-form-item label="商户号Key" prop="merchantKey">
-            <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入商户号Key"></el-input>
+          <el-form-item label="服务商商户密钥" prop="merchantKey">
+            <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入服务商商户密钥"></el-input>
           </el-form-item>
-          <el-form-item label="子appId" prop="childAppId">
-            <el-input v-model="step3Form.childAppId" autocomplete="off" placeholder="请输入子appId"></el-input>
+          <el-form-item label="小程序appid" prop="appletAppid">
+            <el-input v-model="step3Form.appletAppid" autocomplete="off" placeholder="请输入小程序appid"></el-input>
           </el-form-item>
-          <el-form-item label="子密钥" prop="childKey">
-            <el-input v-model="step3Form.childKey" autocomplete="off" placeholder="请输入子密钥"></el-input>
+          <el-form-item label="小程序密钥" prop="appletSecret">
+            <el-input v-model="step3Form.appletSecret" autocomplete="off" placeholder="请输入小程序密钥"></el-input>
           </el-form-item>
           <el-form-item label="子商户号Id" prop="childMerchantId">
             <el-input v-model="step3Form.childMerchantId" autocomplete="off" placeholder="请输入子商户号Id"></el-input>
@@ -434,8 +434,8 @@ export default {
         appId: '',
         merchantId: '',
         merchantKey: '',
-        childAppId: '',
-        childKey: '',
+        appletAppid: '',
+        appletSecret: '',
         childMerchantId: '',
         templateId: '',
         pubAppId: '',
@@ -615,8 +615,8 @@ export default {
             appId: this.step3Form.appId,
             mchId: this.step3Form.merchantId,
             mchKey: this.step3Form.merchantKey,
-            subAppId: this.step3Form.childAppId,
-            subSecret: this.step3Form.childKey,
+            appletAppid: this.step3Form.appletAppid,
+            appletSecret: this.step3Form.appletSecret,
             subMchId: this.step3Form.childMerchantId,
             template: this.step3Form.templateId,
             pubAppId: this.step3Form.pubAppId,

+ 16 - 16
src/views/setting/organizationManagement/tenantDetails/index.vue

@@ -186,20 +186,20 @@
 
         <el-card shadow="never" class="my-card">
           <div class="title" style="margin-bottom: 20px;">1.其他基础配置</div>
-          <el-form-item label="小程序appId" prop="appId">
-            <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入小程序appId"></el-input>
+          <el-form-item label="服务商appId" prop="appId">
+            <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入服务商appId"></el-input>
           </el-form-item>
-          <el-form-item label="商户号Id" prop="merchantId">
-            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入商户号Id"></el-input>
+          <el-form-item label="服务商商户号" prop="merchantId">
+            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入服务商商户号"></el-input>
           </el-form-item>
-          <el-form-item label="商户号Key" prop="merchantKey">
-            <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入商户号Key"></el-input>
+          <el-form-item label="服务商商户密钥" prop="merchantKey">
+            <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入服务商商户密钥"></el-input>
           </el-form-item>
-          <el-form-item label="子appId" prop="childAppId">
-            <el-input v-model="step3Form.childAppId" autocomplete="off" placeholder="请输入子appId"></el-input>
+          <el-form-item label="小程序appid" prop="appletAppid">
+            <el-input v-model="step3Form.appletAppid" autocomplete="off" placeholder="请输入小程序appid"></el-input>
           </el-form-item>
-          <el-form-item label="子密钥" prop="childKey">
-            <el-input v-model="step3Form.childKey" autocomplete="off" placeholder="请输入子密钥"></el-input>
+          <el-form-item label="小程序密钥" prop="appletSecret">
+            <el-input v-model="step3Form.appletSecret" autocomplete="off" placeholder="请输入小程序密钥"></el-input>
           </el-form-item>
           <el-form-item label="子商户号Id" prop="childMerchantId">
             <el-input v-model="step3Form.childMerchantId" autocomplete="off" placeholder="请输入子商户号Id"></el-input>
@@ -438,8 +438,8 @@ export default {
         appId: '',
         merchantId: '',
         merchantKey: '',
-        childAppId: '',
-        childKey: '',
+        appletAppid: '',
+        appletSecret: '',
         childMerchantId: '',
         templateId: '',
         pubAppId: '',
@@ -543,8 +543,8 @@ export default {
         this.step3Form.appId = res.data.appId;
         this.step3Form.merchantId = res.data.mchId;
         this.step3Form.merchantKey = res.data.mchKey;
-        this.step3Form.childAppId = res.data.subAppId;
-        this.step3Form.childKey = res.data.subSecret;
+        this.step3Form.appletAppid = res.data.appletAppid;
+        this.step3Form.appletSecret = res.data.appletSecret;
         this.step3Form.childMerchantId = res.data.subMchId;
         this.step3Form.templateId = res.data.template;
         this.step3Form.pubAppId = res.data.pubAppId;
@@ -720,8 +720,8 @@ export default {
             appId: this.step3Form.appId,
             mchId: this.step3Form.merchantId,
             mchKey: this.step3Form.merchantKey,
-            subAppId: this.step3Form.childAppId,
-            subSecret: this.step3Form.childKey,
+            appletAppid: this.step3Form.appletAppid,
+            appletSecret: this.step3Form.appletSecret,
             subMchId: this.step3Form.childMerchantId,
             template: this.step3Form.templateId,
             pubAppId: this.step3Form.pubAppId,

+ 1188 - 0
src/views/workOrder/basicEngineeringData/index.vue

@@ -0,0 +1,1188 @@
+<template>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{activeKey, data}">
+      <div :style="{
+        width: '100%',
+        height: activeKey == 'list' ? '100%' : '0px',
+        overflow: 'hidden'
+      }">
+        <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
+          :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+          :exportList="exportList" :operation="operation()">
+        </template-page>
+      </div>
+      <div v-if="~['add', 'detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
+        <el-tabs v-if="activeKey == 'detail'" v-model="activeType_e">
+          <el-tab-pane label="基础资料" name="jbzl"></el-tab-pane>
+          <el-tab-pane label="修改记录" name="xgjl"></el-tab-pane>
+        </el-tabs>
+        <br v-if="activeKey == 'detail'" />
+        <div v-if="activeType_e == 'jbzl'">
+          <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+            <zj-form-module :title="data.label" :showPackUp="false" :form-data="formData" :form-items="formItems">
+            </zj-form-module>
+            <zj-form-module title="" label-width="100px" :form-data="formData" :form-items="formItems2">
+              <el-tabs slot="header" v-model="activeName">
+                <el-tab-pane :disabled="isEditIndex > -1 ? true : false" label="辅材配置" name="items_m"></el-tab-pane>
+                <el-tab-pane :disabled="isEditIndex > -1 ? true : false" label="配件配置" name="items_p"></el-tab-pane>
+              </el-tabs>
+            </zj-form-module>
+          </zj-form-container>
+          <div slot="footer" class="dialog-footer">
+            <el-button size="mini" @click="data.removeTab">取 消</el-button>
+            <el-button size="mini" type="primary" @click="quedingbaocun(data.removeTab)">确定</el-button>
+          </div>
+        </div>
+        <div v-if="activeType_e == 'xgjl'">
+          <zj-form-container :form-data="formData" :styleSwitch="false">
+            <zj-form-module title="修改记录" :showPackUp="false" :form-data="formData" :form-items="logList">
+            </zj-form-module>
+          </zj-form-container>
+        </div>
+      </div>
+    </template>
+  </zj-tab-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { orderEnginbaseList, orderEnginBaseListExport, orderEnginBaseSave, orderEnginBaseDetail } from "@/api/basicEngineeringData";
+import { lbsAmapRegion } from '@/api/common.js'
+import geographicalPosi from '@/components/geographicalPosi/index.vue'
+import { listPageV2 } from "@/api/auxiliaryFittings/attachmentProfile";
+import { materialNormList } from "@/api/auxiliaryPriceManagement";
+
+export default {
+  components: { TemplatePage, ImageUpload, geographicalPosi },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      activeName: 'items_m',
+      formData: {
+        companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+        projectName: "",
+        projectNo: "",
+        manger: "",
+        mobile: "",
+        startTime: "",
+        endTime: "",
+        provinceId: "",
+        cityId: "",
+        areaId: "",
+        streetId: "",
+        address: "",
+        remark: "",
+        items_m: [],
+        items_p: [],
+      },
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      streetList: [],
+      fucaiSel: [],
+      peijianSel: [],
+      isEditIndex: -1,
+      activeType_e: 'jbzl'
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.$refs.tabPage.addTab({
+                  // 对应显示的模块
+                  activeKey: "add",
+                  // 唯一标识
+                  key: "add",
+                  // 页签名称
+                  label: "新增",
+                  // 打开时事件
+                  triggerEvent: () => {
+                    this.activeType_e = 'jbzl'
+                    this.handleClose()
+                    this.$nextTick(() => {
+                      this.getinitlbslist()
+                      this.openForm()
+                    })
+                  },
+                  // 关闭时事件
+                  closeEvent: () => { }
+                })
+              }
+            })
+          ]
+        ]
+      ]
+    },
+    formItems() {
+      return [
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            placeholder: '请输入',
+            disabled: true
+          },
+          formItemAttributes: {
+            label: '所属商户',
+            prop: 'companyWechatName',
+          }
+        },
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '工程名称',
+            prop: 'projectName',
+            rules: [...required],
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '工程编号',
+            prop: 'projectNo',
+            rules: [...required],
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '负责人',
+            prop: 'manger',
+            rules: [...required],
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '联系电话',
+            prop: 'mobile',
+            rules: [...mobileRequired],
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 6,
+          formItemAttributes: {
+            label: '项目时间',
+            prop: 'startTime',
+            rules: [...required],
+          },
+          render: (h, { props }) => {
+            return (
+              <div style={{
+                'display': 'flex',
+                'justify-content': 'space-between'
+              }}>
+                <div style="width:49%">
+                  <el-date-picker
+                    style="width:100%"
+                    value={this.formData.startTime}
+                    onInput={(val) => { this.formData.startTime = val }}
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    type="datetime"
+                    placeholder="选择日期">
+                  </el-date-picker>
+                </div>
+                <div style="width:49%">
+                  <el-date-picker
+                    disabled={true}
+                    style="width:100%"
+                    value={this.formData.endTime}
+                    onInput={(val) => { this.formData.endTime = val }}
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    type="datetime"
+                    placeholder="选择日期">
+                  </el-date-picker>
+                </div>
+              </div>
+            )
+          }
+        },
+        {
+          name: 'el-select',
+          md: 6,
+          formItemAttributes: {
+            label: '项目地址', //省
+            prop: 'provinceId',
+            errLabel: '省',
+            rules: [...required],
+          },
+          options: this.provinceList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: false, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取省名称
+              this.formData.province = this.provinceList.find(item => item.id === val)?.name || ''
+              // 清除市区街道以及详细地址数据
+              this.delDataK(1)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.cityList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //市
+            prop: 'cityId',
+            errLabel: '市',
+            rules: [...required],
+          },
+          options: this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: false, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取市名称
+              this.formData.city = this.cityList.find(item => item.id === val).name
+              // 清除区街道以及详细地址数据
+              this.delDataK(2)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.areaList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //区
+            prop: 'areaId',
+            errLabel: '区',
+            rules: [...required],
+          },
+          options: this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: false, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取区名称
+              this.formData.area = this.areaList.find(item => item.id === val).name
+              // 清除街道以及详细地址数据
+              this.delDataK(3)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.streetList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //街道
+            prop: 'streetId',
+            errLabel: '街道',
+            rules: [...required],
+          },
+          options: this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: false, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取街道名称
+              this.formData.street = this.streetList.find(item => item.id === val).name
+              // 清除详细地址数据
+              this.delDataK(4)
+            }
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 3,
+          formItemAttributes: {
+            'label-width': '0px',
+            prop: '',
+          },
+          render: (h, { props }) => {
+            return (
+              <geographicalPosi
+                formData={this.formData}
+                onSelectPosi={data => {
+                  // 获取经纬度
+                  this.formData.lng = data.center[0]
+                  this.formData.lat = data.center[1]
+                  // 获取定位的省市区街道
+                  var { province, city, district, township } = data.data.addressComponent
+                  // 获取选中省名称id
+                  var { id, name } = this.provinceList.find(item => item.name === province)
+                  this.formData.provinceId = id
+                  this.formData.province = name
+                  // 请求市选项
+                  lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+                    // 赋值市选项
+                    this.cityList = res.data
+                    // 获取选中市名称id
+                    var { id, name } = res.data.find(item => item.name === city)
+                    this.formData.cityId = id
+                    this.formData.city = name
+                    // 请求区选项
+                    lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+                      // 赋值区选项
+                      this.areaList = res.data
+                      // 获取选中区名称id
+                      var { id, name } = res.data.find(item => item.name === district)
+                      this.formData.areaId = id
+                      this.formData.area = name
+                      // 请求街道选项
+                      lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+                        // 赋值街道选项
+                        this.streetList = res.data
+                        // 获取选中街道名称id
+                        var { id, name } = res.data.find(item => item.name === township)
+                        this.formData.streetId = id
+                        this.formData.street = name
+                        this.formData.address = data.name
+                      })
+                    })
+                  })
+                }}
+              />
+            )
+          }
+        }, {
+          name: 'el-input',
+          md: 24,
+          formItemAttributes: { label: '详细地址', prop: 'address', rules: [...required] },
+          attributes: { placeholder: '详细地址' }
+        }, {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            type: 'textarea',
+            rows: 3,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '项目说明',
+            prop: 'remark',
+          }
+        }
+      ]
+    },
+    formItems2() {
+      return [
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <div>
+                {this.activeName == 'items_m'
+                  ? [
+                    <div style="margin-bottom:10px">
+                      <el-button type="primary" onClick={() => { this.addItem("M") }}>
+                        添加
+                      </el-button>
+                    </div>,
+                    <zj-table
+                      columns={[
+                        {
+                          columnAttributes: {
+                            label: '大类',
+                            prop: 'parentCategoryId',
+                            propName: 'parentCategoryName',
+                            width: 160
+                          },
+                          render: (h, { row, column, index }) => {
+                            return this.isEditIndex == index ? (
+                              <div class="redbordererr">
+                                <el-form-item
+                                  label=""
+                                  lebel-width="0px"
+                                  prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+                                  rules={required}
+                                >
+                                  <el-select
+                                    value={row[column.columnAttributes.prop]}
+                                    onInput={val => {
+                                      row[column.columnAttributes.prop] = val
+                                    }}
+                                    onChange={val => {
+                                      if (val) {
+                                        row[column.columnAttributes.propName] = this.arrQC(this.fucaiSel, { value: 'parentCategoryId', label: 'parentCategoryName' }).find(item => item.value == val)?.label || ""
+                                      } else {
+                                        row[column.columnAttributes.propName] = ''
+                                      }
+                                      this.delItemKey(1, row)
+                                    }}
+                                    placeholder="请选择"
+                                  >
+                                    {
+                                      this.arrQC(this.fucaiSel, { value: 'parentCategoryId', label: 'parentCategoryName' }).map((item, index_) => (
+                                        <el-option key={index_} label={item.label} value={item.value}></el-option>
+                                      ))
+                                    }
+                                  </el-select>
+                                </el-form-item>
+                              </div>
+                            ) : (
+                              <div style="padding:0 6px">{row[column.columnAttributes.propName]}</div>
+                            )
+                          }
+                        },
+                        {
+                          columnAttributes: {
+                            label: '小类',
+                            prop: 'goodsCategoryId',
+                            propName: 'goodsCategoryName',
+                            width: 160
+                          },
+                          render: (h, { row, column, index }) => {
+                            return this.isEditIndex == index ? (
+                              <div class="redbordererr">
+                                <el-form-item
+                                  label=""
+                                  lebel-width="0px"
+                                  prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+                                  rules={required}
+                                >
+                                  <el-select
+                                    value={row[column.columnAttributes.prop]}
+                                    onInput={val => {
+                                      row[column.columnAttributes.prop] = val
+                                    }}
+                                    onChange={val => {
+                                      if (val) {
+                                        row[column.columnAttributes.propName] = this.arrQC(this.fucaiSel.filter(item => item.parentCategoryId === row.parentCategoryId), { value: 'goodsCategoryId', label: 'categoryName' }).find(item => item.value == val)?.label || ""
+                                      } else {
+                                        row[column.columnAttributes.propName] = ''
+                                      }
+                                      this.delItemKey(2, row)
+                                    }}
+                                    placeholder="请选择"
+                                  >
+                                    {
+                                      this.arrQC(this.fucaiSel.filter(item => item.parentCategoryId === row.parentCategoryId), { value: 'goodsCategoryId', label: 'categoryName' }).map((item, index_) => (
+                                        <el-option key={index_} label={item.label} value={item.value}></el-option>
+                                      ))
+                                    }
+                                  </el-select>
+                                </el-form-item>
+                              </div>
+                            ) : (
+                              <div style="padding:0 6px">{row[column.columnAttributes.propName]}</div>
+                            )
+                          }
+                        },
+                        {
+                          columnAttributes: {
+                            label: '辅材名称',
+                            prop: 'goodsId',
+                            propName: 'goodsName',
+                            width: 160
+                          },
+                          render: (h, { row, column, index }) => {
+                            return this.isEditIndex == index ? (
+                              <div class="redbordererr">
+                                <el-form-item
+                                  label=""
+                                  lebel-width="0px"
+                                  prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+                                  rules={required}
+                                >
+                                  <el-select
+                                    value={row[column.columnAttributes.prop]}
+                                    onInput={val => {
+                                      row[column.columnAttributes.prop] = val
+                                    }}
+                                    onChange={val => {
+                                      this.delItemKey(3, row)
+                                      if (val) {
+                                        var data = this.arrQC(this.fucaiSel.filter(item => item.parentCategoryId === row.parentCategoryId && item.goodsCategoryId === row.goodsCategoryId), { value: 'goodsId', label: 'goodsName' }).find(item => item.value == val)
+                                        row[column.columnAttributes.propName] = data?.label || ""
+                                        if (data) {
+                                          row.goodsCode = data?.data?.goodsCode
+                                          row.goodsSpecification = data?.data?.goodsSpecification
+                                          row.normType = "M"
+                                          row.goodsStockUnit = data?.data?.goodsStockUnit
+                                        }
+                                      } else {
+                                        row[column.columnAttributes.propName] = ''
+                                      }
+                                    }}
+                                    placeholder="请选择"
+                                  >
+                                    {
+                                      this.arrQC(this.fucaiSel.filter(item => item.parentCategoryId === row.parentCategoryId && item.goodsCategoryId === row.goodsCategoryId), { value: 'goodsId', label: 'goodsName' }).map((item, index_) => (
+                                        <el-option key={index_} label={item.label} value={item.value}></el-option>
+                                      ))
+                                    }
+                                  </el-select>
+                                </el-form-item>
+                              </div>
+                            ) : (
+                              <div style="padding:0 6px">{row[column.columnAttributes.propName]}</div>
+                            )
+                          }
+                        },
+                        {
+                          columnAttributes: {
+                            label: '商品代码',
+                            prop: 'goodsCode',
+                            width: 160
+                          }
+                        },
+                        {
+                          columnAttributes: {
+                            label: '规格型号',
+                            prop: 'goodsSpecification',
+                            width: 160
+                          }
+                        },
+                        {
+                          columnAttributes: {
+                            label: '单位',
+                            prop: 'goodsStockUnit',
+                            width: 160
+                          }
+                        },
+                        {
+                          columnAttributes: {
+                            label: '收费类型',
+                            prop: 'normType',
+                            width: 160
+                          },
+                          render: (h, { row, column, index }) => {
+                            return <div style="padding:0 6px">{({ M: '物料收费', S: '服务收费' })[row[column.columnAttributes.prop]] || ''}</div>
+                          }
+                        },
+                        ...this.commonColumns
+                      ]}
+                      tableData={this.formData.items_m}
+                      tableAttributes={{
+                        size: 'mini',
+                        border: true
+                      }}
+                    />
+                  ]
+                  : this.activeName == 'items_p'
+                    ? [
+                      <div style="margin-bottom:10px">
+                        <el-button type="primary" onClick={() => { this.addItem("P") }}>
+                          添加
+                        </el-button>
+                      </div>,
+                      <zj-table
+                        columns={[
+                          {
+                            columnAttributes: {
+                              label: '配件名称',
+                              prop: 'goodsId',
+                              propName: 'goodsName',
+                              width: 160
+                            },
+                            render: (h, { row, column, index }) => {
+                              return this.isEditIndex == index ? (
+                                <div class="redbordererr">
+                                  <el-form-item
+                                    label=""
+                                    lebel-width="0px"
+                                    prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+                                    rules={required}
+                                  >
+                                    <el-select
+                                      value={row[column.columnAttributes.prop]}
+                                      onInput={val => {
+                                        row[column.columnAttributes.prop] = val
+                                      }}
+                                      onChange={val => {
+                                        this.delItemKey(3, row)
+                                        if (val) {
+                                          var data = this.peijianSel.find(item => item.goodsId == val)
+                                          row[column.columnAttributes.propName] = data?.goodsName || ""
+                                          if (data) {
+                                            row.goodsStockUnit = data.goodsStockUnit
+                                            row.goodsCode = data.goodsCode
+                                            row.normType = data.normType
+                                            row.brandRelaName = data.brandRelaName
+                                            row.productRelaName = data.productRelaName
+                                          }
+                                        } else {
+                                          row[column.columnAttributes.propName] = ''
+                                        }
+                                      }}
+                                      placeholder="请选择"
+                                    >
+                                      {this.peijianSel.map((item, index_) => (
+                                        <el-option key={index_} label={item.goodsName} value={item.goodsId}></el-option>
+                                      ))}
+                                    </el-select>
+                                  </el-form-item>
+                                </div>
+                              ) : (
+                                <div style="padding:0 6px">{row[column.columnAttributes.propName]}</div>
+                              )
+                            }
+                          },
+                          {
+                            columnAttributes: {
+                              label: '单位',
+                              prop: 'goodsStockUnit',
+                              width: 160
+                            }
+                          },
+                          {
+                            columnAttributes: {
+                              label: '商品代码',
+                              prop: 'goodsCode',
+                              width: 160
+                            }
+                          },
+                          {
+                            columnAttributes: {
+                              label: '收费类型',
+                              prop: 'normType',
+                              width: 160
+                            },
+                            render: (h, { row, column, index }) => {
+                              return <div style="padding:0 6px">{({ M: '物料收费', S: '服务收费' })[row[column.columnAttributes.prop]] || ''}</div>
+                            }
+                          },
+                          {
+                            columnAttributes: {
+                              label: '适用品牌',
+                              prop: 'brandRelaName',
+                              width: 160
+                            }
+                          },
+                          {
+                            columnAttributes: {
+                              label: '适用产品大类',
+                              prop: 'productRelaName',
+                              width: 160
+                            }
+                          },
+                          ...this.commonColumns
+                        ]}
+                        tableData={this.formData.items_p}
+                        tableAttributes={{
+                          size: 'mini',
+                          border: true
+                        }}
+                      />
+                    ]
+                    : null}
+              </div>
+            )
+          }
+        }
+      ]
+    },
+    commonColumns() {
+      return [{
+        columnAttributes: {
+          label: '销售价格(元)',
+          prop: 'normAmount',
+        },
+        render: (h, { row, column, index }) => {
+          return this.isEditIndex == index ? (
+            <div class="redbordererr">
+              <el-form-item
+                label=""
+                lebel-width="0px"
+                prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+                rules={required}
+              >
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={val => {
+                    row[column.columnAttributes.prop] = val
+                  }}
+                  type="number"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </div>
+          ) : (
+            <div style="padding:0 6px">{row[column.columnAttributes.prop]}</div>
+          )
+        }
+      },
+      // {
+      //   columnAttributes: {
+      //     label: '师傅分账金额(元)',
+      //     prop: 'workerAmount',
+      //     width: 160
+      //   },
+      //   render: (h, { row, column, index }) => {
+      //     return this.isEditIndex == index ? (
+      //       <div class="redbordererr">
+      //         <el-form-item
+      //           label=""
+      //           lebel-width="0px"
+      //           prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+      //           rules={required}
+      //         >
+      //           <el-input
+      //             value={row[column.columnAttributes.prop]}
+      //             onInput={val => {
+      //               row[column.columnAttributes.prop] = val
+      //             }}
+      //             type="number"
+      //             placeholder="请输入"
+      //           ></el-input>
+      //         </el-form-item>
+      //       </div>
+      //     ) : (
+      //       <div style="padding:0 6px">{row[column.columnAttributes.prop]}</div>
+      //     )
+      //   }
+      // }, {
+      //   columnAttributes: {
+      //     label: '商户分账金额(元)',
+      //     prop: 'websitAmount',
+      //     width: 160
+      //   },
+      //   render: (h, { row, column, index }) => {
+      //     return this.isEditIndex == index ? (
+      //       <div class="redbordererr">
+      //         <el-form-item
+      //           label=""
+      //           lebel-width="0px"
+      //           prop={`${this.activeName}.${index}.${column.columnAttributes.prop}`}
+      //           rules={required}
+      //         >
+      //           <el-input
+      //             value={row[column.columnAttributes.prop]}
+      //             onInput={val => {
+      //               row[column.columnAttributes.prop] = val
+      //             }}
+      //             type="number"
+      //             placeholder="请输入"
+      //           ></el-input>
+      //         </el-form-item>
+      //       </div>
+      //     ) : (
+      //       <div style="padding:0 6px">{row[column.columnAttributes.prop]}</div>
+      //     )
+      //   }
+      // }, 
+      {
+        columnAttributes: {
+          label: '操作',
+          fixed: 'right',
+          width: 140
+        },
+        render: (h, { row, column, index }) => {
+          return (
+            <div style="padding:0 6px" class="operation-btns">
+              {[
+                this.isEditIndex == index ? (
+                  <el-button
+                    type="text"
+                    onClick={() => { this.verifyBtn() }}
+                  >
+                    确认
+                  </el-button>
+                ) : null,
+                this.isEditIndex == -1 ? (
+                  <el-button
+                    type="text"
+                    onClick={() => { this.isEditIndex = index }}
+                  >
+                    编辑
+                  </el-button>
+                ) : null,
+                <el-button
+                  type="text"
+                  onClick={() => {
+                    this.formData?.[this.activeName]?.splice(index, 1)
+                    if (index == this.isEditIndex) {
+                      this.isEditIndex = -1
+                    }
+                  }}
+                >
+                  删除
+                </el-button>
+              ]}
+            </div>
+          )
+        }
+      }]
+    },
+    logList() {
+      return [
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <zj-table
+                columns={[
+                  {
+                    columnAttributes: {
+                      label: '操作类型',
+                      prop: 'typeText',
+                    }
+                  },
+                  {
+                    columnAttributes: {
+                      label: '操作内容',
+                      prop: 'content',
+                    }
+                  },
+                  {
+                    columnAttributes: {
+                      label: '操作人',
+                      prop: 'createBy',
+                    }
+                  },
+                  {
+                    columnAttributes: {
+                      label: '操作时间',
+                      prop: 'createTime',
+                    }
+                  },
+                ]}
+                tableData={this.formData.operatorLogList}
+                tableAttributes={{
+                  size: 'mini',
+                  border: true
+                }}
+              />
+            )
+          }
+        }
+      ]
+    },
+  },
+  methods: {
+    // 列表请求函数
+    getList: orderEnginbaseList,
+    // 列表导出函数
+    exportList: orderEnginBaseListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    handleClose() {
+      this.$refs?.formRef?.resetFields()
+      this.$data.formData = this.$options.data().formData
+      this.activeName = 'items_m'
+    },
+    // 打开弹窗
+    openForm() {
+      // 获取辅材下拉数据
+      materialNormList({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }] }).then(res => {
+        this.fucaiSel = res.data.records
+      });
+      // 获取配件下拉数据
+      listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.norm_type", "compare": "=", "value": "M" }] }).then(res => {
+        this.peijianSel = res.data.records
+      });
+    },
+    quedingbaocun(removeTab) {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          orderEnginBaseSave({
+            ...this.formData,
+            items: [...this.formData.items_m, ...this.formData.items_p]
+          }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '保存成功'
+            })
+            this.handleClose()
+            this.$refs.pageRef.refreshList()
+            removeTab && removeTab()
+          })
+        }
+      })
+    },
+    // 操作按钮
+    operation() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            this.$refs.tabPage.addTab({
+              // 对应显示的模块
+              activeKey: "detail",
+              // 唯一标识
+              key: "detail",
+              // 页签名称
+              label: "详情",
+              // 打开时事件
+              triggerEvent: () => {
+                this.activeType_e = 'jbzl'
+                this.handleClose()
+                this.$nextTick(() => {
+                  orderEnginBaseDetail({ id: row.id }).then(res => {
+                    Object.assign(this.formData, res.data, {
+                      items_m: (res.data.items || []).filter(item => item.goodsType == "M"),
+                      items_p: (res.data.items || []).filter(item => item.goodsType == "P"),
+                    })
+                    this.getinitlbslist()
+                    this.openForm()
+                  })
+                })
+              },
+              // 关闭时事件
+              closeEvent: () => { }
+            })
+          }
+        },
+        orderDetail: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: 'workOrderPool',
+              params: {
+                pageName: row.projectNo,
+                pageType: 'projectNo',
+                pageCode: row.projectNo,
+              },
+            })
+          }
+        }
+      })
+    },
+    // 获取省市区街道
+    getinitlbslist() {
+      // 初始化请求省市区街道下拉选项数据
+      lbsAmapRegion({ pid: 0 }).then(res => {
+        this.provinceList = res.data
+        if (this.formData.provinceId) {
+          var item = this.provinceList.find(item => item.name === this.formData.provinceId)
+          if (item) {
+            this.formData.province = item.name
+          }
+          lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+            this.cityList = res.data
+            if (this.formData.cityId) {
+              var item2 = this.cityList.find(item => item.name === this.formData.cityId)
+              if (item2) {
+                this.formData.city = item2.name
+              }
+              lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+                this.areaList = res.data
+                if (this.formData.areaId) {
+                  var item3 = this.areaList.find(item => item.name === this.formData.areaId)
+                  if (item3) {
+                    this.formData.city = item2.name
+                  }
+                  lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+                    this.streetList = res.data
+                    if (this.formData.streetId) {
+                      var item4 = this.streetList.find(item => item.name === this.formData.streetId)
+                      if (item4) {
+                        this.formData.street = item4.name
+                      }
+                    }
+                  })
+                }
+              })
+            }
+          })
+        }
+      })
+    },
+    delDataK(num) {
+      if (num <= 1) {
+        // 删除市
+        this.formData.cityId = ''
+        this.formData.city = ''
+        // 删除市选项
+        this.cityList = []
+      }
+      if (num <= 2) {
+        // 删除区
+        this.formData.areaId = ''
+        this.formData.area = ''
+        // 删除区选项
+        this.areaList = []
+      }
+      if (num <= 3) {
+        // 删除街道
+        this.formData.streetId = ''
+        this.formData.street = ''
+        // 删除街道选项
+        this.streetList = []
+      }
+      // 删除gps地址
+      this.formData.address = ''
+    },
+    delItemKey(num, row) {
+      if (num <= 1) {
+        row.goodsCategoryId = ""
+        row.goodsCategoryName = ""
+      }
+      if (num <= 2) {
+        row.goodsId = ""
+        row.goodsName = ""
+      }
+      if (num <= 3) {
+        row.brandRelaId = ""
+        row.brandRelaName = ""
+        row.goodsBarcodeId = ""
+        row.goodsCode = ""
+        row.goodsSpecification = ""
+        row.goodsStockUnit = ""
+        row.normType = ""
+        row.orderEnginBaseId = ""
+        row.productCreateBy = ""
+        row.productCreateTime = ""
+        row.productRelaId = ""
+        row.productRelaName = ""
+        row.productUpdateBy = ""
+        row.productUpdateTime = ""
+      }
+    },
+    arrQC(list, qz = { label: '', value: '' }) {
+      var obj = {}
+      for (var item of list) {
+        obj[item[qz?.value || 'value']] = item
+      }
+      return Object.keys(obj).map(key => {
+        return {
+          data: obj[key],
+          value: key,
+          label: obj[key][qz?.label || 'label']
+        }
+      })
+    },
+    addItem(goodsType) {
+      if (this.isEditIndex > -1) {
+        this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
+          if (valid) {
+            this.formData[this.activeName].unshift({
+              "brandRelaId": "",
+              "brandRelaName": "",
+              "goodsBarcodeId": "",
+              "goodsCategoryId": "",
+              "goodsCategoryName": "",
+              "goodsCode": "",
+              "goodsId": "",
+              "goodsName": "",
+              "goodsSpecification": "",
+              "goodsStockUnit": "",
+              "goodsType": goodsType,
+              "normAmount": '',
+              "normType": "",
+              "orderEnginBaseId": "",
+              "parentCategoryId": "",
+              "parentCategoryName": "",
+              "productCreateBy": "",
+              "productCreateTime": "",
+              "productRelaId": "",
+              "productRelaName": "",
+              "productUpdateBy": "",
+              "productUpdateTime": "",
+              // "websitAmount": '',
+              // "workerAmount": ''
+            })
+            this.isEditIndex = 0
+          }
+        })
+      } else {
+        this.formData[this.activeName].unshift({
+          "brandRelaId": "",
+          "brandRelaName": "",
+          "goodsBarcodeId": "",
+          "goodsCategoryId": "",
+          "goodsCategoryName": "",
+          "goodsCode": "",
+          "goodsId": "",
+          "goodsName": "",
+          "goodsSpecification": "",
+          "goodsStockUnit": "",
+          "goodsType": goodsType,
+          "normAmount": '',
+          "normType": "",
+          "orderEnginBaseId": "",
+          "parentCategoryId": "",
+          "parentCategoryName": "",
+          "productCreateBy": "",
+          "productCreateTime": "",
+          "productRelaId": "",
+          "productRelaName": "",
+          "productUpdateBy": "",
+          "productUpdateTime": "",
+          // "websitAmount": '',
+          // "workerAmount": ''
+        })
+        this.isEditIndex = 0
+      }
+    },
+    getVfyKey() {
+      return [
+        `${this.activeName}.${this.isEditIndex}.parentCategoryId`,
+        `${this.activeName}.${this.isEditIndex}.goodsCategoryId`,
+        `${this.activeName}.${this.isEditIndex}.goodsId`,
+        `${this.activeName}.${this.isEditIndex}.normAmount`,
+        // `${this.activeName}.${this.isEditIndex}.workerAmount`,
+        // `${this.activeName}.${this.isEditIndex}.websitAmount`,
+      ]
+    },
+    verifyBtn() {
+      this.$refs.formRef.validateField(this.getVfyKey(this.isEditIndex), (valid, invalidFields, errLabels) => {
+        if (valid) {
+          this.isEditIndex = -1
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 295 - 0
src/views/workOrder/penaltyWorkOrder/index.vue

@@ -0,0 +1,295 @@
+<template>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{activeKey, data}">
+      <div :style="{
+        width: '100%',
+        height: activeKey == 'list' ? '100%' : '0px',
+        overflow: 'hidden'
+      }">
+        <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
+          :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+          :exportList="exportList" :operation="operation()">
+        </template-page>
+      </div>
+      <div v-if="~['add', 'detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
+        <div>
+          <zj-form-container ref="formRef" :form-data="formData">
+            <zj-form-module title="单据信息" :form-data="formData" :form-items="formItems">
+            </zj-form-module>
+            <zj-form-module title="客户信息" :form-data="formData" :form-items="basicInfo">
+            </zj-form-module>
+            <zj-form-module title="产品信息" :form-data="formData" :form-items="product">
+            </zj-form-module>
+            <zj-form-module title="处罚信息" label-width="100px" :form-data="formData" :form-items="pandanxinxi">
+            </zj-form-module>
+            <zj-form-module title="处置信息" label-width="100px" :form-data="formData" :form-items="czpandanxinxi">
+            </zj-form-module>
+          </zj-form-container>
+          <div slot="footer" class="dialog-footer">
+            <el-button size="mini" @click="data.removeTab">取 消</el-button>
+            <el-button v-if="!formData.status || formData.status == 'SAVE'" size="mini" type="primary"
+              @click="quedingbaocun(data.removeTab)">保存</el-button>
+            <el-button v-if="formData.status == 'SAVE'" size="mini" type="primary"
+              @click="quedingshenhe(data.removeTab)">审核</el-button>
+          </div>
+        </div>
+      </div>
+    </template>
+  </zj-tab-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import basicInfo from "./mixins/basicInfo"
+import productColumns from "./mixins/productColumns"
+import pandanxinxi from "./mixins/pandanxinxi"
+import czpandanxinxi from "./mixins/czpandanxinxi"
+import common_form from "./mixins/common_form"
+import { orderPunishList, orderPunishListExport, orderPunishExamine, orderPunishDelete, orderPunishDetail, orderPunishSave } from "@/api/penaltyWorkOrder";
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin, operation_mixin, basicInfo, productColumns, pandanxinxi, czpandanxinxi, common_form],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      formData: {
+        "address": "",
+        "area": "",
+        "areaId": "",
+        "city": "",
+        "cityId": "",
+        "disposeOrderBaseId": "",
+        "disposeOrderSmallType": "",
+        "disposeOrderSmallTypeText": "",
+        "disposeWebsitId": "",
+        "disposeWebsitName": "",
+        "disposeWorkerId": "",
+        "disposeWorkerMobile": "",
+        "disposeWorkerName": "",
+        "examineBy": "",
+        "examineRemark": "",
+        "examineTime": "",
+        "fileUrls": [],
+        "id": "",
+        "linkName": "",
+        "orderBaseId": "",
+        "orderSmallType": "",
+        "orderSmallTypeText": "",
+        "province": "",
+        "provinceId": "",
+        "punishOrderProducts": [
+          {
+            "brandId": "",
+            "brandName": "",
+            "insideCode": "",
+            "mainId": "",
+            "mainName": "",
+            "outCode": "",
+            "punishOrderId": "",
+            "smallId": "",
+            "smallName": "",
+            "specsName": "",
+          }
+        ],
+        "punishOrderWorkers": [],
+        "remark": "",
+        // "status": "",
+        "street": "",
+        "streetId": "",
+        "totalAmount": "",
+        "userMobile": "",
+        "userMobile2": "",
+        "userName": "",
+        "websitId": "",
+        "websitName": "",
+      },
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.$refs.tabPage.addTab({
+                  // 对应显示的模块
+                  activeKey: "add",
+                  // 唯一标识
+                  key: "add",
+                  // 页签名称
+                  label: "新增",
+                  // 打开时事件
+                  triggerEvent: () => {
+                    this.handleClose()
+                    this.$nextTick(() => {
+                      this.openForm()
+                    })
+                  },
+                  // 关闭时事件
+                  closeEvent: () => { }
+                })
+              }
+            })
+          ]
+        ]
+      ]
+    },
+  },
+  mounted() {
+    this.initFun()
+  },
+  methods: {
+    initFun() {
+      if (this.pageType == "detail") {
+        this.$refs.tabPage.addTab({
+          // 对应显示的模块
+          activeKey: "detail",
+          // 唯一标识
+          key: "detail",
+          // 页签名称
+          label: "详情",
+          // 打开时事件
+          triggerEvent: () => {
+            this.handleClose()
+            this.$nextTick(() => {
+              orderPunishDetail({ id: this.pageCode }).then(res => {
+                Object.assign(this.formData, res.data, {
+                  fileUrls: res.data.fileUrls ? res.data.fileUrls.split(",").map(url => ({ url })) : []
+                })
+                this.openForm()
+              })
+            })
+          },
+          // 关闭时事件
+          closeEvent: () => { }
+        })
+      }
+    },
+    // 列表请求函数
+    getList: orderPunishList,
+    // 列表导出函数
+    exportList: orderPunishListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 关闭
+    handleClose() {
+      this.$data.formData = this.$options.data().formData
+    },
+    // 打开弹窗
+    openForm() {
+      this.getinitlbslist()
+      this.getProductSel()
+      this.getWebsitList()
+      this.getWorkers()
+      this.getorderSmallTypeData()
+      this.getdisposeWebsitIds()
+    },
+    // 保存
+    quedingbaocun(removeTab) {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          orderPunishSave({
+            ...this.formData,
+            fileUrls: this.formData.fileUrls.map(item => item.url).join(",")
+          }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '保存成功'
+            })
+            this.$refs.pageRef.refreshList()
+            removeTab && removeTab()
+            this.handleClose()
+          })
+        }
+      })
+    },
+    // 审核
+    quedingshenhe(removeTab) {
+      orderPunishExamine({
+        id: this.formData.id,
+        status: "OK",
+      }).then(res => {
+        this.$message({
+          type: 'success',
+          message: '审核成功'
+        })
+        this.$refs.pageRef.refreshList()
+        removeTab && removeTab()
+        this.handleClose()
+      })
+    },
+    // 操作按钮
+    operation() {
+      return this.operationBtn({
+        detail: {
+          click: ({ row, index, column }) => {
+            this.$refs.tabPage.addTab({
+              // 对应显示的模块
+              activeKey: "detail",
+              // 唯一标识
+              key: "detail",
+              // 页签名称
+              label: "详情",
+              // 打开时事件
+              triggerEvent: () => {
+                this.handleClose()
+                this.$nextTick(() => {
+                  orderPunishDetail({ id: row.id }).then(res => {
+                    Object.assign(this.formData, res.data, {
+                      fileUrls: res.data.fileUrls ? res.data.fileUrls.split(",").map(url => ({ url })) : []
+                    })
+                    this.openForm()
+                  })
+                })
+              },
+              // 关闭时事件
+              closeEvent: () => { }
+            })
+          }
+        },
+        del: {
+          prompt: "是否确定删除?",
+          conditions: ({ row, index, column }) => {
+            return row.status != "OK"
+          },
+          click: ({ row, index, column }) => {
+            orderPunishDelete({ id: row.id }).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功'
+              })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 306 - 0
src/views/workOrder/penaltyWorkOrder/mixins/basicInfo.js

@@ -0,0 +1,306 @@
+import { lbsAmapRegion } from '@/api/common.js'
+import geographicalPosi from '@/components/geographicalPosi/index.vue'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+export default {
+  data() {
+    return {
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      streetList: [],
+    }
+  },
+  computed: {
+    // 基本信息数据模型
+    basicInfo() {
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入',
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '客户名称',
+            prop: 'userName',
+            rules: [...required],
+          },
+          events: {
+            input: (v) => {
+              this.formData.linkName = v
+            }
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入',
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '联系人',
+            prop: 'linkName',
+            rules: [...required],
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入',
+            disabled: this.formData.status == "OK", maxlength: 11
+          },
+          formItemAttributes: {
+            label: '客户电话',
+            prop: 'userMobile',
+            rules: [...mobileRequired],
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入',
+            disabled: this.formData.status == "OK", maxlength: 11
+          },
+          formItemAttributes: {
+            label: '客户电话2',
+            prop: 'userMobile2',
+          }
+        },
+        {
+          name: 'el-select',
+          md: 6,
+          formItemAttributes: {
+            label: '客户地址', //省
+            prop: 'provinceId',
+            errLabel: '省',
+            rules: [...required],
+          },
+          options: this.provinceList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: {
+            disabled: this.formData.status == "OK", clearable: true, filterable: true, placeholder: '请选择'
+          },
+          events: {
+            change: (val) => {
+              // 获取省名称
+              this.formData.province = this.provinceList.find(item => item.id === val)?.name || ''
+              // 清除市区街道以及详细地址数据
+              this.delDataK(1)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.cityList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //市
+            prop: 'cityId',
+            errLabel: '市',
+            rules: [...required],
+          },
+          options: this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: {
+            disabled: this.formData.status == "OK", clearable: true, filterable: true, placeholder: '请选择'
+          },
+          events: {
+            change: (val) => {
+              // 获取市名称
+              this.formData.city = this.cityList.find(item => item.id === val).name
+              // 清除区街道以及详细地址数据
+              this.delDataK(2)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.areaList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //区
+            prop: 'areaId',
+            errLabel: '区',
+            rules: [...required],
+          },
+          options: this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: {
+            disabled: this.formData.status == "OK", clearable: true, filterable: true, placeholder: '请选择'
+          },
+          events: {
+            change: (val) => {
+              // 获取区名称
+              this.formData.area = this.areaList.find(item => item.id === val).name
+              // 清除街道以及详细地址数据
+              this.delDataK(3)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.streetList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //街道
+            prop: 'streetId',
+            errLabel: '街道',
+            rules: [...required],
+          },
+          options: this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: {
+            disabled: this.formData.status == "OK", clearable: true, filterable: true, placeholder: '请选择'
+          },
+          events: {
+            change: (val) => {
+              // 获取街道名称
+              this.formData.street = this.streetList.find(item => item.id === val).name
+              // 清除详细地址数据
+              this.delDataK(4)
+            }
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 3,
+          formItemAttributes: {
+            'label-width': '0px',
+            prop: '',
+          },
+          render: (h, { props }) => {
+            return (
+              <geographicalPosi
+                disabled={this.formData.status == "OK"}
+                formData={this.formData}
+                onSelectPosi={data => {
+                  // 获取经纬度
+                  this.formData.lng = data.center[0]
+                  this.formData.lat = data.center[1]
+                  // 获取定位的省市区街道
+                  var { province, city, district, township } = data.data.addressComponent
+                  // 获取选中省名称id
+                  var { id, name } = this.provinceList.find(item => item.name === province)
+                  this.formData.provinceId = id
+                  this.formData.province = name
+                  // 请求市选项
+                  lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+                    // 赋值市选项
+                    this.cityList = res.data
+                    // 获取选中市名称id
+                    var { id, name } = res.data.find(item => item.name === city)
+                    this.formData.cityId = id
+                    this.formData.city = name
+                    // 请求区选项
+                    lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+                      // 赋值区选项
+                      this.areaList = res.data
+                      // 获取选中区名称id
+                      var { id, name } = res.data.find(item => item.name === district)
+                      this.formData.areaId = id
+                      this.formData.area = name
+                      // 请求街道选项
+                      lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+                        // 赋值街道选项
+                        this.streetList = res.data
+                        // 获取选中街道名称id
+                        var { id, name } = res.data.find(item => item.name === township)
+                        this.formData.streetId = id
+                        this.formData.street = name
+                        this.formData.address = data.name
+                      })
+                    })
+                  })
+                }}
+              />
+            )
+          }
+        }, {
+          name: 'el-input',
+          md: 24,
+          formItemAttributes: { label: '详细地址', prop: 'address', rules: [...required] },
+          attributes: {
+            placeholder: '详细地址',
+            disabled: this.formData.status == "OK"
+          }
+        },
+      ]
+    }
+  },
+  methods: {
+    // 获取省市区街道
+    getinitlbslist() {
+      // 初始化请求省市区街道下拉选项数据
+      lbsAmapRegion({ pid: 0 }).then(res => {
+        this.provinceList = res.data
+        if (this.formData.provinceId) {
+          var item = this.provinceList.find(item => item.name === this.formData.provinceId)
+          if (item) {
+            this.formData.province = item.name
+          }
+          lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+            this.cityList = res.data
+            if (this.formData.cityId) {
+              var item2 = this.cityList.find(item => item.name === this.formData.cityId)
+              if (item2) {
+                this.formData.city = item2.name
+              }
+              lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+                this.areaList = res.data
+                if (this.formData.areaId) {
+                  var item3 = this.areaList.find(item => item.name === this.formData.areaId)
+                  if (item3) {
+                    this.formData.city = item2.name
+                  }
+                  lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+                    this.streetList = res.data
+                    if (this.formData.streetId) {
+                      var item4 = this.streetList.find(item => item.name === this.formData.streetId)
+                      if (item4) {
+                        this.formData.street = item4.name
+                      }
+                    }
+                  })
+                }
+              })
+            }
+          })
+        }
+      })
+    },
+    delDataK(num) {
+      if (num <= 1) {
+        // 删除市
+        this.formData.cityId = ''
+        this.formData.city = ''
+        // 删除市选项
+        this.cityList = []
+      }
+      if (num <= 2) {
+        // 删除区
+        this.formData.areaId = ''
+        this.formData.area = ''
+        // 删除区选项
+        this.areaList = []
+      }
+      if (num <= 3) {
+        // 删除街道
+        this.formData.streetId = ''
+        this.formData.street = ''
+        // 删除街道选项
+        this.streetList = []
+      }
+      // 删除gps地址
+      this.formData.address = ''
+    },
+  }
+}

+ 45 - 0
src/views/workOrder/penaltyWorkOrder/mixins/common_form.js

@@ -0,0 +1,45 @@
+
+export default {
+  computed: {
+    formItems() {
+      return [
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <div>
+                <el-descriptions
+                  border
+                  title=""
+                  column={4}
+                  colon={false}
+                  labelStyle={{ width: '8%' }}
+                  contentStyle={{ width: '17%' }}
+                >
+                  <el-descriptions-item label="所属商户">{JSON.parse(localStorage.getItem('greemall_user')).companyName}</el-descriptions-item>
+                  <el-descriptions-item label="处罚单号">{this.formData.id || ''}</el-descriptions-item>
+                  <el-descriptions-item label="状态">
+                    {{ SAVE: '保存', WAIT: '待审核', OK: '通过', FAIL: '失败' }[this.formData.status] || ''}
+                  </el-descriptions-item>
+                  <el-descriptions-item label=""></el-descriptions-item>
+                  <el-descriptions-item label="创建人">{this.formData.createBy || ''}</el-descriptions-item>
+                  <el-descriptions-item label="创建时间">{this.formData.createTime || ''}</el-descriptions-item>
+                  <el-descriptions-item label="审核人">{this.formData.examineBy || ''}</el-descriptions-item>
+                  <el-descriptions-item label="审核时间">{this.formData.examineTime || ''}</el-descriptions-item>
+                </el-descriptions>
+              </div>
+            )
+          }
+        }
+      ]
+    }
+  },
+}

+ 133 - 0
src/views/workOrder/penaltyWorkOrder/mixins/czpandanxinxi.js

@@ -0,0 +1,133 @@
+import { memberListPageV2 } from "@/api/masterManagement";
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+export default {
+  data() {
+    return {
+      workerList_cz: []
+    }
+  },
+  computed: {
+    czpandanxinxi() {
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入',
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '处置工单号',
+            prop: 'disposeOrderBaseId',
+            rules: [...required],
+          }
+        },
+        {
+          name: 'el-select',
+          md: 6,
+          options: this.orderSmallTypeData,
+          attributes: {
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true,
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '工单类型',
+            prop: 'disposeOrderSmallType',
+            rules: [...required],
+          },
+          events: {
+            change: (val) => {
+              if (val) {
+                this.formData.disposeOrderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
+              } else {
+                this.formData.disposeOrderSmallTypeText = ''
+              }
+            }
+          }
+        },
+        {
+          name: 'el-select-add',
+          options: this.websitList,
+          md: 6,
+          attributes: {
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true,
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '网点名称',
+            prop: 'disposeWebsitId',
+            rules: [...required],
+          },
+          events: {
+            change: (val) => {
+              this.formData.disposeWorkerId = ""
+              this.formData.disposeWorkerName = ""
+              this.formData.disposeWorkerMobile = ""
+              this.getdisposeWebsitIds()
+              if (val) {
+                this.formData['disposeWebsitName'] = this.websitList.find(item => item.value == val)?.label || val
+              } else {
+                this.formData['disposeWebsitName'] = ''
+              }
+            }
+          }
+        },
+        {
+          name: 'el-select-add',
+          options: this.workerList_cz,
+          md: 6,
+          attributes: {
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true,
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '处置工程师',
+            prop: 'disposeWorkerId',
+            rules: [...required],
+          },
+          events: {
+            change: (val) => {
+              if (val) {
+                this.formData['disposeWorkerName'] = this.workerList_cz.find(item => item.value == val)?.label || val
+                this.formData['disposeWorkerMobile'] = this.workerList_cz.find(item => item.value == val)?.data?.workerMobile || ""
+              } else {
+                this.formData['disposeWorkerMobile'] = ''
+                this.formData['disposeWorkerName'] = ''
+              }
+            }
+          }
+        },
+      ]
+    }
+  },
+  methods: {
+    getdisposeWebsitIds() {
+      if (this.formData.disposeWebsitId) {
+        memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }, { "param": "b.websit_id", "compare": "=", "value": this.formData.disposeWebsitId }] }).then(res => {
+          this.workerList_cz = res.data.records.map(item => {
+            var { id, userId, ...data } = item
+            return {
+              value: userId,
+              label: data.nickName,
+              data: {
+                workerId: userId,
+                workerName: data.nickName,
+                workerIdcard: data.idCard,
+                workerMobile: data.mobile,
+                ...data
+              }
+            }
+          })
+        })
+      } else {
+        this.workerList_cz = []
+      }
+    }
+  },
+}

+ 281 - 0
src/views/workOrder/penaltyWorkOrder/mixins/pandanxinxi.js

@@ -0,0 +1,281 @@
+import { getWebsit } from "@/api/customerManagement.js"
+import { memberListPageV2 } from "@/api/masterManagement";
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import { listPageV2 } from "@/api/workOrder/orderType";
+import ImageUpload from '@/components/file-upload'
+export default {
+  data() {
+    return {
+      websitList: [],
+      workerList: [],
+      orderSmallTypeData: []
+    }
+  },
+  computed: {
+    workersColumns() {
+      return [
+        {
+          columnAttributes: {
+            label: '姓名',
+            prop: 'workerId'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderWorkers.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <zj-select
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  onChange={(val) => {
+                    if (val) {
+                      var data = this.workerList.find(item => item.value == val)
+                      row.workerMobile = data?.data?.workerMobile || ""
+                      row.workerName = data?.label || val
+                    } else {
+                      row.workerName = ""
+                      row.workerMobile = ""
+                    }
+                  }}
+                  placeholder="请选择"
+                  blurNoMatchText={true}
+                  disabled={this.formData.status == "OK"}
+                  clearable={true}
+                  filterable={true}
+                  blurNoMatchInputBorderColor="">
+                  {this.workerList.map((item, index_) => <zj-option key={index_} label={item.label} value={item.value}></zj-option>)}
+                </zj-select>
+              </el-form-item>
+            </div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '联系电话',
+            prop: 'workerMobile'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderWorkers.${index}.${column.columnAttributes.prop}`} rules={mobileRequired}>
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                  disabled={this.formData.status == "OK"}
+                >
+                </el-input>
+              </el-form-item>
+            </div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '处罚金额',
+            prop: 'amount'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderWorkers.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+
+                  disabled={this.formData.status == "OK"}
+                >
+                </el-input>
+              </el-form-item>
+            </div>
+          }
+        },
+        ...(() => {
+          if (this.formData.status != "OK") {
+            return [
+              {
+                columnAttributes: {
+                  label: '操作',
+                  width: 100
+                },
+                render: (h, { row, column, index }) => {
+                  return <div style="padding-left:10px">
+                    <el-button type="text" onClick={() => {
+                      this.formData.punishOrderWorkers.splice(index, 1)
+                    }}>删除</el-button>
+                  </div>
+                }
+              },
+            ]
+          }
+          return []
+        })()
+      ]
+    },
+    pandanxinxi() {
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            placeholder: '请输入',
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '处罚工单号',
+            prop: 'orderBaseId',
+            rules: [...required],
+          }
+        },
+        {
+          name: 'el-select',
+          md: 6,
+          options: this.orderSmallTypeData,
+          attributes: {
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true,
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '工单类型',
+            prop: 'orderSmallType',
+            rules: [...required],
+          },
+          events: {
+            change: (val) => {
+              if (val) {
+                this.formData.orderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
+              } else {
+                this.formData.orderSmallTypeText = ''
+              }
+            }
+          }
+        },
+        {
+          name: 'el-select-add',
+          options: this.websitList,
+          md: 6,
+          attributes: {
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true,
+            disabled: this.formData.status == "OK"
+          },
+          formItemAttributes: {
+            label: '网点名称',
+            prop: 'websitId',
+            rules: [...required],
+          },
+          events: {
+            change: (val) => {
+              this.formData.punishOrderWorkers = []
+              this.getWorkers()
+              if (val) {
+                this.formData['websitName'] = this.websitList.find(item => item.value == val)?.label || val
+              } else {
+                this.formData['websitName'] = ''
+              }
+            }
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 24,
+          formItemAttributes: {
+            label: '处罚工程师',
+            prop: 'punishOrderWorkers',
+            rules: [...required],
+          },
+          render: (h, { props }) => {
+            var { formData } = props
+            return (
+              <div>
+                {
+                  this.formData.status != "OK" ?
+                    <div>
+                      <el-button size="mini" type="primary" onClick={() => {
+                        this.formData.punishOrderWorkers.unshift({
+                          "amount": "",
+                          "workerId": "",
+                          "workerMobile": "",
+                          "workerName": ""
+                        })
+                      }}>新增</el-button>
+                    </div> : null
+                }
+                <zj-table
+                  isDrop={true}
+                  columns={this.workersColumns}
+                  tableData={this.formData.punishOrderWorkers}
+                ></zj-table>
+              </div>
+            )
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          formItemAttributes: { label: '处罚备注', prop: 'remark' },
+          attributes: {
+            placeholder: '处罚备注',
+            disabled: this.formData.status == "OK"
+          }
+        },
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '附件图片',
+            prop: 'fileUrls',
+            rules: []
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return (
+              <ImageUpload fileList={this.formData.fileUrls} uid="imgSrc677766_materials_drawing_images" limit={100} isEdit={this.formData.status != "OK"} />
+            )
+          }
+        },
+      ]
+    }
+  },
+  methods: {
+    getorderSmallTypeData() {
+      listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "true" }] }).then(res => {
+        this.orderSmallTypeData = res.data.records.map(item => ({
+          value: item.id,
+          label: item.orderSmallTypeText
+        }))
+      })
+    },
+    getWebsitList() {
+      getWebsit({ type: "C", status: true, isAll: true }).then(res => {
+        this.websitList = res.data.map(item => ({
+          label: item.name,
+          value: item.websitId,
+          data: item
+        }))
+      })
+    },
+    getWorkers() {
+      if (this.formData.websitId) {
+        memberListPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "b.examine_status", "compare": "=", "value": "OK" }, { "param": "b.websit_id", "compare": "=", "value": this.formData.websitId }] }).then(res => {
+          this.workerList = res.data.records.map(item => {
+            var { id, userId, ...data } = item
+            return {
+              value: userId,
+              label: data.nickName,
+              data: {
+                workerId: userId,
+                workerName: data.nickName,
+                workerIdcard: data.idCard,
+                workerMobile: data.mobile,
+                ...data
+              }
+            }
+          })
+        })
+      } else {
+        this.workerList = []
+      }
+    }
+  },
+}

+ 207 - 0
src/views/workOrder/penaltyWorkOrder/mixins/productColumns.js

@@ -0,0 +1,207 @@
+import { getClassifyList } from '@/api/goods'
+import { getDataDictionary } from '@/api/dataDictionary.js'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+export default {
+  data() {
+    return {
+      orderBrands: [],
+      classifyList: [],
+      classifyListLv2: []
+    }
+  },
+  computed: {
+    productColumns() {
+      return [
+        {
+          columnAttributes: {
+            label: '产品品牌',
+            prop: 'brandId'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-select
+                  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="请选择"
+                  disabled={this.formData.status == "OK"}>
+                  {this.orderBrands.map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
+                </el-select>
+              </el-form-item>
+            </div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品大类',
+            prop: 'mainId'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-select
+                  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="请选择"
+                  disabled={this.formData.status == "OK"}>
+                  {this.classifyList.map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
+                </el-select>
+              </el-form-item>
+            </div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品小类',
+            prop: 'smallId'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-select
+                  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)
+                      console.log(data)
+                      row.smallName = data.name
+                      row.imgUrl = data.imgUrl
+                    } else {
+                      row.smallName = ""
+                      row.imgUrl = ""
+                    }
+                  }}
+                  placeholder="请选择"
+                  disabled={this.formData.status == "OK"}>
+                  {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>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '产品机型',
+            prop: 'specsName'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                  disabled={this.formData.status == "OK"}
+                >
+                </el-input>
+              </el-form-item>
+            </div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '内机条码',
+            prop: 'insideCode'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                  disabled={this.formData.status == "OK"}
+                >
+                </el-input>
+              </el-form-item>
+            </div>
+          }
+        },
+        {
+          columnAttributes: {
+            label: '外机条码',
+            prop: 'outCode'
+          },
+          render: (h, { row, column, index }) => {
+            return <div class="redbordererr">
+              <el-form-item label="" label-width="0px" prop={`punishOrderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
+                  placeholder="请输入内容"
+                  disabled={this.formData.status == "OK"}
+                >
+                </el-input>
+              </el-form-item>
+            </div>
+          }
+        },
+      ]
+    },
+    product() {
+      return [{
+        name: 'slot-component',
+        md: 24,
+        formItemAttributes: {
+          label: '',
+          'label-width': '0px',
+          prop: 'punishOrderProducts',
+          errLabel: '产品信息',
+          rules: [...required],
+        },
+        render: (h, { props }) => {
+          return (
+            <div>
+              <zj-table
+                columns={this.productColumns}
+                table-data={this.formData.punishOrderProducts}
+              />
+            </div>
+          )
+        }
+      }]
+    },
+  },
+  methods: {
+    getProductSel() {
+      // 获取品牌
+      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
+      })
+    }
+  },
+}

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

@@ -5,7 +5,7 @@
         <zj-form-container :formAttributes="{ 'label-position': 'top' }">
           <template v-for="(item, index) in payData">
             <zj-form-module :title="'支付费用' + (index + 1)" :form-data="payData[index]"
-              :form-items="[formItemsL1, formItems(item)][workOrderType]">
+              :form-items="[formItemsL1, formItems(item)][!!~[1,2,3].indexOf(workOrderType) ? 0 : workOrderType == 4 ? 1 : 0]">
               <div v-if="item.examineStatus === 'FAIL'" style="text-align:right">
                 <el-button size="mini" type="danger" plain @click="enginMaterialCancelFun(item)">取消申请</el-button>
               </div>
@@ -30,7 +30,7 @@ export default {
     },
     workOrderType: {
       type: Number,
-      default: 0, // 0普通工单, 1维保工单
+      default: 1, // 1普通工单, 4维保工单
     },
   },
   data() {
@@ -86,7 +86,7 @@ export default {
               <el-descriptions-item label="支付总金额">
                 {formData.totalAmount}
               </el-descriptions-item>
-              {this?.workOrderType == 0 ? (
+              {!!~[1,2,3].indexOf(this?.workOrderType) ? (
                 <el-descriptions-item label="总手续费">
                   {formData.commissionAmount}
                 </el-descriptions-item>
@@ -96,7 +96,7 @@ export default {
               </el-descriptions-item>
               <el-descriptions-item label="">
               </el-descriptions-item>
-              {this?.workOrderType == 1 ? [
+              {this?.workOrderType == 4 ? [
                 (<el-descriptions-item label=""></el-descriptions-item>),
                 (<el-descriptions-item label="审批状态">
                   {({ WAIT: "待审", OK: "审批", FAIL: "驳回", NO: "取消" })[formData.examineStatus] || ""}
@@ -143,7 +143,7 @@ export default {
                 }
               },
               ...(() => {
-                if (this?.workOrderType == 0) {
+                if (!!~[1,2,3].indexOf(this?.workOrderType)) {
                   return [{
                     columnAttributes: {
                       label: '师傅分账金额',
@@ -169,7 +169,7 @@ export default {
                 return []
               })(),
               ]}
-              table-data={[formData.workerOrderItems, formData.rpMaterialOrderItems][this?.workOrderType]}
+              table-data={[formData.workerOrderItems, formData.rpMaterialOrderItems][!!~[1,2,3].indexOf(this?.workOrderType) ? 0 : this?.workOrderType == 4 ? 1 : 0]}
             />
           )
         }
@@ -501,13 +501,13 @@ export default {
     },
     getxiangqing() {
       if (this.id) {
-        if (this?.workOrderType == 0) {
+        if (!!~[1,2,3].indexOf(this?.workOrderType)) {
           changeOrderGetOrderList({
             id: this.id
           }).then(res => {
             this.payData = res.data
           })
-        } else if (this?.workOrderType == 1) {
+        } else if (this?.workOrderType == 4) {
           enginMaterialDetailWorker({
             workerOrderId: this.id
           }).then(res => {

+ 10 - 31
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue

@@ -1,12 +1,7 @@
 <template>
   <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-container ref="formRef" :form-data="orderInfo" :form-rules="formRules" :form-attributes="{ size: 'mini' }">
         <!-- 派工信息 创建不需要 -->
         <zj-form-module v-if="id" title="派工信息" label-width="90px" :form-data="orderInfo" :form-items="dispatchInfo">
           <div slot="internal-bottom" style="text-align: right;">
@@ -14,11 +9,8 @@
           </div>
           <div slot="right" style="width: 55%; position: relative">
             <div class="pgxxTable">
-              <zj-table
-                :columns="logColumns"
-                :table-data="logList"
-                :table-attributes="{ height: '100%', border: true }"
-              />
+              <zj-table :columns="logColumns" :table-data="logList"
+                :table-attributes="{ height: '100%', border: true }" />
             </div>
           </div>
         </zj-form-module>
@@ -27,11 +19,7 @@
         <!-- 服务信息 -->
         <zj-form-module title="服务信息" label-width="110px" :form-data="orderInfo" :form-items="serviceInfo" />
         <!-- 产品信息 -->
-        <zj-form-module
-          title="产品信息"
-          :form-data="orderInfo"
-          :form-items="workOrderType == 1 ? product_wb : product"
-        />
+        <zj-form-module title="产品信息" :form-data="orderInfo" :form-items="workOrderType == 4 ? product_wb : product" />
         <!-- 其它信息 -->
         <!-- <zj-form-module title="其它信息" :form-data="orderInfo" :form-items="otherInfo" /> -->
         <!-- 派单信息 -->
@@ -46,12 +34,8 @@
         <!-- 1,保存  -->
         <commitSave v-if="~btnRestrict.indexOf(1)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 2,过程反馈  -->
-        <processFeedback
-          v-if="~btnRestrict.indexOf(2)"
-          resultCodeName="过程反馈"
-          :orderInfo="orderInfo"
-          :orderType="orderType"
-        />
+        <processFeedback v-if="~btnRestrict.indexOf(2)" resultCodeName="过程反馈" :orderInfo="orderInfo"
+          :orderType="orderType" />
         <!-- 3,设为异常  -->
         <abnormal v-if="~btnRestrict.indexOf(3)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 4,加急  -->
@@ -61,13 +45,8 @@
         <!-- 6,取消工单  -->
         <cancelOrder v-if="~btnRestrict.indexOf(6)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 7,回访  -->
-        <processFeedback
-          v-if="~btnRestrict.indexOf(7)"
-          resultCodeName="回访"
-          resultCode="回访"
-          :orderInfo="orderInfo"
-          :orderType="orderType"
-        />
+        <processFeedback v-if="~btnRestrict.indexOf(7)" resultCodeName="回访" resultCode="回访" :orderInfo="orderInfo"
+          :orderType="orderType" />
         <!-- 工单驳回 -->
         <orderReject v-if="~btnRestrict.indexOf(9)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 8,新建工单 -->
@@ -143,11 +122,11 @@ export default {
   box-sizing: border-box;
   padding-left: 16px;
 
-  ::v-deep & > .zj-page-fill-scroll {
+  ::v-deep &>.zj-page-fill-scroll {
     box-sizing: border-box;
     padding-right: 16px;
 
-    & > div:nth-child(1) {
+    &>div:nth-child(1) {
       margin-top: 20px;
     }
   }

+ 89 - 7
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js

@@ -1,5 +1,6 @@
 import { lbsAmapRegion } from '@/api/common.js'
 import { listPageV2, getDetail } from "@/api/engineeringMaintenance/basicData";
+import { orderEnginbaseList } from "@/api/basicEngineeringData";
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 export default {
   data() {
@@ -8,7 +9,8 @@ export default {
       cityList: [],
       areaList: [],
       streetList: [],
-      wb_project: []
+      wb_project: [],
+      gc_project: []
     }
   },
   created() {
@@ -19,6 +21,21 @@ export default {
       var day = ('0' + currentDate.getDate()).slice(-2);
       return year + '-' + month + '-' + day + ' ' + sfm
     }
+    // 获取工程下拉
+    orderEnginbaseList({
+      "pageNum": 1,
+      "pageSize": -1,
+      "params": []
+    }).then(res => {
+      this.gc_project = res.data.records.map(item => {
+        return {
+          value: item.projectNo,
+          label: item.projectName,
+          data: item,
+        }
+      })
+    })
+    // 获取维保下拉
     listPageV2({
       "pageNum": 1,
       "pageSize": -1,
@@ -41,7 +58,7 @@ export default {
     basicInfo() {
       return [
         ...(() => {
-          if (this.workOrderType == 1) {
+          if (this.workOrderType == 4) {
             return [{
               isShow: this.formOptions.rpProjectRepairId.isShow,
               name: 'el-select',
@@ -80,6 +97,68 @@ export default {
                 return null
               }
             },]
+          } else if (this.workOrderType == 2) {
+            return [{
+              isShow: this.formOptions.projectNo.isShow,
+              name: 'el-select',
+              md: 12,
+              options: this.gc_project,
+              attributes: {
+                disabled: !this.formOptions.projectNo.isEdit,
+                placeholder: '请选择',
+                clearable: true,
+                filterable: true
+              },
+              formItemAttributes: {
+                label: '工程名称',
+                prop: 'projectNo',
+                rules: this.formOptions.projectNo.isRules
+              },
+              events: {
+                change: (val) => {
+                  this.getorderDetail(() => {
+                    if (val) {
+                      this.orderInfo.projectNo = val
+                      var item = this.gc_project.find(item => item.value == val)
+                      if (item) {
+                        this.orderInfo.projectName = item.label
+                        var data = item.data
+                        if (data) {
+                          this.orderInfo.userName = data.manger
+                          this.orderInfo.linkName = data.manger
+                          this.orderInfo.userMobile = data.mobile
+                          this.orderInfo.provinceId = data.provinceId
+                          this.orderInfo.province = data.province
+                          this.orderInfo.cityId = data.cityId
+                          this.orderInfo.city = data.city
+                          this.orderInfo.areaId = data.areaId
+                          this.orderInfo.area = data.area
+                          this.orderInfo.streetId = data.streetId
+                          this.orderInfo.street = data.street
+                          this.orderInfo.gpsAddress = data.gpsAddress || data.address
+                          this.orderInfo.lat = data.lat
+                          this.orderInfo.lng = data.lng
+                          this.orderInfo.address = data.address
+                          this.getinitlbslist()
+                        }
+                      }
+                    }
+                  })
+                }
+              }
+            }, {
+              isShow: true,
+              name: 'el-input',
+              md: 12,
+              attributes: {
+                disabled: true,
+              },
+              formItemAttributes: {
+                label: '工程编号',
+                prop: 'projectNo',
+                rules: this.formOptions.projectNo.isRules
+              }
+            }]
           }
           return []
         })(),
@@ -148,7 +227,7 @@ export default {
           options: this.provinceList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
-            change: () => {
+            change: (val) => {
               // 获取省名称
               this.orderInfo.province = this.provinceList.find(item => item.id === val)?.name || ''
               // 清除市区街道以及详细地址数据
@@ -173,7 +252,7 @@ export default {
           options: this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
-            change: () => {
+            change: (val) => {
               // 获取市名称
               this.orderInfo.city = this.cityList.find(item => item.id === val).name
               // 清除区街道以及详细地址数据
@@ -198,7 +277,7 @@ export default {
           options: this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
-            change: () => {
+            change: (val) => {
               // 获取区名称
               this.orderInfo.area = this.areaList.find(item => item.id === val).name
               // 清除街道以及详细地址数据
@@ -223,7 +302,7 @@ export default {
           options: this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
           attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
           events: {
-            change: () => {
+            change: (val) => {
               // 获取街道名称
               this.orderInfo.street = this.streetList.find(item => item.id === val).name
               // 清除详细地址数据
@@ -280,6 +359,9 @@ export default {
                         this.orderInfo.street = name
                         // 赋值GPS详细地址
                         this.orderInfo.gpsAddress = data.name
+                        if (!this.orderInfo.address) {
+                          this.orderInfo.address = data.name
+                        }
                       })
                     })
                   })
@@ -373,7 +455,7 @@ export default {
       lbsAmapRegion({ pid: 0 }).then(res => {
         this.provinceList = res.data
         // 创建工单时获取ip地址定位赋值
-        if (!this.id && this.workOrderType == 0 && this.$IpAdd.province) {
+        if (!this.id && !!~[1, 2, 3].indexOf(this?.workOrderType) && this.$IpAdd.province) {
           var item = this.provinceList.find(item => item.name === this.$IpAdd.province)
           if (item) {
             this.orderInfo.provinceId = item.id

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

@@ -138,7 +138,7 @@ export default {
                     this.orderInfo.workerIdcard = data.workerIdcard
                     this.orderInfo.workerMobile = data.workerMobile
                     this.orderInfo.orderWorkers.unshift({ ...data, isMaster: true })
-                    if(data.slaveWorkerId){
+                    if (data.slaveWorkerId) {
                       var data2 = this.workerList.find(item => item.value == data.slaveWorkerId).data
                       this.orderInfo.orderWorkers.push({ ...data2, isMaster: false })
                       this.orderInfo.workerId_fz = ""
@@ -218,7 +218,7 @@ export default {
   },
   created() {
     // 普通工单选择网点数据
-    if (this.workOrderType == 0 || this.isAllWebsit) {
+    if (!!~[1,2,3].indexOf(this?.workOrderType) || this.isAllWebsit) {
       getWebsit({ type: "C", status: true, isAll: this.isAllWebsit || this.id ? true : false }).then(res => {
         this.websitList = res.data.map(item => ({
           label: item.name,

+ 35 - 4
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js

@@ -62,7 +62,7 @@ export default {
             filterable: true
           },
           formItemAttributes: {
-            label: '工单来源',
+            label: '工单渠道',
             prop: 'orderChannelId',
             rules: this.formOptions.orderChannelId.isRules
           },
@@ -77,7 +77,7 @@ export default {
           }
         },
         // ...(() => {
-        //   if (this.workOrderType == 0) {
+        //   if (this.workOrderType == 1) {
         //     // 普通工单
         //     return [{
         //       isShow: this.formOptions.orderChannelId.isShow,
@@ -105,7 +105,7 @@ export default {
         //         }
         //       }
         //     }]
-        //   } else if (this.workOrderType == 1) {
+        //   } else if (this.workOrderType == 4) {
         //     this.orderInfo.orderChannelId = "工程维保"
         //     // 维保工单
         //     return [{
@@ -145,6 +145,23 @@ export default {
           }
         },
         {
+          isShow: this.formOptions.saleType.isShow,
+          name: 'el-select',
+          md: 6,
+          options: [{ value: 1, label: '零售' }, { value: 2, label: '工程' }, { value: 3, label: '延保' }, { value: 4, label: '工程维保' }],
+          attributes: {
+            disabled: !this.formOptions.saleType.isEdit,
+            placeholder: '请选择',
+            clearable: true,
+            filterable: true
+          },
+          formItemAttributes: {
+            label: '销售类型',
+            prop: 'saleType',
+            rules: this.formOptions.saleType.isRules
+          }
+        },
+        {
           isShow: this.formOptions.saleCompany.isShow,
           name: 'el-input',
           md: 6,
@@ -158,12 +175,26 @@ export default {
             rules: this.formOptions.saleCompany.isRules
           }
         },
+        {
+          isShow: this.formOptions.source.isShow,
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !this.formOptions.source.isEdit,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '工单来源',
+            prop: 'source',
+            rules: this.formOptions.source.isRules
+          }
+        },
       ]
     }
   },
   created() {
     // 普通工单选择网点数据
-    if (this.workOrderType == 0) {
+    if (!!~[1,2,3].indexOf(this?.workOrderType)) {
       // 获取工单类型
       listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "true" }] }).then(res => {
         this.orderSmallTypeData = res.data.records.map(item => ({

+ 37 - 9
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js

@@ -4,6 +4,10 @@ var initdata_ = {
   // 基础信息--------------------
   // 维保项目
   rpProjectRepairId: "",
+  // 工程编号
+  projectNo: "",
+  // 工程名称
+  projectName: "",
   // 客户名称
   userName: "",
   // 联系人
@@ -33,6 +37,8 @@ var initdata_ = {
   appointmentTime: "",
   // 销售单位
   saleCompany: "",
+  source: "",
+  saleType: "",
   // 产品信息------------------------
   orderProducts: [],
   // 其它信息------------------------
@@ -56,7 +62,7 @@ export default {
     },
     workOrderType: {
       type: Number,
-      default: 0, // 0普通工单, 1维保工单
+      default: 1, // 1普通工单, 4维保工单
     },
   },
   data() {
@@ -68,14 +74,14 @@ export default {
     id: {
       handler(newVal, oldVal) {
         this.getorderDetail((data) => {
-          if (this.workOrderType == 0) {
+          if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
             this.$nextTick(() => {
               // 获取地址信息
               this.getinitlbslist()
               // 获取可选师傅
               this.getWorkers()
             })
-          } else if (this.workOrderType == 1) {
+          } else if (this.workOrderType == 4) {
             this.$nextTick(() => {
               // 获取维保单详情
               this.getWeiBaoDetail()
@@ -149,24 +155,35 @@ export default {
         // 维保项目
         rpProjectRepairId: {
           isEdit: this.id ? false : true,
-          isShow: this.workOrderType == 1,
+          isShow: this.workOrderType == 4,
+          isRules: [...required]
+        },
+        // 工程项目
+        projectNo: {
+          isEdit: this.id ? false : true,
+          isShow: this.workOrderType == 2,
+          isRules: [...required]
+        },
+        projectName: {
+          isEdit: this.id ? false : true,
+          isShow: this.workOrderType == 2,
           isRules: [...required]
         },
         // 客户名称
         userName: {
-          isEdit: this.workOrderType == 0 && !finish,
+          isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
           isShow: true,
           isRules: [...required]
         },
         // 联系人
         linkName: {
-          isEdit: this.workOrderType == 0 && !finish,
+          isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
           isShow: true,
           isRules: [...required]
         },
         // 客户电话
         userMobile: {
-          isEdit: this.workOrderType == 0 && !finish,
+          isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
           isShow: true,
           isRules: [...mobileRequired]
         },
@@ -178,13 +195,13 @@ export default {
         },
         // gps地址
         gpsAddress: {
-          isEdit: this.workOrderType == 0 && !finish,
+          isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
           isShow: true,
           isRules: [...required]
         },
         // 详细地址
         address: {
-          isEdit: this.workOrderType == 0 && !finish,
+          isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
           isShow: true,
           isRules: []
         },
@@ -206,11 +223,21 @@ export default {
           isShow: true,
           isRules: [...required]
         },
+        saleType: {
+          isEdit: false,
+          isShow: true,
+          isRules: [...required]
+        },
         saleCompany: {
           isEdit: !finish,
           isShow: true,
           isRules: []
         },
+        source: {
+          isEdit: !finish,
+          isShow: true,
+          isRules: []
+        },
         // 产品信息------------------------
         orderProducts: {
           isEdit: !finish,
@@ -274,6 +301,7 @@ export default {
       } else {
         // 创建工单
         this.orderInfo = Object.assign({}, JSON.parse(JSON.stringify(initdata_)), {
+          saleType: this?.workOrderType,
           workerId_fz: ""
         })
         cb && cb(this.orderInfo)

+ 21 - 15
src/views/workOrder/workOrderPool/index.vue

@@ -39,7 +39,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 import { listPageV2 } from "@/api/workOrder/orderType";
-import { orderBaseList, orderBaseListExport, orderBaseStatusCount, orderBaseImport } from "@/api/workOrderPool.js"
+import { orderBaseList, orderBaseListExport, orderBaseStatusCount, orderBaseImport, orderBaseDetail } from "@/api/workOrderPool.js"
 import workOrderInfo from './detailModule/workOrderInfo/index.vue'
 import Detail from './detail'
 import Reassignment from "./components/reassignment/index.vue"
@@ -80,7 +80,7 @@ export default {
       orderTypeList: [],
       orderStatusList: [],
       defaultSearchData: [],
-      workOrderType: 0
+      workOrderType: 1
     }
   },
   computed: {
@@ -121,13 +121,19 @@ export default {
             }),
             this.optionsEvensAuth("createWorkOrder", {
               click: () => {
-                this.workOrderType = 0
+                this.workOrderType = 1
+                this.createFormBool = true
+              }
+            }),
+            this.optionsEvensAuth("createGCWorkOrder", {
+              click: () => {
+                this.workOrderType = 2
                 this.createFormBool = true
               }
             }),
             this.optionsEvensAuth("createWbWorkOrder", {
               click: () => {
-                this.workOrderType = 1
+                this.workOrderType = 4
                 this.createFormBool = true
               }
             })
@@ -205,23 +211,27 @@ export default {
     initFun() {
       if (this.pageType == "detail") {
         this.id = this.pageCode
-        this.$nextTick(() => {
-          this.detailFormBool = true
+        orderBaseDetail({
+          orderBaseId: this.id
+        }).then(res => {
+          this.workOrderType = Number(res?.data?.saleType)
+          this.$nextTick(() => {
+            this.detailFormBool = true
+          })
         })
       }
-
       if (this.pageType == "saleOrderId") {
         this.defaultSearchData = [{ "param": "a.sale_order_id", "compare": "=", "value": this.pageCode, label: "销售订单号" }]
       }
-
-
       if (this.pageType == "pgIncreItemId") {
         this.defaultSearchData = [{ "param": "a.pg_incre_order_id", "compare": "=", "value": this.pageCode, label: "增置服务明细ID" }]
       }
-
       if (this.pageType == "rpProjectRepairId") {
         this.defaultSearchData = [{ "param": "a.rp_project_repair_id", "compare": "=", "value": this.pageCode, label: "维保配置ID" }]
       }
+      if (this.pageType == "projectNo") {
+        this.defaultSearchData = [{ "param": "a.project_no", "compare": "=", "value": this.pageCode, label: "工程编号" }]
+      }
     },
 
     selectable(row, index) {
@@ -325,11 +335,7 @@ export default {
         edit: {
           click: ({ row, index, column }) => {
             this.id = row.id
-            if (row.rpProjectRepairId) {
-              this.workOrderType = 1
-            } else {
-              this.workOrderType = 0
-            }
+            this.workOrderType = Number(Object.entries(row.selectMapData.saleType).find(([key, val]) => val == row.saleType)?.[0] || 1)
             this.$nextTick(() => {
               this.detailFormBool = true
             })