Prechádzať zdrojové kódy

Merge branch 'dev_v2' of https://gogs.zfire.top/zfire-front/supply-front into dev_v2

zh 2 rokov pred
rodič
commit
cd557dc35d

+ 3 - 3
package-lock.json

@@ -4267,9 +4267,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.1.16",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.1.16.tgz",
-      "integrity": "sha512-fS0kr39fLsqU4CLaEV0ZypwE1kh1igZtzin79CqItDfDydisnVjry+eWeScWKaT0i/nZORDSITH7/yMo8/MNDA==",
+      "version": "2.1.17",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.1.17.tgz",
+      "integrity": "sha512-s5FaPHZ4KmyNO89PsMoqQnuXBYe/hq6Ku4sFbL3gzB6Gj4j5ov1pJbHRgYPX0DqiUmufNcTWNeAPk17SCE/qyQ==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",

+ 1 - 1
package.json

@@ -15,7 +15,7 @@
     "test:ci": "npm run lint && npm run test:unit"
   },
   "dependencies": {
-    "@zjlib/element-plugins": "^2.1.16",
+    "@zjlib/element-plugins": "^2.1.17",
     "axios": "0.18.1",
     "clipboard": "^2.0.8",
     "concurrent-tasks": "^1.0.7",

+ 5 - 0
src/components/template/template-page-1.vue

@@ -19,6 +19,7 @@
       :onSavePlan="onSavePlan"
       :onClosePlain="onClosePlain"
       :defaultSearchData="defaultSearchData"
+      :replaceOrNotMap="replaceOrNotMap"
       @columnWidthChange="columnWidthChange"
       @columnListChange="columnListChange"
     >
@@ -131,6 +132,10 @@ export default {
     defaultSearchData: {
       type: Array,
       default: () => []
+    },
+    replaceOrNotMap: {
+      type: Boolean,
+      default: true
     }
   },
   data() {

+ 4 - 1
src/views/sales_policy/components/AddPolicy.vue

@@ -84,7 +84,7 @@
               </el-col>
               <el-col :xs="24" :ms="24" :lg="24">
                 <el-form-item label="政策封面图">
-                  <ImageUpload :file-list="fileList" multiple :limit="3" />
+                  <ImageUpload class="elImageClose" :file-list="fileList" multiple :limit="3" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -1023,6 +1023,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .elImageClose .el-image-viewer__wrapper span[class='el-image-viewer__btn el-image-viewer__close'] {
+  top: 100px;
+}
 h4 {
   margin: 0;
 }

+ 11 - 13
src/views/sales_policy/components/Examine.vue

@@ -30,7 +30,7 @@
                 {{ detail.status == 1 ? '已生效' : '未生效' }}
               </div>
             </el-col>
-       
+
             <el-col :span="24" class="item">
               <div class="label">销售政策名称</div>
               <div class="value">
@@ -101,6 +101,7 @@
                     style="width: 120px; height: 120px; margin-right: 20px"
                     fit="cover"
                     :preview-src-list="[$imageUrl + item]"
+                    class="elImageClose"
                   />
                   <img v-if="checkFileType(item) == 'word'" class="file" src="@/assets/common/word.png" />
                   <img v-if="checkFileType(item) == 'excel'" class="file" src="@/assets/common/excel.png" />
@@ -281,12 +282,7 @@
             </el-table-column>
             <el-table-column label="操作" align="left" width="150">
               <template slot-scope="scope">
-                <el-button
-                  type="text"
-                  size="small"
-                  @click="getCommonApi(scope.row)"
-                  >查看条件</el-button
-                >
+                <el-button type="text" size="small" @click="getCommonApi(scope.row)">查看条件</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -579,7 +575,7 @@
         </div>
       </div>
     </div>
-    <AddCondition v-else :id="cid" @close="handleConditionClose"/>
+    <AddCondition v-else :id="cid" @close="handleConditionClose" />
   </div>
 </template>
 
@@ -704,7 +700,7 @@ export default {
   },
   created() {},
   methods: {
-    handleConditionClose(){
+    handleConditionClose() {
       this.isEdit = 1
     },
     funTitle() {
@@ -802,7 +798,6 @@ export default {
     },
     // 检查文件类型
     checkFileType(url) {
-
       if (!url) return ''
       const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
 
@@ -842,9 +837,9 @@ export default {
       this.handletwoList()
     },
     getCommonApi(row) {
-     this.isEdit = 2
-     this.cid = row.id
-     this.cpolicyId = row.policyId
+      this.isEdit = 2
+      this.cid = row.id
+      this.cpolicyId = row.policyId
     },
     getCond() {
       this.listLoading = true
@@ -1080,6 +1075,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .elImageClose .el-image-viewer__wrapper span[class='el-image-viewer__btn el-image-viewer__close'] {
+  top: 100px;
+}
 .el-col {
   overflow: hidden;
 }

+ 5 - 1
src/views/sales_policy/components/details.vue

@@ -29,7 +29,6 @@
                 <el-input v-model="detail.title" disabled placeholder="请输入销售政策名称" />
               </div>
             </el-col>
-        
 
             <el-col :span="24" class="item">
               <div class="label">表头备注</div>
@@ -78,6 +77,7 @@
                     style="width: 120px; height: 120px; margin-right: 20px"
                     fit="cover"
                     :preview-src-list="[$imageUrl + item]"
+                    class="elImageClose"
                   />
                   <img v-if="checkFileType(item) == 'word'" class="file" src="@/assets/common/word.png" />
                   <img v-if="checkFileType(item) == 'excel'" class="file" src="@/assets/common/excel.png" />
@@ -1166,6 +1166,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .elImageClose .el-image-viewer__wrapper span[class='el-image-viewer__btn el-image-viewer__close'] {
+  top: 100px;
+}
+
 .file {
   margin-right: 20px;
 }

+ 5 - 1
src/views/sales_policy/components/editPolicy.vue

@@ -87,7 +87,7 @@
               </el-col>
               <el-col :xs="24" :ms="24" :lg="24">
                 <el-form-item label="政策封面图">
-                  <ImageUpload :file-list="fileList" multiple :limit="3" />
+                  <ImageUpload class="elImageClose" :file-list="fileList" multiple :limit="3" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -1082,6 +1082,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .elImageClose .el-image-viewer__wrapper span[class='el-image-viewer__btn el-image-viewer__close'] {
+  top: 100px;
+}
+
 h4 {
   margin: 0;
 }

+ 17 - 17
src/views/supply/apply/engin_list.vue

@@ -260,20 +260,20 @@ export default {
     },
     operation() {
       return (h, { row, index, column }) => {
-        // console.log(row)
+        console.log(row, column)
         return (
           <div class="operation-btns">
             {this.$checkBtnRole('apply', this.$route.meta.roles) &&
             ((!this.isCustomer &&
               !row.automaticStatus &&
-              (row.examineStatus === '保存' || row.examineStatus === '不通过')) ||
+              (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL')) ||
               (this.isCustomer &&
                 !row.automaticStatus &&
-                (row.examineStatus === '保存' || row.examineStatus === '不通过') &&
+                (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
                 row.type != 2) ||
               (!this.isCustomer &&
                 row.automaticStatus &&
-                (row.examineStatus === '保存' || row.examineStatus === '不通过') &&
+                (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
                 row.type === 2)) ? (
               <el-popconfirm
                 onOnConfirm={async () => {
@@ -290,9 +290,9 @@ export default {
             )}
 
             {this.$checkBtnRole('apply', this.$route.meta.roles) &&
-            ((!this.isCustomer && !row.automaticStatus && row.examineStatus === '待审核') ||
-              (this.isCustomer && !row.automaticStatus && row.examineStatus === '待审核' && row.type != 2) ||
-              (!this.isCustomer && row.automaticStatus && row.examineStatus === '待审核' && row.type == 2)) ? (
+            ((!this.isCustomer && !row.automaticStatus && row.examineStatus === 'WAIT') ||
+              (this.isCustomer && !row.automaticStatus && row.examineStatus === 'WAIT' && row.type != 2) ||
+              (!this.isCustomer && row.automaticStatus && row.examineStatus === 'WAIT' && row.type == 2)) ? (
               <el-popconfirm
                 onOnConfirm={async () => {
                   this.handleSubmit(row.id, 'SAVE')
@@ -327,7 +327,7 @@ export default {
 
             {this.$checkBtnRole('edit', this.$route.meta.roles) &&
             !row.automaticStatus &&
-            (row.examineStatus === '保存' || row.examineStatus === '不通过') &&
+            (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
             row.type === 1 ? (
               <el-button
                 size="mini"
@@ -345,16 +345,16 @@ export default {
             {this.$checkBtnRole('edit', this.$route.meta.roles) &&
             ((!this.isCustomer &&
               !row.automaticStatus &&
-              (row.examineStatus === '保存' || row.examineStatus === '不通过') &&
+              (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
               row.type === 2) ||
               (this.isCustomer &&
                 !row.automaticStatus &&
-                (row.examineStatus === '保存' || row.examineStatus === '不通过') &&
+                (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
                 row.type != 2 &&
                 row.type !== 1) ||
               (!this.isCustomer &&
                 row.automaticStatus &&
-                (row.examineStatus === '保存' || row.examineStatus === '不通过') &&
+                (row.examineStatus === 'SAVE' || row.examineStatus === 'FAIL') &&
                 row.type === 2)) ? (
               <el-button
                 size="mini"
@@ -370,9 +370,9 @@ export default {
             )}
 
             {this.$checkBtnRole('examine', this.$route.meta.roles) &&
-            ((!this.isCustomer && !row.automaticStatus && row.examineStatus === '待审核') ||
-              (this.isCustomer && !row.automaticStatus && row.examineStatus === '待审核' && row.type != 2) ||
-              (!this.isCustomer && row.automaticStatus && row.examineStatus === '待审核' && row.type == 2)) ? (
+            ((!this.isCustomer && !row.automaticStatus && row.examineStatus === 'WAIT') ||
+              (this.isCustomer && !row.automaticStatus && row.examineStatus === 'WAIT' && row.type != 2) ||
+              (!this.isCustomer && row.automaticStatus && row.examineStatus === 'WAIT' && row.type == 2)) ? (
               <el-button
                 size="mini"
                 type="text"
@@ -397,9 +397,9 @@ export default {
             </el-button>
 
             {this.$checkBtnRole('del', this.$route.meta.roles) &&
-            ((!this.isCustomer && !row.automaticStatus && row.examineStatus !== '通过') ||
-              (this.isCustomer && !row.automaticStatus && row.examineStatus !== '通过' && row.type != 2) ||
-              (!this.isCustomer && row.automaticStatus && row.examineStatus !== '通过' && scope.row.type == 2)) ? (
+            ((!this.isCustomer && !row.automaticStatus && row.examineStatus !== 'OK') ||
+              (this.isCustomer && !row.automaticStatus && row.examineStatus !== 'OK' && row.type != 2) ||
+              (!this.isCustomer && row.automaticStatus && row.examineStatus !== 'OK' && scope.row.type == 2)) ? (
               <el-popconfirm
                 onOnConfirm={async () => {
                   this.handleDelete(row.id)

+ 7 - 1
src/views/supply/engin/components/commerce_form.vue

@@ -399,7 +399,13 @@
     </div>
 
     <!-- 工程登录列表 -->
-    <el-dialog title="工程登录列表" :visible.sync="isShowDialog" width="70%" :close-on-click-modal="false">
+    <el-dialog
+      title="工程登录列表"
+      append-to-body
+      :visible.sync="isShowDialog"
+      width="70%"
+      :close-on-click-modal="false"
+    >
       <el-form ref="screenForm" :model="screenForm" label-width="0" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">

+ 10 - 1
src/views/supply/engin/engin_list.vue

@@ -9,6 +9,7 @@
     :tableAttributes="tableAttributes"
     :tableEvents="tableEvents"
     :operationColumnWidth="200"
+    :fieldBeansHook="fieldBeansHook"
   >
     <EditDateDialog :is-show.sync="isShowEditDateDialog" :date-form.sync="dateForm" />
     <Popu v-if="!showPage">
@@ -209,6 +210,14 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
+    fieldBeansHook(val) {
+      if (this.isDealer) {
+        let res = val.filter(v => v.jname !== 'powerCategory' && v.jname !== 'geLiInerNote' && v.jname !== 'geLiNote')
+        return res
+      } else {
+        return val
+      }
+    },
     operation() {
       return (h, { row, index, column }) => {
         return (
@@ -334,7 +343,7 @@ export default {
       })
       getTypeList({ pageNum: 1, pageSize: -1 }).then(res => {
         this.typeList = res.data.records
-        console.log(this.typeList)
+        // console.log(this.typeList)
       })
     },