hfxc226 3 anni fa
parent
commit
49873dfa49

+ 1 - 1
src/components/Table/index.js

@@ -39,7 +39,7 @@ export default {
     },
     pageSize: {
       type: Number,
-      default: 10
+      default: 50
     },
     showSizeChanger: {
       type: Boolean,

+ 1 - 0
src/views/check/checkstandard/modules/BaseForm.vue

@@ -525,6 +525,7 @@ export default {
           'checkUserType',
           'checkUserId',
           'periodType',
+          'standardHours',
           // 'actionType',
           // 'enable',
           'requirement',

+ 1 - 1
src/views/dashboard/CheckJobReportWeek.vue

@@ -175,7 +175,7 @@ export default {
           const groupData = []
           this.chartsData.forEach(function (data) {
             groupData.push({ name: '标准工时', week: data.week + '', totalHours: data.totalHours })
-            groupData.push({ name: '可用工时', week: data.week + '', totalHours: data.useHours })
+            groupData.push({ name: '可用工时', week: data.week + '', totalHours: data.useHours * data.usePeople })
           })
           this.getCharts('container', groupData)// 调用统计图
         })

+ 23 - 5
src/views/sb/info/modules/BaseForm.vue

@@ -207,11 +207,19 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-input
-              style="width: 70%"
-              disabled
-              v-decorator="['producerName', {rules: [{required: true, message: '生产商不能为空'}]}]" />
-            <a-button style="width: 30%" type="primary" @click="handleProducerSelect">选择</a-button>
+            <a-select
+              show-search
+              option-filter-prop="children"
+              :filter-option="filterOptionProducer"
+              v-decorator="['producerId']"
+              placeholder="请选择">
+              <a-select-option
+                v-for="({id, name}) in producerList"
+                :key="id"
+                :label="name"
+                :value="id">{{ name }}
+              </a-select-option>
+            </a-select>
           </a-form-item>
           <a-form-item
             label="生产商"
@@ -927,6 +935,7 @@ import { queryUser } from '@/api/upms/user'
 import DetailList from '@/components/tools/DetailList'
 import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
 import ParamForm from './ParamForm'
+import { queryFirmProducer } from '@/api/firm/producer'
 const DetailListItem = DetailList.Item
 
 export default {
@@ -967,6 +976,7 @@ export default {
       isChildMap: {},
       isShowMap: {},
       isFinancingMap: {},
+      producerList: {},
       userList: {},
       unitMap: {},
       sbInfoSelectType: null,
@@ -1006,6 +1016,9 @@ export default {
     this.isChildMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_CHILD)
     this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
     this.isFinancingMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_FINANCING)
+    queryFirmProducer({}).then(res => {
+      this.producerList = res.data
+    })
   },
   methods: {
     base (record, type) {
@@ -1458,6 +1471,11 @@ export default {
         'producerName': row.name
       })
     },
+    filterOptionProducer (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
     setFileList (info, type) {
       // { file, fileList }
 

+ 14 - 13
src/views/sqarepartmanage/sparepartinfo/SparePartInfo.vue

@@ -68,13 +68,13 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="用途">
-                  <a-select v-model="queryParam.yt"  placeholder="请选择">
+                  <a-select v-model="queryParam.yt" placeholder="请选择">
                     <a-select-option
-                       v-for="(label,value) in ytMap"
-                       :key="value"
-                       :label="label"
-                       :value="parseInt(value)">{{ label }}
-                     </a-select-option>
+                      v-for="(label,value) in ytMap"
+                      :key="value"
+                      :label="label"
+                      :value="parseInt(value)">{{ label }}
+                    </a-select-option>
                   </a-select>
                 </a-form-item>
               </a-col>
@@ -131,7 +131,7 @@
               </a-popconfirm>
               <a-divider type="vertical" />
               <a @click="handleCopy(record)">复制</a>
-<!--              <a-divider type="vertical" />
+              <!--              <a-divider type="vertical" />
               <a @click="handleDetailBom(record)">BOM信息</a>-->
             </template>
           </span>
@@ -210,7 +210,7 @@ export default {
           title: '备件名称',
           dataIndex: 'name',
           checked: true,
-          width: '150px',
+          width: '150px'
         },
         {
           title: '规格型号',
@@ -227,11 +227,12 @@ export default {
             return this.BaseTool.Amount.formatter(text)
           }
         },
-        // {
-        // title: '当前库存',
-        // dataIndex: 'currentStock',
-        // scopedSlots: { customRender: 'status' }
-        // },
+        {
+          title: '当前库存',
+          dataIndex: 'currentStock',
+          width: '150px',
+          scopedSlots: { customRender: 'status' }
+        },
         {
           title: '计量单位',
           checked: true,

+ 4 - 2
src/views/sqarepartmanage/sparepartinfo/modules/Detail.vue

@@ -29,7 +29,8 @@
       <detail-list-item term="当前库存">{{ model.currentStock }}</detail-list-item>
       <detail-list-item term="采购周期">{{ model.purchasePeriod }}天</detail-list-item>
       <detail-list-item term="使用周期">{{ model.usePeriod }}月</detail-list-item>
-      <detail-list-item term="寿命周期">{{ model.usePeriod }}月</detail-list-item>
+      <detail-list-item term="寿命周期">{{ model.agePeriod }}月</detail-list-item>
+      <detail-list-item term="当前库存">{{ model.currentStock }}</detail-list-item>
       <detail-list-item term="最高库存">{{ model.maxStock }}</detail-list-item>
       <detail-list-item term="最低库存">{{ model.minStock }}</detail-list-item>
       <detail-list-item term="初始库存">{{ model.initStock }}</detail-list-item>
@@ -109,6 +110,7 @@ export default {
         'currentStock': null,
         'purchasePeriod': null,
         'usePeriod': null,
+        'agePeriod': null,
         'maxStock': null,
         'qrCode': null,
         'applicationFileList': [],
@@ -210,4 +212,4 @@ export default {
   margin: 5px;
   display: inline-block;
 }
-</style>
+</style>

+ 2 - 1
src/views/upms/dict/Dict.vue

@@ -266,8 +266,9 @@ export default {
       this.$refs.table.refresh(true)
     },
     onSelect: function (selectedKeys, info) {
+      console.log(info.title)
       this.selectedKeys = selectedKeys
-      this.queryParam.parentId = selectedKeys.length > 0 ? selectedKeys[0] : ''
+      this.queryParam.keyword = selectedKeys.length > 0 ? selectedKeys[0] : ''
       this.$refs.table.refresh(true)
     },
     onExpand (expandedKeys) {