xiongchao преди 3 години
родител
ревизия
d033cbe11e

+ 21 - 8
src/views/check/checkjob/CheckJob.vue

@@ -4,14 +4,9 @@
       <div class="table-page-search-wrapper">
         <a-form layout="inline">
           <a-row :gutter="48">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="计划名称">
-                <a-input v-model="queryParam.planName" placeholder="请输入计划名称"/>
-              </a-form-item>
-            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="负责人">
-                <a-input v-model="queryParam.keyword" placeholder="请输入负责人"/>
+                <a-input v-model="queryParam.keyword" placeholder="请输入设备新号/名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -60,6 +55,7 @@
         <a-button v-if="$auth('check-polling-jobs-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
         <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="primary" icon="download" @click="doExport">导出</a-button>
         <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleSeven">近七日</a-button>
+        <a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleMonth">近30天</a-button>
         <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && ($auth('check-spot-jobs-edit') || $auth('check-polling-jobs-edit'))">
           <a-menu slot="overlay">
             <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
@@ -179,6 +175,14 @@ export default {
           dataIndex: 'name',
           checked: true
         },
+        {
+          title: '计划周期',
+          dataIndex: 'period',
+          checked: true,
+          customRender: (text, record, index) => {
+            return text + this.BaseTool.Table.getMapText(this.periodTypeMap, record.periodType)
+          }
+        },
         /*        {
           title: '计划名称',
           dataIndex: 'planName',
@@ -200,11 +204,11 @@ export default {
           dataIndex: 'startTime',
           checked: true
         },
-        /*        {
+        {
           title: '截至日期',
           dataIndex: 'endTime',
           checked: true
-        }, */
+        },
         {
           title: '标准工时',
           dataIndex: 'standardHours'
@@ -254,6 +258,7 @@ export default {
       // 下拉框map
       statusMap: {},
       sbStatusMap: {},
+      periodTypeMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         parameter = {
@@ -286,6 +291,7 @@ export default {
     // 下拉框map
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_JOB_STATUS)
     this.sbStatusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
+    this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
     this.tableOption()
   },
   methods: {
@@ -377,6 +383,13 @@ export default {
       console.log(this.queryParam.searchEndTime)
       this.$refs.table.refresh()
     },
+    handleMonth () {
+      this.queryParam.searchStartTime = this.BaseTool.Date.formatter(this.getBeforeDate(0), this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+      this.queryParam.searchEndTime = this.BaseTool.Date.formatter(this.getBeforeDate(-30), this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
+      console.log(this.queryParam.searchStartTime)
+      console.log(this.queryParam.searchEndTime)
+      this.$refs.table.refresh()
+    },
     getBeforeDate (num, time) {
       const n = num
       let d = ''

+ 1 - 1
src/views/check/checkstandard/CheckStandard.vue

@@ -192,6 +192,7 @@ export default {
       // 下拉框map
       typeMap: {},
       enableMap: {},
+      periodTypeMap: {},
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         parameter = {
@@ -229,7 +230,6 @@ export default {
     this.enableMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
     this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
     this.actionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_ACTION_TYPE)
-
     this.tableOption()
   },
   methods: {

+ 0 - 1
src/views/sb/info/MeasureSbInfo.vue

@@ -53,7 +53,6 @@
             <a-button v-if="$auth('sb-infos-add')" type="primary" icon="plus" @click="handleAddRelate">关联</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImport">初始化导入</a-button>
-            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImportDe">折旧导入</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="printQcode()">打印</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
               <a-menu slot="overlay">

+ 21 - 20
src/views/sb/info/modules/DetailMeasureRelation.vue

@@ -4,28 +4,11 @@
       <a-row :gutter="48" slot="extra">
         <a-col :md="48" :sm="48">
           <span class="table-page-search-submitButtons" style="float: right">
-            <a-button style="margin-left: 8px" type="primary" @click="handleMeasure()">检定记录</a-button>
+            <a-button style="margin-left: 8px" type="default" @click="handleMeasure()">检定记录</a-button>
             <a-button style="margin-left: 8px" type="primary" @click="handleCancel()">返回</a-button>
           </span>
         </a-col>
       </a-row>
-      <title-divider title="图片信息" width="90px"></title-divider>
-      <a-carousel effect="fade">
-        <div v-for="item in model.sbFileList">
-          <h3>
-            <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
-          </h3>
-        </div>
-      </a-carousel>
-      <detail-list title="" :col="3">
-        <!--        <detail-list-item v-for="item in model.sbFileList" term="">
-                  <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
-                </detail-list-item>-->
-        <detail-list-item>
-          <img-code :src="model.qrCode" :code-id="model.id" :width="200"></img-code>
-        </detail-list-item>
-      </detail-list>
-
       <title-divider title="基本信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
         <detail-list-item term="设备(新号)">{{ model.no }}</detail-list-item>
@@ -59,7 +42,18 @@
         <detail-list-item term="检定证书编号">{{ model.sbdh }}</detail-list-item>
         <detail-list-item term="预警天数">{{ model.seatNumber }}天</detail-list-item>
       </detail-list>
-<!--      <title-divider title="文件信息" width="90px"></title-divider>
+      <title-divider title="图片信息" width="90px"></title-divider>
+      <detail-list title="" :col="1">
+        <detail-list-item term="" v-if="model.sbFileList != null && model.sbFileList.length > 0">
+          <viewer :images="model.sbFileList" @inited="inited" ref="viewer" :index="1" >
+            <img v-for="item in model.sbFileList" :src="item.url" :key="item.id" class="image">
+          </viewer>
+        </detail-list-item>
+        <detail-list-item term="" v-if="model.sbFileList == null || model.sbFileList.length === 0">
+          暂无
+        </detail-list-item>
+      </detail-list>
+      <title-divider title="文件信息" width="90px"></title-divider>
       <detail-list title="" :col="4">
         <detail-list-item term="维保手册">
           <a-upload
@@ -83,7 +77,7 @@
           </a-upload>
         </detail-list-item>
       </detail-list>
-      <title-divider title="相关数据" width="90px"></title-divider>
+<!--      <title-divider title="相关数据" width="90px"></title-divider>
       <q-tabs :activeKey="activeKey" @change="changeTab">
         <q-tab-pane key="1" tab="报修记录">
           <repair-application-form-table :type="2" :table-params="{sbId: model.id, sbName: model.name}" ref="repairApplicationFormTable" />
@@ -366,4 +360,11 @@ export default {
 .ant-carousel >>> .slick-slide h3 {
   color: #fff;
 }
+
+.image {
+  width: calc(20% - 10px);
+  cursor: pointer;
+  margin: 5px;
+  display: inline-block;
+}
 </style>

+ 2 - 2
src/views/sb/measurelog/modules/DetailSbCheck.vue

@@ -24,10 +24,10 @@
         <a-icon type="plus"/>
         添加
       </a-button>
-      <a-button style="margin-left:8px;" type="primary" @click="handleSbSelect">
+<!--      <a-button style="margin-left:8px;" type="primary" @click="handleSbSelect">
         <a-icon type="plus"/>
         复制
-      </a-button>
+      </a-button>-->
       <!--      <a-button style="margin-left: 8px" type="primary" icon="download" @click="doExport">导出</a-button>-->
     </div>
     <a-table

+ 43 - 6
src/views/sqarepartmanage/sparepartinfo/modules/BaseForm.vue

@@ -19,6 +19,7 @@
         <a-input v-decorator="['id']" type="hidden"/>
         <a-input v-decorator="['sbId']" type="hidden"/>
         <a-input v-decorator="['typeId']" type="hidden"/>
+        <a-input v-decorator="['storeId']" type="hidden"/>
       </a-form-item>
       <a-form-item v-show="false" >
         <a-input v-decorator="['unit']" type="hidden"/>
@@ -240,8 +241,7 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input suffix="天"
-              v-decorator="['purchasePeriod']" />
+            <a-input suffix="天" v-decorator="['purchasePeriod']" />
           </a-form-item>
         </row-item>
         <row-item>
@@ -250,8 +250,7 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input suffix="月"
-              v-decorator="['usePeriod']" />
+            <a-input suffix="月" v-decorator="['usePeriod']" />
           </a-form-item>
         </row-item>
         <row-item>
@@ -278,7 +277,20 @@
               v-decorator="['minStock']" />
           </a-form-item>
         </row-item>
-        <row-item>
+        <row-item  v-show="isAdd">
+          <a-form-item
+            label="初始库位"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              disabled
+              style="width:70%;margin-right:5px"
+              v-decorator="['storeName', {rules: [{required: true, message: '名称不能为空'}]}]" />
+            <a-button type="primary" @click="handleStoreSelect">选择仓库库位</a-button>
+          </a-form-item>
+        </row-item>
+        <row-item v-show="isAdd">
           <a-form-item
             label="初始库存"
             :labelCol="BaseTool.Constant.labelCol"
@@ -348,11 +360,16 @@
         </row-item>
       </row-list>
     </a-form>
+    <p style="color: red">仓库数量初始化注意事项:<br/>
+      1:初始化库存仅能选择一个库位入库<br/>
+      2:初始化库存仅能新增,如需要修改请在仓库管理->仓库库存中修改数量<br/>
+    </p>
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
     </template>
     <firm-producer-select-modal ref="producerSelectModal" @selected="handleProducerSelected"/>
     <supplier-select-modal ref="supplierSelectModal" @selected="handleSupplierSelected"/>
+    <store-select-modal ref="storeSelectModal" @selected="handleStoreSelected"/>
   </a-modal>
 </template>
 
@@ -365,6 +382,7 @@ import FirmProducerSelectModal from '@/views/firm/producer/modules/FirmProducerS
 import SupplierSelectModal from '@/views/purchase/supplier/modules/SupplierSelectModal'
 import UploadSpareFile from '@/components/Upload/UploadSpareFile'
 import Vue from 'vue'
+import StoreSelectModal from '@/views/store/store/modules/StoreSelectModal'
 import { uploadUrl } from '@/api/upms/file'
 import { ACCESS_TOKEN } from '@/store/mutation-types'
 
@@ -373,10 +391,12 @@ export default {
   components: {
     FirmProducerSelectModal,
     SupplierSelectModal,
-    UploadSpareFile
+    UploadSpareFile,
+    StoreSelectModal
   },
   data () {
     return {
+      isAdd: false,
       unitName: null,
       unitNameBz: null,
       gg: null,
@@ -469,6 +489,7 @@ export default {
       // 如果是空标识添加
       if (this.BaseTool.Object.isBlank(record)) {
         this.modalTitle = '添加'
+        this.isAdd = true
         return
       }
       this.modalTitle = '编辑'
@@ -589,6 +610,7 @@ export default {
       this.unitName = null
       this.unitNameBz = null
       this.gg = null
+      this.isAdd = true
       this.data = []
       if (this.BaseTool.Object.isNotBlank(values)) {
         this.$emit('ok', values)
@@ -707,6 +729,21 @@ export default {
         this.gg = value
       }
     },
+    handleStoreSelect () {
+      this.$refs.storeSelectModal.base()
+    },
+    handleStoreSelected (record, keys, rows) {
+      const [ key ] = keys
+      const [ row ] = rows
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign({
+          'storeId': key,
+          'storeName': row.name
+        }))
+      })
+    },
     /**
      * @function 任务类型失焦事件
      * @author ***

+ 12 - 12
src/views/store/store/Store.vue

@@ -32,7 +32,7 @@
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+<!--          <a-col :md="6" :sm="24">
             <a-form-item label="选择类型">
               <a-select v-model="queryParam.type" placeholder="请选择">
                 <a-select-option
@@ -43,7 +43,7 @@
                 </a-select-option>
               </a-select>
             </a-form-item>
-          </a-col>
+          </a-col>-->
           <a-col :md="6 || 24" :sm="24">
             <span class="table-page-search-submitButtons">
               <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
@@ -56,7 +56,7 @@
 
     <div class="table-operator">
       <a-button v-if="$auth('store-stores-add')" type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
-      <a-button style="margin-left: 8px" v-if="$auth('store-stores-export')" type="primary" icon="download" @click="doExport">导出</a-button>
+<!--      <a-button style="margin-left: 8px" v-if="$auth('store-stores-export')" type="primary" icon="download" @click="doExport">导出</a-button>-->
       <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('store-stores-del')">
         <a-menu slot="overlay">
           <a-popconfirm title="删除仓库,将清空仓库所有物资数据?" @confirm="batchDelete()">
@@ -88,12 +88,12 @@
           <a-popconfirm v-if="$auth('store-stores-del')" title="删除仓库,将清空仓库所有物资数据??" @confirm="batchDelete(record.id)">
             <a>删除</a>
           </a-popconfirm>
-          <a-divider type="vertical" />
-          <a @click="doExportSpareStore(record)">导出库存</a>
-          <a-divider type="vertical" />
-          <a @click="doImport(record)">导入库存</a>
-          <!--<a-divider type="vertical" />
-          <a @click="handleCopy(record)">复制</a>-->
+          <!-- <a-divider type="vertical" />
+           <a @click="doExportSpareStore(record)">导出库存</a>
+           <a-divider type="vertical" />
+           <a @click="doImport(record)">导入库存</a>
+           <a-divider type="vertical" />
+           <a @click="handleCopy(record)">复制</a>-->
         </template>
       </span>
       <span slot="delFlag" slot-scope="text">
@@ -167,15 +167,15 @@ export default {
             return this.BaseTool.Object.getField(this.levelMap, text)
           }
         },
-        {
+  /*      {
           title: '类型',
           dataIndex: 'type',
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.typeMap, text)
           }
-        },
+        },*/
         {
-          title: '上层仓库',
+          title: '所属仓库',
           dataIndex: 'parentId',
           customRender: (text, record, index) => {
             return record.parentName

+ 23 - 23
src/views/store/store/modules/BaseForm.vue

@@ -22,7 +22,7 @@
           v-decorator="['no', {rules: [{required: false, message: '编码不能为空'}]}]" />
       </a-form-item>
 
-      <a-form-item
+<!--      <a-form-item
         label="所属公司"
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
@@ -49,6 +49,22 @@
             :value="deptId">{{ name }}
           </a-select-option>
         </a-select>
+      </a-form-item>-->
+      <a-form-item
+        label="所属仓库"
+        :labelCol="BaseTool.Constant.labelCol"
+        :wrapperCol="BaseTool.Constant.wrapperCol"
+      >
+        <a-tree-select
+          style="width: 100%"
+          :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+          :treeData="storeTreeDate"
+          :treeNodeFilterProp="'title'"
+          :showSearch="true"
+          v-decorator="['parentId', {rules: [{required: false, message: '上层仓库不能为空'}]}]"
+          placeholder="请选择"
+        >
+        </a-tree-select>
       </a-form-item>
       <a-form-item
         label="名称"
@@ -77,7 +93,7 @@
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
       >
-        <a-select v-decorator="['level', {rules: [{required: true, message: '等級不能为空'}]}]" placeholder="请选择">
+        <a-select v-decorator="['level']" placeholder="请选择">
           <a-select-option
             v-for="(label,value) in levelMap"
             :key="value"
@@ -86,12 +102,12 @@
           </a-select-option>
         </a-select>
       </a-form-item>
-      <a-form-item
+<!--      <a-form-item
         label="类型"
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
       >
-        <a-select v-decorator="['type', {rules: [{required: true, message: '类型不能为空'}]}]" placeholder="请选择">
+        <a-select v-decorator="['type']" placeholder="请选择">
           <a-select-option
             v-for="(label,value) in typeMap"
             :key="value"
@@ -99,7 +115,7 @@
             :value="parseInt(value)">{{ label }}
           </a-select-option>
         </a-select>
-      </a-form-item>
+      </a-form-item>-->
       <a-form-item
         label="排序"
         :labelCol="BaseTool.Constant.labelCol"
@@ -110,7 +126,7 @@
           :min="1"
           v-decorator="['sort', {initialValue:1,rules: [{required: true, message: '排序不能为空'}]}]" />
       </a-form-item>
-      <a-form-item
+<!--      <a-form-item
         label="是否删除"
         :labelCol="BaseTool.Constant.labelCol"
         :wrapperCol="BaseTool.Constant.wrapperCol"
@@ -123,23 +139,7 @@
             :value="parseInt(value)">{{ label }}
           </a-select-option>
         </a-select>
-      </a-form-item>
-      <a-form-item
-        label="上层仓库"
-        :labelCol="BaseTool.Constant.labelCol"
-        :wrapperCol="BaseTool.Constant.wrapperCol"
-      >
-        <a-tree-select
-          style="width: 100%"
-          :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
-          :treeData="storeTreeDate"
-          :treeNodeFilterProp="'title'"
-          :showSearch="true"
-          v-decorator="['parentId', {rules: [{required: false, message: '上层仓库不能为空'}]}]"
-          placeholder="请选择"
-        >
-        </a-tree-select>
-      </a-form-item>
+      </a-form-item>-->
       <a-form-item
         label="备注"
         :labelCol="BaseTool.Constant.labelCol"

+ 6 - 7
src/views/store/store/modules/Detail.vue

@@ -9,19 +9,18 @@
     <detail-list title="" :col="2">
       <detail-list-item term="Id">{{ model.id }}</detail-list-item>
       <detail-list-item term="编码">{{ model.no }}</detail-list-item>
+      <detail-list-item term="所属仓库">{{ model.parentName }}</detail-list-item>
       <detail-list-item term="名称">{{ model.name }}</detail-list-item>
-      <detail-list-item term="使用公司">{{ model.useCompanyName }}</detail-list-item>
-      <detail-list-item term="使用项目部">{{ model.useProjectName }}</detail-list-item>
+<!--      <detail-list-item term="使用公司">{{ model.useCompanyName }}</detail-list-item>
+      <detail-list-item term="使用项目部">{{ model.useProjectName }}</detail-list-item>-->
       <detail-list-item term="仓库负责人">{{ model.userName }}</detail-list-item>
       <detail-list-item term="等级">{{ BaseTool.Object.getField(levelMap,model.level) }}</detail-list-item>
-
-      <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>
+<!--      <detail-list-item term="类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>-->
       <detail-list-item term="排序">{{ model.sort }}</detail-list-item>
-      <detail-list-item term="上层仓库">{{ model.parentName }}</detail-list-item>
-      <detail-list-item term="是否删除"><badge :status="DictCache.COLOR.DELFLAG[model.delFlag]" :text="delFlagMap[model.delFlag]"></badge></detail-list-item>
+<!--      <detail-list-item term="是否删除"><badge :status="DictCache.COLOR.DELFLAG[model.delFlag]" :text="delFlagMap[model.delFlag]"></badge></detail-list-item>
       <detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>
       <detail-list-item term="更新人">{{ model.updateUserName }}</detail-list-item>
-      <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>
+      <detail-list-item term="更新日期">{{ model.updateTime }}</detail-list-item>-->
     </detail-list>
     <detail-list title="" :col="1">
       <detail-list-item term="备注">{{ model.remark }}</detail-list-item>