瀏覽代碼

特殊过程

damon227 1 年之前
父節點
當前提交
ae6bc44d4b

+ 8 - 0
src/api/process.js

@@ -8,3 +8,11 @@ export function getList (params) {
     params: params
   })
 }
+
+// 特殊过程详情
+export function getDetail (cruxId) {
+  return request({
+    url: request.adornUrl(`/biz-service/pro-crux-course/info/${cruxId}`),
+    method: 'get'
+  })
+}

+ 1 - 1
src/views/modules/tech-manage/process-add-or-update.vue

@@ -144,7 +144,7 @@ export default {
           this.$http({
             url: !this.id
               ? this.$http.adornUrl(`/biz-service/pro-crux-course/save`)
-              : this.$http.adornUrl(`/biz-service/pro-crux-course/update`),
+              : this.$http.adornUrl(`/biz-service/pro-crux-course/update2`),
             method: 'post',
             data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
           }).then(({ data }) => {

+ 21 - 7
src/views/modules/tech-manage/process-detail.vue

@@ -3,9 +3,9 @@
     <div class="my-title">详情</div>
     <div style="margin-left: 20px; margin-right: 20px">
       <e-desc title="基本信息" column="3">
-        <e-desc-item label="方案编码">{{ dataForm.optionCode }}</e-desc-item>
-        <e-desc-item label="物料名称">{{ dataForm.materialName }}</e-desc-item>
-        <e-desc-item label="方案名称">{{ dataForm.optionName }}</e-desc-item>
+        <e-desc-item label="编码">{{ dataForm.cruxCode }}</e-desc-item>
+        <e-desc-item label="物料名称">{{ dataForm.productName }}</e-desc-item>
+        <e-desc-item label="关键特殊名称">{{ dataForm.cruxName }}</e-desc-item>
         <e-desc-item label="备注说明" span="3">{{
           dataForm.remark
         }}</e-desc-item>
@@ -18,6 +18,14 @@
           v-model="dataForm.attachList"
         />
       </e-desc>
+      <e-desc title="变更单">
+        <upload-component
+          :display="true"
+          :display-title="false"
+          :accept="'*'"
+          v-model="dataForm.changeList"
+        />
+      </e-desc>
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button @click="onChose">返回</el-button>
@@ -29,6 +37,7 @@
 import EDesc from '../common/e-desc'
 import EDescItem from '../common/e-desc-item'
 import UploadComponent from '../common/upload-component-v2'
+import {getDetail} from '@/api/process'
 export default {
   name: 'process-detail',
   components: {EDesc, EDescItem, UploadComponent},
@@ -49,11 +58,16 @@ export default {
     onChose () {
       this.$emit('onChose')
     },
-    async init (id, item) {
+    async init (id) {
       this.id = id || 0
-      if (id) {
-        this.dataForm = {...item}
-      }
+      this.getDetail(id)
+    },
+    getDetail (id) {
+      getDetail(id).then(({data}) => {
+        if (data && data.code === '200') {
+          this.dataForm = data.data
+        }
+      })
     }
   }
 }

+ 13 - 9
src/views/modules/tech/program.vue

@@ -24,9 +24,9 @@
           >
             <el-option
               v-for="item in materialList"
-              :key="item.materialId"
-              :label="item.materialName"
-              :value="item.materialName"
+              :key="item.productId"
+              :label="item.productName"
+              :value="item.productName"
             >
             </el-option>
           </el-select>
@@ -178,7 +178,7 @@
         >
         </el-table-column>
         <el-table-column
-            prop="creatorId"
+            prop="creatorName"
             header-align="center"
             align="center"
             min-width="140"
@@ -219,13 +219,13 @@
       </el-pagination>
     </template>
     <attach-detail-dialog ref="attachDetail" />
-    <program-add-or-update ref="addOrUpdate" v-if="addOrUpdateVisible" @onChose="onChose" @refreshDataList="getMaterialList"></program-add-or-update>
+    <program-add-or-update ref="addOrUpdate" v-if="addOrUpdateVisible" @onChose="onChose" @refreshDataList="getDataList"></program-add-or-update>
     <program-detail ref="detail" v-if="detailVisible" @onChose="onChose"></program-detail>
   </div>
 </template>
 
 <script>
-import { getMaterialList } from '@/api/material'
+import { getProductList } from '@/api/product'
 import { getList } from '@/api/program'
 import AttachDetailDialog from '../common/attach-detail-dialog'
 import ProgramAddOrUpdate from './program-add-or-update'
@@ -248,15 +248,19 @@ export default {
   },
   created () {
     this.queryData()
-    this.getMaterialList()
+    this.getProductList()
   },
   methods: {
     onChose () {
       this.addOrUpdateVisible = false
       this.detailVisible = false
     },
-    getMaterialList () {
-      getMaterialList().then(({ data }) => {
+    getProductList () {
+      let params = {
+        current: 1,
+        size: 100
+      }
+      getProductList(params).then(({ data }) => {
         if (data && data.code === '200') {
           this.materialList = data.data.records
         }