瀏覽代碼

Merge branch 'linwenxin_dev'

# Conflicts:
#	package-lock.json
#	package.json
pengyh 1 年之前
父節點
當前提交
cb416960c7

+ 3 - 3
package-lock.json

@@ -4716,9 +4716,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.13.20",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.20.tgz",
-      "integrity": "sha512-qHa59hdy7sIvmv3oMl7J0tzQPOR6B3e1HNZWHdo2alcyVqwnoT9xawYqabNhQJwH+Hfy22slJmjM00hlqIMQtw==",
+      "version": "2.13.22",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.22.tgz",
+      "integrity": "sha512-cY+c9usrrWNpI6In4ZIxD9AryGWwflRZ2mFgAF/HXFu7gUA7rkYjZjBZ8YIh3iNlr2y8dWtpXUyegwXy6ATM8w==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",

+ 1 - 1
package.json

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

+ 106 - 0
src/api/tradeInConfig.js

@@ -0,0 +1,106 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function tradeListPage(data) {
+  return request({
+    url: `/trade/list/page?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function tradePageExport(data, name) {
+  return postBlob({
+    url: '/trade/pageExport',
+    data,
+    name
+  })
+}
+
+
+export function tradeListOtherPage(data) {
+  return request({
+    url: `/trade/listOther/page?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function tradePageOtherExport(data, name) {
+  return postBlob({
+    url: '/trade/pageOtherExport',
+    data,
+    name
+  })
+}
+
+export function tradeList(params) {
+  return request({
+    url: '/trade/list',
+    method: 'get',
+    params: params
+  })
+}
+
+export function serviceCategoryAdd(data) {
+  return request({
+    url: '/trade/add',
+    method: 'post',
+    data: data
+  })
+}
+
+export function serviceCategoryUpdate(data) {
+  return request({
+    url: '/trade/update',
+    method: 'post',
+    data: data
+  })
+}
+
+export function serviceCategoryDel(params) {
+  return request({
+    url: '/trade/delete',
+    method: 'post',
+    params: params
+  })
+}
+
+export function serviceCategoryDetail(params) {
+  return request({
+    url: '/trade/detail',
+    method: 'get',
+    params: params
+  })
+}
+
+export function serviceCategoryItemAdd(data) {
+  return request({
+    url: '/trade/addItem',
+    method: 'post',
+    data: data
+  })
+}
+
+export function serviceCategoryItemUpdate(data) {
+  return request({
+    url: '/trade/updateItem',
+    method: 'post',
+    data: data
+  })
+}
+
+export function serviceCategoryItemDel(params) {
+  return request({
+    url: '/trade/deleteItem',
+    method: 'post',
+    params: params
+  })
+}
+
+export function serviceCategoryItemDetail(params) {
+  return request({
+    url: '/trade/detailItem',
+    method: 'get',
+    params: params
+  })
+}

+ 12 - 1
src/components/template/template-page-1.vue

@@ -8,7 +8,7 @@
       :tableEvents="{ ...defaultTableEvents, ...tableEvents }"
       :tableAttributes="{ ...defaultTableAttributes, ...tableAttributes }" :ellipsis="ellipsis" :pageSizes="pageSizes"
       @columnWidthChange="columnWidthChange" @columnListChange="columnListChange" :screeningAnalysis="screeningAnalysis"
-      :filterMethod="filterMethod" :moreParameters="moreParameters">
+      :filterMethod="filterMethod" :sortMethod="sortMethod" :moreParameters="moreParameters">
       <template slot="more-search">
         <slot name="moreSearch"></slot>
       </template>
@@ -133,6 +133,10 @@ export default {
         return row[column['property']] === value
       }
     },
+    sortMethod: {
+      type: Function,
+      default: undefined
+    },
     pageSizes: {
       type: Array,
       default: () => [15, 30, 50, 100, 150, 200],
@@ -141,6 +145,10 @@ export default {
       type: String,
       default: 'exp'
     },
+    // 数据钩子
+    recordsHook: {
+      type: Function
+    },
   },
   data() {
     return {
@@ -390,6 +398,9 @@ export default {
         var res = await this.getList(this.parameter)
         // alert('接收到数据断点')
         if (res.code == 200) {
+          if (this.recordsHook) {
+            res.data.records = this.recordsHook([...(res?.data?.records || [])]) || res?.data?.records || []
+          }
           if (this.fieldBeansHook) {
             res.fieldBeans = this.fieldBeansHook(res.fieldBeans) || res.fieldBeans
           }

+ 1 - 0
src/mixin/orderListColumn.js

@@ -57,6 +57,7 @@ export default {
             YJS: "#02b100",
             YQX: "#ffbd2f",
             YWG: "#f77233",
+            DQD:"#179f00",
           }
           return (
             <div style={`padding:0 6px;cursor: pointer;color:${colors[Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0] || '']};`}>

+ 18 - 4
src/utils/util.js

@@ -2,6 +2,20 @@ import axios from 'axios'
 import FileSaver from 'file-saver'
 import { getToken } from '@/utils/auth'
 
+// 定义一个函数将树形数据转换为列表
+export function treeToList(tree, key = "children", list = []) {
+  // 将当前节点添加到列表中
+  list.push(...tree);
+  // 遍历当前节点的子节点
+  tree?.forEach(item => {
+    if (item?.[key]?.length) {
+      // 递归调用,将子节点及其后代节点添加到列表中
+      treeToList(item?.[key], key, list);
+    }
+  });
+  return list;
+}
+
 /**
  * 删除对象中的空值
  * @param {object} obj
@@ -9,8 +23,8 @@ import { getToken } from '@/utils/auth'
  */
 export function deleteEmptyObj(obj) {
   let newObj = obj;
-  for(var key in newObj) {
-    if(newObj[key] === '' || newObj[key] === null || newObj[key] === undefined) {
+  for (var key in newObj) {
+    if (newObj[key] === '' || newObj[key] === null || newObj[key] === undefined) {
       delete newObj[key]
     }
   }
@@ -25,12 +39,12 @@ export function deleteEmptyObj(obj) {
  * @returns 
  */
 export function findElem(array, attr, val) {
-  if(!array || !array.length){
+  if (!array || !array.length) {
     return -1
   }
   for (var i = 0; i < array.length; i++) {
     if (array[i][attr] == val) {
-        return i; //返回当前索引值
+      return i; //返回当前索引值
     }
   }
   return -1;

+ 163 - 69
src/views/setting/agreement/index.vue

@@ -1,7 +1,13 @@
 <template>
   <div class="app-container">
-    <div class="title">用户协议</div>
-    <el-form ref="mainForm" label-width="80px" label-position="top">
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="用户协议" name="first"></el-tab-pane>
+      <el-tab-pane label="隐私声明" name="second"></el-tab-pane>
+      <el-tab-pane label="服务协议" name="third"></el-tab-pane>
+      <el-tab-pane label="以旧换新协议" name="fourth"></el-tab-pane>
+    </el-tabs>
+
+    <el-form v-show="activeName=='first'" ref="mainForm" label-width="80px" label-position="top">
       <el-form-item label="" prop="content1">
         <el-upload
           ref="imageListUpload1"
@@ -26,8 +32,7 @@
       </el-form-item>
     </el-form>
 
-    <div class="title">隐私声明</div>
-    <el-form ref="mainForm" label-width="80px" label-position="top">
+    <el-form v-show="activeName=='second'" ref="mainForm" label-width="80px" label-position="top">
       <el-form-item label="" prop="content2">
         <el-upload
           ref="imageListUpload2"
@@ -52,8 +57,7 @@
       </el-form-item>
     </el-form>
 		
-		<div class="title">服务协议</div>
-		<el-form ref="mainForm" label-width="80px" label-position="top">
+		<el-form v-show="activeName=='third'" ref="mainForm" label-width="80px" label-position="top">
 		  <el-form-item label="" prop="content3">
 		    <el-upload
 		      ref="imageListUpload3"
@@ -78,6 +82,31 @@
 		  </el-form-item>
 		</el-form>
 
+		<el-form v-show="activeName=='fourth'" ref="mainForm" label-width="80px" label-position="top">
+		  <el-form-item label="" prop="content4">
+		    <el-upload
+		      ref="imageListUpload4"
+		      class="avatar-uploader4"
+		      :action="baseURL + 'common/upload'"
+		      :headers="myHeaders"
+		      multiple
+		      name="file"
+		      :show-file-list="false"
+		      :on-success="uploadSuccess4"
+		      :on-error="uploadError4"
+		      :before-upload="beforeUpload4">
+		    </el-upload>
+		    <!--富文本编辑器组件-->
+		    <el-row v-loading="quillImgLoading4">
+		      <quill-editor
+		        v-model="mainForm.content4"
+		        ref="myQuillEditor4"
+		        :options="editorOption4">
+		      </quill-editor>
+		    </el-row>
+		  </el-form-item>
+		</el-form>
+
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="submitForm" :loading="formLoading">{{ formLoading ? '保存中 ...' : '保 存' }}</el-button>
@@ -119,6 +148,7 @@ export default {
   },
   data() {
     return {
+      activeName: 'first',
       baseURL: process.env.VUE_APP_BASE_API,
       myHeaders: {'x-token': getToken()},
 
@@ -169,26 +199,47 @@ export default {
       },
       editorImages2: [],
 			
-	  quillImgLoading3: false, // 富文本上传图片loading
-	  editorOption3: { // 富文本配置
-	    placeholder: '请输入公共内容',
-	    theme: 'snow',
-	    modules: {
-	      toolbar: {
-	        container: toolbarOptions,
-	        handlers: {
-	          'image': function (value) {
-	            if (value) {
-	              document.querySelector('.avatar-uploader3 input').click()
-	            } else {
-	              this.quill.format('image', false);
-	            }
-	          }
-	        }
-	      }
-	    }
-	  },
-	  editorImages3: [],
+      quillImgLoading3: false, // 富文本上传图片loading
+      editorOption3: { // 富文本配置
+        placeholder: '请输入公共内容',
+        theme: 'snow',
+        modules: {
+          toolbar: {
+            container: toolbarOptions,
+            handlers: {
+              'image': function (value) {
+                if (value) {
+                  document.querySelector('.avatar-uploader3 input').click()
+                } else {
+                  this.quill.format('image', false);
+                }
+              }
+            }
+          }
+        }
+      },
+      editorImages3: [],
+
+      quillImgLoading4: false, // 富文本上传图片loading
+      editorOption4: { // 富文本配置
+        placeholder: '请输入公共内容',
+        theme: 'snow',
+        modules: {
+          toolbar: {
+            container: toolbarOptions,
+            handlers: {
+              'image': function (value) {
+                if (value) {
+                  document.querySelector('.avatar-uploader4 input').click()
+                } else {
+                  this.quill.format('image', false);
+                }
+              }
+            }
+          }
+        }
+      },
+      editorImages4: [],
 
       formLoading: false,
     }
@@ -216,7 +267,8 @@ export default {
         this.mainForm = {
           content1: res.data.userAgreementContent,
           content2: res.data.privacyStatementContent,
-		  content3: res.data.serviceContent,
+		      content3: res.data.serviceContent,
+		      content4: res.data.tradeContent,
         }
       })
     },
@@ -227,7 +279,8 @@ export default {
         companyWechatId: JSON.parse(localStorage.getItem("greemall_user")).companyWechatId,
         userAgreementContent: this.mainForm.content1,
         privacyStatementContent: this.mainForm.content2,
-		serviceContent: this.mainForm.content3,
+		    serviceContent: this.mainForm.content3,
+        tradeContent: this.mainForm.content4,
       }).then(res => {
         this.formLoading = false;
         this.$successMsg('编辑成功');
@@ -246,7 +299,6 @@ export default {
 
     // 富文本图片上传成功
     uploadSuccess1(res, file, fileList) {
-      console.log(fileList);
       fileList.forEach(item => {
         if(this.editorImages1.indexOf(item.response.data.url) < 0) {
           this.editorImages1.push(item.response.data.url);
@@ -319,45 +371,83 @@ export default {
       this.$errorMsg('图片插入失败');
     },
 	
-	// 富文本图片上传前
-	beforeUpload3() {
-	  this.quillImgLoading3 = true;
-	},
-	
-	// 富文本图片上传成功
-	uploadSuccess3(res, file, fileList) {
-	  console.log(fileList);
-	  fileList.forEach(item => {
-	    if(this.editorImages3.indexOf(item.response.data.url) < 0) {
-	      this.editorImages3.push(item.response.data.url);
-	    }
-	  })
-	  this.showImage3()
-	  this.quillImgLoading3 = false;
-	},
-	
-	showImage3() {
-	  console.log(this.editorImages3);
-	  let quill = this.$refs.myQuillEditor3.quill;
-	  this.editorImages3.forEach(item => {
-	    // 获取光标所在位置
-	    let length = quill.getSelection().index;
-	    // 插入图片  res.info为服务器返回的图片地址
-	    console.log(item);
-	    quill.insertEmbed(length, 'image', item);
-	    // this.$refs.imageListUpload2.clearFiles()
-	    // 调整光标到最后
-	    quill.setSelection(length + 1);
-	  })
-	  this.editorImages3 = [];
-	  this.$refs.imageListUpload3.clearFiles();
-	},
-	
-	// 富文本图片上传失败
-	uploadError3() {
-	  this.quillImgLoading3 = false;
-	  this.$errorMsg('图片插入失败');
-	},
+    // 富文本图片上传前
+    beforeUpload3() {
+      this.quillImgLoading3 = true;
+    },
+    
+    // 富文本图片上传成功
+    uploadSuccess3(res, file, fileList) {
+      console.log(fileList);
+      fileList.forEach(item => {
+        if(this.editorImages3.indexOf(item.response.data.url) < 0) {
+          this.editorImages3.push(item.response.data.url);
+        }
+      })
+      this.showImage3()
+      this.quillImgLoading3 = false;
+    },
+    
+    showImage3() {
+      console.log(this.editorImages3);
+      let quill = this.$refs.myQuillEditor3.quill;
+      this.editorImages3.forEach(item => {
+        // 获取光标所在位置
+        let length = quill.getSelection().index;
+        // 插入图片  res.info为服务器返回的图片地址
+        console.log(item);
+        quill.insertEmbed(length, 'image', item);
+        // this.$refs.imageListUpload2.clearFiles()
+        // 调整光标到最后
+        quill.setSelection(length + 1);
+      })
+      this.editorImages3 = [];
+      this.$refs.imageListUpload3.clearFiles();
+    },
+    
+    // 富文本图片上传失败
+    uploadError3() {
+      this.quillImgLoading3 = false;
+      this.$errorMsg('图片插入失败');
+    },
+
+
+    // ----------
+    // 富文本图片上传前
+    beforeUpload4() {
+      this.quillImgLoading4 = true;
+    },
+    
+    // 富文本图片上传成功
+    uploadSuccess4(res, file, fileList) {
+      fileList.forEach(item => {
+        if(this.editorImages4.indexOf(item.response.data.url) < 0) {
+          this.editorImages4.push(item.response.data.url);
+        }
+      })
+      this.showImage4()
+      this.quillImgLoading4 = false;
+    },
+    
+    showImage4() {
+      let quill = this.$refs.myQuillEditor4.quill;
+      this.editorImages4.forEach(item => {
+        // 获取光标所在位置
+        let length = quill.getSelection().index;
+        quill.insertEmbed(length, 'image', item);
+        // this.$refs.imageListUpload2.clearFiles()
+        // 调整光标到最后
+        quill.setSelection(length + 1);
+      })
+      this.editorImages4 = [];
+      this.$refs.imageListUpload4.clearFiles();
+    },
+    
+    // 富文本图片上传失败
+    uploadError4() {
+      this.quillImgLoading4 = false;
+      this.$errorMsg('图片插入失败');
+    },
   }
 }
 </script>
@@ -370,7 +460,11 @@ export default {
     font-weight: 600;
   }
   
-  .avatar-uploader1 {
+  .avatar-uploader1,
+  .avatar-uploader2,
+  .avatar-uploader3,
+  .avatar-uploader4 {
     height: 0;
+    overflow: hidden;
   }
 </style>

+ 2 - 2
src/views/setting/departmentManage/index.vue

@@ -95,12 +95,12 @@
                 <el-radio :label="false">禁用</el-radio>
               </el-radio-group>
             </el-form-item>
-            <el-form-item v-if="mainForm.type == 'B'" label="商品出入库" prop="joinCode">
+            <!-- <el-form-item v-if="mainForm.type == 'B'" label="商品出入库" prop="joinCode">
               <el-radio-group v-model="mainForm.joinCode">
                 <el-radio :label="true">关联条码</el-radio>
                 <el-radio :label="false">不关联条码</el-radio>
               </el-radio-group>
-            </el-form-item>
+            </el-form-item> -->
           </el-form>
           <div slot="footer" class="dialog-footer">
             <el-button @click="data.removeTab()">取 消</el-button>

+ 238 - 186
src/views/setting/organizationManagement/settledManagement/index.vue

@@ -3,83 +3,144 @@
     <div v-show="step == 1">
       <div class="setting_title">开通账号</div>
       <el-divider></el-divider>
-      <div class="tips">说明:开通商户账号是指开通商城后台管理系统的总登录账号。</div>
-
+      <div class="tips"></div>
       <el-card shadow="never" class="my-card">
-        <el-form class="my-form" ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="140px"
-          label-position="right">
-          <el-form-item label="商户账号" prop="account">
-            <el-input v-model="step1Form.account" autocomplete="off" placeholder="请输入商户账号"></el-input>
-            <el-popover class="question" placement="right-start" title="账号设置" width="260" trigger="hover"
-              content="账号设置需按数字、字母组合设置至少12位账号">
-              <svg-icon icon-class="question" slot="reference" />
-            </el-popover>
-          </el-form-item>
-          <el-form-item label="账户昵称" prop="nickName">
-            <el-input v-model="step1Form.nickName" autocomplete="off" placeholder="请输入账户昵称"></el-input>
-          </el-form-item>
-          <el-form-item label="小程序名称" prop="appName">
-            <el-input v-model="step1Form.appName" autocomplete="off" placeholder="请输入小程序名称"></el-input>
-          </el-form-item>
-          <el-form-item label="负责人" prop="chargePerson">
-            <el-input v-model="step1Form.chargePerson" autocomplete="off" placeholder="请输入负责人"></el-input>
-          </el-form-item>
-          <el-form-item label="联系电话" prop="phone">
-            <el-input v-model="step1Form.phone" autocomplete="off" placeholder="请输入联系电话"></el-input>
-          </el-form-item>
-          <el-form-item label="电子邮箱" prop="email">
-            <el-input v-model="step1Form.email" autocomplete="off" placeholder="请输入电子邮箱"></el-input>
-          </el-form-item>
-          <el-form-item label="地址" prop="address">
-            <div style="display:flex;">
-              <el-input placeholder="请选择地址" autocomplete="off" readonly style="margin-right: 20px;"
-                v-model="step1Form.address"></el-input>
-              <geographicalPosi :formData="step1Form" @selectPosi="selectAddress"></geographicalPosi>
-            </div>
-          </el-form-item>
-          <el-form-item label="登录密码" prop="newPassword">
-            <el-input v-model="step1Form.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-popover class="question" placement="right-start" title="密码设置" width="260" trigger="hover"
-              content="密码设置需按数字、字母组合设置至少12位密码">
-              <svg-icon icon-class="question" slot="reference" />
-            </el-popover>
-          </el-form-item>
-          <el-form-item label="确认密码" prop="confirmPassword">
-            <el-input v-model="step1Form.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-popover class="question" placement="right-start" title="密码设置" width="260" trigger="hover"
-              content="确认密码需要和登录密码保持一致">
-              <svg-icon icon-class="question" slot="reference" />
-            </el-popover>
-          </el-form-item>
-          <el-form-item label="到期时间" prop="expireTime">
-            <el-date-picker style="width: 100%;" v-model="step1Form.expireTime" type="datetime"
-              value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
-            </el-date-picker>
-          </el-form-item>
-          <el-form-item label="辅材配件权限" prop="moduleMaterialPart">
-            <el-switch v-model="step1Form.moduleMaterialPart" active-color="#13ce66" inactive-color="#ff4949">
-            </el-switch>
-          </el-form-item>
-          <el-form-item label="延保权限" prop="moduleYb">
-            <el-switch v-model="step1Form.moduleYb" active-color="#13ce66" inactive-color="#ff4949">
-            </el-switch>
-          </el-form-item>
-          <el-form-item label="工程维保权限" prop="moduleWb">
-            <el-switch v-model="step1Form.moduleWb" active-color="#13ce66" inactive-color="#ff4949">
-            </el-switch>
-          </el-form-item>
-          <el-form-item label="是否允许到店支付" prop="storePay">
-            <el-switch v-model="step1Form.storePay" active-color="#13ce66" inactive-color="#ff4949">
-            </el-switch>
-          </el-form-item>
+        <div slot="header" class="clearfix">
+          <span>商户信息  <span style="font-size: 12px;margin-left: 10px;">说明:开通商户账号是指开通商城后台管理系统的总登录账号。</span></span>
+        </div>
+        <el-form class="my-form" ref="step1Form" :model="step1Form" :rules="step1FormRules" label-width="140px" size="mini">
+          <el-row :gutter="20">
+            <el-col :span="6">
+              <el-form-item label="商户账号" prop="account">
+                <el-input v-model="step1Form.account" autocomplete="off" placeholder="请输入商户账号"></el-input>
+                <el-popover class="question" placement="right-start" title="账号设置" width="260" trigger="hover"
+                  content="账号设置需按数字、字母组合设置至少12位账号">
+                  <svg-icon icon-class="question" slot="reference" />
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="账户昵称" prop="nickName">
+                <el-input v-model="step1Form.nickName" autocomplete="off" placeholder="请输入账户昵称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="小程序名称" prop="appName">
+                <el-input v-model="step1Form.appName" autocomplete="off" placeholder="请输入小程序名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="负责人" prop="chargePerson">
+                <el-input v-model="step1Form.chargePerson" autocomplete="off" placeholder="请输入负责人"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="联系电话" prop="phone">
+                <el-input v-model="step1Form.phone" autocomplete="off" placeholder="请输入联系电话"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="step1Form.email" autocomplete="off" placeholder="请输入电子邮箱"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="地址" prop="address">
+                <div style="display:flex;">
+                  <el-input placeholder="请选择地址" autocomplete="off" readonly style="margin-right: 20px;"
+                    v-model="step1Form.address"></el-input>
+                  <geographicalPosi :formData="step1Form" @selectPosi="selectAddress"></geographicalPosi>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="登录密码" prop="newPassword">
+                <el-input v-model="step1Form.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-popover class="question" placement="right-start" title="密码设置" width="260" trigger="hover"
+                  content="密码设置需按数字、字母组合设置至少12位密码">
+                  <svg-icon icon-class="question" slot="reference" />
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="确认密码" prop="confirmPassword">
+                <el-input v-model="step1Form.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-popover class="question" placement="right-start" title="密码设置" width="260" trigger="hover"
+                  content="确认密码需要和登录密码保持一致">
+                  <svg-icon icon-class="question" slot="reference" />
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="到期时间" prop="expireTime">
+                <el-date-picker style="width: 100%;" v-model="step1Form.expireTime" type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="辅材配件权限" prop="moduleMaterialPart">
+                <el-switch v-model="step1Form.moduleMaterialPart" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="延保权限" prop="moduleYb">
+                <el-switch v-model="step1Form.moduleYb" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="工程维保权限" prop="moduleWb">
+                <el-switch v-model="step1Form.moduleWb" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="商品出入库" prop="joinCode">
+                <el-radio-group v-model="step1Form.joinCode">
+                  <el-radio :label="true">关联条码</el-radio>
+                  <el-radio :label="false">不关联条码</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="租赁业务" prop="moduleZl">
+                <el-radio-group v-model="step1Form.moduleZl">
+                  <el-radio :label="true">开启</el-radio>
+                  <el-radio :label="false">禁用</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="二手商城" prop="moduleEs">
+                <el-switch v-model="step1Form.moduleEs" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="是否允许到店支付" prop="storePay">
+                <el-switch v-model="step1Form.storePay" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="以旧换新抵扣方式" prop="yjhxDkFlag">
+                <el-radio-group v-model="step1Form.yjhxDkFlag">
+                  <el-radio :label="1">线上支付抵扣订单货款</el-radio>
+                  <el-radio :label="2">仅线上展示旧机价格</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
       </el-card>
     </div>
@@ -100,6 +161,7 @@
                 <div class="mask" v-show="img1_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('img1')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('img1')"></i>
+                  <i class="el-icon-delete" @click="img1_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('img1')">
@@ -126,6 +188,7 @@
                 <div class="mask" v-show="img2_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('img2')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('img2')"></i>
+                  <i class="el-icon-delete" @click="img2_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('img2')">
@@ -152,6 +215,7 @@
                 <div class="mask" v-show="img3_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('img3')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('img3')"></i>
+                  <i class="el-icon-delete" @click="img3_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('img3')">
@@ -182,6 +246,7 @@
                 <div class="mask" v-show="qrcode1_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('qrcode1')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('qrcode1')"></i>
+                  <i class="el-icon-delete" @click="qrcode1_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('qrcode1')">
@@ -200,6 +265,7 @@
                 <div class="mask" v-show="qrcode2_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('qrcode2')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('qrcode2')"></i>
+                  <i class="el-icon-delete" @click="qrcode2_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('qrcode2')">
@@ -217,99 +283,96 @@
     <div v-show="step == 3">
       <div class="setting_title">微信配置</div>
       <el-divider></el-divider>
-      <!-- <div class="tips">说明:企微配置是指通过配置企业微信将企微用户和系统打通,实现企业微信用户信息同平台互通,聊天会话信息同步</div> -->
-      <div class="tips" style="margin-top: 20px">商户名称:{{ step1Form.nickName }}</div>
-
-      <el-form class="my-form2" ref="step3Form" :model="step3Form" :rules="step3FormRules" label-width="200px"
-        label-position="right">
-        <!-- <el-card shadow="never" class="my-card">
-          <div class="title">1.配置企业ID</div>
-          <div class="box">指引:进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【我的企业】,将企业ID分别复制并填写到下方输入框中</div>
-          <el-form-item label="企业ID" prop="enterpriseId">
-            <el-input v-model="step3Form.enterpriseId" autocomplete="off" placeholder="请输入企业ID"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title">2.配置通讯录密钥(Secret)</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【客户联系】-选择【客户】-展开右侧【API】。将外部联系人Secret复制并填写到下方输入框中。如果外部联系人Secret不更新,请将更新后的外部联系人Secret更新复制更新到下方输入框中。</div>
-          <el-form-item label="通讯录密钥(Secret)" prop="listSecret">
-            <el-input v-model="step3Form.listSecret" autocomplete="off" placeholder="请输入通讯录密钥(Secret)"></el-input>
-          </el-form-item>
-          <el-divider></el-divider>
-          <div class="title">配置通讯录同步密钥(Secret)</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【管理工具】-选择【通讯录同步】-获取通讯录同步Secret。将通讯录同步Secret复制并填写到下方输入框中。如果通讯录同步Secret不更新,请将更新后的通讯录同步Secret更新复制更新到下方输入框中。</div>
-          <el-form-item label="通讯录同步密钥(Secret)" prop="listSyncSecret">
-            <el-input v-model="step3Form.listSyncSecret" autocomplete="off" placeholder="请输入通讯录同步密钥(Secret)"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title">3.配置小程序</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【应用管理】-选择【应用】-选择【小程序】-获取小程序AgentiD、小程序Secret。将小程序AgentiD、小程序Secret复制并填写到下方输入框中。</div>
-          <el-form-item label="小程序(AgentiD)" prop="appAgentId">
-            <el-input v-model="step3Form.appAgentId" autocomplete="off" placeholder="请输入小程序(AgentiD)"></el-input>
-          </el-form-item>
-          <el-form-item label="小程序(Secret)" prop="appSecret">
-            <el-input v-model="step3Form.appSecret" autocomplete="off" placeholder="请输入小程序(Secret)"></el-input>
-          </el-form-item>
-        </el-card> -->
-
-        <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>
-          <el-form-item label="服务商商户号" prop="merchantId">
-            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入服务商商户号"></el-input>
-          </el-form-item>
-          <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="appletAppid">
-            <el-input v-model="step3Form.appletAppid" autocomplete="off" placeholder="请输入小程序appid"></el-input>
-          </el-form-item>
-          <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>
-          </el-form-item>
-          <el-form-item label="微信订阅模版" prop="templateId">
-            <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
-          </el-form-item>
-          <el-form-item label="公众号appid" prop="pubAppId">
-            <el-input v-model="step3Form.pubAppId" autocomplete="off" placeholder="请输入公众号appid"></el-input>
-          </el-form-item>
-          <el-form-item label="公众号密钥" prop="pubAppSecret">
-            <el-input v-model="step3Form.pubAppSecret" autocomplete="off" placeholder="请输入公众号密钥"></el-input>
-          </el-form-item>
-
-
-
-          <el-form-item label="改派通知" prop="pubTemplateId1">
-            <el-input v-model="step3Form.pubTemplateId1" autocomplete="off" placeholder="请输入工单派工,改派通知"></el-input>
-          </el-form-item>
-          <el-form-item label="发货通知" prop="pubTemplateId2">
-            <el-input v-model="step3Form.pubTemplateId2" autocomplete="off" placeholder="请输入商城订单支付成功提醒发货通知"></el-input>
-          </el-form-item>
-          <el-form-item label="维权订单提醒" prop="pubTemplateId3">
-            <el-input v-model="step3Form.pubTemplateId3" autocomplete="off" placeholder="请输入商城维权订单提醒"></el-input>
-          </el-form-item>
-          <el-form-item label="支付成功通知" prop="pubTemplateId4">
-            <el-input v-model="step3Form.pubTemplateId4" autocomplete="off" placeholder="请输入订单支付成功(含全部销售订单和延保)"></el-input>
-          </el-form-item>
-          <el-form-item label="维保费用申请" prop="pubTemplateId5">
-            <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
-          </el-form-item>
-          <el-form-item label="安维费用发放通知" prop="pubTemplateId6">
-            <el-input v-model="step3Form.pubTemplateId6" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
-          </el-form-item>
-
-
-
-        </el-card>
-      </el-form>
+      <!-- <div class="tips" style="margin-top: 20px">商户名称:{{ step1Form.nickName }}</div> -->
+      <el-card>
+        <div slot="header" class="clearfix">
+          <span>商户名称:{{ step1Form.nickName }}</span>
+        </div>
+        <el-form class="my-form2" ref="step3Form" :model="step3Form" :rules="step3FormRules" label-width="130px" size="mini">
+          <el-row :gutter="20">
+            <el-col :span="6">
+              <el-form-item label="服务商appId" prop="appId">
+                <el-input v-model="step3Form.appId" autocomplete="off" placeholder="请输入服务商appId"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="服务商商户号" prop="merchantId">
+                <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入服务商商户号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="服务商商户密钥" prop="merchantKey">
+                <el-input v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入服务商商户密钥"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="小程序appid" prop="appletAppid">
+                <el-input v-model="step3Form.appletAppid" autocomplete="off" placeholder="请输入小程序appid"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="小程序密钥" prop="appletSecret">
+                <el-input v-model="step3Form.appletSecret" autocomplete="off" placeholder="请输入小程序密钥"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="子商户号Id" prop="childMerchantId">
+                <el-input v-model="step3Form.childMerchantId" autocomplete="off" placeholder="请输入子商户号Id"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="微信订阅模版" prop="templateId">
+                <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="公众号appid" prop="pubAppId">
+                <el-input v-model="step3Form.pubAppId" autocomplete="off" placeholder="请输入公众号appid"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="公众号密钥" prop="pubAppSecret">
+                <el-input v-model="step3Form.pubAppSecret" autocomplete="off" placeholder="请输入公众号密钥"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="改派通知" prop="pubTemplateId1">
+                <el-input v-model="step3Form.pubTemplateId1" autocomplete="off" placeholder="请输入工单派工,改派通知"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="发货通知" prop="pubTemplateId2">
+                <el-input v-model="step3Form.pubTemplateId2" autocomplete="off" placeholder="请输入商城订单支付成功提醒发货通知"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="维权订单提醒" prop="pubTemplateId3">
+                <el-input v-model="step3Form.pubTemplateId3" autocomplete="off" placeholder="请输入商城维权订单提醒"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="支付成功通知" prop="pubTemplateId4">
+                <el-input v-model="step3Form.pubTemplateId4" autocomplete="off" placeholder="请输入订单支付成功(含全部销售订单和延保)"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="维保费用申请" prop="pubTemplateId5">
+                <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="安维费用发放通知" prop="pubTemplateId6">
+                <el-input v-model="step3Form.pubTemplateId6" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="抢单新单通知" prop="pubTemplateId7">
+                <el-input v-model="step3Form.pubTemplateId7" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-card>
     </div>
 
     <div class="page-footer">
@@ -391,6 +454,7 @@ export default {
         moduleYb: false,
         moduleWb: false,
         storePay: false,
+        yjhxDkFlag: 1
       },
       step1FormRules: {
         account: [
@@ -454,23 +518,9 @@ export default {
         pubTemplateId4:'',
         pubTemplateId5:'',
         pubTemplateId6:'',
+        pubTemplateId7:'',
       },
       step3FormRules: {
-        enterpriseId: [
-          // { required: true, message: '请输入企业ID', trigger: 'blur' }
-        ],
-        listSecret: [
-          // { required: true, message: '请输入通讯录密钥(Secret)', trigger: 'blur' }
-        ],
-        listSyncSecret: [
-          // { required: true, message: '请输入通讯录同步密钥(Secret)', trigger: 'blur' }
-        ],
-        appAgentId: [
-          // { required: true, message: '请输入小程序(AgentiD)', trigger: 'blur' }
-        ],
-        appSecret: [
-          // { required: true, message: '请输入小程序(Secret)', trigger: 'blur' }
-        ],
       },
       formLoading: false,
     }
@@ -610,6 +660,7 @@ export default {
             moduleYb: this.step1Form.moduleYb,
             moduleWb: this.step1Form.moduleWb,
             storePay: this.step1Form.storePay,
+            yjhxDkFlag: this.step1Form.yjhxDkFlag,
             
             minLogo1: this.img1_url,
             minLogo2: this.img2_url,
@@ -637,6 +688,7 @@ export default {
             pubTemplateId4: this.step3Form.pubTemplateId4,
             pubTemplateId5: this.step3Form.pubTemplateId5,
             pubTemplateId6: this.step3Form.pubTemplateId6,
+            pubTemplateId7: this.step3Form.pubTemplateId7,
           }
           addAccount(params).then(res => {
             this.$successMsg('开通成功');
@@ -679,7 +731,7 @@ export default {
 }
 
 .my-form {
-  width: 450px;
+  width: 100%;
   margin: 0 auto;
 }
 
@@ -703,7 +755,7 @@ export default {
 
 .my-form2 {
   ::v-deep input {
-    width: 400px;
+    // width: 400px;
   }
 }
 

+ 234 - 164
src/views/setting/organizationManagement/tenantDetails/index.vue

@@ -10,61 +10,124 @@
     </el-tabs>
 
     <div v-show="step == 'first'">
-      <el-form class="my-form" ref="step1Form" :model="step1Form" label-width="130px" label-position="right">
-        <el-form-item label="商户账号" prop="account">
-          <el-input v-model="step1Form.account" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="账户昵称" prop="nickName">
-          <el-input v-model="step1Form.nickName" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="小程序名称" prop="appName">
-          <el-input v-model="step1Form.appName" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="负责人" prop="chargePerson">
-          <el-input v-model="step1Form.chargePerson" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="联系电话" prop="phone">
-          <el-input v-model="step1Form.phone" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="电子邮箱" prop="email">
-          <el-input v-model="step1Form.email" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="地址" prop="address">
-          <el-input v-model="step1Form.address" disabled></el-input>
-        </el-form-item>
-        <el-form-item label="登录密码" prop="password">
-          <el-input v-model="step1Form.password" type="password" disabled></el-input>
-          <el-button class="reset" @click="handleReset()">重置密码</el-button>
-        </el-form-item>
-        <el-form-item label="到期时间" prop="companyExpireTime">
-          <el-date-picker v-model="step1Form.companyExpireTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
-            placeholder="选择日期时间">
-          </el-date-picker>
-          <el-button type="primary" @click="saveTime()">保存</el-button>
-        </el-form-item>
-		<el-form-item label="打印单名称" prop="billTitle">
-		  <el-input v-model="step1Form.billTitle" placeholder="请输入"></el-input>
-		</el-form-item>
-        <el-form-item label="辅材配件权限" prop="moduleMaterialPart">
-          <el-switch v-model="step1Form.moduleMaterialPart" active-color="#13ce66" inactive-color="#ff4949">
-          </el-switch>
-        </el-form-item>
-        <el-form-item label="延保权限" prop="moduleYb">
-          <el-switch v-model="step1Form.moduleYb" active-color="#13ce66" inactive-color="#ff4949">
-          </el-switch>
-        </el-form-item>
-        <el-form-item label="工程维保权限" prop="moduleWb">
-          <el-switch v-model="step1Form.moduleWb" active-color="#13ce66" inactive-color="#ff4949">
-          </el-switch>
-        </el-form-item>
-        <el-form-item label="是否允许到店支付" prop="storePay">
-          <el-switch v-model="step1Form.storePay" active-color="#13ce66" inactive-color="#ff4949">
-          </el-switch>
-        </el-form-item>
-        <!-- <el-form-item class="tr">
-          <el-button type="primary" @click="submitStep1Form">保存</el-button>
-        </el-form-item> -->
-      </el-form>
+      <el-card>
+        <div slot="header" class="clearfix">
+          <span>商户信息</span>
+        </div>
+        <el-form class="my-form" ref="step1Form" :model="step1Form" label-width="130px" label-position="right" size="mini">
+          <el-row :gutter="20">
+            <el-col :span="6">
+              <el-form-item label="商户账号" prop="account">
+                <el-input v-model="step1Form.account" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="账户昵称" prop="nickName">
+                <el-input v-model="step1Form.nickName" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="小程序名称" prop="appName">
+                <el-input v-model="step1Form.appName" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="负责人" prop="chargePerson">
+                <el-input v-model="step1Form.chargePerson" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="联系电话" prop="phone">
+                <el-input v-model="step1Form.phone" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="电子邮箱" prop="email">
+                <el-input v-model="step1Form.email" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="地址" prop="address">
+                <el-input v-model="step1Form.address" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="登录密码" prop="password">
+                <el-input v-model="step1Form.password" type="password" disabled>
+                  <el-button slot="append" @click="handleReset()">重置密码</el-button>
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="打印单名称" prop="billTitle">
+                <el-input v-model="step1Form.billTitle" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="到期时间" prop="companyExpireTime">
+                <el-date-picker :disabled="!~[2].indexOf(userType)" v-model="step1Form.companyExpireTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="选择日期时间">
+                </el-date-picker>
+                <el-button :disabled="!~[2].indexOf(userType)" type="primary" @click="saveTime()">保存</el-button>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="辅材配件权限" prop="moduleMaterialPart">
+                <el-switch v-model="step1Form.moduleMaterialPart" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="延保权限" prop="moduleYb">
+                <el-switch v-model="step1Form.moduleYb" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="工程维保权限" prop="moduleWb">
+                <el-switch v-model="step1Form.moduleWb" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="商品出入库" prop="joinCode">
+                <el-radio-group v-model="step1Form.joinCode">
+                  <el-radio :label="true">关联条码</el-radio>
+                  <el-radio :label="false">不关联条码</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="租赁业务" prop="moduleZl">
+                <el-radio-group v-model="step1Form.moduleZl">
+                  <el-radio :label="true">开启</el-radio>
+                  <el-radio :label="false">禁用</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="二手商城" prop="moduleEs">
+                <el-switch v-model="step1Form.moduleEs" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="是否允许到店支付" prop="storePay">
+                <el-switch v-model="step1Form.storePay" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="以旧换新抵扣方式" prop="yjhxDkFlag">
+                <el-radio-group v-model="step1Form.yjhxDkFlag">
+                  <el-radio :label="1">线上支付抵扣订单货款</el-radio>
+                  <el-radio :label="2">仅线上展示旧机价格</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-card>
     </div>
 
     <div v-show="step == 'second'">
@@ -81,6 +144,7 @@
                 <div class="mask" v-show="img1_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('img1')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('img1')"></i>
+                  <i class="el-icon-delete" @click="img1_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('img1')">
@@ -107,6 +171,7 @@
                 <div class="mask" v-show="img2_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('img2')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('img2')"></i>
+                  <i class="el-icon-delete" @click="img2_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('img2')">
@@ -133,6 +198,7 @@
                 <div class="mask" v-show="img3_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('img3')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('img3')"></i>
+                  <i class="el-icon-delete" @click="img3_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('img3')">
@@ -154,98 +220,95 @@
     </div>
 
     <div v-show="step == 'third'">
-      <!-- <div class="tips">说明:企微配置是指通过配置企业微信将企微用户和系统打通,实现企业微信用户信息同平台互通,聊天会话信息同步</div> -->
-
-      <el-form class="my-form2" ref="step3Form" :model="step3Form" :rules="step3FormRules" label-width="200px"
-        label-position="right">
-        <!-- <el-card shadow="never" class="my-card">
-          <div class="title">1.配置企业ID</div>
-          <div class="box">指引:进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【我的企业】,将企业ID分别复制并填写到下方输入框中</div>
-          <el-form-item label="企业ID" prop="enterpriseId">
-            <el-input v-model="step3Form.enterpriseId" autocomplete="off" placeholder="请输入企业ID"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title">2.配置通讯录密钥(Secret)</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【客户联系】-选择【客户】-展开右侧【API】。将外部联系人Secret复制并填写到下方输入框中。如果外部联系人Secret不更新,请将更新后的外部联系人Secret更新复制更新到下方输入框中。</div>
-          <el-form-item label="通讯录密钥(Secret)" prop="listSecret">
-            <el-input v-model="step3Form.listSecret" autocomplete="off" placeholder="请输入通讯录密钥(Secret)"></el-input>
-          </el-form-item>
-          <el-divider></el-divider>
-          <div class="title">配置通讯录同步密钥(Secret)</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【管理工具】-选择【通讯录同步】-获取通讯录同步Secret。将通讯录同步Secret复制并填写到下方输入框中。如果通讯录同步Secret不更新,请将更新后的通讯录同步Secret更新复制更新到下方输入框中。</div>
-          <el-form-item label="通讯录同步密钥(Secret)" prop="listSyncSecret">
-            <el-input v-model="step3Form.listSyncSecret" autocomplete="off" placeholder="请输入通讯录同步密钥(Secret)"></el-input>
-          </el-form-item>
-        </el-card>
-
-        <el-card shadow="never" class="my-card">
-          <div class="title">3.配置小程序</div>
-          <div class="box">进入<el-link type="primary" :underline="false" href="https://element.eleme.io" target="_blank">企业微信</el-link>打开【应用管理】-选择【应用】-选择【小程序】-获取小程序AgentiD、小程序Secret。将小程序AgentiD、小程序Secret复制并填写到下方输入框中。</div>
-          <el-form-item label="小程序(AgentiD)" prop="appAgentId">
-            <el-input v-model="step3Form.appAgentId" autocomplete="off" placeholder="请输入小程序(AgentiD)"></el-input>
-          </el-form-item>
-          <el-form-item label="小程序(Secret)" prop="appSecret">
-            <el-input v-model="step3Form.appSecret" autocomplete="off" placeholder="请输入小程序(Secret)"></el-input>
-          </el-form-item>
-        </el-card> -->
-
-        <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>
-          <el-form-item label="服务商商户号" prop="merchantId">
-            <el-input v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入服务商商户号"></el-input>
-          </el-form-item>
-          <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="appletAppid">
-            <el-input v-model="step3Form.appletAppid" autocomplete="off" placeholder="请输入小程序appid"></el-input>
-          </el-form-item>
-          <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>
-          </el-form-item>
-          <el-form-item label="微信订阅模版" prop="templateId">
-            <el-input v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
-          </el-form-item>
-
-
-
-          <el-form-item label="公众号appid" prop="pubAppId">
-            <el-input v-model="step3Form.pubAppId" autocomplete="off" placeholder="请输入公众号appid"></el-input>
-          </el-form-item>
-          <el-form-item label="公众号密钥" prop="pubAppSecret">
-            <el-input v-model="step3Form.pubAppSecret" autocomplete="off" placeholder="请输入公众号密钥"></el-input>
-          </el-form-item>
-
-          <el-form-item label="改派通知" prop="pubTemplateId1">
-            <el-input v-model="step3Form.pubTemplateId1" autocomplete="off" placeholder="请输入工单派工,改派通知"></el-input>
-          </el-form-item>
-          <el-form-item label="发货通知" prop="pubTemplateId2">
-            <el-input v-model="step3Form.pubTemplateId2" autocomplete="off" placeholder="请输入商城订单支付成功提醒发货通知"></el-input>
-          </el-form-item>
-          <el-form-item label="维权订单提醒" prop="pubTemplateId3">
-            <el-input v-model="step3Form.pubTemplateId3" autocomplete="off" placeholder="请输入商城维权订单提醒"></el-input>
-          </el-form-item>
-          <el-form-item label="支付成功通知" prop="pubTemplateId4">
-            <el-input v-model="step3Form.pubTemplateId4" autocomplete="off" placeholder="请输入订单支付成功(含全部销售订单和延保)"></el-input>
-          </el-form-item>
-          <el-form-item label="维保费用申请" prop="pubTemplateId5">
-            <el-input v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
-          </el-form-item>
-          <el-form-item label="安维费用发放通知" prop="pubTemplateId6">
-            <el-input v-model="step3Form.pubTemplateId6" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
-          </el-form-item>
-
-
-        </el-card>
-      </el-form>
+      <el-card>
+        <div slot="header" class="clearfix">
+          <span>微信配置信息</span>
+        </div>
+        <el-form class="my-form2" ref="step3Form" :model="step3Form" :rules="step3FormRules" label-width="130px" size="mini">
+          <el-row :gutter="20">
+            <el-col :span="6">
+              <el-form-item label="服务商appId" prop="appId">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.appId" autocomplete="off" placeholder="请输入服务商appId"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="服务商商户号" prop="merchantId">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.merchantId" autocomplete="off" placeholder="请输入服务商商户号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="服务商商户密钥" prop="merchantKey">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.merchantKey" autocomplete="off" placeholder="请输入服务商商户密钥"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="小程序appid" prop="appletAppid">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.appletAppid" autocomplete="off" placeholder="请输入小程序appid"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="小程序密钥" prop="appletSecret">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.appletSecret" autocomplete="off" placeholder="请输入小程序密钥"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="子商户号Id" prop="childMerchantId">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.childMerchantId" autocomplete="off" placeholder="请输入子商户号Id"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="微信订阅模版" prop="templateId">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.templateId" autocomplete="off" placeholder="请输入微信订阅模版"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="公众号appid" prop="pubAppId">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubAppId" autocomplete="off" placeholder="请输入公众号appid"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="公众号密钥" prop="pubAppSecret">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubAppSecret" autocomplete="off" placeholder="请输入公众号密钥"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="改派通知" prop="pubTemplateId1">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId1" autocomplete="off" placeholder="请输入工单派工,改派通知"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="发货通知" prop="pubTemplateId2">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId2" autocomplete="off" placeholder="请输入商城订单支付成功提醒发货通知"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="维权订单提醒" prop="pubTemplateId3">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId3" autocomplete="off" placeholder="请输入商城维权订单提醒"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="支付成功通知" prop="pubTemplateId4">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId4" autocomplete="off" placeholder="请输入订单支付成功(含全部销售订单和延保)"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="维保费用申请" prop="pubTemplateId5">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId5" autocomplete="off" placeholder="请输入维保的费用申请"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="安维费用发放通知" prop="pubTemplateId6">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId6" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="抢单新单通知" prop="pubTemplateId7">
+                <el-input :disabled="!~[2].indexOf(userType)" v-model="step3Form.pubTemplateId7" autocomplete="off" placeholder="请输入安维费用发放通知"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-card>
     </div>
 
     <div v-show="step == 'four'">
@@ -279,6 +342,7 @@
                 <div class="mask" v-show="qrcode1_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('qrcode1')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('qrcode1')"></i>
+                  <i class="el-icon-delete" @click="qrcode1_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('qrcode1')">
@@ -299,6 +363,7 @@
                 <div class="mask" v-show="qrcode2_hover">
                   <i class="el-icon-zoom-in" @click="previewImage('qrcode2')"></i>
                   <i class="el-icon-upload2" @click="uploadImage('qrcode2')"></i>
+                  <i class="el-icon-delete" @click="qrcode2_url=''"></i>
                 </div>
               </div>
               <div class="add" v-else @click="uploadImage('qrcode2')">
@@ -319,6 +384,7 @@
 				        <div class="mask" v-show="qrcode3_hover">
 				          <i class="el-icon-zoom-in" @click="previewImage('qrcode3')"></i>
 				          <i class="el-icon-upload2" @click="uploadImage('qrcode3')"></i>
+                  <i class="el-icon-delete" @click="qrcode3_url=''"></i>
 				        </div>
 				      </div>
 				      <div class="add" v-else @click="uploadImage('qrcode3')">
@@ -429,7 +495,11 @@ export default {
 				billTitle: '',
         moduleYb: '',
         moduleWb: '',
+        joinCode:'',
+        moduleZl:'',
+        moduleEs:'',
         storePay: '',
+        yjhxDkFlag: '',
       },
 
       passwordType1: 'password',
@@ -485,23 +555,10 @@ export default {
         pubTemplateId4:'',
         pubTemplateId5:'',
         pubTemplateId6:'',
+        pubTemplateId7:'',
       },
       step3FormRules: {
-        enterpriseId: [
-          // { required: true, message: '请输入企业ID', trigger: 'blur' }
-        ],
-        listSecret: [
-          // { required: true, message: '请输入通讯录密钥(Secret)', trigger: 'blur' }
-        ],
-        listSyncSecret: [
-          // { required: true, message: '请输入通讯录同步密钥(Secret)', trigger: 'blur' }
-        ],
-        appAgentId: [
-          // { required: true, message: '请输入小程序(AgentiD)', trigger: 'blur' }
-        ],
-        appSecret: [
-          // { required: true, message: '请输入小程序(Secret)', trigger: 'blur' }
-        ],
+       
       },
       step4Form: {
         dayNum: '',
@@ -529,6 +586,9 @@ export default {
         openSidebar: this.sidebar.opened
       }
     },
+    userType() {
+      return JSON.parse(localStorage.getItem('greemall_user')).type
+    },
   },
   created() {
     const { id, type } = this.$route.query;
@@ -564,7 +624,11 @@ export default {
 				this.step1Form.billTitle = res.data.billTitle
         this.step1Form.moduleYb = res.data.moduleYb
         this.step1Form.moduleWb = res.data.moduleWb
+        this.step1Form.joinCode = res.data.joinCode
+        this.step1Form.moduleZl = res.data.moduleZl
+        this.step1Form.moduleEs = res.data.moduleEs
         this.step1Form.storePay = res.data.storePay
+        this.step1Form.yjhxDkFlag = res.data.yjhxDkFlag
 
         this.img1_url = res.data.minLogo1;
         this.img2_url = res.data.minLogo2;
@@ -594,6 +658,7 @@ export default {
         this.step3Form.pubTemplateId4 = res.data.pubTemplateId4;
         this.step3Form.pubTemplateId5 = res.data.pubTemplateId5;
         this.step3Form.pubTemplateId6 = res.data.pubTemplateId6;
+        this.step3Form.pubTemplateId7 = res.data.pubTemplateId7;
 
         this.companyWechatId = res.data.companyWechatId;
 
@@ -706,7 +771,11 @@ export default {
 				billTitle: this.step1Form.billTitle,
         moduleYb: this.step1Form.moduleYb,
         moduleWb: this.step1Form.moduleWb,
+        joinCode: this.step1Form.joinCode,
+        moduleZl: this.step1Form.moduleZl,
+        moduleEs: this.step1Form.moduleEs,
         storePay: this.step1Form.storePay,
+        yjhxDkFlag: this.step1Form.yjhxDkFlag,
       }
       editAccount(params).then(res => {
         this.$successMsg('保存成功');
@@ -774,6 +843,7 @@ export default {
             pubTemplateId4: this.step3Form.pubTemplateId4,
             pubTemplateId5: this.step3Form.pubTemplateId5,
             pubTemplateId6: this.step3Form.pubTemplateId6,
+            pubTemplateId7: this.step3Form.pubTemplateId7,
             
             companyWechatId: this.companyWechatId
           }
@@ -868,7 +938,7 @@ export default {
 }
 
 .my-form {
-  width: 450px;
+  width: 100%;
   margin-top: 20px;
 }
 
@@ -898,7 +968,7 @@ export default {
 
 .my-form2 {
   ::v-deep input {
-    width: 400px;
+    // width: 400px;
   }
 }
 

+ 17 - 10
src/views/setting/organizationManagement/tenantManagement/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <!-- 筛选条件 -->
-    <div class="screen-container">
+    <div class="screen-container"  v-if="!!~[2].indexOf(userType)">
       <div class="top clearfix">
         <div class="title fl">条件筛选</div>
       </div>
@@ -47,7 +47,7 @@
     </div>
 
     <div class="mymain-container">
-      <div class="btn-group clearfix">
+      <div class="btn-group clearfix" v-if="!!~[2].indexOf(userType)">
         <div class="fl">
           <el-button size="small" type="primary" @click="toCreate()">开通账号</el-button>
         </div>
@@ -61,13 +61,15 @@
             <template slot-scope="scope">
               <el-button type="text" @click="toDetail(scope.row.adminUserId, 1)">详情</el-button>
               <el-button type="text" @click="toDetail(scope.row.adminUserId, 2)">商城配置</el-button>
-              <el-button type="text" @click="toDetail(scope.row.adminUserId, 3)">微信配置</el-button>
-              <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定冻结吗?" @confirm="changeStatus(scope.row.adminUserId, 0)" >
-                <el-button slot="reference" type="text">冻结</el-button>
-              </el-popconfirm>
-              <el-popconfirm v-else style="margin-left: 10px;" title="确定恢复吗?" @confirm="changeStatus(scope.row.adminUserId, 1)" >
-                <el-button slot="reference" type="text">恢复</el-button>
-              </el-popconfirm>
+              <template v-if="!!~[2].indexOf(userType)">
+                <el-button type="text" @click="toDetail(scope.row.adminUserId, 3)">微信配置</el-button>
+                <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定冻结吗?" @confirm="changeStatus(scope.row.adminUserId, 0)" >
+                  <el-button slot="reference" type="text">冻结</el-button>
+                </el-popconfirm>
+                <el-popconfirm v-else style="margin-left: 10px;" title="确定恢复吗?" @confirm="changeStatus(scope.row.adminUserId, 1)" >
+                  <el-button slot="reference" type="text">恢复</el-button>
+                </el-popconfirm>
+              </template>
             </template>
           </el-table-column>
           <el-table-column align="center" label="商户账号" prop="userName" min-width="100" show-overflow-tooltip>
@@ -79,7 +81,7 @@
           <el-table-column align="center" label="负责人" prop="linkName" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="角色" prop="roleName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="联系电话" prop="linkPhone" min-width="160" show-overflow-tooltip></el-table-column>
-		  <el-table-column align="center" label="到期时间" prop="expireTime" min-width="160" show-overflow-tooltip></el-table-column>
+		      <el-table-column align="center" label="到期时间" prop="expireTime" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="电子邮箱" prop="email" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="地址" prop="address" min-width="200" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="状态" class-name="status-col">
@@ -132,6 +134,11 @@ export default {
       ],
     }
   },
+  computed: {
+    userType() {
+      return JSON.parse(localStorage.getItem('greemall_user')).type
+    },
+  },
   created() {
     this.getListfun();
   },

+ 20 - 0
src/views/setting/tradeInConfig/index.vue

@@ -0,0 +1,20 @@
+<template>
+  <categoryAllocation/>
+</template>
+
+<script>
+import categoryAllocation from './pages/categoryAllocation.vue'
+export default {
+  components: { categoryAllocation },
+  data() {
+    return {
+    }
+  },
+  methods: {
+    
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 208 - 0
src/views/setting/tradeInConfig/mixins/formItems.js

@@ -0,0 +1,208 @@
+import {
+  serviceCategoryAdd,
+  serviceCategoryUpdate,
+  serviceCategoryDel,
+  serviceCategoryDetail
+} from '@/api/tradeInConfig.js'
+import ImageUpload from '@/components/file-upload'
+import { required } from '@/components/template/rules_verify.js'
+export default {
+  components: { ImageUpload },
+  data() {
+    return {
+      formDialog: false,
+      formData: {
+        level: 0,
+        name: '',
+        parentId: 0,
+        sortNum: 0,
+        status: true,
+        typeAttribute: '',
+        typeOption: '',
+        // type: '',
+        // indexSort: 0,
+        // imgUrl: []
+      }
+    }
+  },
+  computed: {
+    formItems() {
+      return [
+        {
+          isShow: !!~[2, 3].indexOf(this.formData.level),
+          name: 'el-select',
+          md: 24,
+          formItemAttributes: {
+            label: '上级名称',
+            prop: 'parentId',
+            rules: [...required]
+          },
+          options: this.list.map(item => ({ label: item.name, value: item.categoryId })),
+          attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          attributes: { disabled: false, placeholder: '请输入', maxlength: 11 },
+          formItemAttributes: {
+            label: "类型名称",
+            prop: 'name',
+            rules: [...required]
+          }
+        },
+        // {
+        //   md: 24,
+        //   isShow: !!~[2].indexOf(this.formData.level),
+        //   name: 'slot-component',
+        //   formItemAttributes: {
+        //     prop: 'imgUrl',
+        //     label: '分类图片',
+        //     rules: [...required]
+        //   },
+        //   render: (h, { props, onInput }) => {
+        //     var { value } = props
+        //     return <ImageUpload fileList={this.formData.imgUrl} limit={1} isEdit={true} />
+        //   }
+        // },
+        {
+          isShow: !!~[3].indexOf(this.formData.level),
+          md: 24,
+          name: 'el-radio',
+          options: [
+            { label: '单选', value: 'SIGIN' },
+            { label: '多选', value: 'MANY' }
+          ],
+          attributes: { disabled: this.formData.categoryId ? true : false },
+          formItemAttributes: {
+            label: '选项属性',
+            prop: 'typeOption',
+            rules: [...required]
+          }
+        },
+        {
+          isShow: !!~[3].indexOf(this.formData.level),
+          md: 24,
+          name: 'el-radio',
+          options: [
+            { label: '规格', value: 'SPEC' },
+            // { label: '增减参考金额', value: 'DED' },
+            { label: '其他', value: 'OTHER' }
+          ],
+          attributes: { disabled: this.formData.categoryId ? true : false },
+          formItemAttributes: {
+            label: '属性类型',
+            prop: 'typeAttribute',
+            rules: [...required]
+          }
+        },
+        {
+          md: 24,
+          name: 'el-radio',
+          options: [
+            { label: '有效', value: true },
+            { label: '无效', value: false }
+          ],
+          attributes: {},
+          formItemAttributes: {
+            label: '状态',
+            prop: 'status',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: { disabled: false, placeholder: '请输入', maxlength: 11 },
+          formItemAttributes: {
+            label: '排序',
+            prop: 'sortNum',
+            rules: []
+          }
+        },
+        // {
+        //   isShow: !!~[2].indexOf(this.formData.level),
+        //   name: 'el-input',
+        //   md: 12,
+        //   attributes: { disabled: false, placeholder: '请输入', maxlength: 11 },
+        //   formItemAttributes: {
+        //     label: '首页顺序',
+        //     prop: 'indexSort',
+        //     rules: []
+        //   }
+        // }
+      ]
+    }
+  },
+  methods: {
+    // 添加一级
+    addL1Class() {
+      this.formData.level = 1
+      this.formDialog = true
+    },
+    // 添加二三级
+    addChClass(row) {
+      this.formData.level = row.level + 1
+      this.formData.parentId = row.categoryId
+      this.formDialog = true
+    },
+    // 编辑
+    editClass(row) {
+      serviceCategoryDetail({ categoryId: row.categoryId }).then(res => {
+        Object.assign(
+          this.formData,
+          { ...res.data },
+          // {
+          //   imgUrl: res.data.imgUrl ? res.data.imgUrl.split(',').map(u => ({ imgUrl: u })) : [],
+          //   children: undefined
+          // }
+        )
+        this.formDialog = true
+      })
+    },
+    // 删除
+    handleDelete(row) {
+      serviceCategoryDel({ categoryId: row.categoryId }).then(res => {
+        this.$message({
+          type: 'success',
+          message: `删除成功!`
+        })
+        this.getList()
+      })
+    },
+    // 关闭窗口
+    formCancel() {
+      this.$refs?.formRef?.$refs?.inlineForm?.clearValidate()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+    // 确定保存
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          ;[serviceCategoryAdd, serviceCategoryUpdate]
+          [this.formData.categoryId ? 1 : 0]({
+            ...this.formData,
+            // imgUrl: this.formData.imgUrl.map(item => item.imgUrl).join(','),
+            // ...(() => {
+            //   if (this.formData.level == 3) {
+            //     return {
+            //       categoryType: 'A'
+            //     }
+            //   } else {
+            //     return {}
+            //   }
+            // })()
+          })
+            .then(res => {
+              this.$message({
+                type: 'success',
+                message: `保存成功!`
+              })
+              this.formCancel()
+              this.getList()
+            })
+        }
+      })
+    }
+  }
+}

+ 405 - 0
src/views/setting/tradeInConfig/pages/categoryAllocation.vue

@@ -0,0 +1,405 @@
+<template>
+  <div style="width: 100%; height: 100%; box-sizing: border-box; padding: 20px">
+    <zj-page-container direction="row">
+      <div class="catalogue" style="padding-right: 0px">
+        <zj-page-container>
+          <div style="padding: 0 10px 10px; display: flex">
+            <el-button icon="el-icon-refresh-right" size="small" @click="refreshDepartment"
+              style="padding: 9px 10px; margin-right: 6px"></el-button>
+            <el-input placeholder="输入关键字进行过滤" size="small" clearable v-model="filterText"> </el-input>
+          </div>
+          <zj-page-fill>
+            <el-tree :data="listTree" :props="defaultProps" default-expand-all highlight-current
+              :expand-on-click-node="false" :filter-node-method="filterNode" @node-click="handleNodeClick"
+              node-key="categoryId" ref="listTree">
+              <div class="custom-tree-node" slot-scope="{ node, data }">
+                <span>
+                  <i :class="data.children && data.children.length > 0 ? 'el-icon-folder-opened' : 'el-icon-document-remove'
+              "></i>
+                  <span>{{ node.label }}</span>
+                </span>
+                <span v-if="data.level == 2 || data.level == 3">
+                  <el-button v-if="data.level == 2" type="text" size="mini" @click="addChClass(data)"> 添加 </el-button>
+                  <el-button v-if="data.level == 3" type="text" size="mini" @click="editClass(data)"> 编辑 </el-button>
+                  <el-popconfirm v-if="data.level == 3" style="margin-left: 10px" title="确定删除吗?"
+                    @confirm="handleDelete(data)">
+                    <el-button v-if="data.level == 3" slot="reference" size="mini" type="text"> 删除 </el-button>
+                  </el-popconfirm>
+                </span>
+              </div>
+            </el-tree>
+          </zj-page-fill>
+        </zj-page-container>
+      </div>
+      <zj-page-fill v-loading="!showList">
+        <template-page v-if="showList && item && item.typeAttribute" ref="pageRef" :getList="getListRight"
+          :exportList="exportList" :columnParsing="columnParsing" :optionsEvensGroup="optionsEvensGroup"
+          :tableAttributes="tableAttributes" :tableEvents="tableEvents" :operationColumnWidth="200"
+          :operation="operation()" :recordsHook="recordsHook" :replaceOrNotMap="true" :customModuleName="`${$route.meta.title}_${item ? ['规格', '其他'][typeAttribute[item.typeAttribute]] : ''
+              }`" :setModuleId="`${$route.meta.moduleId}_${item ? item.typeAttribute : ''}`">
+        </template-page>
+      </zj-page-fill>
+    </zj-page-container>
+    <el-dialog :title="formData.categoryId ? '编辑' : '新建'" :modal="true" width="600px" :visible.sync="formDialog"
+      :before-close="formCancel" :close-on-click-modal="false">
+      <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
+        <zj-form-module label-width="120px" :showPackUp="false" :form-data="formData" :form-items="formItems">
+        </zj-form-module>
+      </zj-form-container>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="formCancel">取 消</el-button>
+        <el-button size="mini" @click="formConfirm" type="primary">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import import_mixin from '@/components/template/import_mixin.js'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import { treeToList } from '@/utils/util'
+import {
+  tradeList,
+  tradeListPage,
+  tradePageExport,
+  tradeListOtherPage,
+  tradePageOtherExport,
+  serviceCategoryDetail,
+  serviceCategoryItemAdd,
+  serviceCategoryItemUpdate,
+  serviceCategoryItemDel
+} from '@/api/tradeInConfig.js'
+import formItems from '../mixins/formItems.js'
+export default {
+  mixins: [import_mixin, formItems],
+  components: {
+    TemplatePage
+  },
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {},
+      // 表格事件
+      tableEvents: {},
+      // 重新加载列表
+      showList: true,
+      //**部门树 */
+      filterText: '',
+      list: [],
+      listTree: [],
+      defaultProps: {
+        children: 'children',
+        label: 'name'
+      },
+      item: null,
+      typeAttribute: {
+        SPEC: 0,
+        OTHER: 1
+      }
+    }
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.listTree.filter(val)
+    },
+    item(val) {
+      this.showList = false
+      if (val) {
+        this.$nextTick(() => {
+          this.showList = true
+        })
+      }
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    getList() {
+      tradeList().then(res => {
+        this.list = treeToList(res.data)
+        this.listTree = res.data
+        this.listTree.map(item => {
+          ; (item.children || []).map(item2 => {
+            ; (item2.children || []).map(item3 => {
+              if (!this.item) {
+                this.item = item3
+                serviceCategoryDetail({ categoryId: item3.categoryId }).then(res => {
+                  this.item = res.data
+                  this.$nextTick(() => {
+                    this.$refs.listTree.setCurrentKey(this.item?.categoryId || '')
+                  })
+                })
+              }
+            })
+          })
+        })
+      })
+    },
+    refreshDepartment() {
+      this.getList()
+    },
+    filterNode(value, data) {
+      if (!value) return true
+      return data.name.indexOf(value) !== -1
+    },
+    // 选择部门
+    handleNodeClick(data) {
+      if (data.level === 3) {
+        serviceCategoryDetail({ categoryId: data.categoryId }).then(res => {
+          this.item = res.data
+        })
+      } else {
+        this.$refs.listTree.setCurrentKey(this.item?.categoryId || '')
+      }
+    },
+    exportList(...p) {
+      return [tradePageExport, tradePageOtherExport][
+        this.typeAttribute[this.item.typeAttribute]
+      ](...p)
+    },
+    // 列表请求函数
+    getListRight(p, cb) {
+      p.params.push({ param: 'service_category_id', compare: '=', value: this.item.categoryId })
+      cb && cb(p)
+      return [tradeListPage, tradeListOtherPage][
+        this.typeAttribute[this.item.typeAttribute]
+      ](p)
+    },
+    recordsHook(list) {
+      return [
+        {
+          "dictName": "",
+          "price": 0,
+          "companyName": JSON.parse(localStorage.getItem('greemall_user')).companyName,
+          "categoryName": this.item?.name || '',
+          "serviceCategoryId": this.item?.categoryId || '',
+          "status": 'ON',
+          "typeAttribute": this.item?.typeAttribute,
+          "remark": "",
+          "maxPrice":"",
+          "minPrice":"",
+          isRowEdit: true
+        },
+        ...list.map(item => ({ ...item, isRowEdit: false }))
+      ]
+    },
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      if (item.jname === 'dictName') {
+        defaultData.render = (h, { row, index, column }) => {
+          if (row.isRowEdit) {
+            return (
+              <div class="redbordererr">
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={val => {
+                    row[column.columnAttributes.prop] = val
+                  }}
+                  placeholder="请输入内容"
+                ></el-input>
+              </div>
+            )
+          } else {
+            return <div style="padding:0 6px;">{row[column.columnAttributes.prop]}</div>
+          }
+        }
+      }
+      if (item.jname === 'remark') {
+        defaultData.render = (h, { row, index, column }) => {
+          if (row.isRowEdit) {
+            return (
+              <div class="redbordererr">
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={val => {
+                    row[column.columnAttributes.prop] = val
+                  }}
+                  placeholder="请输入内容"
+                ></el-input>
+              </div>
+            )
+          } else {
+            return <div style="padding:0 6px;">{row[column.columnAttributes.prop]}</div>
+          }
+        }
+      }
+      if (item.jname === 'status') {
+        defaultData.render = (h, { row, index, column }) => {
+          if (row.isRowEdit) {
+            return (
+              <div class="redbordererr">
+                <el-select
+                  value={row[column.columnAttributes.prop]}
+                  onInput={val => {
+                    row[column.columnAttributes.prop] = val
+                  }}
+                  placeholder="请选择"
+                >
+                  {[
+                    { label: '有效', value: 'ON' },
+                    { label: '无效', value: 'OFF' }
+                  ].map((item, index_) => (
+                    <el-option key={index_} label={item.label} value={item.value}></el-option>
+                  ))}
+                </el-select>
+              </div>
+            )
+          } else {
+            return <div style="padding:0 6px;">{row[column.columnAttributes.prop]}</div>
+          }
+        }
+      }
+      if (item.jname === 'price') {
+        defaultData.render = (h, { row, index, column }) => {
+          if (row.isRowEdit) {
+            return (
+              <div class="redbordererr">
+                <el-input
+                  value={row[column.columnAttributes.prop]}
+                  onInput={val => {
+                    row[column.columnAttributes.prop] = val
+                  }}
+                  placeholder="请输入内容"
+                  type="number"
+                ></el-input>
+              </div>
+            )
+          } else {
+            return (
+              <div style="padding:0 6px;">{row[column.columnAttributes.prop]}</div>
+            )
+          }
+        }
+      }
+      return defaultData
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            {index === 0 || row.isRowEdit ? (
+              <zj-button
+                useLoading={false}
+                parameter={[row]}
+                buttonAttributes={{
+                  size: 'mini',
+                  type: 'primary'
+                }}
+                buttonEvents={{
+                  click: row => {
+                    if (this.jiaoyan(row)) {
+                      ;[serviceCategoryItemAdd, serviceCategoryItemUpdate]
+                      [row.id ? 1 : 0]({
+                        ...row,
+                        status: row.status == '有效' ? 'ON' : row.status == '无效' ? 'OFF' : row.status
+                      })
+                        .then(res => {
+                          this.$message({
+                            type: 'success',
+                            message: `保存成功!`
+                          })
+                          this.$refs.pageRef.refreshList()
+                        })
+                    }
+                  }
+                }}
+              >
+                保存
+              </zj-button>
+            ) : null}
+            {!row.isRowEdit ? (
+              <zj-button
+                useLoading={false}
+                parameter={[row]}
+                buttonAttributes={{
+                  size: 'mini',
+                  type: 'primary'
+                }}
+                buttonEvents={{
+                  click: row => {
+                    row.isRowEdit = true
+                  }
+                }}
+              >
+                编辑
+              </zj-button>
+            ) : null}
+            {index !== 0 ? (
+              <el-popconfirm
+                icon="el-icon-info"
+                icon-color="red"
+                title="这是一段内容确定删除吗?"
+                onConfirm={() => {
+                  serviceCategoryItemDel({
+                    categoryId: row.id
+                  }).then(res => {
+                    this.$message({
+                      type: 'success',
+                      message: `删除成功!`
+                    })
+                    this.$refs.pageRef.refreshList()
+                  })
+                }}
+              >
+                <zj-button
+                  slot="reference"
+                  buttonAttributes={{
+                    size: 'mini',
+                    type: 'danger'
+                  }}
+                >
+                  删除
+                </zj-button>
+              </el-popconfirm>
+            ) : null}
+          </div>
+        )
+      }
+    },
+    jiaoyan(row) {
+      try {
+        ;['dictName', 'price'].map(key => {
+          if (row[key] === undefined || row[key] === null || row[key] === '') {
+            throw new Error(
+              {
+                dictName: '字典值',
+                price: ["回收价格(元/台)", "增减费用(元/台)"][this.typeAttribute[this.item.typeAttribute]],
+              }[key]
+            )
+          }
+        })
+        return true
+      } catch (err) {
+        this.$message({
+          type: 'error',
+          message: `缺少参数【${err.message}】!`
+        })
+        return false
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.catalogue {
+  width: 300px;
+  height: 100%;
+  box-sizing: border-box;
+  padding: 20px;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+.custom-tree-node {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 14px;
+  padding-right: 8px;
+}
+</style>

+ 16 - 8
src/views/workOrder/orderHome/index.vue

@@ -5,7 +5,7 @@
 			<i class="el-icon-refresh-left" style="color: #1d82ff;"></i>
 		</div>
 		<div class="container_top">
-			<div class="tab" v-for="(item,index) in tabs" :key='index' @click="openOrder(item.type)">
+			<div class="tab" v-for="(item,index) in tabs" :key='index' @click="openOrder(item.type, item.title)">
 				<el-image class="img" :src="item.url" fit="fit"></el-image>
 				<div class="text">
 					<div class="title">{{item.title}}</div>
@@ -44,7 +44,14 @@
 	export default{
 		data(){
 			return {
-				tabs: [{title: '待派工',num: 12,url: require('@/assets/orderHome/dpg.png'),type: 'DWDPG'},{title: '待接收',num: 22,url: require('@/assets/orderHome/djs.png'),type: 'DJD'},{title: '服务中',num: 53,url: require('@/assets/orderHome/ffz.png'),type: 'FWZ'},{title: '异常待处理',num: 2,url: require('@/assets/orderHome/yc.png'),type: 'YCD'},{title: '差评统计',num: 0,url: require('@/assets/orderHome/pj.png'),type: 'appraise'}],
+				tabs: [
+          {title: '待派工',num: 0,url: require('@/assets/orderHome/dpg.png'),type: 'DWDPG'},
+          {title: '待抢单',num: 0,url: require('@/assets/orderHome/djs.png'),type: 'DQD'},
+          {title: '待接收',num: 0,url: require('@/assets/orderHome/djs.png'),type: 'DJD'},
+          {title: '服务中',num: 0,url: require('@/assets/orderHome/ffz.png'),type: 'FWZ'},
+          {title: '异常待处理',num: 0,url: require('@/assets/orderHome/yc.png'),type: 'YCD'},
+          {title: '差评统计',num: 0,url: require('@/assets/orderHome/pj.png'),type: 'appraise'}
+        ],
 				qtsm: [],
 				qtddqs: {},
 				wglxfb: {}
@@ -101,7 +108,7 @@
 				this.$echarts.init(this.$refs.chart3).dispose()
 				this.getCount()
 			},
-			openOrder(type){
+			openOrder(type, name){
 				if(!type){
 					this.$router.push({
 						name: "workOrderPool",
@@ -118,7 +125,7 @@
 					this.$router.push({
 						name: 'workOrderPool',
 						params: {
-							pageName: '-',
+							pageName: name||'-',
 							pageType: 'orderStatus',
 							pageCode: type,
 						},
@@ -129,10 +136,11 @@
 			getCount(){
 				getCount().then(res => {
 					this.tabs[0].num = res.data.dpg
-					this.tabs[1].num = res.data.djs
-					this.tabs[2].num = res.data.fwz
-					this.tabs[3].num = res.data.ycdcl
-					this.tabs[4].num = res.data.cp
+					this.tabs[1].num = res.data.dqd
+					this.tabs[2].num = res.data.djs
+					this.tabs[3].num = res.data.fwz
+					this.tabs[4].num = res.data.ycdcl
+					this.tabs[5].num = res.data.cp
 					this.qtsm = res.data.qtsm
 					this.qtddqs = res.data.qtddqs
 					this.wglxfb = res.data.wglxfb

+ 5 - 0
src/views/workOrder/workOrderPool/components/reassignment/index.vue

@@ -54,6 +54,11 @@ export default {
           isShow: true,
           isRules: [...required]
         },
+        isQd: {
+          isEdit: false,
+          isShow: false,
+          isRules: []
+        },
         workerId: {
           isEdit: true,
           isShow: true,

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

@@ -101,6 +101,29 @@ export default {
           }
         },
         {
+          isShow: this.formOptions.isQd.isShow,
+          name: 'el-switch',
+          md: 8,
+          attributes: {
+            disabled: !this.formOptions.isQd.isEdit,
+          },
+          formItemAttributes: {
+            label: '是否抢单',
+            prop: 'isQd',
+            rules: this.formOptions.isQd.isRules,
+          }
+        },
+        {
+          isShow: this.formOptions.isQd.isShow,
+          name: 'slot-component',
+          md: 8,
+          formItemAttributes: { label: '', prop: '' },
+          render: (h, { props }) => {
+            return null
+          }
+        },
+        {
+          isShow: !this.formOptions.isQd.isShow,
           name: 'slot-component',
           md: 16,
           formItemAttributes: { label: '', prop: '' },

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

@@ -21,7 +21,7 @@ export default {
           },
           render: (h, { row, column, index }) => {
             return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={this.orderInfo.isCj ? [] : []}>
                 <el-select
                   disabled={!this.formOptions.orderProducts.isEdit}
                   value={row[column.columnAttributes.prop]}
@@ -48,7 +48,7 @@ export default {
           },
           render: (h, { row, column, index }) => {
             return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={this.orderInfo.isCj ? [] : required}>
                 <el-select
                   disabled={!this.formOptions.orderProducts.isEdit}
                   value={row[column.columnAttributes.prop]}
@@ -77,7 +77,7 @@ export default {
           },
           render: (h, { row, column, index }) => {
             return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={this.orderInfo.isCj ? [] : []}>
                 <el-select
                   disabled={!this.formOptions.orderProducts.isEdit}
                   value={row[column.columnAttributes.prop]}
@@ -145,7 +145,7 @@ export default {
           },
           render: (h, { row, column, index }) => {
             return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={required}>
+              <el-form-item label="" label-width="0px" prop={`orderProducts.${index}.${column.columnAttributes.prop}`} rules={this.orderInfo.isCj ? [] : required}>
                 <el-input
                   disabled={!this.formOptions.orderProducts.isEdit}
                   value={row[column.columnAttributes.prop]}
@@ -304,9 +304,9 @@ export default {
         ...(() => {
           if (index > -1) {
             return [
-              `orderProducts.${index}.brandId`,
+              // `orderProducts.${index}.brandId`,
               `orderProducts.${index}.mainId`,
-              `orderProducts.${index}.smallId`,
+              // `orderProducts.${index}.smallId`,
               `orderProducts.${index}.productName`,
               `orderProducts.${index}.num`,
               `orderProducts.${index}.remark`,

+ 20 - 10
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/workOrderLogic.js

@@ -47,11 +47,15 @@ var initdata_ = {
   // 派单信息-----------------------------
   // 服务商网点
   websitId: "",
+  // 是否抢单
+  isQd: false,
   // 主要工程师id
   workerId: "",
   // 工程师列表
   orderWorkers: [],
-  orderWorkers_cp: []
+  orderWorkers_cp: [],
+
+  isCj: false
 }
 
 export default {
@@ -115,7 +119,7 @@ export default {
       // 1,保存 2,过程反馈 3,设为异常 4,加急 5,不加急 6,取消工单 7,回访 8,新建工单 9,工单驳回 10,激活工单
       var btns = []
       if (this.orderInfo) {
-        btns = {
+        btns = ({
           // 待预约
           DYY: [],
           // 待商户派工
@@ -133,19 +137,21 @@ export default {
           // 已结算
           YJS: [],
           // 已取消
-          YQX: [10]
-        }[this.orderInfo.orderStatus]
+          YQX: [10],
+          // 待抢单
+          DQD:[1, 2, 4, 5, 6],
+        }[this.orderInfo.orderStatus]) || []
       }
 
       // 已经加急
-      if (this.orderInfo.orderFlags.find(item => item.tag == 'JIA_JI')) {
+      if ((this.orderInfo.orderFlags||[]).find(item => item.tag == 'JIA_JI')) {
         btns = btns.filter(item => !new Set([4]).has(item))
       } else {
         btns = btns.filter(item => !new Set([5]).has(item))
       }
 
       // 已经异常
-      if (this.orderInfo.orderFlags.find(item => item.tag == 'YI_CHANGE')) {
+      if ((this.orderInfo.orderFlags||[]).find(item => item.tag == 'YI_CHANGE')) {
         btns = btns.filter(item => !new Set([3]).has(item))
       }
 
@@ -244,7 +250,7 @@ export default {
         },
         // 产品信息------------------------
         orderProducts: {
-          isEdit: !finish,
+          isEdit: !finish && !this.orderInfo.isCj,
           isShow: true,
           isRules: [...required]
         },
@@ -262,15 +268,20 @@ export default {
           isShow: true,
           isRules: [...required]
         },
+        isQd: {
+          isEdit: !!~['DSHPG', 'DWDPG', 'DJD', 'DQD', undefined].indexOf(this.orderInfo.orderStatus),
+          isShow: true,
+          isRules: [...required]
+        },
         workerId: {
           isEdit: !finish,
           isShow: true,
-          isRules: this.userInfo.type != 1 ? [...required] : []
+          isRules: this.userInfo.type != 1 && !this.orderInfo.isQd ? [...required] : []
         },
         orderWorkers: {
           isEdit: !finish,
           isShow: true,
-          isRules: this.userInfo.type != 1 ? [...required] : []
+          isRules: this.userInfo.type != 1 && !this.orderInfo.isQd ? [...required] : []
         },
       }
     },
@@ -302,7 +313,6 @@ export default {
             cb && cb(this.orderInfo)
           })
       } if(this.cloneWorkOrder){
-       
         // 创建工单
         this.orderInfo = Object.assign({}, JSON.parse(JSON.stringify(this.cloneWorkOrder)), {
           saleType: this?.workOrderType,

+ 3 - 10
src/views/workOrder/workOrderPool/index.vue

@@ -224,7 +224,6 @@ export default {
     })
     EventBus.$on('cloneWorkOrder', (data) => {
       this.handleClose(()=>{
-        console.log(data,"999999999")
         this.cloneWorkOrder = data
         this.workOrderType = data.saleType
         this.createFormBool = false
@@ -294,6 +293,9 @@ export default {
           label: "待预约",
           value: "DYY"
         }, {
+          label: "待抢单",
+          value: "DQD"
+        }, {
           label: "待商户派工",
           value: "DSHPG"
         }, {
@@ -337,15 +339,6 @@ export default {
         if (pam.orderSmallType) {
           pam.params.push({ "param": "a.order_small_type", "compare": "=", "value": pam.orderSmallType })
         }
-        // if (this.$route.query.saleOrderId && !pam.params.find(item => item.param == "a.sale_order_id")) {
-        //   pam.params.push({ "param": "a.sale_order_id", "compare": "like", "value": this.$route.query.saleOrderId, label: "销售订单号" })
-        // }
-        // if (this.$route.query.pgIncreItemId && !pam.params.find(item => item.param == "a.pg_incre_order_id")) {
-        //   pam.params.push({ "param": "a.pg_incre_order_id", "compare": "like", "value": this.$route.query.pgIncreItemId, label: "增置服务明细ID" })
-        // }
-        // if (this.$route.query.rpProjectRepairId  && !pam.params.find(item => item.param == "a.rp_project_repair_id")) {
-        //   pam.params.push({ "param": "a.rp_project_repair_id", "compare": "=", "value": this.$route.query.rpProjectRepairId })
-        // }
         cb && cb(pam)
         return orderBaseList(pam)
       } catch (err) {