Merge remote-tracking branch 'origin/master'
# Conflicts:
# vue.config.js
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export function fetchList(query) { |
| | | return request({ |
| | | url: '/mes/packageInspect/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function fetchListById(id) { |
| | | return request({ |
| | | url: '/mes/packageInspect/'+id, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function deleteById(id) { |
| | | return request({ |
| | | url: '/mes/packageInspect/'+id, |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | export function updatePackageInsProduct(data) { |
| | | return request({ |
| | | url: '/mes/packageInsProduct/updatePackageInsProduct', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/quality/packageinspect', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: 'packageInspect-form', |
| | | name: 'packageInspectForm', |
| | | component: () => |
| | | import(/* webpackChunkName: "views" */ '@/views/quality/packageinspect/packageInspect-form'), |
| | | meta: { |
| | | keepAlive: false, |
| | | isTab: false, |
| | | isAuth: false |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/quality/rawMaterial', |
| | | component: Layout, |
| | | children: [ |
| | |
| | | <el-button style="float: right; padding: 3px 0" type="text">æä½æé®</el-button> |
| | | </div> |
| | | <div style="height:70vh;overflow-y: scroll;"> |
| | | <el-timeline reverse> |
| | | <el-timeline> |
| | | <el-timeline-item |
| | | placement="top" |
| | | v-for="(item, index) in scheduleList" |
| | |
| | | this.tableData = res.data.data.records |
| | | this.page.total = res.data.data.total |
| | | this.page.currentPage = res.data.data.records.pages |
| | | this.scheduleList = [] |
| | | }) |
| | | this.loading = false |
| | | |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.multipleSelection = val |
| | |
| | | :prelang="prelang" |
| | | :ajaxFun="ajaxFun" |
| | | :options="options" |
| | | @handleSelectionChange="handleCurrentChange" |
| | | @currentChange="handleCurrentChange" |
| | | ref="processconfiguration" |
| | | > |
| | | <template #toolbar></template> |
| | |
| | | :data="testStandardParams" |
| | | id="testStandardParamTable" |
| | | ref="testStandardParam" |
| | | :default-sort="{ prop: 'index' }" |
| | | |
| | | highlight-current-row |
| | | height="700" |
| | | style="width: 100%" |
| | |
| | | stripe |
| | | > |
| | | <el-table-column |
| | | prop="index" |
| | | type ="index" |
| | | label="åºå·" |
| | | align="center" |
| | | width="50" |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="æ°é" |
| | | prop="parameterFormat" |
| | | prop="number" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.parameterFormat"></el-input> |
| | | <el-input v-model="scope.row.number"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" prop="unit" align="center" /> |
| | |
| | | <!-- æ°å¢ --> |
| | | <packfrom |
| | | :currshowlist.sync="addOrUpdateVisible" |
| | | > |
| | | @refreshDataList="getData"> |
| | | </packfrom> |
| | | <packfromadd |
| | | :currshowlist.sync="increase" |
| | |
| | | export default { |
| | | data(){ |
| | | return { |
| | | dataway:{}, |
| | | goid:'', |
| | | testStandardParams: [], |
| | | packageBoxId:{}, |
| | |
| | | ], |
| | | operator: [ |
| | | { |
| | | text: 'å é¤', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | },{ |
| | | text: 'æ£éª', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.check |
| | | },{ |
| | | text: 'å é¤', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | } |
| | | ], |
| | | operatorConfig: { |
| | |
| | | packfromadd |
| | | }, |
| | | watch: { |
| | | // renovate() { |
| | | // if (this.innerVisible = false) { |
| | | // this.$nextTick(() => { |
| | | // this.getData() |
| | | // }) |
| | | // } |
| | | // } |
| | | |
| | | }, |
| | | methods: { |
| | | // è·åæ°æ®å表 |
| | | getData() { |
| | | this.$refs.processconfiguration.refreshData() |
| | | }, |
| | | wayRenovate(){ |
| | | this.getData() |
| | | }, |
| | | //add |
| | | addOrUpdateHandle(){ |
| | |
| | | deleteHandle(row){ |
| | | dropById({id:row.id}).then((res) =>{ |
| | | this.getData() |
| | | this.$message.error('å 餿å') |
| | | this.$message.success('å 餿å') |
| | | }) |
| | | }, |
| | | handleCurrentChange(row){ |
| | | console.log(row,"id"); |
| | | console.log(row,"ä¸è¡"); |
| | | this.dataway = row |
| | | this.packageBoxId = { |
| | | packageBoxId:row[0].id |
| | | packageBoxId:row.id |
| | | } |
| | | this.goid = row[0].id |
| | | list({packageBoxId:row[0].id}).then((res) =>{ |
| | | this.goid = row.id |
| | | this.rightquery() |
| | | }, |
| | | rightquery(){ |
| | | list({packageBoxId:this.goid}).then((res) =>{ |
| | | console.log(res,"nihaoa"); |
| | | this.testStandardParams = res.data.data |
| | | }) |
| | | }, |
| | | //详æ
æ·»å |
| | | relateOperationParam(){ |
| | | |
| | | this.increase = true |
| | | |
| | | if (this.dataway.state == "æªæ¥æ£") { |
| | | this.increase = true |
| | | }else{ |
| | | this.$message.error('请å
éæ©å
è£
项ç®') |
| | | } |
| | | }, |
| | | preserve(datalist){ |
| | | console.log(datalist); |
| | | this.testStandardParams = datalist |
| | | |
| | | }, |
| | |
| | | this.testStandardParams.forEach(el => { |
| | | el.packageBoxId =this.goid |
| | | }); |
| | | console.log(this.testStandardParams,"niaho"); |
| | | saveList(this.testStandardParams).then((res) =>{ |
| | | console.log(res,"ä¿åæå"); |
| | | this.$message.success('ä¿åæå') |
| | | this.testStandardParams |
| | | this.rightquery() |
| | | }) |
| | | }, |
| | | //å é¤ |
| | |
| | | console.log(row,""); |
| | | deledata({id:row.id}).then((res)=>{ |
| | | this.$message.success('å 餿å') |
| | | this.testStandardParams |
| | | this.rightquery() |
| | | }) |
| | | }, |
| | | //å®¡æ ¸ |
| | |
| | | <template> |
| | | <el-dialog |
| | | width="60%" |
| | | title="åæ°" |
| | | title="æ°å¢" |
| | | top="5vh" |
| | | :visible.sync="innerVisible" |
| | | :show="currshowlist" |
| | |
| | | > |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | @currentChange="Getdata" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :ajaxFun="ajaxFun" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | datalistid:"", |
| | | datalistid:{}, |
| | | ajaxFun: customerpage, |
| | | currentRow: false, |
| | | typeOptions: [], |
| | |
| | | }, |
| | | methods: { |
| | | // è·åæ°æ®å表 |
| | | getData() { |
| | | this.$refs.paramTable.getDataList() |
| | | }, |
| | | handleSelectionChange(val){ |
| | | let data = val |
| | | data.forEach(el => { |
| | | this.datalistid = el |
| | | }); |
| | | console.log(this.datalistid); |
| | | // getData() { |
| | | // this.$refs.paramTable.getDataList() |
| | | // }, |
| | | Getdata(val){ |
| | | console.log(val); |
| | | this.datalistid = val |
| | | }, |
| | | saveSelectRow() { |
| | | pagedataadd ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | console.log(res); |
| | | let packageBox = { |
| | | customerId:this.datalistid.id, |
| | | contractNo:this.datalistid.contractNo |
| | | } |
| | | pagedataadd (packageBox).then((res =>{ |
| | | if (res.status === 200) { |
| | | this.$message.success('æ°å¢æå') |
| | | this.$emit('refreshDataList') |
| | | }else{ |
| | | this.$message.error('å建失败') |
| | | } |
| | | })) |
| | | this.innerVisible = false |
| | | this.$emit('handleSelectionChange',this.innerVisible ) |
| | | this.$emit('wayapi',this.innerVisible ) |
| | | }, |
| | | } |
| | | } |
| | |
| | | }, |
| | | saveSelectRow() { |
| | | console.log(this.packageBoxIddata,"123"); |
| | | saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | console.log(res); |
| | | if (res.status === 200) { |
| | | this.$message.success('æ°å¢æå') |
| | | }else{ |
| | | this.$message.error('å建失败') |
| | | } |
| | | })) |
| | | // saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | // console.log(res); |
| | | // if (res.status === 200) { |
| | | // this.$message.success('æ°å¢æå') |
| | | // }else{ |
| | | // this.$message.error('å建失败') |
| | | // } |
| | | // })) |
| | | this.innerVisible = false |
| | | // this.$emit('handleSelectionChange',this.innerVisible ) |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | - Copyright (c) 2018-2025, ztt All rights reserved. |
| | | - |
| | | - Redistribution and use in source and binary forms, with or without |
| | | - modification, are permitted provided that the following conditions are met: |
| | | - |
| | | - Redistributions of source code must retain the above copyright notice, |
| | | - this list of conditions and the following disclaimer. |
| | | - Redistributions in binary form must reproduce the above copyright |
| | | - notice, this list of conditions and the following disclaimer in the |
| | | - documentation and/or other materials provided with the distribution. |
| | | - Neither the name of the pig4cloud.com developer nor the names of its |
| | | - contributors may be used to endorse or promote products derived from |
| | | - this software without specific prior written permission. |
| | | - Author: ztt |
| | | --> |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | :table="table" |
| | | :resultData="resultData" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :ajaxFun="ajaxFun" |
| | | ref="packageInspectTable"> |
| | | <template #toolbar> |
| | | </template> |
| | | </ttable> |
| | | </basic-container> |
| | | <!-- å¼¹çª, æ°å¢ / ä¿®æ¹ --> |
| | | <!-- <RawMaterialForm |
| | | v-if="addOrUpdateVisible" |
| | | ref="addOrUpdate" |
| | | @refreshDataList="getData" |
| | | ></RawMaterialForm> --> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { fetchList,deleteById } from '@/api/quality/packageInspect' |
| | | // import RawMaterialForm from './rawMaterial-form' |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import { mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | resultData:[], |
| | | addOrUpdateVisible: false, |
| | | type: [1], |
| | | multipleSelection: [], |
| | | prelang: 'packageInspect', |
| | | ajaxFun: fetchList, |
| | | options: { |
| | | height: 300, // é»è®¤é«åº¦-为äºè¡¨å¤´åºå® |
| | | stripe: true, // æ¯å¦ä¸ºæé©¬çº¹ table |
| | | highlightCurrentRow: false, // æ¯å¦è¦é«äº®å½åè¡ |
| | | border: true, // æ¯å¦æçºµåè¾¹æ¡ |
| | | lazy: false, // æ¯å¦éè¦æå è½½ |
| | | fit: true, // åç宽度æ¯å¦èªæå¼ |
| | | multiSelect: true, // |
| | | seqNo: true, |
| | | isRefresh: true, // æ¯å¦æ¾ç¤ºå·æ°æé® |
| | | isShowHide: true, // æ¯å¦æ¾ç¤ºæ¾å½±æé®H |
| | | isSearch: true, // é«çº§æ¥è¯¢æé® |
| | | defaultOrderBy: { column: 'createTime', direction: 'desc' }, |
| | | }, |
| | | table: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | data: [], |
| | | // æ é¢ |
| | | column: [ |
| | | { |
| | | minWidth: '150', |
| | | prop: 'packInsNo', |
| | | label: 'å
è£
æ£éªç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | render: { fun: this.addOrUpdateHandle } |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'packageNo', |
| | | label: 'å
è£
ç¼ç ', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'contractNo', |
| | | label: 'ååå·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'projectName', |
| | | label: '项ç®åç§°', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'customerName', |
| | | label: '客æ·åç§°', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'createTime', |
| | | label: 'æ¥æ£æ¥æ', |
| | | isTrue: true, |
| | | sort: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | formatter: this.formatDateTime, |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'createUser', |
| | | label: 'æ¥æ£äºº', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | prop: 'result', |
| | | label: 'ç»è®º', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | // { |
| | | // text: 'æ°å¢', |
| | | // type: 'primary', |
| | | // fun: this.addOrUpdateHandle |
| | | // }, |
| | | ], |
| | | operator: [ |
| | | { |
| | | text: 'ä½åº', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }], |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: 120, |
| | | minWidth: 120 |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | components: { |
| | | ttable, |
| | | }, |
| | | created() { }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | watch:{ |
| | | |
| | | }, |
| | | methods:{ |
| | | // å é¤ |
| | | deleteHandle(row) { |
| | | const _than = this |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤å
è£
ç¼å·ã' + row.packInsNo+'ãçæ°æ®ï¼' , 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | closeOnClickModal: false, |
| | | type: 'warning' |
| | | }).then(function() { |
| | | deleteById(row.id).then((response)=>{ |
| | | var data = response.data |
| | | if (data.code == 0) { |
| | | _than.$message.success('å 餿å') |
| | | } else { |
| | | _than.$message.error('å é¤å¤±è´¥') |
| | | } |
| | | _than.getData() |
| | | }) |
| | | }).catch((error) => { |
| | | console.log(error); |
| | | }) |
| | | }, |
| | | // æ°å¢ / ä¿®æ¹ |
| | | addOrUpdateHandle(row) { |
| | | this.$router.push({ |
| | | name: 'packageInspectForm', |
| | | query: { |
| | | id: row == null ? null : row.id, |
| | | } |
| | | }) |
| | | }, |
| | | formatResult(row, column, cellValue){ |
| | | if(cellValue != undefined || cellValue != null){ |
| | | if(cellValue == 'ä¸åæ ¼'){ |
| | | return "<span style='color:#E84738;'>ä¸åæ ¼</span>" |
| | | } |
| | | return "<span style='color:#34BD66;'>åæ ¼</span>" |
| | | } |
| | | }, |
| | | formatDateTime(row, column, cellValue) { |
| | | return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : '' |
| | | }, |
| | | getData() { |
| | | this.$refs.packageInspectTable.getDataList() |
| | | }, |
| | | // tableèªå¸¦äºä»¶ |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="height: 100%"> |
| | | <div class="page-header"> |
| | | <div class="header-left"> |
| | | <a @click="$router.go(-1)"><i class="icon-btn-back"></i></a> |
| | | <h2>ç¼è¾-å
è£
æ£éª</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button @click="save()" type="primary">ä¿å</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="packageInspect-basic"> |
| | | <el-form |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | | ref="dataForm" |
| | | style="width: 100%" |
| | | class="l-mes" |
| | | label-width="110px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="å
è£
æ£éªç¼å·" prop="packInsNo"> |
| | | <el-input v-model="dataForm.packInsNo" disabled> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="å
è£
ç¼å·" prop="packageNo"> |
| | | <el-input v-model="dataForm.packageNo" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="projectName" label="项ç®åç§°" > |
| | | <el-tooltip :disabled="dataForm.projectName==null" :content="dataForm.projectName"> |
| | | <el-input v-model="dataForm.projectName" disabled ></el-input> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客æ·åç§°" prop="customerName"> |
| | | <el-input v-model="dataForm.customerName" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ååå·" prop="contractNo"> |
| | | <el-input v-model="dataForm.contractNo" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ¥æ£æ¥æ" prop="createTime"> |
| | | <el-input v-model="dataForm.createTime" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ¥æ£äºº" prop="createUser"> |
| | | <el-input v-model="dataForm.createUser" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="packageInspect-detail"> |
| | | <el-row style="width:100%;z-index: 10;height:50px;"> |
| | | <el-col :span="22">æ£éªé¡¹ç®</el-col> |
| | | <el-col :span="2"> |
| | | <el-button style="width:100%" size="small" @click="clickAddLine()">æ·»å æ£éªé¡¹ç®</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width:100%;"> |
| | | <el-col :span="24"> |
| | | <el-table |
| | | :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" |
| | | :cell-style="{textAlign:'center'}" |
| | | ref="table" |
| | | :data="list" |
| | | border |
| | | style="width: 100%;" |
| | | height="400" |
| | | row-key="randomId" class="l-mes" |
| | | default-expand-all |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | | <el-table-column type="index" label="åºå·" width="60"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="项ç®" width="260"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-if="scope.row.children" class="inline-input" style="width:90%;" v-model="scope.row.name" |
| | | placeholder="请è¾å
¥é¡¹ç®åç§°"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="required" label="è¦æ±" width="260"> |
| | | <template slot-scope="scope"> |
| | | <div> |
| | | <el-input v-model="scope.row.required" |
| | | placeholder="请è¾å
¥è¦æ±"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="note" label="æ£éªæè¿°" width="260" > |
| | | <template slot-scope="scope"> |
| | | <div> |
| | | <el-input v-model="scope.row.note" placeholder="æ£éªæè¿°"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" prop="testState" label="ç»è®º" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.result"> |
| | | <el-option label="åæ ¼" value="åæ ¼"></el-option> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" style="background-color: white;" label="æä½" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-button icon="el-icon-circle-check" type="text" @click="savePackIns(scope.row,scope.$index)">ä¿å</el-button> |
| | | <el-button v-if="scope.row.children" icon="el-icon-circle-plus-outline" type="text" @click="clickAddChildren(scope.row,scope.$index)">æ·»å è¡</el-button> |
| | | <el-button v-if="!scope.row.children || scope.row.children.length==0" |
| | | icon="el-icon-circle-close" type="text" |
| | | @click="clickDelLine(scope.row,scope.$index,scope.row.children!=null)">åæ¶</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="packageInspect-result"> |
| | | <el-row> |
| | | <el-col :span="24">æ£éªç»è®º</el-col> |
| | | </el-row> |
| | | <el-row style="width:100%"> |
| | | <el-col :span="24"> |
| | | <el-table border height="90" :data="conclusionTable" ref="conclusion" v-model="conclusion" |
| | | :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" |
| | | :cell-style="{textAlign:'center'}"> |
| | | <el-table-column prop="packageNo" label="å
è£
ç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="userName" label="æ£éªå"></el-table-column> |
| | | <el-table-column prop="judgeState" label="æ£éªç»è®º"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="scope.row.testState == '1'">åæ ¼</el-tag> |
| | | <el-tag type="danger" v-else-if="scope.row.testState == '0'">ä¸åæ ¼</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template> |
| | | <el-button type="text" :disabled="resultVal!=null && dataForm.id!=null" @click="showDialog()" size="small">䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="䏿¥" |
| | | :visible.sync="dialogVisible" |
| | | width="30%" class="l-mes"> |
| | | <el-row> |
| | | <el-col> |
| | | <span>ä¸åæ ¼æ°é:</span> |
| | | <el-input type="number" v-model="unqualifiedNum" placeholder="请è¾å
¥ä¸åæ ¼æ°é"/> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitSave()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | fetchListById, |
| | | updatePackageInsProduct, |
| | | } from '@/api/quality/packageInspect' |
| | | export default { |
| | | computed:{}, |
| | | components:{ |
| | | }, |
| | | data(){ |
| | | return{ |
| | | loading: false, |
| | | unqualifiedNum: null, |
| | | dialogVisible:false, |
| | | resultVal: null, |
| | | projectList: [], |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | columnList: [], |
| | | dataForm:{ |
| | | id: null, |
| | | packInsNo: null, |
| | | packageNo: '', |
| | | contractNo: '', |
| | | projectName: '', |
| | | customerName: '', |
| | | packageInsProductS: [{ |
| | | deviceId: 0, |
| | | father:'', |
| | | name: '', |
| | | required: '', |
| | | testValue: '', |
| | | unit: '', |
| | | testValueList: [] |
| | | }] |
| | | }, |
| | | form: null, |
| | | list:[], |
| | | conclusion: null, |
| | | conclusionTable: [{ |
| | | packageNo: '', |
| | | name: '', |
| | | userName: '', |
| | | testState: '' |
| | | }], |
| | | dataRule: {}, |
| | | } |
| | | }, |
| | | beforeUpdate(){ |
| | | this.$nextTick(()=>{ |
| | | this.$refs.table.doLayout(); |
| | | }) |
| | | }, |
| | | created(){ |
| | | this.dataForm.id = this.$route.query.id |
| | | this.init() |
| | | }, |
| | | watch:{ |
| | | dialogVisible(newVal){ |
| | | if(newVal){ |
| | | this.unqualifiedNum = null |
| | | } |
| | | }, |
| | | }, |
| | | methods:{ |
| | | checkTestState(){ |
| | | let resultVal = '1' |
| | | this.list.forEach(item=>{ |
| | | if(item.children){ |
| | | item.children.forEach(ele=>{ |
| | | if(ele.testState == 0){ |
| | | resultVal = '0' |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.resultVal = resultVal |
| | | this.conclusionTable[0].testState = resultVal |
| | | sessionStorage.setItem("raw-resultVal-"+this.dataForm.id,resultVal) |
| | | }, |
| | | showDialog(){ |
| | | let size = 0 //ä¸åæ ¼é¡¹ç®æ°é |
| | | this.list.forEach(item=>{ |
| | | if(item.children){ |
| | | let num = item.children.filter(e=>{ |
| | | return e.testState == 0 |
| | | }).length |
| | | size+=num |
| | | } |
| | | }) |
| | | if (size > 0) { |
| | | this.dialogVisible = true |
| | | }else{ |
| | | this.submitSave() |
| | | } |
| | | }, |
| | | //䏿¥ |
| | | submitSave(){ |
| | | let data = { |
| | | id: this.dataForm.id, |
| | | number: this.unqualifiedNum, |
| | | } |
| | | updateRawInspectsById(data).then(res => { |
| | | if(res.data.code == 0 && (res.data.data=='1'|| res.data.data=='0')){ |
| | | sessionStorage.setItem("raw-resultVal-"+this.dataForm.id,res.data.data) |
| | | this.$message.success("䏿¥æå"); |
| | | }else{ |
| | | this.$message.error("䏿¥å¤±è´¥ï¼",res.data.data); |
| | | } |
| | | this.dialogVisible = false |
| | | this.checkTestState() |
| | | }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine(row) { |
| | | this.list.push({ |
| | | pId: '', |
| | | name: '', |
| | | note: '', |
| | | required: '', |
| | | result: '', |
| | | randomId: Math.random(), |
| | | children: [] |
| | | }) |
| | | }, |
| | | //æ·»å å级 |
| | | clickAddChildren(row,index){ |
| | | console.log(row,index); |
| | | row.children.push({ |
| | | note: '', |
| | | required: '', |
| | | result: '', |
| | | randomId: Math.random(), |
| | | }) |
| | | }, |
| | | // å é¤è¡ |
| | | clickDelLine(row,index,isParent) { |
| | | if(isParent){ |
| | | let parentIndex = this.list.findIndex(el =>{ |
| | | return el.randomId == row.randomId |
| | | }) |
| | | this.list.splice(parentIndex,1) |
| | | }else{ |
| | | let i = this.list.findIndex(el =>{ |
| | | return el.children.find(ele => ele.randomId == row.randomId) |
| | | }) |
| | | let childrenIndex = this.list[i].children.findIndex(el =>{ |
| | | return el.randomId == row.randomId |
| | | }) |
| | | this.list[i].children.splice(childrenIndex,1) |
| | | } |
| | | }, |
| | | //ä¿åæ£æ¥é¡¹ |
| | | savePackIns(row,index){ |
| | | if(row){ |
| | | let obj = { |
| | | name: row.anme, |
| | | note: row.note, |
| | | packageInspectId: row.packageInspectId, |
| | | required: row.required, |
| | | result: row.result, |
| | | } |
| | | updatePackageInsProduct(obj).then(res=>{ |
| | | console.log(res); |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }) |
| | | } |
| | | }, |
| | | init(){ |
| | | if(this.dataForm.id){ |
| | | fetchListById(this.dataForm.id).then(res=>{ |
| | | let data = res.data.data |
| | | this.dataForm.packInsNo = data.packInsNo |
| | | this.dataForm.packageNo = data.packageNo |
| | | this.dataForm.contractNo = data.contractNo |
| | | this.dataForm.customerName = data.customerName |
| | | this.dataForm.projectName = data.projectName |
| | | this.dataForm.createTime = data.createTime |
| | | this.dataForm.createUser = data.createUser |
| | | this.list = data.packageInsProductS |
| | | |
| | | }).catch(error=>{ |
| | | this.$message.error("è·å失败",error) |
| | | }) |
| | | }else{ |
| | | this.conclusionTable = [] |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | if (row.rpId != null && row.rpId != '') { |
| | | let val = row.testValueList.join(",") |
| | | if (val === undefined || val === '' || val === null) { |
| | | return |
| | | } |
| | | let obj = { |
| | | deviceId: row.deviceId, |
| | | rpId: row.rpId, |
| | | testValue: val, |
| | | note: row.note |
| | | } |
| | | updateRawInsProduct(obj).then(res => { |
| | | if (res.data.code == 0) { |
| | | this.$message.success("æ´æ°æå") |
| | | } else { |
| | | this.$message.error("æ´æ°å¤±è´¥") |
| | | } |
| | | this.init() |
| | | }) |
| | | } |
| | | }, |
| | | save(){ |
| | | let data = this.dataForm |
| | | this.list.forEach(item=>{ |
| | | item.children.forEach(c=>{ |
| | | c.testValue=c.testValueList.join(",") |
| | | }) |
| | | }) |
| | | data.packageInsProductS = this.list |
| | | addRawInspects(data).then(res=>{ |
| | | this.$message.success("ä¿åæå") |
| | | this.$router.go(-1) |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .packageInspect-detail { |
| | | width: 100%; |
| | | height: 490px; |
| | | padding: 10px 20px; |
| | | display: flex; |
| | | border: 1px solid #ddd; |
| | | background-color: #fff; |
| | | margin-top: 10px; |
| | | box-sizing: border-box; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .packageInspect-result { |
| | | width: 100%; |
| | | height: 150px; |
| | | padding: 10px 20px; |
| | | display: flex; |
| | | border: 1px solid #ddd; |
| | | background-color: #fff; |
| | | margin-top: 10px; |
| | | box-sizing: border-box; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .packageInspect-basic { |
| | | background-color: #fff; |
| | | height: 120px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 10px 20px; |
| | | border: 1px solid #ddd; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .packageInspect-related-stock-part { |
| | | background-color: #fff; |
| | | width: 100%; |
| | | height: 220px; |
| | | border: 1px solid #ddd; |
| | | padding: 10px 20px 0px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .packageInspect-bom { |
| | | background-color: #fff; |
| | | width: 100%; |
| | | height: 499px; |
| | | border: 1px solid #ddd; |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .packageInspect-bom .el-card__header { |
| | | padding: 1px 20px; |
| | | border-bottom: 0px solid #ebeef5; |
| | | } |
| | | |
| | | .packageInspect-bom .el-card__body { |
| | | height: calc(100% - 22px); |
| | | } |
| | | |
| | | .packageInspect-bom .el-card__body .el-collapse { |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .packageInspect-technology-params { |
| | | background-color: #fff; |
| | | width: calc(52% - 20px); |
| | | float: left; |
| | | height: 719px; |
| | | border: 1px solid #ddd; |
| | | padding: 10px 20px; |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | .packageInspect-structure { |
| | | background-color: #fff; |
| | | width: 35%; |
| | | float: left; |
| | | height: 719px; |
| | | border: 1px solid #ddd; |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .packageInspect-flow { |
| | | background-color: #fff; |
| | | width: calc(65% - 20px); |
| | | float: left; |
| | | height: 719px; |
| | | border: 1px solid #ddd; |
| | | padding: 10px 20px; |
| | | margin-left: 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /*èªå®ä¹disabledç¶æä¸checkboxçæ ·å¼*/ |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled.is-checked |
| | | .el-checkbox__inner { |
| | | background-color: #006eff; |
| | | border-color: #006eff; |
| | | } |
| | | |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled.is-checked |
| | | + span.el-checkbox__label { |
| | | color: #006eff; |
| | | border-color: #006eff; |
| | | } |
| | | |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled |
| | | .el-checkbox__inner { |
| | | background-color: #ffffff; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled |
| | | + span.el-checkbox__label { |
| | | color: #606266; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .completeproductstructure-checkout .el-checkbox__inner::after { |
| | | border: 1px solid #fff !important; |
| | | border-left: 0 !important; |
| | | border-top: 0 !important; |
| | | cursor: pointer !important; |
| | | } |
| | | |
| | | .packageInspect-bom-div { |
| | | width: 100%; |
| | | margin-bottom: 5px; |
| | | } |
| | | |
| | | .packageInspect-technology-div { |
| | | width: 100%; |
| | | margin-bottom: 5px; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .packageInspect-technology-div .el-collapse { |
| | | border-top: 0px; |
| | | border-bottom: 0px; |
| | | } |
| | | |
| | | .structure-detail-table th.gutter { |
| | | display: table-cell !important; |
| | | width: 10px !important; |
| | | } |
| | | |
| | | .structure-detail-table colgroup.gutter { |
| | | display: table-cell !important; |
| | | width: 10px !important; |
| | | } |
| | | |
| | | .final-product-checkout .el-card__header { |
| | | padding: 0px 20px; |
| | | border-bottom: 0px; |
| | | } |
| | | |
| | | .final-product-checkout .el-card__body { |
| | | padding: 0px 20px 20px; |
| | | } |
| | | |
| | | .orimaterial-quantity .el-card__header { |
| | | padding: 0px 20px; |
| | | border-bottom: 0px; |
| | | } |
| | | |
| | | .orimaterial-quantity .el-card__body { |
| | | padding: 0px 20px 20px; |
| | | } |
| | | |
| | | .packageInspect-materialcost-table th.gutter { |
| | | display: table-cell !important; |
| | | width: 10px !important; |
| | | } |
| | | |
| | | .packageInspect-materialcost-table colgroup.gutter { |
| | | display: table-cell !important; |
| | | width: 10px !important; |
| | | } |
| | | |
| | | .GooFlow .ico .ico_start:before { |
| | | color: red; |
| | | } |
| | | .highlight-tab-class { |
| | | color: #006eff; |
| | | background: #e4e7ed; |
| | | border-top: 1px solid #006eff; |
| | | } |
| | | .unhighlight-tab-class { |
| | | border: 1px solid #e4e7ed; |
| | | border-bottom: none; |
| | | } |
| | | .avue-crud__menu{ |
| | | min-height: 0px; |
| | | } |
| | | </style> |
| | |
| | | * https://cli.vuejs.org/zh/config/ |
| | | */ |
| | | // const url = 'http://192.168.2.7:9999' |
| | | const url = 'http://192.168.2.7:9999' |
| | | //const url = 'http://192.168.32.45:9999' |
| | | // const url = 'http://192.168.0.23:9999' |
| | | |
| | | const url = 'http://localhost:9999' |
| | | // const url = 'http://localhost:9999' |
| | | |
| | | // const url = 'http://ztt-gateway:9999' |
| | | const localUrl = 'http://localhost:8089' |