Explorar o código

Merge branch 'demo_' of http://123.60.19.203:8088/hitch/hitch-antd into demo_

408249787 %!s(int64=2) %!d(string=hai) anos
pai
achega
d3daa43abc

+ 1 - 1
src/api/store/instoreform.js

@@ -23,7 +23,7 @@ export function updateStore (parameter) {
  */
 export function updateStoreBack (parameter) {
   return axios({
-    url: '/store/in-store-forms/in/' + parameter.id,
+    url: '/store/in-store-forms/back/' + parameter.id,
     method: 'PUT',
     data: parameter
   })

+ 1 - 0
src/router/generator-platform-routers.js

@@ -161,6 +161,7 @@ const constantRouterComponents = {
   'RepairForm': () => import('@/views/repair/application-form/RepairForm'),
   'MRepairForm': () => import('@/views/repair/application-form/MyRepairForm'),
   'MyRepairForm': () => import('@/views/repair/form/MyRepairForm'),
+  'WaitRepairForm': () => import('@/views/repair/application-form/WaitRepairForm'),
   // 验收单
   'RepairCheck': () => import('@/views/repair/check/RepairCheck'),
   // 故障类别

+ 17 - 0
src/views/repair/application-form/WaitRepairForm.vue

@@ -0,0 +1,17 @@
+<template>
+  <RepairForm :search-type="1"/>
+</template>
+
+<script>
+import RepairForm from './RepairForm'
+export default {
+  name: 'WaitRepairForm',
+  components: {
+    RepairForm
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/views/sb/info/modules/DetailC.vue

@@ -403,7 +403,7 @@ export default {
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
     this.firmProducerLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FIRM_PRODUCER_LEVEL)
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
-    this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
+    this.unitMap = this.DictCache.getRepairCheckFormLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
     this.colorMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_COLOR)
     this.rlTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.RANLIAO_TYPE)
     this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)

+ 12 - 4
src/views/sb/modelbom/modules/BaseForm.vue

@@ -139,6 +139,7 @@ import { addSbInfo } from '@/api/sb/model'
 import { addSbModelBom, updateSbModelBom, deleteSbModelBoms } from '@/api/sb/modelbom'
 import SparePartInfoSelectModal from '@/views/sqarepartmanage/sparepartinfo/modules/SparePartInfoSelectModal'
 import Vue from 'vue'
+import BaseTool from "@/utils/tool";
 
 export default {
   name: 'BaseSbModel',
@@ -148,6 +149,7 @@ export default {
       modelId: null,
       spareId: null,
       modalTitle: null,
+      sbId: null,
 
       form: this.$form.createForm(this),
       visible: false,
@@ -176,14 +178,15 @@ export default {
   methods: {
     base (record) {
       this.visible = true
-      if (this.BaseTool.Object.isBlank(record.id)) {
-        this.modelId = record.modelId
+      if (this.BaseTool.Object.isBlank(record.modelId)) {
+        this.sbId = record.id
         this.modalTitle = '添加'
         const { form: { setFieldsValue } } = this
         // 日期处理
         this.$nextTick(() => {
           setFieldsValue(Object.assign({
-            'modelId': record.modelId
+            'modelId': record.modelId,
+            'sbId': record.id
           }))
         })
         return
@@ -226,7 +229,12 @@ export default {
           this.confirmLoading = false
           return
         }
-        if (this.BaseTool.String.isBlank(values.id)) {
+        values.sbId = this.sbId
+        values.checkDate = BaseTool.Date.formatter(values.checkDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        values.nextCheckDate = BaseTool.Date.formatter(values.nextCheckDate, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+
+        if (this.BaseTool.String.isBlank(values.modelId)) {
+          console.log(values)
           addSbModelBom(values)
             .then((response) => {
               this.$message.info('添加成功')

+ 5 - 5
src/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectModal.vue

@@ -279,11 +279,11 @@ export default {
     handleEdit (record) {
       fetchSparePartUsed({ id: record.id }).then(res => {
         const modal = this.$refs.baseModal
-        modal.base(res.data,{sbId:this.repaireRecord.id, modelId: this.repaireRecord.modelId})
+        modal.base(res.data, { sbId: this.repaireRecord.id, modelId: this.repaireRecord.modelId })
       })
     },
     handleFeiqi (id) {
-      updateSparePartUsed({ id: id, status: 2}).then(res => {
+      updateSparePartUsed({ id: id, status: 2 }).then(res => {
         this.$message.info('废弃成功')
         this.handleOk()
         this.$refs.table.clearSelected()
@@ -305,7 +305,7 @@ export default {
       this.visible = true
       this.modalTitle = '选择信息'
       this.queryParam = queryParam
-      //console.log(333, this.queryParam)
+      // console.log(333, this.queryParam)
       this.repaireRecord = record
       if (this.isCreated) {
         this.$refs.table.clearSelected()
@@ -316,8 +316,8 @@ export default {
         this.isCreated = true
       }
     },
-    handleAdd(){
-      this.$refs.baseModal.base(null,{sbId:this.repaireRecord.sbId,modelId: this.repaireRecord.modelId})
+    handleAdd () {
+      this.$refs.baseModal.base(null, { sbId: this.repaireRecord.sbId, modelId: this.repaireRecord.modelId })
     },
     handleCancel () {
       this.visible = false

+ 10 - 4
src/views/store/sparestore/modules/SpareStoreSelectModal.vue

@@ -9,7 +9,7 @@
   >
     <a-card :bordered="false">
       <a-row :gutter="8">
-<!--        <a-col :span="5">
+        <!--        <a-col :span="5">
           <a-tree
             @expand="onExpand"
             :expandedKeys="expandedKeys"
@@ -118,6 +118,7 @@
 
 <script>
 import { STable, Ellipsis } from '@/components'
+import { stringify } from 'qs'
 import Detail from './Detail'
 import { getSpareStorePage, fetchSpareStore } from '@/api/store/sparestore'
 import { fetchSpareTypeTree } from '@/api/sqarepartmanage/sparetype'
@@ -226,10 +227,14 @@ export default {
             sortName: 'update_time'
           }
         }
-        return getSpareStorePage(Object.assign(parameter, this.queryParam))
-          .then(res => {
+        return getSpareStorePage(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.data.rows === null) {
+            const data = { total: 0, rows: [], pageNum: 1, pageSize: 10, pages: 1 }
+            return data
+          } else {
             return res.data
-          })
+          }
+        })
       },
       selectedRowKeys: [],
       selectedRows: [],
@@ -320,6 +325,7 @@ export default {
       this.visible = true
       this.modalTitle = '选择信息'
       this.queryParam = queryParam
+      console.log(queryParam)
       this.record = record
       if (this.isCreated) {
         this.$refs.table.clearSelected()