Selaa lähdekoodia

bug fix: 176,175

chris 1 vuosi sitten
vanhempi
commit
1f4bd06796

+ 18 - 20
src/views/modules/production/scheduling.vue

@@ -106,6 +106,7 @@
           label="仓库核对数量">
         </el-table-column>
         <el-table-column
+          fixed="right"
           prop="prodState"
           header-align="center"
           align="center"
@@ -114,6 +115,7 @@
           label="当前状态">
         </el-table-column>
         <el-table-column
+          fixed="right"
           prop="state"
           header-align="center"
           align="center"
@@ -124,14 +126,14 @@
           fixed="right"
           header-align="center"
           align="center"
-          width="280"
+          width="200"
           label="操作">
           <template slot-scope="scope">
-            <el-button v-if="isAuth('prod:production:updateCheck')" type="text" size="small" @click="check(scope.row)">核料</el-button>
-            <el-button v-if="isAuth('prod:production:purchase')" type="text" size="small" @click="purchaseHandle(scope.row)">转采购</el-button>
-            <el-button v-if="isAuth('pur:commDetail:save')" type="text" size="small" @click="outsourceHandle(scope.row)">转委外</el-button>
-            <el-button v-if="isAuth('prod:production:examine')" type="text" size="small" @click="preCheck(scope.row.id)">试制前检查</el-button>
-            <el-button v-if="isAuth('prod:production:plan')" type="text" size="small" @click="detail(scope.row.id, true)">排产</el-button>
+            <el-button v-if="isAuth('prod:production:updateCheck') && Number(scope.row.prodState) === 0" type="text" size="small" @click="check(scope.row)">核料</el-button>
+            <el-button v-if="isAuth('prod:production:purchase') && Number(scope.row.prodState) === 1" type="text" size="small" @click="purchaseHandle(scope.row)">转采购</el-button>
+            <el-button v-if="isAuth('pur:commDetail:save') && Number(scope.row.prodState) === 1" type="text" size="small" @click="outsourceHandle(scope.row)">转委外</el-button>
+            <el-button v-if="isAuth('prod:production:examine') && Number(scope.row.prodState) === 1" type="text" size="small" @click="preCheck(scope.row.id)">试制前检查</el-button>
+            <el-button v-if="isAuth('prod:production:plan') && Number(scope.row.prodState) === 2" type="text" size="small" @click="detail(scope.row.id, true)">排产</el-button>
 <!--            <el-button v-if="isAuth('pur:commDetail:save') && Number(scope.row.outsourcing) === 0" type="text" size="small" @click="outsourceHandle(scope.row.id)">委外生产</el-button>-->
           </template>
         </el-table-column>
