aXin-0810 9 mesiacov pred
rodič
commit
1922b11b65

+ 33 - 0
src/api/paymentMerchantManagement.js

@@ -0,0 +1,33 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function adminCompanyPayConfigList(data) {
+  return request({
+    url: `/admin/company/pay/config/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function adminCompanyPayConfigListExport(data, name) {
+  return postBlob({
+    url: '/admin/company/pay/config/list/export',
+    data,
+    name
+  })
+}
+
+export function adminCompanyPayConfigSave(data) {
+  return request({
+    url: `/admin/company/pay/config/save`,
+    method: 'post',
+    data
+  })
+}
+
+export function adminCompanyPayConfigDetail(params) {
+  return request({
+    url: '/admin/company/pay/config/save',
+    method: 'post',
+    params
+  })
+}

+ 336 - 0
src/views/setting/organizationManagement/paymentMerchantManagement/index.vue

@@ -0,0 +1,336 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :operationColumnWidth="200"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :operation="operation()"
+    :exportList="exportList"
+  >
+    <div class="cartographer_big">
+      <el-dialog
+        title="设置支付商户信息"
+        width="100%"
+        :modal="false"
+        :visible.sync="formDialog"
+        :before-close="handleClose"
+      >
+        <zj-page-container>
+          <zj-page-fill class="neibuview">
+            <zj-form-container
+              ref="formRef"
+              :styleSwitch="false"
+              :form-data="formData"
+              :form-attributes="{ size: 'mini' }"
+            >
+              <zj-form-module title="" label-width="120px" :form-data="formData" :form-items="formItem" />
+            </zj-form-container>
+          </zj-page-fill>
+          <div style="box-sizing: border-box; padding: 10px 10px 0">
+            <el-button type="primary" @click="save">保存</el-button>
+            <el-button @click="chongzhi">重置</el-button>
+          </div>
+        </zj-page-container>
+      </el-dialog>
+    </div>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
+import {
+  adminCompanyPayConfigListExport,
+  adminCompanyPayConfigList,
+  adminCompanyPayConfigSave,
+  adminCompanyPayConfigDetail
+} from '@/api/paymentMerchantManagement'
+import MemberDetail from '@/components/Mall/Member/member-detail'
+import operation_mixin from '@/components/template/operation_mixin.js'
+export default {
+  components: { TemplatePage, MemberDetail, ImageUpload },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialog: false,
+      formDialogType: 0,
+      formData: {
+        appId: '',
+        companyName: JSON.parse(localStorage.getItem('greemall_user'))?.companyName || '',
+        companyWechatId: JSON.parse(localStorage.getItem('greemall_user'))?.companyWechatId || '',
+        mchId: '',
+        mchKey: '',
+        payMerchantName: '',
+        remark: '',
+        status: '',
+        subAppId: '',
+        subMchId: ''
+      }
+    }
+  },
+  computed: {
+    moreParameters() {
+      return []
+    },
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.formDialog = true
+              }
+            })
+          ]
+        ]
+      ]
+    },
+    formItem() {
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '所属商户',
+            prop: 'companyName',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '电子商户名称',
+            prop: 'payMerchantName',
+            rules: required
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: 'appid',
+            prop: 'appId',
+            rules: required
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '子商户应用appid',
+            prop: 'subAppId',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: 'mchid',
+            prop: 'mchId',
+            rules: required
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '子商户mchid',
+            prop: 'subMchId',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: 'key',
+            prop: 'mchKey',
+            rules: required
+          }
+        },
+        {
+          name: 'el-radio',
+          options: [
+            { label: '启用', value: true },
+            { label: '禁用', value: false }
+          ],
+          md: 6,
+          attributes: {
+            disabled: !!this.formDialogType,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '状态',
+            prop: 'status',
+            rules: required
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: !!this.formDialogType,
+            type: 'textarea',
+            rows: 3,
+            placeholder: '请输入'
+          },
+          formItemAttributes: {
+            label: '支付说明',
+            prop: 'remark',
+            rules: []
+          }
+        }
+      ]
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: adminCompanyPayConfigList,
+    // 列表导出函数
+    exportList: adminCompanyPayConfigListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+
+    // 表格操作列
+    operation() {
+      return this.operationBtn({
+        details: {
+          click: ({ row, index, column }) => {
+            adminCompanyPayConfigDetail({
+              id: row.id
+            }).then(res => {
+              this.formDialogType = 1
+              this.formData = { ...res.data }
+              this.formDialog = true
+            })
+          }
+        },
+        edit: {
+          click: ({ row, index, column }) => {
+            adminCompanyPayConfigDetail({
+              id: row.id
+            }).then(res => {
+              this.formData = { ...res.data }
+              this.formDialog = true
+            })
+          }
+        }
+      })
+    },
+    handleClose() {
+      this.formDialogType = 0
+      this.formData = {
+        appId: '',
+        companyName: '',
+        companyWechatId: '',
+        mchId: '',
+        mchKey: '',
+        payMerchantName: '',
+        remark: '',
+        status: '',
+        subAppId: '',
+        subMchId: ''
+      }
+      this.formDialog = false
+    },
+    chongzhi() {
+      this.formData = Object.assign(this.formData, {
+        appId: '',
+        mchId: '',
+        mchKey: '',
+        payMerchantName: '',
+        remark: '',
+        status: '',
+        subAppId: '',
+        subMchId: ''
+      })
+    },
+    save() {
+      this.$refs.formRef.validate(valid => {
+        if (valid) {
+          adminCompanyPayConfigSave({
+            ...this.formData
+          }).then(res => {
+            this.$message({
+              type: 'success',
+              message: '保存成功'
+            })
+            this.handleClose()
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+
+  ::v-deep & > .zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    & > div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+</style>

+ 98 - 83
src/views/workOrder/workOrderPool/detailModule/CompletionDetails/index.vue

@@ -15,14 +15,14 @@
         <zj-form-module v-else title="采集信息" :form-data="formData" :form-items="INSTALL_pgOrderProductImgs" />
       </zj-form-container>
     </zj-page-fill>
-    <div v-if="detailId" style="box-sizing: border-box;padding: 16px;">
+    <div v-if="detailId" style="box-sizing: border-box; padding: 16px">
       <el-button @click="close" size="mini">关闭</el-button>
     </div>
   </zj-page-container>
 </template>
 
 <script>
-import { changeOrderGetOrderProduct, changeOrderProductDetail } from "@/api/workOrderPool.js";
+import { changeOrderGetOrderProduct, changeOrderProductDetail } from '@/api/workOrderPool.js'
 import ImageUpload from '@/components/file-upload'
 export default {
   components: {
@@ -31,17 +31,17 @@ export default {
   props: {
     id: {
       type: [String, Number],
-      default: null,
+      default: null
     }
   },
   data() {
     return {
       completeDetailData: [],
-      detailId: "",
+      detailId: '',
       formData: {
-        bugRemark: "",
-        detailRemark: "",
-        isDefend: "",
+        bugRemark: '',
+        detailRemark: '',
+        isDefend: '',
         pgOrderProductDetails: []
       }
     }
@@ -56,59 +56,66 @@ export default {
             width: 60
           },
           render: (h, { row, column, index }) => {
-            return <div style="padding-left:10px">
-              <el-button type="text" onClick={() => {
-                this.detailId = row.id
-              }}>查看</el-button>
-            </div>
+            return (
+              <div style="padding-left:10px">
+                <el-button
+                  type="text"
+                  onClick={() => {
+                    this.detailId = row.id
+                  }}
+                >
+                  查看
+                </el-button>
+              </div>
+            )
           }
         },
         {
           columnAttributes: {
             label: '品牌名称',
-            prop: 'brandName',
+            prop: 'brandName'
           }
         },
         {
           columnAttributes: {
             label: '产品大类',
-            prop: 'mainName',
+            prop: 'mainName'
           }
         },
         {
           columnAttributes: {
             label: '产品小类',
-            prop: 'smallName',
+            prop: 'smallName'
           }
         },
         {
           columnAttributes: {
             label: '机型名称',
-            prop: 'productName',
+            prop: 'productName'
           }
         },
         {
           columnAttributes: {
             label: '负责工程师',
-            prop: 'workerName',
+            prop: 'workerName'
           }
         },
         {
           columnAttributes: {
             label: '联系电话',
-            prop: 'workerMobile',
+            prop: 'workerMobile'
           }
         },
         {
           columnAttributes: {
             label: '状态',
-            prop: 'status',
+            prop: 'status'
           }
         },
         {
           columnAttributes: {
             label: '采集时间',
-            prop: 'giveTime',
+            prop: 'giveTime'
           }
         },
         {
@@ -124,7 +131,7 @@ export default {
             prop: 'giveAddress',
             width: 260
           }
-        },
+        }
       ]
     },
     repairInfo() {
@@ -133,79 +140,87 @@ export default {
           name: 'el-input',
           md: 14,
           attributes: { disabled: true, placeholder: '' },
-          formItemAttributes: { label: '故障现象', prop: 'bugRemark' },
+          formItemAttributes: { label: '故障现象', prop: 'bugRemark' }
         },
         {
           name: 'el-radio',
           options: [
             { label: '是', value: 'YES' },
-            { label: '否', value: 'NO' },
+            { label: '否', value: 'NO' }
           ],
           md: 10,
           attributes: { disabled: true, placeholder: '' },
-          formItemAttributes: { label: '是否质保', prop: 'isDefend' },
+          formItemAttributes: { label: '是否质保', prop: 'isDefend' }
         },
         {
           name: 'el-input',
           md: 24,
-          attributes: { disabled: true, type: "textarea", placeholder: '' },
-          formItemAttributes: { label: '备注', prop: 'detailRemark' },
-        },
+          attributes: { disabled: true, type: 'textarea', placeholder: '' },
+          formItemAttributes: { label: '备注', prop: 'detailRemark' }
+        }
       ]
     },
     INSTALL_pgOrderProductImgs() {
-      return [{
-        md: 24,
-        name: 'slot-component',
-        formItemAttributes: {
-          label: '',
-          prop: '',
-          'label-width': '0px'
+      return [
+        {
+          md: 24,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            return (
+              <ImageUpload
+                fileList={this.formData?.pgOrderProductDetails
+                  ?.filter(item => item.type === 'INSTALL')
+                  .map(item => ({ url: item.fileUrl, name: item.fileName }))}
+                limit={1000}
+                isEdit={false}
+                viewOnline={false}
+                download={false}
+                showName={true}
+              />
+            )
+          }
         },
-        render: (h, { props, onInput }) => {
-          return (
-            <ImageUpload
-              fileList={this.formData?.pgOrderProductDetails?.filter((item) => item.type === 'INSTALL').map((item) => ({ url: item.fileUrl, name: item.fileName }))}
-              limit={1000}
-              isEdit={false}
-              viewOnline={false}
-              download={false}
-              showName={true}
-            />
-          )
+        {
+          show: this.formData.pgOrderBase && this.formData.pgOrderBase.orderType == 'INSTALL',
+          name: 'el-input',
+          md: 24,
+          attributes: { disabled: true, type: 'textarea', placeholder: '' },
+          formItemAttributes: { label: '备注', prop: 'detailRemark' }
         }
-      },
-      {
-        show: this.formData.pgOrderBase && this.formData.pgOrderBase.orderType == 'INSTALL',
-        name: 'el-input',
-        md: 24,
-        attributes: { disabled: true, type: "textarea", placeholder: '' },
-        formItemAttributes: { label: '备注', prop: 'detailRemark' },
-      },]
+      ]
     },
     BUG_pgOrderProductImgs() {
-      return [{
-        md: 24,
-        name: 'slot-component',
-        formItemAttributes: {
-          label: '',
-          prop: '',
-          'label-width': '0px'
-        },
-        render: (h, { props, onInput }) => {
-          return (
-            <ImageUpload
-              fileList={this.formData?.pgOrderProductDetails?.filter((item) => item.type === 'BUG').map((item) => ({ url: item.fileUrl, name: item.fileName }))}
-              limit={1000}
-              isEdit={false}
-              viewOnline={false}
-              download={false}
-              showName={true}
-            />
-          )
+      return [
+        {
+          md: 24,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '',
+            prop: '',
+            'label-width': '0px'
+          },
+          render: (h, { props, onInput }) => {
+            return (
+              <ImageUpload
+                fileList={this.formData?.pgOrderProductDetails
+                  ?.filter(item => item.type === 'BUG')
+                  .map(item => ({ url: item.fileUrl, name: item.fileName }))}
+                limit={1000}
+                isEdit={false}
+                viewOnline={false}
+                download={false}
+                showName={true}
+              />
+            )
+          }
         }
-      },]
-    },
+      ]
+    }
   },
   watch: {
     id: {
@@ -217,14 +232,14 @@ export default {
             this.completeDetailData = res.data.map(item => {
               return {
                 ...item,
-                status: ({ WAIT: "待采集", WAIT_SAVE: "待完善", WAIT_OK: "临时采集", OK: "已采集" })[item.status]
+                status: { WAIT: '待采集', WAIT_SAVE: '待完善', WAIT_OK: '临时采集', OK: '已采集' }[item.status]
               }
             })
           })
         }
       },
       deep: true,
-      immediate: true,
+      immediate: true
     },
     detailId: {
       handler(newVal, oldVal) {
@@ -237,14 +252,14 @@ export default {
           })
         }
       },
-      deep: true,
-    },
+      deep: true
+    }
   },
   methods: {
     close() {
       this.$data.formData = this.$options.data().formData
-      this.detailId = ""
-    },
+      this.detailId = ''
+    }
   }
 }
 </script>
@@ -254,13 +269,13 @@ export default {
   box-sizing: border-box;
   padding-left: 16px;
 
-  ::v-deep &>.zj-page-fill-scroll {
+  ::v-deep & > .zj-page-fill-scroll {
     box-sizing: border-box;
     padding-right: 16px;
 
-    &>div:nth-child(1) {
+    & > div:nth-child(1) {
       margin-top: 20px;
     }
   }
 }
-</style>
+</style>