Commit 5aa16f3f authored by 沈翠玲's avatar 沈翠玲

iqc对接口

parent f39d8179
...@@ -187,6 +187,9 @@ const install = (Vue, vm) => { ...@@ -187,6 +187,9 @@ const install = (Vue, vm) => {
//查询检验列表 //查询检验列表
ipqcList: (params = {}) => ipqcList: (params = {}) =>
vm.$u.get(config.adminPath + '/mes/qc/ipqc/list', params), vm.$u.get(config.adminPath + '/mes/qc/ipqc/list', params),
//查询IQC检验列表
iqcList: (params = {}) =>
vm.$u.get(config.adminPath + '/mes/qc/iqc/list'),
//增加检验 //增加检验
addIpqc: (params = {}, type = 'postJson') => addIpqc: (params = {}, type = 'postJson') =>
vm.$u[type](config.adminPath + '/mes/qc/ipqc', params), vm.$u[type](config.adminPath + '/mes/qc/ipqc', params),
...@@ -204,7 +207,18 @@ const install = (Vue, vm) => { ...@@ -204,7 +207,18 @@ const install = (Vue, vm) => {
params params
), ),
// iqc查看详情
getIqcInfo: (ipcId) =>
vm.$u.get(config.adminPath + '/mes/qc/iqc/' + ipcId),
// iqc加载校验项
reloadTable: (params = {}) =>
vm.$u.postJson(config.adminPath + '/mes/qc/iqc/reloadTable', params),
// iqc提交
commitIqcInfo: (ipcId) =>
vm.$u.get(config.adminPath + '/mes/qc/iqc/commit/' + ipcId),
// iqc保存
saveIqcInfo: (params = {}) =>
vm.$u.putJson(config.adminPath + '/mes/qc/iqc', params),
/** /**
* 工艺工序相关API * 工艺工序相关API
*/ */
......
This diff is collapsed.
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
</view> </view>
<view class="grid-text">首检确认</view> <view class="grid-text">首检确认</view>
</view> --> </view> -->
<view class="button-frame" :class="{ active: qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type" @click="handleClickBtn(qcType.value)"> <view class="button-frame" :class="{ active: qcType.value === curQcType }" v-for="qcType in dict.type.mes_ipqc_type" :key="qcType.value" @click="handleClickBtn(qcType.value)">
<!-- <view class="shortcut-icon icon-color01"> <!-- <view class="shortcut-icon icon-color01">
<image class="icon-button" src="/static/icons/png/pro.png"/> <image class="icon-button" src="/static/icons/png/pro.png"/>
</view> --> </view> -->
<view class="grid-text">{{ qcType.label }}</view> <view class="grid-text">{{ qcType.label }}</view>
</view> </view>
<!-- <view class="button-frame" :class="{'active': !curQcType }" @click="handleClickBtn('')"> <view class="button-frame" :class="{'active': curQcType === 'IQC' }" @click="handleClickBtn('IQC')">
<view class="grid-text">全部</view> <view class="grid-text">IQC</view>
</view> --> </view>
</view> </view>
<view class="list-bar"> <view class="list-bar">
...@@ -45,16 +45,17 @@ ...@@ -45,16 +45,17 @@
class="uni-button" class="uni-button"
size="mini" size="mini"
type="primary" type="primary"
v-if="curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && (scope.row.status === 'PREPARE' || scope.row.status === 'PENDING')" v-if="(curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && (scope.row.status === 'PREPARE' || scope.row.status === 'PENDING')) || (curQcType === 'IQC' && (scope.row.status === 'PREPARE'))"
@click="qcLineClick(scope.row, true, 'firstEdit')" @click="qcLineClick(scope.row, true, 'firstEdit')"
> >
查看编辑 查看编辑
</button> </button>
<button <button
class="uni-button" class="uni-button"
style="margin-left: 10rpx"
size="mini" size="mini"
type="primary" type="primary"
v-if="(curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && scope.row.status === 'CONFIRMED') || curQcType === 'PATROL'" v-if="(curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && scope.row.status === 'CONFIRMED') || curQcType === 'PATROL' || curQcType === 'IQC'"
@click="qcLineClick(scope.row, false, 'firstView')" @click="qcLineClick(scope.row, false, 'firstView')"
> >
查看 查看
...@@ -69,6 +70,7 @@ ...@@ -69,6 +70,7 @@
</view> </view>
</view> </view>
<addDialog v-if="addQuFlag" :visible.sync="addQuFlag" :currentItem="qcForm" :btnType="btnType" :curQcType="curQcType" :showIpqcConfirmButton="showIpqcConfirmButton" ref="addDialog" @confirm="submitIpqc" :qcAddIndex.sync = "qcAddIndex" :zjVisible.sync = "zjVisible" @close="closemodel" /> <addDialog v-if="addQuFlag" :visible.sync="addQuFlag" :currentItem="qcForm" :btnType="btnType" :curQcType="curQcType" :showIpqcConfirmButton="showIpqcConfirmButton" ref="addDialog" @confirm="submitIpqc" :qcAddIndex.sync = "qcAddIndex" :zjVisible.sync = "zjVisible" @close="closemodel" />
<iqcDialog v-if="iqcFlag" :visible.sync="iqcFlag" :currentItem="qcForm" :btnType="btnType" :curQcType="curQcType" :showIpqcConfirmButton="showIpqcConfirmButton" ref="iqcDialog" @confirm="submitIpqc" :qcAddIndex.sync = "qcAddIndex" :zjVisible.sync = "zjVisible" @close="closemodel" />
<u-modal width="90%" @confirm="submitIpqc" @cancel="closemodel" v-model="qcModalFlag" :showConfirmButton="showIpqcConfirmButton" :showCancelButton="true" title="请填写检验单" content="操作内容"> <u-modal width="90%" @confirm="submitIpqc" @cancel="closemodel" v-model="qcModalFlag" :showConfirmButton="showIpqcConfirmButton" :showCancelButton="true" title="请填写检验单" content="操作内容">
<u-form ref="qcForm" label-width="90px" class="addForm"> <u-form ref="qcForm" label-width="90px" class="addForm">
<u-row> <u-row>
...@@ -328,6 +330,7 @@ import UniEasyinput from '../../../uni_modules/uni-easyinput/components/uni-easy ...@@ -328,6 +330,7 @@ import UniEasyinput from '../../../uni_modules/uni-easyinput/components/uni-easy
import User from '@/components/User/User.vue'; import User from '@/components/User/User.vue';
import zjList from './components/zjList.vue'; import zjList from './components/zjList.vue';
import addDialog from './components/addDialog.vue'; import addDialog from './components/addDialog.vue';
import iqcDialog from './components/iqcDialog.vue';
export default { export default {
name: 'QcContent', name: 'QcContent',
...@@ -337,13 +340,18 @@ export default { ...@@ -337,13 +340,18 @@ export default {
UniEasyinput, UniEasyinput,
User, User,
zjList, zjList,
addDialog addDialog,
iqcDialog
}, },
dicts: ['mes_ipqc_type', 'mes_qc_result', 'mes_order_status', 'mes_defect_level'], dicts: ['mes_ipqc_type', 'mes_qc_result', 'mes_order_status', 'mes_defect_level'],
computed: { computed: {
tableColumn() { tableColumn() {
if (this.curQcType === 'FIRST' || this.curQcType === 'SJQR') { if (this.curQcType === 'FIRST' || this.curQcType === 'SJQR') {
return this.tableSjColumn; return this.tableSjColumn;
} else if(this.curQcType === 'IQC'){
let list = JSON.parse(JSON.stringify(this.tableSjColumn))
list[0].name = 'iqcCode'
return list
} else { } else {
return this.tableDefaultColumn; return this.tableDefaultColumn;
} }
...@@ -355,6 +363,7 @@ export default { ...@@ -355,6 +363,7 @@ export default {
qcAddIndex: null, qcAddIndex: null,
zjVisible: false, zjVisible: false,
addQuFlag: false, addQuFlag: false,
iqcFlag: false,
qcAddList: [], qcAddList: [],
tableSjColumn: [ tableSjColumn: [
{ {
...@@ -568,7 +577,9 @@ export default { ...@@ -568,7 +577,9 @@ export default {
console.log(this.$refs.zjListRef.tableSelectData, 'this.$refs.zjListRef.tableSelectData'); console.log(this.$refs.zjListRef.tableSelectData, 'this.$refs.zjListRef.tableSelectData');
if(this.addQuFlag) { if(this.addQuFlag) {
this.$refs.addDialog.handleSubmitZj({inputType:1, ipqcId: this.qcForm.ipqcId, indexId: this.$refs.zjListRef.tableSelectData[0].indexId, indexCode: this.$refs.zjListRef.tableSelectData[0].indexCode, indexName: this.$refs.zjListRef.tableSelectData[0].indexName, indexType: this.$refs.zjListRef.tableSelectData[0].indexType, qcTool: this.$refs.zjListRef.tableSelectData[0].qcTool}) this.$refs.addDialog.handleSubmitZj({inputType:1, ipqcId: this.qcForm.ipqcId, indexId: this.$refs.zjListRef.tableSelectData[0].indexId, indexCode: this.$refs.zjListRef.tableSelectData[0].indexCode, indexName: this.$refs.zjListRef.tableSelectData[0].indexName, indexType: this.$refs.zjListRef.tableSelectData[0].indexType, qcTool: this.$refs.zjListRef.tableSelectData[0].qcTool})
} else { } else if (this.iqcFlag) {
this.$refs.iqcDialog.handleSubmitZj({inputType:1, ipqcId: this.qcForm.ipqcId, indexId: this.$refs.zjListRef.tableSelectData[0].indexId, indexCode: this.$refs.zjListRef.tableSelectData[0].indexCode, indexName: this.$refs.zjListRef.tableSelectData[0].indexName, indexType: this.$refs.zjListRef.tableSelectData[0].indexType, qcTool: this.$refs.zjListRef.tableSelectData[0].qcTool})
}else {
this.$set(this.qcAddList[this.qcAddIndex], 'inputType', 1) this.$set(this.qcAddList[this.qcAddIndex], 'inputType', 1)
this.$set(this.qcAddList[this.qcAddIndex], 'ipqcId', this.qcForm.ipqcId) this.$set(this.qcAddList[this.qcAddIndex], 'ipqcId', this.qcForm.ipqcId)
this.$set(this.qcAddList[this.qcAddIndex], 'indexId', this.$refs.zjListRef.tableSelectData[0]?.indexId) this.$set(this.qcAddList[this.qcAddIndex], 'indexId', this.$refs.zjListRef.tableSelectData[0]?.indexId)
...@@ -590,7 +601,12 @@ export default { ...@@ -590,7 +601,12 @@ export default {
if (this.curQcType == 'SJQR') { if (this.curQcType == 'SJQR') {
params = { status: 'PENDING', ipqcType: 'FIRST' }; params = { status: 'PENDING', ipqcType: 'FIRST' };
} }
const res = await this.$u.api.ipqcList(params); let res = null
if (type === 'IQC') {
res = await this.$u.api.iqcList();
} else {
res = await this.$u.api.ipqcList(params);
}
if (res.code === 200) { if (res.code === 200) {
this.qcList = res.rows; this.qcList = res.rows;
} else { } else {
...@@ -616,6 +632,10 @@ export default { ...@@ -616,6 +632,10 @@ export default {
}, },
async submitIpqc(params={}) { async submitIpqc(params={}) {
if (this.curQcType === 'IQC') {
this.getIpqcList(this.curQcType);
return
}
console.log('params', params) console.log('params', params)
// if (this.btnType === 'sjqrFinish') { // if (this.btnType === 'sjqrFinish') {
// this.firstCONFIRMED(this.qcForm); // this.firstCONFIRMED(this.qcForm);
...@@ -745,7 +765,9 @@ export default { ...@@ -745,7 +765,9 @@ export default {
this.qcForm = { this.qcForm = {
quantityCheck: 0 quantityCheck: 0
}; };
if(this.curQcType !== 'FINAL') { if (this.curQcType === 'IQC') {
this.iqcFlag = true
} else if (this.curQcType !== 'FINAL') {
this.addQuFlag = true this.addQuFlag = true
} else { } else {
this.qcModalFlag = true; this.qcModalFlag = true;
...@@ -797,7 +819,9 @@ export default { ...@@ -797,7 +819,9 @@ export default {
qcLineClick(item, flag, btnType) { qcLineClick(item, flag, btnType) {
this.qcAddList = [] this.qcAddList = []
this.btnType = btnType this.btnType = btnType
if(this.curQcType !== 'FINAL') { if (this.curQcType === 'IQC') {
this.iqcFlag = true
} else if(this.curQcType !== 'FINAL') {
this.addQuFlag = true this.addQuFlag = true
} else { } else {
this.qcModalFlag = true; this.qcModalFlag = true;
...@@ -834,6 +858,7 @@ export default { ...@@ -834,6 +858,7 @@ export default {
closemodel(){ closemodel(){
this.btnType = '' this.btnType = ''
this.addQuFlag = false this.addQuFlag = false
this.iqcFlag = false
}, },
addQcdeffect() { addQcdeffect() {
this.defectrecordList.push({ this.defectrecordList.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment