modified: src/api/plan/productionschedul.js
modified: src/api/quality/packageInspect.js
modified: src/views/plan/productionschedul/index.vue
modified: src/views/quality/packageinspect/index.vue
modified: src/views/quality/packageinspect/packageInspect-form.vue
modified: vue.config.js
| | |
| | | |
| | | export function fetchScheduleById(id) { |
| | | return request({ |
| | | url: '/mes//productionSchedul/'+id, |
| | | url: '/mes/productionSchedul/'+id, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function fillTime(data) { |
| | | return request({ |
| | | url: '/mes/productionSchedul/fillTime', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | data: data |
| | | }) |
| | | } |
| | | export function updatePackageInspectById(data) { |
| | | return request({ |
| | | url: '/mes/packageInspect/updatePackageInspectById', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | |
| | | <basic-container> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div style="height:80vh"> |
| | | <div style="height:80vh;padding: 0px 10px;"> |
| | | <avue-crud :data="tableData" ref="crud" :option="option" :span-method="spanMethod" |
| | | @refresh-change="getData" |
| | | :page="page" |
| | |
| | | <el-card> |
| | | <div slot="header" class="clearfix"> |
| | | <span>调度时间线</span> |
| | | <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button> |
| | | <el-button v-if="scheduleList.length>0" @click="openEditDialog" style="float: right; padding: 3px 0" type="text">编辑</el-button> |
| | | </div> |
| | | <div style="height:70vh;overflow-y: scroll;"> |
| | | <el-timeline> |
| | |
| | | placement="top" |
| | | v-for="(item, index) in scheduleList" |
| | | :key="index" |
| | | :timestamp="item.planTime"> |
| | | <el-card style="width:95%;margin: 0;padding: 0px 10px;"> |
| | | <p style="font-weight: bold;">{{item.title}}</p> |
| | | <p>实际时间: {{ item.actualTime }}</p> |
| | | :timestamp="item.title"> |
| | | <el-card shadow="hover" :body-style="{margin: '0',padding:'0px 20px 0px 20px'}" style="width:90%;"> |
| | | <p> |
| | | <span style="font-weight: bold;">计划时间: </span> |
| | | {{item.planTime}} |
| | | </p> |
| | | <p> |
| | | <span style="font-weight: bold;">实际时间: </span> |
| | | {{ item.actualTime }}</p> |
| | | </el-card> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </basic-container> |
| | | <el-dialog |
| | | title="编辑时间线" |
| | | :visible.sync="dialogVisible" |
| | | top="5vh" |
| | | width="50%" |
| | | :before-close="handleClose"> |
| | | <div style="height:60vh;overflow-y: scroll;"> |
| | | <el-timeline> |
| | | <el-timeline-item |
| | | placement="top" |
| | | v-for="(item, index) in scheduleEditList" |
| | | :key="index" |
| | | :timestamp="item.title"> |
| | | <el-card shadow="hover" style="width:90%" :body-style="{padding:'20px 20px 5px 20px'}"> |
| | | <el-row> |
| | | <el-col :span="3"> |
| | | <p style="font-weight: bold;line-height: 50%;">计划时间: </p> |
| | | </el-col> |
| | | <el-col :span="21"> |
| | | <el-date-picker |
| | | style="width:100%" |
| | | v-model="item.planTime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | placeholder="选择日期时间"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="3"> |
| | | <p style="font-weight: bold;line-height: 50%;">实际时间: </p> |
| | | </el-col> |
| | | <el-col :span="21"> |
| | | <el-date-picker |
| | | style="width:100%" |
| | | v-model="item.actualTime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="datetime" |
| | | placeholder="选择日期时间"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmEditSchedul">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | fetchScheduleList, |
| | | fetchScheduleById, |
| | | fillTime |
| | | } from '@/api//plan/productionschedul' |
| | | import TableForm from './template-form' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | scheduleList: [], |
| | | scheduleEditList: [], |
| | | typeOptions: [], |
| | | multipleSelection: [], |
| | | loading: true, |
| | |
| | | beforeDestroy() { |
| | | }, |
| | | methods: { |
| | | openEditDialog(){ |
| | | this.scheduleEditList = JSON.parse(JSON.stringify(this.scheduleList)) |
| | | this.dialogVisible = true |
| | | }, |
| | | confirmEditSchedul(){ |
| | | let data = this.scheduleEditList |
| | | let orderObj = this.multipleSelection[0] |
| | | console.log("data---",data) |
| | | console.log("orderObj-----",orderObj) |
| | | let obj = { |
| | | "documentActualTime": data[0].actualTime, |
| | | "documentPlanTime": data[0].planTime, |
| | | "bomActualTime": data[1].actualTime, |
| | | "bomPlanTime": data[1].planTime, |
| | | "contractActualTime": data[2].actualTime, |
| | | "contractPlanTime": data[2].planTime, |
| | | "arrivalActualTime": data[3].actualTime, |
| | | "arrivalPlanTime": data[3].planTime, |
| | | "checkActualTime": data[4].actualTime, |
| | | "checkPlanTime": data[4].planTime, |
| | | "productActualTime": data[5].actualTime, |
| | | "productPlanTime": data[5].planTime, |
| | | "id": orderObj.id, |
| | | "contractNo": orderObj.contractNo, |
| | | "customerName": orderObj.customerName, |
| | | "deliveryDate": orderObj.deliveryDate, |
| | | "orderTime": orderObj.orderTime, |
| | | "productType": orderObj.productType, |
| | | "projectName": orderObj.projectName |
| | | } |
| | | console.log("obj----->>>",obj); |
| | | fillTime(obj).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("更新成功") |
| | | }else{ |
| | | this.$message.error("更新失败") |
| | | } |
| | | this.getScheduleById(orderObj.id) |
| | | this.dialogVisible = false |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }) |
| | | |
| | | }, |
| | | handleClose(done){ |
| | | done() |
| | | }, |
| | | initTimeLine(data){ |
| | | this.scheduleList = [] |
| | | if(data){ |
| | |
| | | }, |
| | | selectionRow(val){ |
| | | if (val.length > 1) { |
| | | const preVal = val.shift(); |
| | | this.$refs.crud.toggleRowSelection(preVal, false); |
| | | } |
| | | this.getScheduleById(val[0].id) |
| | | const preVal = val.shift(); |
| | | this.$refs.crud.toggleRowSelection(preVal, false); |
| | | } |
| | | else{ |
| | | this.scheduleList=[] |
| | | } |
| | | this.multipleSelection = val |
| | | this.getScheduleById(val[0].id) |
| | | }, |
| | | formatDate(row, cellValue){ |
| | | if (cellValue) { |
| | |
| | | // 标题 |
| | | column: [ |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'packInsNo', |
| | | label: '包装检验编号', |
| | | isTrue: true, |
| | |
| | | render: { fun: this.addOrUpdateHandle } |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'packageNo', |
| | | label: '包装编码', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'contractNo', |
| | | label: '合同号', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'projectName', |
| | | label: '项目名称', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'customerName', |
| | | label: '客户名称', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'createTime', |
| | | label: '报检日期', |
| | | isTrue: true, |
| | |
| | | formatter: this.formatDateTime, |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '180', |
| | | prop: 'createUser', |
| | | label: '报检人', |
| | | isTrue: true, |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '150', |
| | | minWidth: '200', |
| | | prop: 'result', |
| | | label: '结论', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | | width: 120, |
| | | minWidth: 120 |
| | | width: 100, |
| | | minWidth: 100 |
| | | }, |
| | | }, |
| | | } |
| | |
| | | this.$router.push({ |
| | | name: 'packageInspectForm', |
| | | query: { |
| | | id: row == null ? null : row.id, |
| | | } |
| | | id: row == null ? null : row.id |
| | | }, |
| | | params:{resultVal : row == null ? null : row.result} |
| | | }) |
| | | }, |
| | | formatResult(row, column, cellValue){ |
| | |
| | | <h2>编辑-包装检验</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button @click="save()" type="primary">保存</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="packageInspect-detail"> |
| | | <el-row style="width:100%;z-index: 10;height:50px;"> |
| | | <el-col :span="22">检验项目</el-col> |
| | | <el-row :gutter="10" style="width:100%;z-index: 10;height:50px;"> |
| | | <el-col :span="20">检验项目</el-col> |
| | | <el-col :span="2"> |
| | | <el-button style="width:100%" size="small" @click="clickAddLine()">添加检验项目</el-button> |
| | | <el-button v-if="resultVal==''" style="width:100%" size="small" @click="clickAddLine()">添加检验项目</el-button> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-button v-if="resultVal==''" style="width:100%" type="primary" size="small" |
| | | @click="savePackIns()">保存</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="width:100%;"> |
| | |
| | | </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" |
| | | <el-input :readonly="resultVal!=''" 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" |
| | | <div v-if="!scope.row.children"> |
| | | <el-input :readonly="resultVal!=''" 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 v-if="!scope.row.children"> |
| | | <el-input :readonly="resultVal!=''" v-model="scope.row.note" placeholder="检验描述"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" prop="testState" label="结论" min-width="150"> |
| | | <el-table-column prop="testState" label="结论" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.result"> |
| | | <el-select :disabled="resultVal!=''" @change="changeResult" v-model="scope.row.result" v-if="!scope.row.children"> |
| | | <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"> |
| | | <el-table-column v-if="resultVal==''" 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" |
| | | <el-button v-if="!scope.row.children" icon="el-icon-circle-close" type="text" |
| | | @click="clickDelLine(scope.row,scope.$index,scope.row.children!=null)">取消</el-button> |
| | | <el-button v-if="scope.row.children" 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-row> |
| | | <el-row style="width:100%"> |
| | | <el-col :span="24"> |
| | | <el-table border height="90" :data="conclusionTable" ref="conclusion" v-model="conclusion" |
| | | <el-table class="l-mes" 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="检验结论"> |
| | | <el-table-column prop="result" 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> |
| | | <el-select :disabled="resultVal!=''" style="width:100%" 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 label="操作"> |
| | | <template> |
| | | <el-button type="text" :disabled="resultVal!=null && dataForm.id!=null" @click="showDialog()" size="small">上报</el-button> |
| | | <el-button type="text" :disabled="resultVal!=''" @click="submitSave()" size="small">上报</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </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> |
| | | |
| | |
| | | import { |
| | | fetchListById, |
| | | updatePackageInsProduct, |
| | | updatePackageInspectById, |
| | | } from '@/api/quality/packageInspect' |
| | | export default { |
| | | computed:{}, |
| | |
| | | data(){ |
| | | return{ |
| | | loading: false, |
| | | unqualifiedNum: null, |
| | | dialogVisible:false, |
| | | resultVal: null, |
| | | projectList: [], |
| | | // 添加列 |
| | | empiricalValueAdd: 1, |
| | | // 编辑时存储最长的列数字,做删除判断 |
| | | empiricalValueAddMaxNumber: 0, |
| | | columnList: [], |
| | | dataForm:{ |
| | | id: null, |
| | | packInsNo: null, |
| | |
| | | conclusion: null, |
| | | conclusionTable: [{ |
| | | packageNo: '', |
| | | name: '', |
| | | userName: '', |
| | | testState: '' |
| | | result: '' |
| | | }], |
| | | dataRule: {}, |
| | | } |
| | |
| | | }, |
| | | created(){ |
| | | this.dataForm.id = this.$route.query.id |
| | | this.resultVal = this.$route.params.resultVal |
| | | if(!this.resultVal){ |
| | | let val = sessionStorage.getItem("packIns-resultVal-"+this.dataForm.id) |
| | | if(val){ |
| | | this.resultVal=val |
| | | } |
| | | } |
| | | this.init() |
| | | }, |
| | | watch:{ |
| | | dialogVisible(newVal){ |
| | | if(newVal){ |
| | | this.unqualifiedNum = null |
| | | } |
| | | }, |
| | | list(){ |
| | | this.changeResult() |
| | | } |
| | | }, |
| | | methods:{ |
| | | checkTestState(){ |
| | | let resultVal = '1' |
| | | this.list.forEach(item=>{ |
| | | if(item.children){ |
| | | item.children.forEach(ele=>{ |
| | | if(ele.testState == 0){ |
| | | resultVal = '0' |
| | | } |
| | | }) |
| | | } |
| | | changeResult(){ |
| | | let result = '合格' |
| | | let data = this.list |
| | | if(data){ |
| | | data.forEach(item=>{ |
| | | if(item.children){ |
| | | item.children.forEach(ele=>{ |
| | | if(ele.result=='不合格'){ |
| | | result='不合格' |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | 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() |
| | | } |
| | | this.conclusionTable[0].result = result |
| | | }, |
| | | //上报 |
| | | submitSave(){ |
| | | let data = { |
| | | id: this.dataForm.id, |
| | | number: this.unqualifiedNum, |
| | | result: this.conclusionTable[0].result, |
| | | } |
| | | 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) |
| | | updatePackageInspectById(data).then(res => { |
| | | if(res.data.code === 0){ |
| | | this.resultVal = res.data.data |
| | | sessionStorage.setItem("packIns-resultVal-"+this.dataForm.id,res.data.data) |
| | | this.$message.success("上报成功"); |
| | | }else{ |
| | | this.$message.error("上报失败,",res.data.data); |
| | | 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({ |
| | | name: row.name, |
| | | note: '', |
| | | required: '', |
| | | result: '', |
| | |
| | | } |
| | | }, |
| | | //保存检查项 |
| | | 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); |
| | | savePackIns(){ |
| | | if(this.list.length==0){ |
| | | this.$message.error("检验项目为空!") |
| | | return |
| | | }else{ |
| | | let dataList = [] |
| | | this.list.forEach(item=>{ |
| | | if(item.children){ |
| | | item.children.forEach(ele=>{ |
| | | let obj = { |
| | | id: ele.pid || null, |
| | | name: item.name, |
| | | note: ele.note, |
| | | packageInspectId: this.dataForm.id, |
| | | required: ele.required, |
| | | result: ele.result, |
| | | } |
| | | dataList.push(obj) |
| | | }) |
| | | } |
| | | }) |
| | | updatePackageInsProduct(dataList).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("保存成功") |
| | | } |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | this.$message.error("保存失败") |
| | | }) |
| | | } |
| | | }, |
| | |
| | | this.dataForm.projectName = data.projectName |
| | | this.dataForm.createTime = data.createTime |
| | | this.dataForm.createUser = data.createUser |
| | | this.list = data.packageInsProductS |
| | | |
| | | this.list = [] |
| | | let userNameList = [] |
| | | data.packageInsProductS.forEach(item => { |
| | | if (item.children) { |
| | | let ele = { |
| | | randomId: Math.random(), |
| | | name: null, |
| | | children: [] |
| | | } |
| | | ele.name = item.name |
| | | item.children.forEach(obj => { |
| | | if(obj.userName){ |
| | | userNameList.push(obj.userName) |
| | | } |
| | | let o = { |
| | | name: item.name, |
| | | randomId: Math.random(), |
| | | required: obj.required, |
| | | pid: obj.pid, |
| | | note: obj.note?obj.note:'', |
| | | result: obj.presult |
| | | } |
| | | ele.children.push(o) |
| | | }) |
| | | this.list.push(ele) |
| | | } |
| | | }) |
| | | this.conclusionTable = [{ |
| | | packageNo: data.packageNo, |
| | | userName: Array.from(new Set(userNameList)).join(','), |
| | | result: null |
| | | }] |
| | | }).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) |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | |
| | | * 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.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' |