Merge remote-tracking branch 'origin/master'
| | |
| | | }) |
| | | } |
| | | |
| | | export function addObj(obj) { |
| | | export function saveOrUpdate(obj) { |
| | | return request({ |
| | | url: '/mes/customer', |
| | | url: '/mes/customer/saveOrUpdate', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | |
| | | }) |
| | | } |
| | | |
| | | export function checkHanderOrder(orderId) { |
| | | export function checkHanderOrder(data) { |
| | | return request({ |
| | | url: '/mes/customerOrderInterrelated/checkHanderOrder/' + orderId, |
| | | url: '/mes/customerOrderInterrelated/checkHanderOrder', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | export function getCustomerMainAndOrderBycNo(contractNo) { |
| | | return request({ |
| | | url: '/mes/plan/customerOrder/getCustomerMainAndOrderBycNo/' + contractNo, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function addCustomerOrder(obj) { |
| | | return request({ |
| | | url: '/mes/plan/customerOrder', |
| | |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export function checkPutIFS(id,data) { |
| | | export function checkPutIFS(id,result) { |
| | | return request({ |
| | | url: '/mes/rawInspect/check/'+id, |
| | | url: '/mes/rawInspect/check/'+id+'/'+result, |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | |
| | | refreshBtn: false, // 是否显示刷新按钮 |
| | | columnBtn: false, // 是否显示显影按钮H |
| | | column: [{ |
| | | prop: 'id', |
| | | hide:true |
| | | },{ |
| | | label: '零件号', |
| | | slot: true, |
| | | formSlot: true, |
| | |
| | | cell: true, |
| | | type: 'input', |
| | | minWidth: 200, |
| | | span: 24 |
| | | span: 24, |
| | | }, { |
| | | label: '规格型号', |
| | | prop: 'customerPartSpec', |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | checkHanderOrder(val.id).then(res=>{ |
| | | checkHanderOrder(val).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("审核通过") |
| | | this.getData() |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | this.addOrUpdateVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addOrUpdate.init(row ? row.id : row) |
| | | }) |
| | | if(row.isPass){ |
| | | this.addOrUpdateVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addOrUpdate.init(row ? row.id : row) |
| | | }) |
| | | }else{ |
| | | this.addSampleVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addSampleForm.init(row ? row.contractNo : null) |
| | | }) |
| | | } |
| | | }, |
| | | // 新增样品订单 |
| | | addSampleCustomerOrder() { |
| | | this.addSampleVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addSampleForm.init(0) |
| | | this.$refs.addSampleForm.init(null) |
| | | }) |
| | | }, |
| | | // 打开日期选择框 |
| | |
| | | <template> |
| | | <el-dialog |
| | | width="75%" |
| | | top="10vh" |
| | | top="5vh" |
| | | :fullscreen="isFullScreen" |
| | | :close-on-click-modal="false" |
| | | :visible.sync="visible" |
| | |
| | | } |
| | | </style> |
| | | <script> |
| | | import { addObj } from '@/api/plan/customer' |
| | | import { saveOrUpdate } from '@/api/plan/customer' |
| | | import { getCustomerMainAndOrderBycNo } from '@/api/plan/customerorder' |
| | | import { remote } from '@/api/admin/dict' |
| | | import PartDialog from '@/views/common/part.vue' |
| | | import {dateFormat} from '@/util/date' |
| | |
| | | currentSelectRow: 0, |
| | | option: tableOption, |
| | | tableData: [{ |
| | | "$cellEdit": true, |
| | | "$index": 0, |
| | | "partNo": "", |
| | | "customerPartSpec": "", |
| | | "manufactureAttr": "", |
| | | "productName": "", |
| | | "productType": "", |
| | | "otcUnit": "", |
| | | "buyQtyDue": "", |
| | | "shippingAddress": "", |
| | | "remark": "", |
| | | "isTrusted": true |
| | | id: null, |
| | | $cellEdit: true, |
| | | $index: 0, |
| | | partNo: "", |
| | | customerPartSpec: "", |
| | | manufactureAttr: "", |
| | | productName: "", |
| | | productType: "", |
| | | otcUnit: "", |
| | | buyQtyDue: "", |
| | | shippingAddress: "", |
| | | remark: "", |
| | | isTrusted: true |
| | | }], |
| | | staffOptions: [], |
| | | title: '', |
| | |
| | | buttonDisable: false, |
| | | showPart: false, |
| | | dataForm: { |
| | | id: null, |
| | | contractNo: null, |
| | | customerName: null, |
| | | customerNo: null, |
| | |
| | | this.staffOptions = response.data.data |
| | | }) |
| | | }, |
| | | init(id) { |
| | | this.initDataForm() |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.title = '新增' |
| | | }) |
| | | init(contractNo) { |
| | | if(contractNo){ |
| | | getCustomerMainAndOrderBycNo(contractNo).then(res=>{ |
| | | if(res.status===200){ |
| | | let data = res.data.data |
| | | this.dataForm.id = data.id |
| | | this.dataForm.contractNo = data.contractNo |
| | | this.dataForm.customerName = data.customerName |
| | | this.dataForm.entityName = data.entityName |
| | | this.dataForm.province = data.province |
| | | this.salesSelectData = data.salesMan |
| | | this.dataForm.salesMan = data.salesMan |
| | | this.dataForm.originalContractStatus = data.originalContractStatus |
| | | this.dataForm.isCp = data.isCp |
| | | this.dataForm.customerNo = data.customerNo |
| | | this.dataForm.returnStatus = data.returnStatus |
| | | this.dataForm.placeOrderDate = data.placeOrderDate |
| | | this.dataForm.factoryPlaceOrderDate = data.factoryPlaceOrderDate |
| | | this.dataForm.deliveryDate = data.deliveryDate |
| | | this.dataForm.comment = data.comment |
| | | data.customerOrderVOList.forEach(e=>{ |
| | | e.$cellEdit = true |
| | | }) |
| | | this.tableData = data.customerOrderVOList |
| | | console.log(this.dataForm); |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.title = '编辑' |
| | | }) |
| | | }else{ |
| | | this.initDataForm() |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.title = '新增' |
| | | }) |
| | | } |
| | | }, |
| | | initDataForm() { |
| | | this.dataForm.contractNo = null |
| | |
| | | this.dataForm.deliveryDate = null |
| | | this.dataForm.comment = null |
| | | this.dataForm.customerOrderVOList = [{ |
| | | "$cellEdit": true, |
| | | "$index": 0, |
| | | "partNo": "", |
| | | "customerPartSpec": "", |
| | | "manufactureAttr": "", |
| | | "productName": "", |
| | | "productType": "", |
| | | "otcUnit": "", |
| | | "buyQtyDue": "", |
| | | "shippingAddress": "", |
| | | "remark": "", |
| | | "isTrusted": true |
| | | id: null, |
| | | $cellEdit: true, |
| | | $index: 0, |
| | | partNo: "", |
| | | customerPartSpec: "", |
| | | manufactureAttr: "", |
| | | productName: "", |
| | | productType: "", |
| | | otcUnit: "", |
| | | buyQtyDue: "", |
| | | shippingAddress: "", |
| | | remark: "", |
| | | isTrusted: true |
| | | }] |
| | | }, |
| | | // 表单提交 |
| | |
| | | _than.$refs.dataForm.validate((valid) => { |
| | | if (valid) { |
| | | _than.dataForm.customerOrderVOList = _than.tableData |
| | | addObj(_than.dataForm).then((data) => { |
| | | _than.$message.success('添加成功') |
| | | _than.initDataForm(); |
| | | _than.visible = false |
| | | _than.buttonDisable = false |
| | | _than.$emit('refreshDataList', 1) |
| | | saveOrUpdate(_than.dataForm).then((res) => { |
| | | if(res.status===200){ |
| | | if(_than.dataForm.id){ |
| | | _than.$message.success('更新成功') |
| | | }else{ |
| | | _than.$message.success('添加成功') |
| | | } |
| | | _than.initDataForm(); |
| | | _than.visible = false |
| | | _than.buttonDisable = false |
| | | _than.$emit('refreshDataList', 1) |
| | | } |
| | | }).catch((error) => { |
| | | _than.buttonDisable = false |
| | | }) |
| | |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <el-row> |
| | | <el-col :span="16" style="height:100vh"> |
| | | <el-row style="height:65%;padding:0px 10px;"> |
| | | <el-col :span="24"> |
| | | <el-row style="padding:0px 10px;"> |
| | | <el-col :span="24" style="margin: 0;"> |
| | | <div style="display:flex;height:36px;justify-content: space-between;align-items:center;"> |
| | | <div><span style="color:#E84738;font-weight: bold;">未完成</span></div> |
| | | <div> |
| | | <el-button @click="tagFinished" size="mini" round type="success">标记已完成</el-button> |
| | | <el-dropdown @command="changeTable"> |
| | | <span :style="dropdownTitleStyle" class="el-dropdown-link"> |
| | | {{dropdownTitle}}<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </span> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="undone">待完成调度</el-dropdown-item> |
| | | <el-dropdown-item command="done">已完成调度</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | | <div> |
| | | <el-button @click="tagFinished" v-if="showUnDownTable" size="mini" round type="success">标记已完成</el-button> |
| | | <el-button size="mini" round type="primary" |
| | | v-if="permissions.plan_productionschedul_edit_line" |
| | | v-if="permissions.plan_productionschedul_edit_line && showUnDownTable" |
| | | @click="openEditDialog">编辑时间线</el-button> |
| | | <el-tooltip content="刷新"> |
| | | <el-button circle icon="el-icon-refresh" @click="getDataList"></el-button> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | <!-- 待完成调度表格 --> |
| | | <avue-crud |
| | | v-if="showUnDownTable" |
| | | class="unfinished-crud" |
| | | :data="tableData" |
| | | ref="crud" |
| | | ref="unfinished" |
| | | :option="option" |
| | | :span-method="spanMethod" |
| | | @refresh-change="getDataList" |
| | | @current-change="handleCurrentChange" |
| | | @size-change="handleSizeChange" |
| | | @cell-click="handleClickCell" |
| | | :page="page" |
| | | @selection-change="selectionRow" |
| | | :table-loading="loading"> |
| | | <template #menu="{ row, index }"> |
| | | <el-button |
| | | v-if="permissions.plan_productionschedul_edit" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | size="small" |
| | | @click="editHandle(row, index)">编辑</el-button> |
| | | <el-button |
| | | v-if="permissions.plan_productionschedul_del" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | @click="deleteHandle(row, index)">删除</el-button> |
| | | </template> |
| | | <template slot="product" slot-scope="scope"> |
| | | <el-link type="primary">{{ scope.row.product }}</el-link> |
| | | </template> |
| | | <template #menu="{ row, index }"> |
| | | <el-button |
| | | v-if="permissions.plan_productionschedul_edit" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | size="small" |
| | | @click="editHandle(row, index)">编辑</el-button> |
| | | <el-button |
| | | v-if="permissions.plan_productionschedul_del" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | @click="deleteHandle(row, index)">删除</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="height:35%;padding:0px 10px;"> |
| | | <el-col :span="24" style="margin: 0;"> |
| | | <div style="display:flex;height:36px;justify-content: space-between;align-items:center;"> |
| | | <div><span style="color:#34BD66;font-weight: bold;">已完成</span></div> |
| | | </div> |
| | | <!-- 已完成调度表格 --> |
| | | <avue-crud |
| | | v-else |
| | | class="finished-crud" |
| | | :data="finishedTableData" |
| | | ref="finished" |
| | |
| | | :span-method="spanMethod" |
| | | @refresh-change="getFinishedData" |
| | | @current-change="handleCurrentChange" |
| | | @cell-click="handleClickCell" |
| | | @size-change="handleSizeChange" |
| | | :page="finishedPage" |
| | | @selection-change="selectionFinishedRow"> |
| | | <template slot="product" slot-scope="scope"> |
| | | <el-link type="primary">{{ scope.row.product }}</el-link> |
| | | </template> |
| | | </avue-crud> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="8" style="padding-left: 10px"> |
| | | <div style=""> |
| | | <el-card> |
| | | <div slot="header" class="clearfix"> |
| | | <span>调度时间线</span> |
| | | </div> |
| | | <div style="height:100vh;overflow-y: scroll;"> |
| | | <el-timeline> |
| | | <el-timeline-item |
| | | placement="top" |
| | | :color="(item.planTime||item.actualTime) ? '#34BD66' :null" |
| | | :icon="(item.planTime||item.actualTime) ? 'el-icon-circle-check' :null" |
| | | v-for="(item, index) in scheduleList" |
| | | :key="index" |
| | | :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> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </basic-container> |
| | | <!-- 编辑时间线 --> |
| | | <el-dialog |
| | | title="编辑时间线" |
| | | :visible.sync="dialogVisible" |
| | |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmEditSchedul">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="编辑" |
| | | :visible.sync="editDialogVisible" |
| | | width="50%"> |
| | | <el-form :model="editForm" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产情况:"> |
| | | <el-input style="width:100%" placeholder="请输入生产情况" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产程度:"> |
| | | <el-input style="width:100%" placeholder="请输入生产程度" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editDialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmEdit()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | <!-- 编辑生产过程和生产情况 --> |
| | | <el-dialog |
| | | title="编辑" |
| | | :visible.sync="editDialogVisible" |
| | | width="50%"> |
| | | <el-form :model="editForm" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产情况:"> |
| | | <el-input style="width:100%" placeholder="请输入生产情况" type="textarea" :row="2" v-model="editForm.productionStatus"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产程度:"> |
| | | <el-input style="width:100%" placeholder="请输入生产程度" type="textarea" :row="2" v-model="editForm.productionRoutine"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="editDialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmEdit()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 查看时间线 --> |
| | | <el-dialog |
| | | title="查看调度时间线" |
| | | top="5vh" |
| | | :visible.sync="showTimeLineDialog" |
| | | width="40%"> |
| | | <el-card> |
| | | <div style="height:500px;overflow-y: scroll;"> |
| | | <el-timeline> |
| | | <el-timeline-item |
| | | placement="top" |
| | | :color="(item.actualTime) ? '#34BD66' :null" |
| | | :icon="(item.actualTime) ? 'el-icon-circle-check' :null" |
| | | v-for="(item, index) in scheduleList" |
| | | :key="index" |
| | | :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> |
| | | </div> |
| | | </el-card> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | deleteSchedul, |
| | | updateState, |
| | | checkTimeLines, |
| | | updateSchedul |
| | | } from '@/api//plan/productionschedul' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | dropdownTitleStyle: { |
| | | color: '#E84738', |
| | | fontWeight: 'bold' |
| | | }, |
| | | showUnDownTable: true, |
| | | dropdownTitle: '待完成调度', |
| | | showTimeLineDialog:false, |
| | | editForm:{ |
| | | id: null, |
| | | productionRoutine: null, |
| | |
| | | prop:'id', |
| | | order:'descending' |
| | | }, |
| | | height: 370, |
| | | height: 530, |
| | | selection: true, |
| | | columnBtn: false, |
| | | index: true, |
| | |
| | | prop: 'product', |
| | | label: '产品名', |
| | | overHidden: true, |
| | | slot: true |
| | | }, |
| | | { |
| | | minWidth: 120, |
| | |
| | | prop: 'product', |
| | | label: '产品名', |
| | | overHidden: true, |
| | | slot: true |
| | | }, |
| | | { |
| | | minWidth: 120, |
| | |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | }, |
| | | mounted() {}, |
| | | beforeDestroy() {}, |
| | | methods: { |
| | | handleClickCell(row, column, cell, event){ |
| | | if(column.label === '产品名'){ |
| | | this.getScheduleById(row.mid) |
| | | this.showTimeLineDialog = true |
| | | } |
| | | }, |
| | | changeTable(command){ |
| | | if(command === 'undone'){ |
| | | this.dropdownTitle = '待完成调度' |
| | | this.dropdownTitleStyle = {color:'#E84738',fontWeight: 'bold'} |
| | | this.showUnDownTable = true |
| | | }else if(command === 'done'){ |
| | | this.dropdownTitle = '已完成调度' |
| | | this.dropdownTitleStyle = {color:'#34BD66',fontWeight: 'bold'} |
| | | this.showUnDownTable = false |
| | | } |
| | | }, |
| | | tagFinished(){ |
| | | if(this.multipleSelection.length < 1){ |
| | | this.$message.warning("请至少选择一条数据") |
| | |
| | | }) |
| | | }, |
| | | confirmEditSchedul(){ |
| | | const _than = this |
| | | let data = this.scheduleEditList |
| | | let mIds = this.multipleSelection.map(ele=>{ |
| | | return ele.mid |
| | |
| | | } |
| | | fillTime(obj).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("更新成功") |
| | | _than.$message.success("更新成功") |
| | | }else{ |
| | | this.$message.error("更新失败") |
| | | _than.$message.error("更新失败") |
| | | } |
| | | this.getScheduleById(orderObj.id) |
| | | this.dialogVisible = false |
| | | // _than.getScheduleById(orderObj.id) |
| | | _than.dialogVisible = false |
| | | }).catch(error=>{ |
| | | console.error(error); |
| | | }) |
| | | |
| | | }, |
| | | initTimeLine(data){ |
| | | let scheduleList = [] |
| | |
| | | }, |
| | | selectionRow(val){ |
| | | this.multipleSelection = val |
| | | this.getScheduleById(val[val.length-1].mid) |
| | | // if(this.multipleSelection.length>0){ |
| | | // this.getScheduleById(val[val.length-1].mid) |
| | | // this.showTimeLineDialog = true |
| | | // } |
| | | }, |
| | | selectionFinishedRow(val){ |
| | | if (val.length > 1) { |
| | |
| | | getDataList(){ |
| | | this.getUnFinishedData() |
| | | this.getFinishedData() |
| | | this.$nextTick(()=>{ |
| | | this.rowCalc() |
| | | }) |
| | | }, |
| | | getUnFinishedData() { |
| | | this.loading = true |
| | |
| | | deleteSchedul(row.mid).then(res=>{ |
| | | if(res.status===200){ |
| | | _than.$message.success("删除成功") |
| | | _than.getData() |
| | | _than.getDataList() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | <ttable |
| | | :table="table" |
| | | :resultData="resultData" |
| | | @handleSelectionChange="handleSelectionChange" |
| | |
| | | isTrue: true, |
| | | sort: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'date', |
| | | formatter: this.formatDateTime, |
| | | }, |
| | | { |
| | |
| | | components: { |
| | | ttable, |
| | | }, |
| | | created() { |
| | | created() { |
| | | if(this.permissions.quality_packageinspect_del){ |
| | | this.table.operator = [{ |
| | | text: '作废', |
| | |
| | | } |
| | | this.$router.push({ |
| | | name: 'packageInspectForm', |
| | | query: { |
| | | query: { |
| | | id: row == null ? null : row.id |
| | | }, |
| | | params:{resultVal : row.result=='' ? null : row.result} |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <div class="content-main"> |
| | | <div class="rawPage"> |
| | | <basic-container> |
| | | <ttable |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :prelang="prelang" |
| | |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | created() { |
| | | created() { |
| | | if(this.permissions.quality_processInspect_add){ |
| | | this.table.toolbar.push({ |
| | | text: '新增', |
| | |
| | | .rawPage .content-body { |
| | | flex: 1; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.AuditResult, |
| | | show: { |
| | | key: 'type', |
| | | val: ['过程检验','产品检验','包装检验'] |
| | | } |
| | | showFun: (row)=>{return row.type != '原材料检验'} |
| | | }) |
| | | } |
| | | this.table.operator = arr.length>0 ? arr : null |
| | |
| | | cancelButtonText: '不通过', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | checkPutIFS(val.id,{result: 1}).then(res=>{ |
| | | if(res.status===200){ |
| | | console.log(res) |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | this.checkPutIFSFun(val.id,1); |
| | | }).catch((action) => { |
| | | if(action === 'cancel'){ |
| | | checkPutIFS(val.id,{result: 2}).then(res=>{ |
| | | if(res.status===200){ |
| | | console.log(res) |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | this.checkPutIFSFun(val.id,2); |
| | | } |
| | | }); |
| | | }, |
| | | checkPutIFSFun(id,result){ |
| | | checkPutIFS(id, result).then(res=>{ |
| | | if(res.status===200){ |
| | | this.getData() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | downloadReport(){ |
| | | let selection = this.multipleSelection |
| | | if(!selection || selection.length < 1){ |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="报检日期" prop="createTime"> |
| | | <el-date-picker |
| | | :disabled="dataForm.id!=null" |
| | | v-model="dataForm.createTime" |
| | | type="datetime" |
| | | placeholder="报检日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="报检人" prop="createUser" v-if="dataForm.id!=null"> |
| | | <el-input v-model="dataForm.createUser" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="projectName" label="项目名称" v-if="dataForm.id!=null"> |
| | | <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="createTime" v-if="dataForm.id!=null"> |
| | | <el-input v-model="dataForm.createTime" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="报检人" prop="createUser" v-if="dataForm.id!=null"> |
| | | <el-input v-model="dataForm.createUser" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | testState: '' |
| | | }], |
| | | dataRule: { |
| | | code:[{ required: true, message: '请扫描选择零件', trigger: 'blur' }] |
| | | code:[{ required: true, message: '请扫描选择零件', trigger: 'blur' }], |
| | | createTime: [{ required: true, message: '请选择报检日期', trigger: 'change' }] |
| | | }, |
| | | deviceList: [], |
| | | } |
| | |
| | | row.children.push(obj) |
| | | }, |
| | | save(){ |
| | | const _than = this |
| | | let data = this.dataForm |
| | | this.list.forEach(item=>{ |
| | | item.children.forEach(c=>{ |
| | | c.testValue=c.testValueList.join(",") |
| | | }) |
| | | }) |
| | | data.rawInsProducts = this.list |
| | | addRawInspects(data).then(res=>{ |
| | | this.$message.success("保存成功") |
| | | // this.$router.go(-1) |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | _than.$nextTick(()=>{ |
| | | _than.init(Number(res.data.msg)) |
| | | this.$refs.dataForm.validate(valid=>{ |
| | | if(valid){ |
| | | const _than = this |
| | | let data = this.dataForm |
| | | this.list.forEach(item=>{ |
| | | item.children.forEach(c=>{ |
| | | c.testValue=c.testValueList.join(",") |
| | | }) |
| | | }) |
| | | data.rawInsProducts = this.list |
| | | addRawInspects(data).then(res=>{ |
| | | this.$message.success("保存成功") |
| | | // this.$router.go(-1) |
| | | }).catch(error=>{ |
| | | this.$message.error(error) |
| | | }) |
| | | _than.$nextTick(()=>{ |
| | | _than.init(Number(res.data.msg)) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getDeviceList(){ |