浏览代码

no message

aXin-0810 9 月之前
父节点
当前提交
1c8ec08b07

+ 53 - 0
src/api/bankAccount.js

@@ -0,0 +1,53 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function dailyBankTemplateImport(data) {
+  return handleImport('/daily/bank/template/import', data.formdata, data.id || '')
+}
+
+export function dailyBankList(data) {
+  return request({
+    url: `/daily/bank/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function dailyBankListExport(data, name) {
+  return postBlob({
+    url: '/daily/bank/list/export',
+    data,
+    name
+  })
+}
+
+export function dailyBankAdd(data) {
+  return request({
+    url: '/daily/bank/add',
+    method: 'post',
+    data
+  })
+}
+
+export function dailyBankUpdate(data) {
+  return request({
+    url: '/daily/bank/update',
+    method: 'post',
+    data
+  })
+}
+
+export function dailyBankDetail(params) {
+  return request({
+    url: '/daily/bank/detail',
+    method: 'post',
+    params
+  })
+}
+
+export function dailyBankDelete(params) {
+  return request({
+    url: '/daily/bank/delete',
+    method: 'post',
+    params
+  })
+}

+ 3 - 5
src/api/masterManagement.js

@@ -17,13 +17,12 @@ export function memberPageExport(data, name) {
   })
   })
 }
 }
 
 
-
 // 审核
 // 审核
-export function memberAudit(params) {
+export function memberAudit(data) {
   return request({
   return request({
     url: '/member/worker/examine',
     url: '/member/worker/examine',
     method: 'post',
     method: 'post',
-    params
+    data
   })
   })
 }
 }
 
 
@@ -45,7 +44,6 @@ export function memberInner(data) {
   })
   })
 }
 }
 
 
-
 export function memberSlaveBind(params) {
 export function memberSlaveBind(params) {
   return request({
   return request({
     url: '/member/slave/bind',
     url: '/member/slave/bind',
@@ -60,4 +58,4 @@ export function update(params) {
     method: 'post',
     method: 'post',
     params
     params
   })
   })
-}
+}

+ 199 - 0
src/components/barrageContainer/barrageContainer.vue

@@ -0,0 +1,199 @@
+<template>
+  <div class="barrageContainer" ref="barrageContainer">
+    <slot />
+  </div>
+</template>
+
+<script>
+import { CircularLinkedList } from './circularLinkedList.js'
+export default {
+  props: {
+    // 动画时间
+    wheelTime: {
+      type: Number,
+      default: 3000
+    },
+    // 隐藏的过度距离
+    excessive: {
+      type: Number,
+      default: 500
+    },
+    // 距离顶部最小高度
+    mintop: {
+      type: Number,
+      default: 100
+    },
+    // 距离底部最小高度
+    minbottom: {
+      type: Number,
+      default: 100
+    },
+    // 弹幕样式
+    barrageStyle: {
+      type: Object,
+      default: () => ({})
+    },
+    // 默认的数据
+    // 对象中必要参数又id与time
+    // 默认以text为展示内容,text可以是文本或者是返回文本的函数。没有则展示id
+    defaultBarrage: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      link: new CircularLinkedList(),
+      containerWidth: 0,
+      containerHeight: 0
+    }
+  },
+  created() {
+    this.defaultBarrage.map(item => {
+      this.push(item)
+    })
+  },
+  methods: {
+    // 计算容器高度
+    kg() {
+      const element = this.$refs.barrageContainer
+      this.containerWidth = element.offsetWidth
+      this.containerHeight = element.offsetHeight
+    },
+    // 向后追加
+    push(val) {
+      this.link.append(val)
+    },
+    // 向前追加
+    unshift(val) {
+      this.link.prepend(val)
+    },
+    // 执行开始
+    execute() {
+      if (this.link.getLength() > 0) {
+        this.currentData = this.link.head
+        this.kg()
+        this.dongtai()
+        this.$nextTick(() => {
+          this.start()
+        })
+      }
+    },
+    // 关闭
+    close() {
+      if (this.timeId) {
+        clearTimeout(this.timeId)
+      }
+      // 删除样式
+      const style = document.getElementById('dynamic-animation-style')
+      if (style) {
+        style.parentNode.removeChild(style)
+      }
+      // 删除元素
+      document.querySelectorAll('.newBarrageChild').forEach(element => {
+        element.remove()
+      })
+    },
+    // 开始
+    start() {
+      if (this.timeId) {
+        clearTimeout(this.timeId)
+      }
+      // 上一个距离下一个的时间
+      var timeNum2 = Math.abs(
+        new Date(this.currentData?.next?.value?.time).getTime() - new Date(this.currentData?.value?.time).getTime()
+      )
+      // 获取间隔时间
+      var timenum =
+        this?.currentData?.next === this.link?.head
+          ? this.wheelTime
+          : timeNum2 > this.wheelTime
+          ? this.wheelTime
+          : timeNum2
+
+      // 删除之前的
+      var node = document.getElementById(this.currentData?.value?.id)
+      if (node) {
+        node.parentNode.removeChild(node)
+      }
+      // 追加新的元素
+      var parent = this.$refs.barrageContainer
+      var newChild = document.createElement('div')
+      newChild.id = this.currentData?.value?.id
+      newChild.className = 'barrage newBarrageChild'
+      newChild.style.top = `${this.getRandomIntInRange(
+        this.mintop,
+        this.containerHeight > this.minbottom ? this.containerHeight - this.minbottom : this.minbottom
+      )}px`
+      for (var key in this.barrageStyle) {
+        newChild.style[key] = this.barrageStyle[key]
+      }
+      newChild.style.animation = `moveRight ${this.wheelTime / 1000}s linear infinite`
+      newChild.innerText =
+        typeof this.currentData?.value?.text === 'function'
+          ? this.currentData?.value?.text?.()
+          : typeof this.currentData?.value?.text === 'string'
+          ? this.currentData?.value?.text
+          : this.currentData?.value?.id
+      parent.appendChild(newChild)
+      // 赋值下一个数据为当前数据
+      this.currentData = this.currentData.next
+      // 定时器下一次执行追加
+      this.timeId = setTimeout(() => {
+        this.start()
+      }, timenum)
+    },
+    // 获取随机高度
+    getRandomIntInRange(min, max) {
+      return Math.floor(Math.random() * (max - min + 1)) + min
+    },
+    // 生成uid
+    uid() {
+      let d = new Date().getTime()
+      let d2 = (performance && performance.now && performance.now() * 1000) || 0
+      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+        let r = Math.random() * 16
+        if (d > 0) {
+          r = (d + r) % 16 | 0
+          d = Math.floor(d / 16)
+        } else {
+          r = (d2 + r) % 16 | 0
+          d2 = Math.floor(d2 / 16)
+        }
+        return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
+      })
+    },
+    dongtai() {
+      // 创建一个 <style> 标签
+      const style = document.createElement('style')
+      style.id = 'dynamic-animation-style'
+      style.type = 'text/css'
+      style.innerHTML = `
+          @keyframes moveRight {
+              from {
+                  right: 0;
+              }
+              to {
+                  right: ${this.containerWidth + this.excessive}px;
+              }
+          }
+      `
+      document.getElementsByTagName('head')[0].appendChild(style)
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.barrageContainer {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  overflow: hidden;
+  .barrage {
+    position: absolute;
+    z-index: 9999999;
+    transform: translateX(100%);
+  }
+}
+</style>

+ 54 - 0
src/components/barrageContainer/circularLinkedList.js

@@ -0,0 +1,54 @@
+class Node {
+  constructor(value) {
+    this.value = value
+    this.next = null
+  }
+}
+
+// 循环链
+export class CircularLinkedList {
+  constructor() {
+    this.head = null
+    this.tail = null
+  }
+
+  // 向后追加
+  append(value) {
+    const newNode = new Node(value)
+    if (!this.head) {
+      this.head = newNode
+      this.tail = newNode
+      this.tail.next = this.head
+    } else {
+      this.tail.next = newNode
+      this.tail = newNode
+      this.tail.next = this.head
+    }
+  }
+
+  // 向前追加
+  prepend(value) {
+    const newNode = new Node(value)
+    if (!this.head) {
+      this.head = newNode
+      this.tail = newNode
+      this.tail.next = this.head
+    } else {
+      newNode.next = this.head
+      this.head = newNode
+      this.tail.next = this.head
+    }
+  }
+
+  // 获取链表长度
+  getLength() {
+    if (!this.head) return 0
+    let length = 0
+    let currentNode = this.head
+    do {
+      length++
+      currentNode = currentNode.next
+    } while (currentNode !== this.head)
+    return length
+  }
+}

+ 186 - 150
src/views/auxiliaryFittings/salesManagement/oldPartsReturnFactory/index.vue

@@ -1,14 +1,25 @@
 <template>
 <template>
   <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
   <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
-    <template slot-scope="{activeKey, data}">
-      <div :style="{
-    width: '100%',
-    height: activeKey == 'list' ? '100%' : '0px',
-    overflow: 'hidden'
-  }">
-        <template-page v-if="isShowTab" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
-          :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
-          :column-parsing="columnParsing" :exportList="exportList" :operation="operation()">
+    <template slot-scope="{ activeKey, data }">
+      <div
+        :style="{
+          width: '100%',
+          height: activeKey == 'list' ? '100%' : '0px',
+          overflow: 'hidden'
+        }"
+      >
+        <template-page
+          v-if="isShowTab"
+          ref="pageRef"
+          :get-list="getList"
+          :table-attributes="tableAttributes"
+          :table-events="tableEvents"
+          :options-evens-group="optionsEvensGroup"
+          :moreParameters="moreParameters"
+          :column-parsing="columnParsing"
+          :exportList="exportList"
+          :operation="operation()"
+        >
           <div slot="moreSearch">
           <div slot="moreSearch">
             <el-radio-group v-model="flag" size="mini">
             <el-radio-group v-model="flag" size="mini">
               <el-radio-button label="">全部</el-radio-button>
               <el-radio-button label="">全部</el-radio-button>
@@ -17,26 +28,42 @@
               <el-radio-button label="OK">通过</el-radio-button>
               <el-radio-button label="OK">通过</el-radio-button>
               <el-radio-button label="FAIL">失败</el-radio-button>
               <el-radio-button label="FAIL">失败</el-radio-button>
             </el-radio-group>
             </el-radio-group>
-            <br><br>
+            <br /><br />
           </div>
           </div>
         </template-page>
         </template-page>
       </div>
       </div>
-      <div v-if="~['add', 'edit', 'detail', 'confirm'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
+      <div
+        v-if="~['add', 'edit', 'detail', 'confirm'].indexOf(activeKey)"
+        style="box-sizing: border-box; padding: 16px"
+      >
         <div>
         <div>
           <zj-form-container ref="formRef" :form-data="formData">
           <zj-form-container ref="formRef" :form-data="formData">
-            <zj-form-module title="单据信息" :form-data="formData" :form-items="formItems">
-            </zj-form-module>
-            <zj-form-module title="旧件信息" :form-data="formData" :form-items="product">
-            </zj-form-module>
+            <zj-form-module title="单据信息" :form-data="formData" :form-items="formItems"> </zj-form-module>
+            <zj-form-module title="旧件信息" :form-data="formData" :form-items="product"> </zj-form-module>
           </zj-form-container>
           </zj-form-container>
           <div slot="footer" class="dialog-footer">
           <div slot="footer" class="dialog-footer">
             <el-button size="mini" @click="data.removeTab">取 消</el-button>
             <el-button size="mini" @click="data.removeTab">取 消</el-button>
-            <el-button v-if="openType == 0 || formData.flag == 'SAVE'" size="mini" type="primary"
-              @click="quedingbaocun(data.removeTab)">{{formData.flag == 'SAVE'?'提交':'保存'}}</el-button>
-            <el-button v-if="openType == 3 && formData.flag == 'SUBMIT'" size="mini" type="primary"
-              @click="shenbi(data.removeTab, 'OK')">审核通过</el-button>
-            <el-button v-if="openType == 3 && formData.flag == 'SUBMIT'" size="mini" type="primary"
-              @click="shenbi(data.removeTab, 'FAIL')">审核失败</el-button>
+            <el-button
+              v-if="openType == 0 || formData.flag == 'SAVE'"
+              size="mini"
+              type="primary"
+              @click="quedingbaocun(data.removeTab)"
+              >{{ formData.flag == 'SAVE' ? '提交' : '保存' }}</el-button
+            >
+            <el-button
+              v-if="openType == 3 && formData.flag == 'SUBMIT'"
+              size="mini"
+              type="primary"
+              @click="shenbi(data.removeTab, 'OK')"
+              >审核通过</el-button
+            >
+            <el-button
+              v-if="openType == 3 && formData.flag == 'SUBMIT'"
+              size="mini"
+              type="primary"
+              @click="shenbi(data.removeTab, 'FAIL')"
+              >审核失败</el-button
+            >
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -48,9 +75,16 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
-import basicInfo from "./mixins/basicInfo"
-import productColumns from "./mixins/productColumns"
-import { websitPartsFactoryRetListPageV2, websitPartsFactoryRetPageExport, websitPartsFactoryRetDetail, websitPartsFactoryRetAdd, websitPartsFactoryRetUpdate, websitPartsFactoryRetExamine } from "@/api/oldPartsReturnFactory";
+import basicInfo from './mixins/basicInfo'
+import productColumns from './mixins/productColumns'
+import {
+  websitPartsFactoryRetListPageV2,
+  websitPartsFactoryRetPageExport,
+  websitPartsFactoryRetDetail,
+  websitPartsFactoryRetAdd,
+  websitPartsFactoryRetUpdate,
+  websitPartsFactoryRetExamine
+} from '@/api/oldPartsReturnFactory'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
   mixins: [import_mixin, operation_mixin, basicInfo, productColumns],
   mixins: [import_mixin, operation_mixin, basicInfo, productColumns],
@@ -69,65 +103,65 @@ export default {
       recordSelected: [],
       recordSelected: [],
       openType: 0,
       openType: 0,
       formData: {
       formData: {
-        "address": "",
-        "area": "",
-        "areaId": "",
-        "buyPeople": "",
-        "city": "",
-        "cityId": "",
-        "companyWechatId": "",
-        "companyWechatName": JSON.parse(localStorage.getItem('greemall_user')).companyName,
-        "endTime": "",
-        "factory": "",
-        "factoryAddress": "",
-        "fileUrl": [],
-        "flag": "",
-        "goodsType": "P",
-        "identity": "",
-        "manger": "",
-        "mobile": "",
-        "orderEnginBaseId": "",
-        "orderUseType": "",
-        "partsRetId": "",
-        "payNo": "",
-        "payTime": "",
-        "payType": "",
-        "projectName": "",
-        "projectNo": "",
-        "province": "",
-        "provinceId": "",
-        "reason": "",
-        "refundSerialNo": "",
-        "refundState": "",
-        "refundTime": "",
-        "remark": "",
-        "salesId": "",
-        "salesTime": "",
-        "salesType": "",
-        "source": "",
-        "startTime": "",
-        "street": "",
-        "streetId": "",
-        "submitBy": "",
-        "submitTime": "",
-        "totalAmount": 0,
-        "totalRefundAmount": 0,
-        "type": "FACTORY",
-        "websitId": "",
-        "websitName": "",
-        "websitPartsRetItemList": [],
-        "websitPartsRetItems": [],
-        "websitPartsRetOldRecordList": [],
-        "workerId": "",
-        "workerMobile": "",
-        "workerName": "",
-        "workerWebsitId": "",
-        "workerWebsitName": "",
-		storageId: '',
-		storageName: ''
+        address: '',
+        area: '',
+        areaId: '',
+        buyPeople: '',
+        city: '',
+        cityId: '',
+        companyWechatId: '',
+        companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+        endTime: '',
+        factory: '',
+        factoryAddress: '',
+        fileUrl: [],
+        flag: '',
+        goodsType: 'P',
+        identity: '',
+        manger: '',
+        mobile: '',
+        orderEnginBaseId: '',
+        orderUseType: '',
+        partsRetId: '',
+        payNo: '',
+        payTime: '',
+        payType: '',
+        projectName: '',
+        projectNo: '',
+        province: '',
+        provinceId: '',
+        reason: '',
+        refundSerialNo: '',
+        refundState: '',
+        refundTime: '',
+        remark: '',
+        salesId: '',
+        salesTime: '',
+        salesType: '',
+        source: '',
+        startTime: '',
+        street: '',
+        streetId: '',
+        submitBy: '',
+        submitTime: '',
+        totalAmount: 0,
+        totalRefundAmount: 0,
+        type: 'FACTORY',
+        websitId: '',
+        websitName: '',
+        websitPartsRetItemList: [],
+        websitPartsRetItems: [],
+        websitPartsRetOldRecordList: [],
+        workerId: '',
+        workerMobile: '',
+        workerName: '',
+        workerWebsitId: '',
+        workerWebsitName: '',
+        storageId: '',
+        storageName: ''
       },
       },
       isShowTab: true,
       isShowTab: true,
-      flag: this?.$route?.params?.pageCode || '',
+      flag: this?.$route?.params?.pageCode || ''
     }
     }
   },
   },
   computed: {
   computed: {
@@ -144,11 +178,11 @@ export default {
               click: () => {
               click: () => {
                 this.$refs.tabPage.addTab({
                 this.$refs.tabPage.addTab({
                   // 对应显示的模块
                   // 对应显示的模块
-                  activeKey: "add",
+                  activeKey: 'add',
                   // 唯一标识
                   // 唯一标识
-                  key: "add",
+                  key: 'add',
                   // 页签名称
                   // 页签名称
-                  label: "新增",
+                  label: '新增',
                   // 打开时事件
                   // 打开时事件
                   triggerEvent: () => {
                   triggerEvent: () => {
                     this.handleClose()
                     this.handleClose()
@@ -157,14 +191,14 @@ export default {
                     })
                     })
                   },
                   },
                   // 关闭时事件
                   // 关闭时事件
-                  closeEvent: () => { }
+                  closeEvent: () => {}
                 })
                 })
               }
               }
             })
             })
           ]
           ]
         ]
         ]
       ]
       ]
-    },
+    }
   },
   },
   watch: {
   watch: {
     flag() {
     flag() {
@@ -180,7 +214,7 @@ export default {
       try {
       try {
         var pam = JSON.parse(JSON.stringify(p))
         var pam = JSON.parse(JSON.stringify(p))
         if (this.flag) {
         if (this.flag) {
-          pam.params.push({ 'param': 'a.flag', "compare": "=", "value": this.flag })
+          pam.params.push({ param: 'a.flag', compare: '=', value: this.flag })
         }
         }
         cb && cb(pam)
         cb && cb(pam)
         return websitPartsFactoryRetListPageV2(pam)
         return websitPartsFactoryRetListPageV2(pam)
@@ -207,31 +241,33 @@ export default {
     openForm() {
     openForm() {
       this.getWebsitList()
       this.getWebsitList()
       this.getProductSel()
       this.getProductSel()
-	  this.getWarehouseList()
+      this.getWarehouseList()
     },
     },
     // 保存
     // 保存
     quedingbaocun(removeTab) {
     quedingbaocun(removeTab) {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
       this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
         if (valid) {
         if (valid) {
-          ; ([websitPartsFactoryRetAdd, websitPartsFactoryRetUpdate][this.formData.partsRetId ? 1 : 0])({
-            ...this.formData,
-            ...(() => {
-              if (this.formData.partsRetId) {
-                return {
-                  flag: "SUBMIT"
+          ;[websitPartsFactoryRetAdd, websitPartsFactoryRetUpdate]
+            [this.formData.partsRetId ? 1 : 0]({
+              ...this.formData,
+              ...(() => {
+                if (this.formData.partsRetId) {
+                  return {
+                    flag: 'SUBMIT'
+                  }
                 }
                 }
-              }
-            })(),
-            fileUrl: this.formData.fileUrl.map(item => item.url).join(",")
-          }).then(res => {
-            this.$message({
-              type: 'success',
-              message: '保存成功'
+              })(),
+              fileUrl: this.formData.fileUrl.map(item => item.url).join(',')
+            })
+            .then(res => {
+              this.$message({
+                type: 'success',
+                message: '保存成功'
+              })
+              this.$refs.pageRef.refreshList()
+              removeTab && removeTab()
+              this.handleClose()
             })
             })
-            this.$refs.pageRef.refreshList()
-            removeTab && removeTab()
-            this.handleClose()
-          })
         }
         }
       })
       })
     },
     },
@@ -240,7 +276,7 @@ export default {
         if (valid) {
         if (valid) {
           websitPartsFactoryRetExamine({
           websitPartsFactoryRetExamine({
             ...this.formData,
             ...this.formData,
-            fileUrl: this.formData.fileUrl.map(item => item.url).join(","),
+            fileUrl: this.formData.fileUrl.map(item => item.url).join(','),
             flag: flag
             flag: flag
           }).then(res => {
           }).then(res => {
             this.$message({
             this.$message({
@@ -261,19 +297,19 @@ export default {
           click: ({ row, index, column }) => {
           click: ({ row, index, column }) => {
             this.$refs.tabPage.addTab({
             this.$refs.tabPage.addTab({
               // 对应显示的模块
               // 对应显示的模块
-              activeKey: "detail",
+              activeKey: 'detail',
               // 唯一标识
               // 唯一标识
-              key: "detail",
+              key: 'detail',
               // 页签名称
               // 页签名称
-              label: "详情",
+              label: '详情',
               // 打开时事件
               // 打开时事件
               triggerEvent: () => {
               triggerEvent: () => {
                 this.handleClose()
                 this.handleClose()
                 this.$nextTick(() => {
                 this.$nextTick(() => {
-                  this.openType = 1;
+                  this.openType = 1
                   websitPartsFactoryRetDetail({ id: row.partsRetId }).then(res => {
                   websitPartsFactoryRetDetail({ id: row.partsRetId }).then(res => {
                     Object.assign(this.formData, res.data, {
                     Object.assign(this.formData, res.data, {
-                      fileUrl: res.data.fileUrl ? res.data.fileUrl.split(",").map(url => ({ url })) : [],
+                      fileUrl: res.data.fileUrl ? res.data.fileUrl.split(',').map(url => ({ url })) : [],
                       websitPartsRetItems: res.data.websitPartsRetItemList
                       websitPartsRetItems: res.data.websitPartsRetItemList
                     })
                     })
                     this.openForm()
                     this.openForm()
@@ -281,7 +317,7 @@ export default {
                 })
                 })
               },
               },
               // 关闭时事件
               // 关闭时事件
-              closeEvent: () => { }
+              closeEvent: () => {}
             })
             })
           }
           }
         },
         },
@@ -292,19 +328,19 @@ export default {
           click: ({ row, index, column }) => {
           click: ({ row, index, column }) => {
             this.$refs.tabPage.addTab({
             this.$refs.tabPage.addTab({
               // 对应显示的模块
               // 对应显示的模块
-              activeKey: "edit",
+              activeKey: 'edit',
               // 唯一标识
               // 唯一标识
-              key: "edit",
+              key: 'edit',
               // 页签名称
               // 页签名称
-              label: "编辑",
+              label: '编辑',
               // 打开时事件
               // 打开时事件
               triggerEvent: () => {
               triggerEvent: () => {
                 this.handleClose()
                 this.handleClose()
                 this.$nextTick(() => {
                 this.$nextTick(() => {
-					this.openType = 2;
+                  this.openType = 2
                   websitPartsFactoryRetDetail({ id: row.partsRetId }).then(res => {
                   websitPartsFactoryRetDetail({ id: row.partsRetId }).then(res => {
                     Object.assign(this.formData, res.data, {
                     Object.assign(this.formData, res.data, {
-                      fileUrl: res.data.fileUrl ? res.data.fileUrl.split(",").map(url => ({ url })) : [],
+                      fileUrl: res.data.fileUrl ? res.data.fileUrl.split(',').map(url => ({ url })) : [],
                       websitPartsRetItems: res.data.websitPartsRetItemList
                       websitPartsRetItems: res.data.websitPartsRetItemList
                     })
                     })
                     this.openForm()
                     this.openForm()
@@ -312,48 +348,48 @@ export default {
                 })
                 })
               },
               },
               // 关闭时事件
               // 关闭时事件
-              closeEvent: () => { }
+              closeEvent: () => {}
             })
             })
           }
           }
         },
         },
-		confirm: {
-			conditions: ({ row, index, column }) => {
-			  return row.flag == 'SUBMIT'
-			},
-		  click: ({ row, index, column }) => {
-		    this.$refs.tabPage.addTab({
-		      // 对应显示的模块
-		      activeKey: "confirm",
-		      // 唯一标识
-		      key: "confirm",
-		      // 页签名称
-		      label: "确认",
-		      // 打开时事件
-		      triggerEvent: () => {
-		        this.handleClose()
-		        this.$nextTick(() => {
-		          this.openType = 3;
-		          websitPartsFactoryRetDetail({ id: row.partsRetId }).then(res => {
-		            Object.assign(this.formData, res.data, {
-		              fileUrl: res.data.fileUrl ? res.data.fileUrl.split(",").map(url => ({ url })) : [],
-		              websitPartsRetItems: res.data.websitPartsRetItemList
-		            })
-		            this.openForm()
-		          })
-		        })
-		      },
-		      // 关闭时事件
-		      closeEvent: () => { }
-		    })
-		  }
-		},
+        confirm: {
+          conditions: ({ row, index, column }) => {
+            return row.flag == 'SUBMIT'
+          },
+          click: ({ row, index, column }) => {
+            this.$refs.tabPage.addTab({
+              // 对应显示的模块
+              activeKey: 'confirm',
+              // 唯一标识
+              key: 'confirm',
+              // 页签名称
+              label: '确认',
+              // 打开时事件
+              triggerEvent: () => {
+                this.handleClose()
+                this.$nextTick(() => {
+                  this.openType = 3
+                  websitPartsFactoryRetDetail({ id: row.partsRetId }).then(res => {
+                    Object.assign(this.formData, res.data, {
+                      fileUrl: res.data.fileUrl ? res.data.fileUrl.split(',').map(url => ({ url })) : [],
+                      websitPartsRetItems: res.data.websitPartsRetItemList
+                    })
+                    this.openForm()
+                  })
+                })
+              },
+              // 关闭时事件
+              closeEvent: () => {}
+            })
+          }
+        }
         // printTp: {
         // printTp: {
         //   click: ({ row, index, column }) => {
         //   click: ({ row, index, column }) => {
 
 
         //   }
         //   }
         // },
         // },
       })
       })
-    },
+    }
   }
   }
 }
 }
 </script>
 </script>

+ 295 - 0
src/views/engineerFeeSettlement/dailyMaintenanceBalance/bankAccount/index.vue

@@ -0,0 +1,295 @@
+<template>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{ activeKey, data }">
+      <div
+        :style="{
+          width: '100%',
+          height: activeKey == 'list' ? '100%' : '0px',
+          overflow: 'hidden'
+        }"
+      >
+        <template-page
+          ref="pageRef"
+          :get-list="getList"
+          :table-attributes="tableAttributes"
+          :table-events="tableEvents"
+          :options-evens-group="optionsEvensGroup"
+          :moreParameters="moreParameters"
+          :column-parsing="columnParsing"
+          :exportList="exportList"
+          :operation="operation()"
+        >
+        </template-page>
+      </div>
+      <div v-if="~['add', 'edit'].indexOf(activeKey)">
+        <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module
+            title=""
+            label-width="110px"
+            :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="data.removeTab()">取 消</el-button>
+          <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
+        </div>
+      </div>
+    </template>
+  </zj-tab-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
+import {
+  dailyBankList,
+  dailyBankListExport,
+  dailyBankTemplateImport,
+  dailyBankDelete,
+  dailyBankAdd,
+  dailyBankUpdate,
+  dailyBankDetail
+} from '@/api/bankAccount'
+export default {
+  components: { TemplatePage, ImageUpload },
+  mixins: [import_mixin, operation_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      // 表单
+      formData: {
+        bankAccount: '',
+        bankAccountName: '',
+        bankAddr: '',
+        companyName: '',
+        companyWechatId: '',
+        depositBank: '',
+        idcard: '',
+        mobile: '',
+        remark: '',
+        websitId: '',
+        websitName: '',
+        workerName: '',
+        workerNumber: ''
+      }
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.$refs.tabPage.addTab({
+                  // 对应显示的模块
+                  activeKey: 'add',
+                  // 唯一标识
+                  key: 'add',
+                  // 页签名称
+                  label: '新增',
+                  // 打开时事件
+                  triggerEvent: () => {},
+                  // 关闭时事件
+                  closeEvent: () => {}
+                })
+              }
+            })
+          ]
+        ],
+        [
+          [
+            this.optionsEvensAuth('import', ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(dailyBankTemplateImport, moduleName)
+                }
+              }
+            })
+          ]
+        ]
+      ]
+    },
+    formItems() {
+      return [
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: true
+          },
+          formItemAttributes: {
+            label: '所属商户',
+            prop: 'companyName',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '师傅名称',
+            prop: 'workerName',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '身份证',
+            prop: 'idcard',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '联系电话',
+            prop: 'mobile',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '银行卡',
+            prop: 'bankAccount',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '户名',
+            prop: 'bankAccountName',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '开户行名称',
+            prop: 'depositBank',
+            rules: [...required]
+          }
+        },
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: {
+            disabled: false
+          },
+          formItemAttributes: {
+            label: '开户行地址',
+            prop: 'bankAddr',
+            rules: []
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          attributes: {
+            disabled: false,
+            type: 'textarea',
+            rows: 2
+          },
+          formItemAttributes: {
+            label: '备注',
+            prop: 'remark',
+            rules: []
+          }
+        }
+      ]
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      try {
+        cb && cb(p)
+        return dailyBankList(p)
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    // 列表导出函数
+    exportList: dailyBankListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {}
+        },
+        del: {
+          prompt: '确定删除吗?',
+          click: ({ row, index, column }) => {
+            dailyBankDelete({ id: row.id }).then(res => {
+              this.$message({
+                type: 'success',
+                message: '删除成功!'
+              })
+              this.$refs?.pageRef?.refreshList()
+            })
+          }
+        }
+      })
+    },
+    formConfirm(removeTab) {
+      removeTab()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 8 - 0
src/views/userManagement/masterManagement/index.vue

@@ -566,6 +566,14 @@ export default {
     },
     },
     audit(examineStatusEnum, removeTab) {
     audit(examineStatusEnum, removeTab) {
       memberAudit({
       memberAudit({
+        userId: this.formData.userId,
+        websitId: this.formData.websitId,
+        bankAccount: this.formData.bankAccount,
+        workerNumber: this.formData.workerNumber,
+        isEs: this.formData.isEs,
+        idCard: this.formData.idCard,
+        idCardImg: this.formData.idCardImg[0].url,
+        name: this.formData.nickName,
         examineStatusEnum,
         examineStatusEnum,
         examineRemark: this.formData.examineRemark,
         examineRemark: this.formData.examineRemark,
         id: this.formData.id
         id: this.formData.id

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

@@ -1,7 +1,12 @@
 import { getClassifyList } from '@/api/goods'
 import { getClassifyList } from '@/api/goods'
 import { getDataDictionary } from '@/api/dataDictionary.js'
 import { getDataDictionary } from '@/api/dataDictionary.js'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { orderBaseProductList, orderBaseProductAdd, orderBaseProductUpdate, orderBaseProductDelete } from "@/api/workOrderPool.js"
+import {
+  orderBaseProductList,
+  orderBaseProductAdd,
+  orderBaseProductUpdate,
+  orderBaseProductDelete
+} from '@/api/workOrderPool.js'
 export default {
 export default {
   data() {
   data() {
     return {
     return {
@@ -20,25 +25,39 @@ export default {
             prop: 'brandId'
             prop: 'brandId'
           },
           },
           render: (h, { row, column, index }) => {
           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={this.orderInfo.isCj ? [] : []}>
-                <el-select
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  onChange={(val) => {
-                    if (val) {
-                      var data = this.orderBrands.find(item => item.value == val)
-                      row.brandName = data.label
-                    } else {
-                      row.brandName = ""
-                    }
-                  }}
-                  placeholder="请选择">
-                  {this.orderBrands.map((item, index_) => <el-option key={index_} label={item.label} value={item.value}></el-option>)}
-                </el-select>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row.brandName}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <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]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    onChange={val => {
+                      if (val) {
+                        var data = this.orderBrands.find(item => item.value == val)
+                        row.brandName = data.label
+                      } else {
+                        row.brandName = ''
+                      }
+                    }}
+                    placeholder="请选择"
+                  >
+                    {this.orderBrands.map((item, index_) => (
+                      <el-option key={index_} label={item.label} value={item.value}></el-option>
+                    ))}
+                  </el-select>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row.brandName}</div>
+            )
           }
           }
         },
         },
         {
         {
@@ -47,29 +66,43 @@ export default {
             prop: 'mainId'
             prop: 'mainId'
           },
           },
           render: (h, { row, column, index }) => {
           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={this.orderInfo.isCj ? [] : required}>
-                <el-select
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  onChange={(val) => {
-                    row.smallId = ""
-                    row.smallName = ""
-                    if (val) {
-                      var data = this.classifyList.find(item => item.categoryId == val)
-                      row.mainName = data.name
-                      row.imgUrl = data.imgUrl
-                    } else {
-                      row.mainName = ""
-                      row.imgUrl = ""
-                    }
-                  }}
-                  placeholder="请选择">
-                  {this.classifyList.map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
-                </el-select>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row.mainName}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <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]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    onChange={val => {
+                      row.smallId = ''
+                      row.smallName = ''
+                      if (val) {
+                        var data = this.classifyList.find(item => item.categoryId == val)
+                        row.mainName = data.name
+                        row.imgUrl = data.imgUrl
+                      } else {
+                        row.mainName = ''
+                        row.imgUrl = ''
+                      }
+                    }}
+                    placeholder="请选择"
+                  >
+                    {this.classifyList.map((item, index_) => (
+                      <el-option key={index_} label={item.name} value={item.categoryId}></el-option>
+                    ))}
+                  </el-select>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row.mainName}</div>
+            )
           }
           }
         },
         },
         {
         {
@@ -78,25 +111,41 @@ export default {
             prop: 'smallId'
             prop: 'smallId'
           },
           },
           render: (h, { row, column, index }) => {
           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={this.orderInfo.isCj ? [] : []}>
-                <el-select
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  onChange={(val) => {
-                    if (val) {
-                      var data = this.classifyListLv2.find(item => item.categoryId == val)
-                      row.smallName = data.name
-                    } else {
-                      row.smallName = ""
-                    }
-                  }}
-                  placeholder="请选择">
-                  {this.classifyListLv2.filter(item => item.parentId === row.mainId).map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
-                </el-select>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row.smallName}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <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]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    onChange={val => {
+                      if (val) {
+                        var data = this.classifyListLv2.find(item => item.categoryId == val)
+                        row.smallName = data.name
+                      } else {
+                        row.smallName = ''
+                      }
+                    }}
+                    placeholder="请选择"
+                  >
+                    {this.classifyListLv2
+                      .filter(item => item.parentId === row.mainId)
+                      .map((item, index_) => (
+                        <el-option key={index_} label={item.name} value={item.categoryId}></el-option>
+                      ))}
+                  </el-select>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row.smallName}</div>
+            )
           }
           }
         },
         },
         {
         {
@@ -105,17 +154,26 @@ export default {
             prop: 'productName'
             prop: 'productName'
           },
           },
           render: (h, { row, column, index }) => {
           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}`}>
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
                 >
                 >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
           }
         },
         },
         {
         {
@@ -124,17 +182,22 @@ export default {
             prop: 'insideCode'
             prop: 'insideCode'
           },
           },
           render: (h, { row, column, index }) => {
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px">
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
-                >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item label="" label-width="0px">
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
           }
         },
         },
         {
         {
@@ -143,17 +206,27 @@ export default {
             prop: 'num'
             prop: 'num'
           },
           },
           render: (h, { row, column, index }) => {
           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={this.orderInfo.isCj ? [] : required}>
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item
+                  label=""
+                  label-width="0px"
+                  prop={`orderProducts.${index}.${column.columnAttributes.prop}`}
+                  rules={this.orderInfo.isCj ? [] : required}
                 >
                 >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
           }
         },
         },
         {
         {
@@ -162,17 +235,22 @@ export default {
             prop: 'remark'
             prop: 'remark'
           },
           },
           render: (h, { row, column, index }) => {
           render: (h, { row, column, index }) => {
-            return this.isEditIndex == index ? <div class="redbordererr">
-              <el-form-item label="" label-width="0px">
-                <el-input
-                  disabled={!this.formOptions.orderProducts.isEdit}
-                  value={row[column.columnAttributes.prop]}
-                  onInput={(val) => { row[column.columnAttributes.prop] = val }}
-                  placeholder="请输入内容"
-                >
-                </el-input>
-              </el-form-item>
-            </div> : <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            return this.isEditIndex == index ? (
+              <div class="redbordererr">
+                <el-form-item label="" label-width="0px">
+                  <el-input
+                    disabled={!this.formOptions.orderProducts.isEdit}
+                    value={row[column.columnAttributes.prop]}
+                    onInput={val => {
+                      row[column.columnAttributes.prop] = val
+                    }}
+                    placeholder="请输入内容"
+                  ></el-input>
+                </el-form-item>
+              </div>
+            ) : (
+              <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+            )
           }
           }
         },
         },
         ...(() => {
         ...(() => {
@@ -180,22 +258,43 @@ export default {
             return [
             return [
               {
               {
                 columnAttributes: {
                 columnAttributes: {
-                  label: '操作',
+                  label: '操作'
                 },
                 },
                 render: (h, { row, column, index }) => {
                 render: (h, { row, column, index }) => {
-                  return <div style="padding-left:10px">
-                    <el-button type="text" onClick={() => {
-                      this.delProduct(row, index)
-                    }}>删除</el-button>
-                    {this.isEditIndex == index && <el-button type="text" onClick={() => {
-                      this.eidtProduct(row, index)
-                    }}>确定</el-button>}
-                    {this.isEditIndex == -1 && <el-button type="text" onClick={() => {
-                      this.isEditIndex = index
-                    }}>编辑</el-button>}
-                  </div>
+                  return (
+                    <div style="padding-left:10px">
+                      <el-button
+                        type="text"
+                        onClick={() => {
+                          this.delProduct(row, index)
+                        }}
+                      >
+                        删除
+                      </el-button>
+                      {this.isEditIndex == index && (
+                        <el-button
+                          type="text"
+                          onClick={() => {
+                            this.eidtProduct(row, index)
+                          }}
+                        >
+                          确定
+                        </el-button>
+                      )}
+                      {this.isEditIndex == -1 && (
+                        <el-button
+                          type="text"
+                          onClick={() => {
+                            this.isEditIndex = index
+                          }}
+                        >
+                          编辑
+                        </el-button>
+                      )}
+                    </div>
+                  )
                 }
                 }
-              },
+              }
             ]
             ]
           }
           }
           return []
           return []
@@ -203,74 +302,89 @@ export default {
       ]
       ]
     },
     },
     product() {
     product() {
-      return [{
-        isShow: this.formOptions.orderProducts.isShow,
-        name: 'slot-component',
-        md: 24,
-        formItemAttributes: {
-          label: '',
-          'label-width': '0px',
-          prop: 'orderProducts',
-          errLabel: '产品信息',
-          rules: this.formOptions.orderProducts.isRules
-        },
-        render: (h, { props }) => {
-          return (
-            <div>
-              {this.formOptions.orderProducts.isEdit ? <div>
-                <el-button size="mini" type="primary" onClick={() => {
-                  this.appointVerify(this.getVfyKey(this.isEditIndex, false), (v) => {
-                    if (v) {
-                      try {
-                        this.orderInfo.orderProducts.map((item, index_) => {
-                          var row = this.orderInfo.orderProducts[index_ + 1]
-                          if (row) {
-                            if (
-                              `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` == `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}`
-                            ) {
-                              throw new Error('');
+      return [
+        {
+          isShow: this.formOptions.orderProducts.isShow,
+          name: 'slot-component',
+          md: 24,
+          formItemAttributes: {
+            label: '',
+            'label-width': '0px',
+            prop: 'orderProducts',
+            errLabel: '产品信息',
+            rules: this.formOptions.orderProducts.isRules
+          },
+          render: (h, { props }) => {
+            return (
+              <div>
+                {this.formOptions.orderProducts.isEdit ? (
+                  <div>
+                    <el-button
+                      size="mini"
+                      type="primary"
+                      onClick={() => {
+                        this.appointVerify(this.getVfyKey(this.isEditIndex, false), v => {
+                          if (v) {
+                            try {
+                              this.orderInfo.orderProducts.map((item, index_) => {
+                                var row = this.orderInfo.orderProducts[index_ + 1]
+                                if (row) {
+                                  if (
+                                    `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` ==
+                                    `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}`
+                                  ) {
+                                    throw new Error('')
+                                  }
+                                }
+                              })
+                            } catch (error) {
+                              this.$message.warning('产品机型重复')
+                              return
                             }
                             }
+                            this.isEditIndex = 0
+                            this.orderInfo.orderProducts.unshift({
+                              brandId: '',
+                              brandName: '',
+                              createBy: '',
+                              createTime: '',
+                              mainId: '',
+                              mainName: '',
+                              num: '',
+                              insideCode: '',
+                              orderBaseId: this.id || '',
+                              productId: '',
+                              productName: '',
+                              remark: '',
+                              smallId: '',
+                              smallName: '',
+                              imgUrl: ''
+                            })
                           }
                           }
                         })
                         })
-                      } catch (error) {
-                        this.$message.warning('产品机型重复')
-                        return
-                      }
-                      this.isEditIndex = 0
-                      this.orderInfo.orderProducts.unshift({
-                        "brandId": "",
-                        "brandName": "",
-                        "createBy": "",
-                        "createTime": "",
-                        "mainId": "",
-                        "mainName": "",
-                        "num": "",
-                        "insideCode": "",
-                        "orderBaseId": this.id || '',
-                        "productId": "",
-                        "productName": "",
-                        "remark": "",
-                        "smallId": "",
-                        "smallName": "",
-                        "imgUrl": ""
-                      })
-                    }
-                  })
-                }}>新增</el-button>
-              </div> : null}
-              <zj-table
-                columns={this.productColumns}
-                table-data={this.orderInfo.orderProducts}
-              />
-            </div>
-          )
+                      }}
+                    >
+                      新增
+                    </el-button>
+                  </div>
+                ) : null}
+                <zj-table columns={this.productColumns} table-data={this.orderInfo.orderProducts} />
+              </div>
+            )
+          }
         }
         }
-      }]
-    },
+      ]
+    }
   },
   },
   created() {
   created() {
     // 获取品牌
     // 获取品牌
-    getDataDictionary({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.dict_type", "compare": "=", "value": "BRAND" }] }).then(res => {
+    getDataDictionary({
+      pageNum: 1,
+      pageSize: -1,
+      params: [
+        { param: 'a.status', compare: '=', value: 'ON' },
+        { param: 'a.dict_type', compare: '=', value: 'BRAND' }
+      ]
+    }).then(res => {
       this.orderBrands = res.data.records.map(item => ({
       this.orderBrands = res.data.records.map(item => ({
         value: item.dictCode,
         value: item.dictCode,
         label: item.dictValue
         label: item.dictValue
@@ -285,7 +399,7 @@ export default {
         return {
         return {
           ...data
           ...data
         }
         }
-      });
+      })
       this.classifyListLv2 = classifyListLv2
       this.classifyListLv2 = classifyListLv2
     })
     })
   },
   },
@@ -294,9 +408,7 @@ export default {
       return [
       return [
         ...(() => {
         ...(() => {
           if (bool) {
           if (bool) {
-            return [
-              `orderProducts`,
-            ]
+            return [`orderProducts`]
           }
           }
           return []
           return []
         })(),
         })(),
@@ -308,7 +420,7 @@ export default {
               // `orderProducts.${index}.smallId`,
               // `orderProducts.${index}.smallId`,
               `orderProducts.${index}.productName`,
               `orderProducts.${index}.productName`,
               `orderProducts.${index}.num`,
               `orderProducts.${index}.num`,
-              `orderProducts.${index}.remark`,
+              `orderProducts.${index}.remark`
             ]
             ]
           }
           }
           return []
           return []
@@ -320,7 +432,7 @@ export default {
       if (this.id) {
       if (this.id) {
         orderBaseProductList({
         orderBaseProductList({
           orderBaseId: this.id
           orderBaseId: this.id
-        }).then((res) => {
+        }).then(res => {
           this.orderInfo.orderProducts = res.data || []
           this.orderInfo.orderProducts = res.data || []
         })
         })
       }
       }
@@ -329,20 +441,21 @@ export default {
       try {
       try {
         this.orderInfo.orderProducts.map((item, index_) => {
         this.orderInfo.orderProducts.map((item, index_) => {
           if (
           if (
-            `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` == `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}` &&
+            `${row.brandId}_${row.mainId}_${row.smallId}_${row.productName}` ==
+              `${item.brandId}_${item.mainId}_${item.smallId}_${item.productName}` &&
             index_ != index
             index_ != index
           ) {
           ) {
-            throw new Error('');
+            throw new Error('')
           }
           }
         })
         })
       } catch (error) {
       } catch (error) {
         this.$message.warning('产品机型重复')
         this.$message.warning('产品机型重复')
         return
         return
       }
       }
-      this.appointVerify(this.getVfyKey(this.isEditIndex), (v) => {
+      this.appointVerify(this.getVfyKey(this.isEditIndex), v => {
         if (v) {
         if (v) {
           if (this.id) {
           if (this.id) {
-            [orderBaseProductAdd, orderBaseProductUpdate][row.id ? 1 : 0](row).then(res => {
+            ;[orderBaseProductAdd, orderBaseProductUpdate][row.id ? 1 : 0](row).then(res => {
               this.isEditIndex = -1
               this.isEditIndex = -1
               this.getOrderBaseProduct()
               this.getOrderBaseProduct()
               this.getOrderBaseLogList()
               this.getOrderBaseLogList()
@@ -354,7 +467,7 @@ export default {
       })
       })
     },
     },
     delProduct(row, index) {
     delProduct(row, index) {
-      this.appointVerify(this.getVfyKey(this.isEditIndex), (v) => {
+      this.appointVerify(this.getVfyKey(this.isEditIndex), v => {
         if (v && this.id && row.id) {
         if (v && this.id && row.id) {
           orderBaseProductDelete({
           orderBaseProductDelete({
             orderProductId: row.id
             orderProductId: row.id
@@ -367,5 +480,5 @@ export default {
         }
         }
       })
       })
     }
     }
-  },
+  }
 }
 }

+ 30 - 16
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/serviceInfo.js

@@ -1,4 +1,4 @@
-import { listPageV2 } from "@/api/workOrder/orderType";
+import { listPageV2 } from '@/api/workOrder/orderType'
 import { getDataDictionary } from '@/api/dataDictionary.js'
 import { getDataDictionary } from '@/api/dataDictionary.js'
 
 
 export default {
 export default {
@@ -28,7 +28,7 @@ export default {
             rules: this.formOptions.orderSmallType.isRules
             rules: this.formOptions.orderSmallType.isRules
           },
           },
           events: {
           events: {
-            change: (val) => {
+            change: val => {
               if (val) {
               if (val) {
                 this.orderInfo.orderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
                 this.orderInfo.orderSmallTypeText = this.orderSmallTypeData.find(item => item.value == val).label
               } else {
               } else {
@@ -42,7 +42,7 @@ export default {
           name: 'el-input',
           name: 'el-input',
           md: 6,
           md: 6,
           attributes: {
           attributes: {
-            disabled: !this.formOptions.orderSmallType.isEdit,
+            disabled: !this.formOptions.orderSmallType.isEdit
           },
           },
           formItemAttributes: {
           formItemAttributes: {
             label: '工单类型',
             label: '工单类型',
@@ -67,7 +67,7 @@ export default {
             rules: this.formOptions.orderChannelId.isRules
             rules: this.formOptions.orderChannelId.isRules
           },
           },
           events: {
           events: {
-            change: (val) => {
+            change: val => {
               if (val) {
               if (val) {
                 this.orderInfo.orderChannelText = this.orderChannels.find(item => item.value == val).label
                 this.orderInfo.orderChannelText = this.orderChannels.find(item => item.value == val).label
               } else {
               } else {
@@ -134,7 +134,7 @@ export default {
             'value-format': 'yyyy-MM-dd HH:mm:ss',
             'value-format': 'yyyy-MM-dd HH:mm:ss',
             'picker-options': {
             'picker-options': {
               disabledDate: time => {
               disabledDate: time => {
-                return time.getTime() < (Date.now() - 86400000)
+                return time.getTime() < Date.now() - 86400000
               }
               }
             }
             }
           },
           },
@@ -148,7 +148,12 @@ export default {
           isShow: this.formOptions.saleType.isShow,
           isShow: this.formOptions.saleType.isShow,
           name: 'el-select',
           name: 'el-select',
           md: 6,
           md: 6,
-          options: [{ value: 1, label: '零售' }, { value: 2, label: '工程' }, { value: 3, label: '延保' }, { value: 4, label: '工程维保' }],
+          options: [
+            { value: 1, label: '零售' },
+            { value: 2, label: '工程' },
+            { value: 3, label: '延保' },
+            { value: 4, label: '工程维保' }
+          ],
           attributes: {
           attributes: {
             disabled: !this.formOptions.saleType.isEdit,
             disabled: !this.formOptions.saleType.isEdit,
             placeholder: '请选择',
             placeholder: '请选择',
@@ -188,27 +193,36 @@ export default {
             prop: 'source',
             prop: 'source',
             rules: this.formOptions.source.isRules
             rules: this.formOptions.source.isRules
           }
           }
-        },
+        }
       ]
       ]
     }
     }
   },
   },
   created() {
   created() {
     // 普通工单选择网点数据
     // 普通工单选择网点数据
-    if (!!~[1,2,3].indexOf(this?.workOrderType)) {
+    if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
       // 获取工单类型
       // 获取工单类型
-      listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "true" }] }).then(res => {
-        this.orderSmallTypeData = res.data.records.map(item => ({
-          value: item.id,
-          label: item.orderSmallTypeText
-        }))
-      })
+      listPageV2({ pageNum: 1, pageSize: -1, params: [{ param: 'a.status', compare: '=', value: 'true' }] }).then(
+        res => {
+          this.orderSmallTypeData = res.data.records.map(item => ({
+            value: item.id,
+            label: item.orderSmallTypeText
+          }))
+        }
+      )
     }
     }
     // 获取工单来源
     // 获取工单来源
-    getDataDictionary({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "ON" }, { "param": "a.dict_type", "compare": "=", "value": "ORDER_CHANNEL" }] }).then(res => {
+    getDataDictionary({
+      pageNum: 1,
+      pageSize: -1,
+      params: [
+        { param: 'a.status', compare: '=', value: 'ON' },
+        { param: 'a.dict_type', compare: '=', value: 'ORDER_CHANNEL' }
+      ]
+    }).then(res => {
       this.orderChannels = res.data.records.map(item => ({
       this.orderChannels = res.data.records.map(item => ({
         value: item.dictCode,
         value: item.dictCode,
         label: item.dictValue
         label: item.dictValue
       }))
       }))
     })
     })
-  },
+  }
 }
 }