@@ -192,15 +194,15 @@ export default {
         totalPage: 0,
         dataListLoading: false,
         dataListSelections: [],
-        // 状态
+        // 当前状态
         optionsProdState: [
           {
             code: '0',
-            value: '待试制前检查'
+            value: '待核料'
           },
           {
             code: '1',
-            value: '待'
+            value: '待试制前检查'
           },
           {
             code: '2',
@@ -208,7 +210,7 @@ export default {
           },
           {
             code: '3',
-            value: '生产中生产完成'
+            value: '生产中'
           },
           {
             code: '4',
@@ -216,29 +218,25 @@ export default {
           },
           {
             code: '5',
-            value: '检验不合格完成'
-          },
-          {
-            code: '6',
-            value: '操作损坏完成'
+            value: '不合格完成'
           }
         ],
         // 处理状态
         optionsState: [
           {
-            code: '1',
-            value: '待核料'
+            code: '2',
+            value: '待处理'
           },
           {
-            code: '2',
+            code: '3',
             value: '采购'
           },
           {
-            code: '3',
+            code: '4',
             value: '委外'
           },
           {
-            code: '4',
+            code: '5',
             value: '生产'
           }
         ],

+ 40 - 1
src/views/modules/warehouse/stock-order-detail.vue

@@ -108,6 +108,31 @@
                 :show-tooltip-when-overflow="true"
                 label="来源">
               </el-table-column>
+              <el-table-column
+                header-align="center"
+                align="center"
+                width="120"
+                label="原材料材质报告">
+                <template slot-scope="scope">
+                  <el-button :disabled="!scope.row.attachTextureList || scope.row.attachTextureList.length === 0" type="text" size="small" @click="attachDetails(scope.row.attachTextureList)">查看</el-button>
+                </template>
+              </el-table-column>
+              <el-table-column
+                header-align="center"
+                align="center"
+                label="原厂合格证">
+                <template slot-scope="scope">
+                  <el-button :disabled="!scope.row.attachCertificateList || scope.row.attachCertificateList.length === 0" type="text" size="small" @click="attachDetails(scope.row.attachCertificateList)">查看</el-button>
+                </template>
+              </el-table-column>
+              <el-table-column
+                header-align="center"
+                align="center"
+                label="复验报告">
+                <template slot-scope="scope">
+                  <el-button :disabled="!scope.row.attachReviewList || scope.row.attachReviewList.length === 0" type="text" size="small" @click="attachDetails(scope.row.attachReviewList)">查看</el-button>
+                </template>
+              </el-table-column>
               <el-table-column
                 prop="expirationTime"
                 header-align="center"
@@ -138,6 +163,7 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="onChose">取消</el-button>
       </span>
+      <attach-detail-dialog ref="attachDetail" v-if="attachVisible" />
     </div>
     <!-- </el-dialog> -->
 </template>
@@ -148,14 +174,19 @@
   import { getBoundDetails } from '@/api/warehouse'
   import { dealStepData, dealStepLogs } from '@/api/util'
   import ApproveComponent from '../common/approve-component'
+  import AttachDetailDialog from '@/views/modules/common/attach-detail-dialog'
   export default {
     name: 'stock-order-detail',
     components: {
-      EDesc, EDescItem, ApproveComponent
+      AttachDetailDialog,
+      EDesc,
+      EDescItem,
+      ApproveComponent
     },
     data () {
       return {
         visible: false,
+        attachVisible: false,
         isFlow: false,
         dataForm: {},
         dataList: [],
@@ -165,6 +196,7 @@
     },
     methods: {
       onChose () {
+        this.attachVisible = false
         this.$emit('onChose')
       },
       async init (id, businessType) {
@@ -202,6 +234,13 @@
       approveFinished () {
         this.onChose()
         this.$emit('approveFinished')
+      },
+      // 附件
+      attachDetails (attachList) {
+        this.attachVisible = true
+        this.$nextTick(() => {
+          this.$refs.attachDetail.init(attachList)
+        })
       }
     }
   }

+ 5 - 3
src/views/modules/warehouse/stock-order-inbound.vue

@@ -44,7 +44,7 @@
                 </el-form-item>
               </el-col>
         </el-row>
-        
+
         <template v-for="(item, index) in dataList">
           <div :key="index" class="my-line">
             <el-row class="my-row">
@@ -146,7 +146,7 @@
             </el-row>
           </div>
         </template>
-       
+
         <el-row style="text-align: center;">
           <el-button v-if="!display" type="primary" icon="el-icon-plus" @click="addOne"></el-button>
         </el-row>
@@ -219,7 +219,6 @@
           })
         } else if (item) {
           item.applicant = this.$store.state.user.id
-          console.log(this.$store.state.user, 'qqqqqqqqq')
           this.addOne(item)
         } else if (!display) {
           this.addOne()
@@ -259,6 +258,9 @@
             this.dataList.forEach((item) => {
               postData.push({...item,
                 applicant: this.dataForm.applicant,
+                attachCertificateList: this.dataForm.attachCertificateList,
+                attachReviewList: this.dataForm.attachReviewList,
+                attachTextureList: this.dataForm.attachTextureList,
                 materialName: item.materialName ? item.materialName : item.materialId,
                 materialTypeId: item.materialTypeId ? item.materialTypeId : item.cateId,
                 orgId: this.$store.state.user.orgId,