408249787 11 maanden geleden
bovenliggende
commit
80e1f6b560

+ 2 - 1
src/utils/dict.js

@@ -413,7 +413,8 @@ DictCache.VALUE = {
     SB_SCRAP_FORM: 'sb_info_scrap',
     SB_ALLOCATE_FORM: 'sb_info_allocate',
     SB_STOP_FORM: 'sb_info_stop',
-    OUT_STORE_BACK: 'out_store_back'
+    OUT_STORE_BACK: 'out_store_back',
+    OUT_STORE_BACK_GWL_1: 'out_store_back_gwl_1'
   },
   SB_INFO_AUDIT_MODEL_NAME: {
     'sb_info_scrap': '设备报废审批', // 报废

+ 39 - 37
src/views/activiti/task/MyTask.vue

@@ -6,7 +6,7 @@
           <a-row :gutter="48">
             <a-col :md="8" :sm="24">
               <a-form-item label="关键字">
-                <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/类型名称"/>
+                <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/类型名称" />
               </a-form-item>
             </a-col>
             <a-col :md="8 || 24" :sm="24">
@@ -19,14 +19,7 @@
         </a-form>
       </div>
 
-      <s-table
-        ref="table"
-        size="small"
-        rowKey="id"
-        :columns="columns"
-        :data="loadData"
-        showPagination="auto"
-      >
+      <s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" showPagination="auto">
         <span slot="action" slot-scope="record">
           <template>
             <a @click="handleAudit(record)">审批</a>
@@ -36,9 +29,9 @@
         </span>
       </s-table>
     </div>
-    <detail-audit-scrap ref="detailAuditScrapModal" @ok="handleOk"/>
-    <detail-y-y-audit ref="detailYYAuditModal" @ok="handleOk"/>
-    <assign-form ref="assignForm" @ok="handleOk"/>
+    <detail-audit-scrap ref="detailAuditScrapModal" @ok="handleOk" />
+    <detail-y-y-audit ref="detailYYAuditModal" @ok="handleOk" />
+    <assign-form ref="assignForm" @ok="handleOk" />
   </a-card>
 </template>
 
@@ -61,19 +54,20 @@ export default {
     DetailYYAudit,
     AssignForm
   },
-  data () {
+  data() {
     return {
       mdl: {},
       // 查询参数
-      queryParam: {
-      },
+      queryParam: {},
       // 表头
       columns: [
         {
           title: '序号',
           dataIndex: 'index',
           customRender: (text, record, index) => {
-            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize +
+              index +
+              1}`
           }
         },
         {
@@ -105,10 +99,9 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return getTaskPage(Object.assign(parameter, this.queryParam))
-          .then(res => {
-            return res.data
-          })
+        return getTaskPage(Object.assign(parameter, this.queryParam)).then(res => {
+          return res.data
+        })
       },
       selectedRowKeys: [],
       selectedRows: [],
@@ -116,7 +109,12 @@ export default {
       visible: true,
 
       options: {
-        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        alert: {
+          show: true,
+          clear: () => {
+            this.selectedRowKeys = []
+          }
+        },
         rowSelection: {
           selectedRowKeys: this.selectedRowKeys,
           onChange: this.onSelectChange
@@ -125,14 +123,19 @@ export default {
       optionAlertShow: false
     }
   },
-  created () {
+  created() {
     this.tableOption()
   },
   methods: {
-    tableOption () {
+    tableOption() {
       if (!this.optionAlertShow) {
         this.options = {
-          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          alert: {
+            show: true,
+            clear: () => {
+              this.selectedRowKeys = []
+            }
+          },
           rowSelection: {
             selectedRowKeys: this.selectedRowKeys,
             onChange: this.onSelectChange,
@@ -153,9 +156,10 @@ export default {
         this.optionAlertShow = false
       }
     },
-    handleAudit (record) {
+    handleAudit(record) {
       this.visible = false
-      if (record.targetCode === 'out_store_back') { // 仓库审批跳转到仓库审批页面
+      if (record.targetCode === 'out_store_back' || record.targetCode === 'out_store_back_gwl_1') {
+        // 仓库审批跳转到仓库审批页面
         fetchOutStoreForm({ id: record.targetId }).then(res => {
           const templateData = res.data
           const recordTemp = res.data
@@ -171,13 +175,14 @@ export default {
           const recordTemp = res.data
           recordTemp.taskId = record.taskId
           this.$refs.detailAuditScrapModal.base(recordTemp, templateData)
-        /* record.remark = res.data.remark
+          /* record.remark = res.data.remark
         this.$refs.detailAuditScrapModal.base(record, templateData) */
         })
       }
     },
-    handleChange (record) {
-      if (record.targetCode === 'out_store_back') { // 仓库审批
+    handleChange(record) {
+      if (record.targetCode === 'out_store_back' || record.targetCode === 'out_store_back_gwl_1') {
+        // 仓库审批
         this.$refs.assignForm.base(record)
       } else {
         fetchCustomFieldTemplateData({ id: record.targetId }).then(res => {
@@ -186,22 +191,19 @@ export default {
         })
       }
     },
-    handleOk () {
+    handleOk() {
       this.visible = true
       this.$refs.table.refresh()
     },
-    onSelectChange (selectedRowKeys, selectedRows) {
+    onSelectChange(selectedRowKeys, selectedRows) {
       this.selectedRowKeys = selectedRowKeys
       this.selectedRows = selectedRows
     },
-    resetSearchForm () {
-      this.queryParam = {
-      }
+    resetSearchForm() {
+      this.queryParam = {}
       this.$refs.table.refresh(true)
     }
   }
 }
 </script>
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 39 - 36
src/views/activiti/task/MyTaskClaim.vue

@@ -6,7 +6,7 @@
           <a-row :gutter="48">
             <a-col :md="8" :sm="24">
               <a-form-item label="关键字">
-                <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/类型名称"/>
+                <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/类型名称" />
               </a-form-item>
             </a-col>
             <a-col :md="8 || 24" :sm="24">
@@ -19,14 +19,7 @@
         </a-form>
       </div>
 
-      <s-table
-        ref="table"
-        size="small"
-        rowKey="id"
-        :columns="columns"
-        :data="loadData"
-        showPagination="auto"
-      >
+      <s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" showPagination="auto">
         <span slot="action" slot-scope="record">
           <template>
             <a @click="handleClaim(record)">签收</a>
@@ -34,7 +27,7 @@
         </span>
       </s-table>
     </div>
-    <detail-audit-scrap ref="detailAuditScrapModal" @ok="handleOk"/>
+    <detail-audit-scrap ref="detailAuditScrapModal" @ok="handleOk" />
   </a-card>
 </template>
 
@@ -54,19 +47,20 @@ export default {
     DetailAuditScrap,
     AssignForm
   },
-  data () {
+  data() {
     return {
       mdl: {},
       // 查询参数
-      queryParam: {
-      },
+      queryParam: {},
       // 表头
       columns: [
         {
           title: '序号',
           dataIndex: 'index',
           customRender: (text, record, index) => {
-            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize +
+              index +
+              1}`
           }
         },
         {
@@ -98,10 +92,9 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return getTaskPageClaim(Object.assign(parameter, this.queryParam))
-          .then(res => {
-            return res.data
-          })
+        return getTaskPageClaim(Object.assign(parameter, this.queryParam)).then(res => {
+          return res.data
+        })
       },
       selectedRowKeys: [],
       selectedRows: [],
@@ -109,7 +102,12 @@ export default {
       visible: true,
 
       options: {
-        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        alert: {
+          show: true,
+          clear: () => {
+            this.selectedRowKeys = []
+          }
+        },
         rowSelection: {
           selectedRowKeys: this.selectedRowKeys,
           onChange: this.onSelectChange
@@ -118,14 +116,19 @@ export default {
       optionAlertShow: false
     }
   },
-  created () {
+  created() {
     this.tableOption()
   },
   methods: {
-    tableOption () {
+    tableOption() {
       if (!this.optionAlertShow) {
         this.options = {
-          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          alert: {
+            show: true,
+            clear: () => {
+              this.selectedRowKeys = []
+            }
+          },
           rowSelection: {
             selectedRowKeys: this.selectedRowKeys,
             onChange: this.onSelectChange,
@@ -146,44 +149,44 @@ export default {
         this.optionAlertShow = false
       }
     },
-    handleClaim (record) {
+    handleClaim(record) {
       this.confirmLoading = true
-      if (record.targetCode === 'out_store_back') { // 仓库审批
+      if (record.targetCode === 'out_store_back' || record.targetCode === 'out_store_back_gwl_1') {
+        // 仓库审批
         claimOutStoreFormForAudit({ taskId: record.taskId })
-          .then((res) => {
+          .then(res => {
             this.$message.info(res.data)
             this.handleOk()
-          }).catch(() => {
+          })
+          .catch(() => {
             this.confirmLoading = false
           })
       } else {
         fetchCustomFieldTemplateData({ id: record.targetId }).then(res => {
           claimSbInfoScrapForAudit({ taskId: record.taskId, auditModelKey: res.data.remark })
-            .then((res) => {
+            .then(res => {
               this.$message.info(res.data)
               this.handleOk()
-            }).catch(() => {
+            })
+            .catch(() => {
               this.confirmLoading = false
             })
         })
       }
     },
-    handleOk () {
+    handleOk() {
       this.visible = true
       this.$refs.table.refresh()
     },
-    onSelectChange (selectedRowKeys, selectedRows) {
+    onSelectChange(selectedRowKeys, selectedRows) {
       this.selectedRowKeys = selectedRowKeys
       this.selectedRows = selectedRows
     },
-    resetSearchForm () {
-      this.queryParam = {
-      }
+    resetSearchForm() {
+      this.queryParam = {}
       this.$refs.table.refresh(true)
     }
   }
 }
 </script>
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 39 - 25
src/views/activiti/task/MyTaskFinish.vue

@@ -6,7 +6,7 @@
           <a-row :gutter="48">
             <a-col :md="8" :sm="24">
               <a-form-item label="关键字">
-                <a-input v-model.trim="queryParam.keyword" placeholder="请输单号"/>
+                <a-input v-model.trim="queryParam.keyword" placeholder="请输单号" />
               </a-form-item>
             </a-col>
             <a-col :md="8 || 24" :sm="24">
@@ -25,7 +25,7 @@
         rowKey="id"
         :columns="columns"
         :data="loadData"
-        :scroll="{x: 1500, y: BaseTool.Constant.scrollY}"
+        :scroll="{ x: 1500, y: BaseTool.Constant.scrollY }"
         showPagination="auto"
       >
         <span slot="action" slot-scope="record">
@@ -35,7 +35,7 @@
         </span>
       </s-table>
     </div>
-    <detail-audit-scrap :audit="false" ref="detailAuditScrapModal" @ok="handleOk"/>
+    <detail-audit-scrap :audit="false" ref="detailAuditScrapModal" @ok="handleOk" />
   </a-card>
 </template>
 
@@ -55,7 +55,7 @@ export default {
     DetailAuditScrap,
     AssignForm
   },
-  data () {
+  data() {
     return {
       mdl: {},
       statusMap: {},
@@ -74,7 +74,9 @@ export default {
           checked: true,
           width: 80,
           customRender: (text, record, index) => {
-            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize +
+              index +
+              1}`
           }
         },
         {
@@ -129,8 +131,13 @@ export default {
           dataIndex: 'status',
           fixed: 'right',
           customRender: (text, record, index) => {
-            return this.BaseTool.Table.statusCustomRenderDict(this, text, record,
-              this.DictCache.COLOR.SB_ALLOCATE_APPLY_STATUS, this.statusMap)
+            return this.BaseTool.Table.statusCustomRenderDict(
+              this,
+              text,
+              record,
+              this.DictCache.COLOR.SB_ALLOCATE_APPLY_STATUS,
+              this.statusMap
+            )
           }
         },
         {
@@ -145,10 +152,9 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        return getLocalTaskPageFinish(Object.assign(parameter, this.queryParam))
-          .then(res => {
-            return res.data
-          })
+        return getLocalTaskPageFinish(Object.assign(parameter, this.queryParam)).then(res => {
+          return res.data
+        })
       },
       selectedRowKeys: [],
       selectedRows: [],
@@ -156,7 +162,12 @@ export default {
       visible: true,
 
       options: {
-        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        alert: {
+          show: true,
+          clear: () => {
+            this.selectedRowKeys = []
+          }
+        },
         rowSelection: {
           selectedRowKeys: this.selectedRowKeys,
           onChange: this.onSelectChange
@@ -165,15 +176,20 @@ export default {
       optionAlertShow: false
     }
   },
-  created () {
+  created() {
     this.tableOption()
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.ACTIVITI_FORM_STATUS)
   },
   methods: {
-    tableOption () {
+    tableOption() {
       if (!this.optionAlertShow) {
         this.options = {
-          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          alert: {
+            show: true,
+            clear: () => {
+              this.selectedRowKeys = []
+            }
+          },
           rowSelection: {
             selectedRowKeys: this.selectedRowKeys,
             onChange: this.onSelectChange,
@@ -194,9 +210,10 @@ export default {
         this.optionAlertShow = false
       }
     },
-    handleView (record) {
+    handleView(record) {
       this.visible = false
-      if (record.targetCode === 'out_store_back') { // 仓库审批跳转到仓库审批页面
+      if (record.targetCode === 'out_store_back' || record.targetCode === 'out_store_back_gwl_1') {
+        // 仓库审批跳转到仓库审批页面
         fetchOutStoreForm({ id: record.targetId }).then(res => {
           const templateData = res.data
           const recordTemp = res.data
@@ -218,22 +235,19 @@ export default {
         this.$refs.detailAuditScrapModal.base(record, templateData)
       }) */
     },
-    handleOk () {
+    handleOk() {
       this.visible = true
       this.$refs.table.refresh()
     },
-    onSelectChange (selectedRowKeys, selectedRows) {
+    onSelectChange(selectedRowKeys, selectedRows) {
       this.selectedRowKeys = selectedRowKeys
       this.selectedRows = selectedRows
     },
-    resetSearchForm () {
-      this.queryParam = {
-      }
+    resetSearchForm() {
+      this.queryParam = {}
       this.$refs.table.refresh(true)
     }
   }
 }
 </script>
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 26 - 32
src/views/activiti/task/modules/AssignForm.vue

@@ -1,25 +1,15 @@
 <template>
-  <a-modal
-    :title="modalTitle"
-    :width="800"
-    :visible="visible"
-    :confirmLoading="confirmLoading"
-    @cancel="handleCancel"
-  >
+  <a-modal :title="modalTitle" :width="800" :visible="visible" :confirmLoading="confirmLoading" @cancel="handleCancel">
     <a-form :form="form">
       <row-list :col="2">
         <row-item>
-          <a-form-item
-            label="转签人"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-select v-decorator="['changeUser', {rules: [{required: true, message: '转签人不能为空'}]}]" placeholder="请选择">
-              <a-select-option
-                v-for="item in userList"
-                :key="item.userId"
-                :label="item.realName"
-                :value="item.userId">{{ item.realName }}
+          <a-form-item label="转签人" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
+            <a-select
+              v-decorator="['changeUser', { rules: [{ required: true, message: '转签人不能为空' }] }]"
+              placeholder="请选择"
+            >
+              <a-select-option v-for="item in userList" :key="item.userId" :label="item.realName" :value="item.userId"
+                >{{ item.realName }}
               </a-select-option>
             </a-select>
           </a-form-item>
@@ -39,7 +29,7 @@ import { changeOutStoreFormForAudit } from '@/api/activiti/activiti-outstoreform
 
 export default {
   name: 'DispatchBaseForm',
-  data () {
+  data() {
     return {
       confirmLoading: false,
       modalTitle: null,
@@ -53,9 +43,8 @@ export default {
       userList: []
     }
   },
-  props: {
-  },
-  created () {
+  props: {},
+  created() {
     // 下拉框map
     this.sourceMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE)
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL)
@@ -63,19 +52,21 @@ export default {
     this.getUsers()
   },
   methods: {
-    base (record) {
+    base(record) {
       this.visible = true
       // 如果是空标识添加
       this.modalTitle = '派工'
       this.record = record
     },
-    getUsers () {
+    getUsers() {
       queryUser({ status: 1 }).then(res => {
         this.userList = res.data
       })
     },
-    save () {
-      const { form: { validateFieldsAndScroll } } = this
+    save() {
+      const {
+        form: { validateFieldsAndScroll }
+      } = this
       this.confirmLoading = true
       validateFieldsAndScroll((errors, values) => {
         if (errors) {
@@ -83,27 +74,30 @@ export default {
           return
         }
         values.taskId = this.record.taskId
-        if (this.record.targetCode === 'out_store_back') { // 仓库审批
+        if (this.record.targetCode === 'out_store_back' || this.record.targetCode === 'out_store_back_gwl_1') {
+          // 仓库审批
           changeOutStoreFormForAudit(values)
-            .then((res) => {
+            .then(res => {
               this.$message.info(res.data)
               this.handleOk()
-            }).catch(() => {
+            })
+            .catch(() => {
               this.confirmLoading = false
             })
         } else {
           values.auditModelKey = this.record.remark
           changeSbInfoScrapForAudit(values)
-            .then((res) => {
+            .then(res => {
               this.$message.info(res.data)
               this.handleCancel(values)
-            }).catch(() => {
+            })
+            .catch(() => {
               this.confirmLoading = false
             })
         }
       })
     },
-    handleCancel (values) {
+    handleCancel(values) {
       this.visible = false
       this.confirmLoading = false
       this.form.resetFields()

+ 29 - 26
src/views/sb/scraps/modules/DetailAudit.vue

@@ -9,7 +9,7 @@
     </a-row>
     <detail-list title="" :col="2">
       <detail-list-item term="类型">{{ model.auditName }}</detail-list-item>
-      <detail-list-item term="状态">{{ BaseTool.Object.getField(this.statusMap,model.status) }}</detail-list-item>
+      <detail-list-item term="状态">{{ BaseTool.Object.getField(this.statusMap, model.status) }}</detail-list-item>
       <detail-list-item term="申请人">{{ model.createdUserName }}</detail-list-item>
       <detail-list-item term="申请日期">{{ model.createdTime }}</detail-list-item>
     </detail-list>
@@ -50,7 +50,6 @@
       <detail-list-item term="仓库名称">{{ model.storeName }}</detail-list-item>
       <detail-list-item term="问题描述">{{ model.content }}</detail-list-item>
       <detail-list-item term="备注">{{ model.dataRemark }}</detail-list-item>
-
     </detail-list>
     <title-divider v-show="storeInfo" title="备件明细" width="90px"></title-divider>
     <a-table
@@ -59,7 +58,8 @@
       :data-source="model.detailList"
       :columns="columns"
       tableLayout="auto"
-      rowKey="cbatch">
+      rowKey="cbatch"
+    >
     </a-table>
     <history ref="history" :audit="audit" @ok="handleCancel"></history>
   </a-card>
@@ -83,7 +83,7 @@ export default {
       default: true
     }
   },
-  data () {
+  data() {
     return {
       confirmLoading: false,
       mdl: {},
@@ -97,23 +97,23 @@ export default {
       statusMap: {},
       task: {},
       model: {
-        'auditName': null,
-        'remark': null,
-        'status': null,
-        'createdUserName': null,
-        'createdTime': null,
-        'dataRemark': null,
-        'startTime': null,
-        'endTime': null,
-        'currentDeptName': null,
-        'targetDeptName': null,
-        'title': null,
-        'reason': null,
-        'stopDate': null,
-        'sbName': null,
-        'repairId': null,
-        'no': null,
-        'sbNo': null
+        auditName: null,
+        remark: null,
+        status: null,
+        createdUserName: null,
+        createdTime: null,
+        dataRemark: null,
+        startTime: null,
+        endTime: null,
+        currentDeptName: null,
+        targetDeptName: null,
+        title: null,
+        reason: null,
+        stopDate: null,
+        sbName: null,
+        repairId: null,
+        no: null,
+        sbNo: null
       },
       sbInfos: [],
       columns: [
@@ -166,12 +166,12 @@ export default {
       ]
     }
   },
-  created () {
+  created() {
     // 下拉框map
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.ACTIVITI_FORM_STATUS)
   },
   methods: {
-    base (record, model) {
+    base(record, model) {
       this.visible = true
       this.modalTitle = '详情'
       this.task = record
@@ -185,7 +185,10 @@ export default {
         this.sbInfoScrap = true
       } else if (record.remark === this.DictCache.VALUE.CUSTOM_TEMPLATE_SB_REMARK.SB_STOP_FORM) {
         this.sbInfoStop = true
-      } else if (record.remark === this.DictCache.VALUE.CUSTOM_TEMPLATE_SB_REMARK.OUT_STORE_BACK) {
+      } else if (
+        record.remark === this.DictCache.VALUE.CUSTOM_TEMPLATE_SB_REMARK.OUT_STORE_BACK ||
+        record.remark === this.DictCache.VALUE.CUSTOM_TEMPLATE_SB_REMARK.OUT_STORE_BACK_GWL_1
+      ) {
         this.storeInfo = true
       }
       if (record.targetId === undefined) {
@@ -197,12 +200,12 @@ export default {
       model.auditModelKey = record.remark
       modal.base(model, this.task.taskId)
     },
-    handleCancel () {
+    handleCancel() {
       this.visible = false
       this.confirmLoading = false
       this.$emit('ok')
     },
-    sbIdhandleDetail () {
+    sbIdhandleDetail() {
       const text = this.$router.resolve({
         name: 'SbInfo',
         query: { id: this.model.sbId }