Commit 7a07fb8c authored by 张海景's avatar 张海景

update:提交质量的修改

parent 2d2dd714
...@@ -15,6 +15,8 @@ const install = (Vue, vm) => { ...@@ -15,6 +15,8 @@ const install = (Vue, vm) => {
vm.$u.get(config.adminPath + '/mobile/index', params), vm.$u.get(config.adminPath + '/mobile/index', params),
getUserInfo: (params = {}) => getUserInfo: (params = {}) =>
vm.$u.get(config.adminPath + '/mobile/user/getUserInfo', params), vm.$u.get(config.adminPath + '/mobile/user/getUserInfo', params),
getUserList: (params = {}) =>
vm.$u.get(config.adminPath + '/system/user/list', params),
getUserPrintInfo: () => getUserPrintInfo: () =>
vm.$u.get(config.adminPath + '/system/print/printer'), vm.$u.get(config.adminPath + '/system/print/printer'),
getPrintDown: (params) => getPrintDown: (params) =>
......
<template>
<view class="dmodel-table">
<view class="search">
<u-form :model="tableParams" labelAlign="right" class="tableForm">
<u-form-item label="编号" label-width="60px" name="userName">
<uni-easyinput type="text" v-model="tableParams.userName" placeholder="请输入编号" />
</u-form-item>
<u-form-item label="名称" label-width="60px" name="nickName">
<uni-easyinput type="text" v-model="tableParams.nickName" placeholder="请输入名称" />
</u-form-item>
<u-form-item>
<u-button class="btn" @click="handleClick" type="primary" size="medium">搜索</u-button>
</u-form-item>
</u-form>
</view>
<view>
<zb-table ref="zbTable" rowKey="userName" :columns="tableColumn" :data="tableData" :stripe="true" @toggleRowSelection="toggleRowSelection"></zb-table>
</view>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view>
</template>
<script>
export default {
name: 'User',
data() {
return {
params: {
pageNum: 1,
pageSize: 10
},
total: 0,
tableParams: {
nickName: null,
userName: null
},
tableData: [],
tableSelectData: [],
tableColumn: [
{
type: 'radio',
width: 40
},
{
name: 'userName',
label: '编号',
width: 160
},
{
name: 'nickName',
label: '名称',
width: 200
}
]
};
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted() {
this.getList();
},
methods: {
handleClick( ){
if (this.tableParams.userName) {
this.params.userName = this.tableParams.userName;
}
if (this.tableParams.nickName) {
this.params.nickName = this.tableParams.nickName;
}
this.params.pageNum = 1
this.getList()
},
async getList() {
const res = await this.$u.api.getUserList(this.params);
console.log(res, 'res');
if (res.code == 200) {
this.tableData = res.rows;
this.total = res.total;
}
},
// 分页触发
change(e) {
this.params.pageNum = e.current
this.getList()
},
toggleRowSelection(checked, arr) {
this.tableSelectData = arr;
}
}
};
</script>
<style lang="scss" scoped>
.dmodel-table {
height: 1200rpx;
margin-top: 20rpx;
padding: 0 20rpx;
position: relative;
}
.tableForm {
display: flex;
margin-bottom: 20rpx;
}
.btn {
margin-left: 10px;
}
.uni-pagination-box {
position: absolute;
right: 20rpx;
bottom: 40rpx;
}
</style>
...@@ -9,15 +9,18 @@ ...@@ -9,15 +9,18 @@
<uni-easyinput type="text" v-model="tableParams.nickName" placeholder="请输入名称" /> <uni-easyinput type="text" v-model="tableParams.nickName" placeholder="请输入名称" />
</u-form-item> </u-form-item>
<u-form-item> <u-form-item>
<u-button class="btn" @click="getList" type="primary" size="medium">搜索</u-button> <u-button class="btn" @click="handleClick" type="primary" size="medium">搜索</u-button>
</u-form-item> </u-form-item>
</u-form> </u-form>
</view> </view>
<zb-table ref="zbTable" rowKey="recordId" <view>
<zb-table ref="zbTable" rowKey="userName"
:columns="tableColumn" :data="tableData" :stripe="true" :columns="tableColumn" :data="tableData" :stripe="true"
@toggleRowSelection="toggleRowSelection"> @toggleRowSelection="toggleRowSelection">
</zb-table> </zb-table>
</view> </view>
<view class="uni-pagination-box"><uni-pagination show-icon :page-size="params.pageSize" :current="params.pageNum" :total="total" @change="change" /></view>
</view>
</template> </template>
<script> <script>
...@@ -30,6 +33,12 @@ ...@@ -30,6 +33,12 @@
}, },
data() { data() {
return { return {
params: {
pageNum: 1,
pageSize: 10,
workstationId: this.data?.workstationId || null
},
total: 0,
tableParams: { tableParams: {
nickName: null, nickName: null,
userName: null, userName: null,
...@@ -56,7 +65,6 @@ ...@@ -56,7 +65,6 @@
label: '工作站', label: '工作站',
width: 160, width: 160,
}, },
], ],
} }
}, },
...@@ -70,30 +78,34 @@ ...@@ -70,30 +78,34 @@
// this.data.workstationName // this.data.workstationName
}, },
methods: { methods: {
async getList() { handleClick( ){
let params = { if (this.tableParams.userName) {
pageNum: 1, this.params.userName = this.tableParams.userName;
pageSize: 10,
workstationId: this.data.workstationId
} }
if (this.userName) { if (this.tableParams.nickName) {
params.userName = this.tableParams.userName this.params.nickName = this.tableParams.nickName;
} }
if (this.nickName) { this.params.pageNum = 1
params.nickName = this.tableParams.nickName this.getList()
} },
const res = await this.$u.api.userQuery(params) async getList() {
const res = await this.$u.api.userQuery(this.params)
console.log(res, 'res') console.log(res, 'res')
if (res.code == 200) { if (res.code == 200) {
this.tableData=res.rows.map(item => { this.tableData= res.rows.map(item => {
return { return {
...item, ...item,
workstationName: this.data.workstationName workstationName: this.data?.workstationName || null
} }
}) })
this.total = res.total
} }
}, },
// 分页触发
change(e) {
this.params.pageNum = e.current
this.getList()
},
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr this.tableSelectData = arr
}, },
...@@ -101,11 +113,12 @@ ...@@ -101,11 +113,12 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.dmodel-table { .dmodel-table {
height: 500rpx; height: 1200rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding: 0 20rpx; padding: 0 20rpx;
position: relative;
} }
.tableForm{ .tableForm{
display: flex; display: flex;
...@@ -114,4 +127,9 @@ ...@@ -114,4 +127,9 @@
.btn{ .btn{
margin-left:10px; margin-left:10px;
} }
.uni-pagination-box{
position: absolute;
right:20rpx;
bottom:40rpx;
}
</style> </style>
...@@ -38,19 +38,29 @@ ...@@ -38,19 +38,29 @@
<template slot="status" slot-scope="scope"> <template slot="status" slot-scope="scope">
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" /> <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" />
</template> </template>
<template slot="operation" slot-scope="scope" > <template slot="operation" slot-scope="scope">
<view style="padding-top:10rpx;"> <view style="padding-top: 10rpx">
<!-- 首检按钮判断FIRST开始 --> <!-- 首检按钮判断FIRST开始 -->
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'FIRST'&&scope.row.ipqcType === 'FIRST'&&(scope.row.status === 'PREPARE'||scope.row.status === 'PENDING')" @click="qcLineClick(scope.row)"> <button
class="uni-button"
size="mini"
type="primary"
v-if="curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && (scope.row.status === 'PREPARE' || scope.row.status === 'PENDING')"
@click="qcLineClick(scope.row, true, 'firstEdit')"
>
查看编辑 查看编辑
</button> </button>
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'FIRST'&&scope.row.ipqcType === 'FIRST'&&scope.row.status === 'CONFIRMED'" @click="qcLineClick(scope.row, false)"> <button
class="uni-button"
size="mini"
type="primary"
v-if="curQcType === 'FIRST' && scope.row.ipqcType === 'FIRST' && scope.row.status === 'CONFIRMED'"
@click="qcLineClick(scope.row, false)"
>
查看 查看
</button> </button>
<!-- 首检按钮判断FIRST结束 --> <!-- 首检按钮判断FIRST结束 -->
<button class="uni-button" size="mini" type="primary" v-if="curQcType === 'SJQR'" @click="qcLineClick(scope.row)"> <button class="uni-button" size="mini" type="primary" v-if="curQcType === 'SJQR'" @click="qcLineClick(scope.row,true, 'sjqrFinish')">查看确认</button>
查看确认
</button>
<!-- <button class="uni-button" size="mini" type="primary" v-if="scope.row.ipqcType === 'SJQR'" @click="firstCONFIRMED(scope.row)"> <!-- <button class="uni-button" size="mini" type="primary" v-if="scope.row.ipqcType === 'SJQR'" @click="firstCONFIRMED(scope.row)">
确认 确认
</button> --> </button> -->
...@@ -86,25 +96,27 @@ ...@@ -86,25 +96,27 @@
<u-row> <u-row>
<u-col span="4"> <u-col span="4">
<u-form-item label="检测数量" prop="quantityCheck"> <u-form-item label="检测数量" prop="quantityCheck">
<u-number-box v-model="qcForm.quantityCheck"></u-number-box> <u-number-box disabled v-model="qcForm.quantityCheck"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-form-item label="合格数量" prop="quantityQualified"> <u-form-item label="合格数量" prop="quantityQualified">
<u-number-box :min="0" v-model="qcForm.quantityQualified"></u-number-box> <u-number-box :min="0" v-model="qcForm.quantityQualified" @change="handleChangeQuantityCheck"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="4"> <u-col span="4">
<u-form-item label="不合格数量" prop="quantityUnqualified"> <u-form-item label="不合格数量" prop="quantityUnqualified">
<u-number-box :min="0" v-model="qcForm.quantityUnqualified"></u-number-box> <u-number-box :min="0" v-model="qcForm.quantityUnqualified" @change="handleChangeQuantityCheck"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<u-row> <u-row>
<u-col span="12"> <u-col span="4">
<u-form-item label="检测人员" prop="inspector"> <u-form-item label="检测人员" prop="inspectorName">
<!-- <u-input v-model="qcForm.inspector"></u-input>--> <!-- <u-input v-model="qcForm.inspector"></u-input>-->
<zxz-uni-data-select v-model="qcForm.inspector" filterable multiple dataKey="label" dataValue="value" :localdata="qcUserList" @change="change"></zxz-uni-data-select> <!-- <zxz-uni-data-select v-model="qcForm.inspector" filterable multiple dataKey="label" dataValue="value" :localdata="qcUserList" @change="change"></zxz-uni-data-select> -->
<u-input readonly v-model="qcForm.inspectorName"></u-input>
<u-button @tap="userTempVisible = true" type="success" size="mini">选择人员</u-button>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
...@@ -117,7 +129,7 @@ ...@@ -117,7 +129,7 @@
<uni-th width="100px" align="center">检验要求</uni-th> <uni-th width="100px" align="center">检验要求</uni-th>
<uni-th width="150px" align="center">检验结果</uni-th> <uni-th width="150px" align="center">检验结果</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line, index) in qcLines" :key="index+'index'"> <uni-tr v-for="(line, index) in qcLines" :key="index + 'index'">
<uni-td align="center">{{ line.indexName }}</uni-td> <uni-td align="center">{{ line.indexName }}</uni-td>
<uni-td align="center">{{ line.checkMethod }}</uni-td> <uni-td align="center">{{ line.checkMethod }}</uni-td>
<uni-td width="150px" align="center"> <uni-td width="150px" align="center">
...@@ -130,6 +142,18 @@ ...@@ -130,6 +142,18 @@
</view> </view>
</scroll-view> </scroll-view>
</u-modal> </u-modal>
<u-modal
title="选择人员"
@confirm="userDetermine()"
show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="userTempVisible"
width="1300rpx"
>
<view class="feedback-card">
<user ref="userRef" v-if="userTempVisible" />
</view>
</u-modal>
<u-modal width="80%" v-model="qcMsgVisible" :showConfirmButton="false" :showCancelButton="true" title="检验通知" content="操作内容"> <u-modal width="80%" v-model="qcMsgVisible" :showConfirmButton="false" :showCancelButton="true" title="检验通知" content="操作内容">
<scroll-view scroll-y="true" scroll-x="true" class="line-list"> <scroll-view scroll-y="true" scroll-x="true" class="line-list">
...@@ -241,7 +265,7 @@ ...@@ -241,7 +265,7 @@
title="缺陷登记" title="缺陷登记"
> >
<u-button @click="addQcdeffect">新增</u-button> <u-button @click="addQcdeffect">新增</u-button>
<uni-card v-for="item in defectrecordList"> <uni-card v-for="(item,index) in defectrecordList" :key="index">
<u-form label-width="100px"> <u-form label-width="100px">
<u-row> <u-row>
<u-col> <u-col>
...@@ -257,8 +281,8 @@ ...@@ -257,8 +281,8 @@
<u-col> <u-col>
<u-form-item label="缺陷等级"> <u-form-item label="缺陷等级">
<u-radio-group v-model="item.defectLevel"> <u-radio-group v-model="item.defectLevel">
<u-radio :name="item.value" v-for="item in dict.type.mes_defect_level" v-key="item.value"> <u-radio :name="v.value" v-for="v in dict.type.mes_defect_level" :key="v.value">
{{ item.label }} {{ v.label }}
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
...@@ -274,68 +298,144 @@ ...@@ -274,68 +298,144 @@
import SearchInput from '@/components/ScanInput/index.vue'; import SearchInput from '@/components/ScanInput/index.vue';
import UButton from '../../../uview-ui/components/u-button/u-button.vue'; import UButton from '../../../uview-ui/components/u-button/u-button.vue';
import UniEasyinput from '../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'; import UniEasyinput from '../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue';
import User from '@/components/User/User.vue'
export default { export default {
name: 'QcContent', name: 'QcContent',
components: { components: {
SearchInput, SearchInput,
UButton, UButton,
UniEasyinput UniEasyinput,
User
}, },
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: {
tableColumn() {
if (this.curQcType === 'FIRST' || this.curQcType === 'SJQR') {
return this.tableSjColumn
} else {
return this.tableDefaultColumn
}
}
},
data() { data() {
return { return {
tableColumn:[ tableSjColumn: [
{ {
name: 'ipqcCode', name: 'ipqcCode',
label: '检验单编号', label: '检验单编号',
align: 'center',
width: 200
},
{
name: 'arrangeCode',
label: '编排单号',
align: 'center',
width: 200
},
{
name: 'quantityCheck',
label: '检测数量',
align: 'center',
width: 80
},
{
name: 'checkResult',
label: '检测结果',
align: 'center',
type:'slot',
slot: 'checkResult',
width: 150
},
{
name: 'inspectDate',
label: '检测日期',
align: 'center',
width: 80
},
{
name: 'inspector',
label: '检测人员',
align: 'center',
width: 100
},
{
name: 'status',
label: '单据状态',
align: 'center',
width: 80,
type: 'slot',
slot: 'status'
},
{
name: 'operation',
label: '操作',
slot: 'operation',
type: 'slot',
width: 80
}
],
tableDefaultColumn: [
{
name: 'ipqcCode',
label: '检验单编号',
align: 'center',
width: 120 width: 120
}, },
{ {
name: 'workorderCode', name: 'arrangeCode',
label: '工单编号', label: '编排单号',
align: 'center',
width: 130 width: 130
}, },
{ {
name: 'itemCode', name: 'itemCode',
label: '产品物料编码', label: '产品物料编码',
align: 'center',
width: 110 width: 110
}, },
{ {
name: 'itemName', name: 'itemName',
label: '产品物料名称', label: '产品物料名称',
align: 'center',
width: 130 width: 130
}, },
{ {
name: 'specification', name: 'specification',
label: '规格型号', label: '规格型号',
align: 'center',
width: 100 width: 100
}, },
{ {
name: 'checkResult', name: 'quantityCheck',
label: '检测数量', label: '检测数量',
slot: 'checkResult', align: 'center',
type: 'slot',
width: 80 width: 80
}, },
{ {
name: 'unitOfMeasure', name: 'checkResult',
label: '检测结果', label: '检测结果',
align: 'center',
type:'slot',
slot: 'checkResult',
width: 80 width: 80
}, },
{ {
name: 'inspectDate', name: 'inspectDate',
label: '检测日期', label: '检测日期',
align: 'center',
width: 80 width: 80
}, },
{ {
name: 'inspector', name: 'inspector',
label: '检测人员', label: '检测人员',
align: 'center',
width: 100 width: 100
}, },
{ {
name: 'status', name: 'status',
label: '单据状态', label: '单据状态',
align: 'center',
width: 80, width: 80,
type: 'slot', type: 'slot',
slot: 'status' slot: 'status'
...@@ -346,8 +446,9 @@ export default { ...@@ -346,8 +446,9 @@ export default {
slot: 'operation', slot: 'operation',
type: 'slot', type: 'slot',
width: 80 width: 80
}, }
], ],
userTempVisible: false,
screenHeight: 768, screenHeight: 768,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -370,22 +471,22 @@ export default { ...@@ -370,22 +471,22 @@ export default {
//所有检测单的列表 //所有检测单的列表
qcList: [], qcList: [],
qcUserList: [ qcUserList: [
{ // {
value: 0, // value: 0,
label: 'admin' // label: 'admin'
}, // },
{ // {
value: 1, // value: 1,
label: '张三' // label: '张三'
}, // },
{ // {
value: 2, // value: 2,
label: '李四' // label: '李四'
}, // },
{ // {
value: 3, // value: 3,
label: '王五' // label: '王五'
} // }
], ],
taskInfo: {}, taskInfo: {},
curQcType: 'FIRST', curQcType: 'FIRST',
...@@ -405,10 +506,9 @@ export default { ...@@ -405,10 +506,9 @@ export default {
this.screenHeight = res.windowHeight; this.screenHeight = res.windowHeight;
} }
}); });
this.getIpqcList("FIRST"); this.getIpqcList('FIRST');
},
mounted () {
}, },
mounted() {},
methods: { methods: {
async firstCONFIRMED(item) { async firstCONFIRMED(item) {
const res = await this.$u.api.changeState({ ipqcId: item.ipqcId, status: 'CONFIRMED' }); const res = await this.$u.api.changeState({ ipqcId: item.ipqcId, status: 'CONFIRMED' });
...@@ -416,10 +516,15 @@ export default { ...@@ -416,10 +516,15 @@ export default {
this.getIpqcList(); this.getIpqcList();
} }
}, },
userDetermine() {
console.log(this.$refs.userRef.tableSelectData, 'this.$refs.userRef.tableSelectData');
this.qcForm.inspectorName = this.$refs.userRef.tableSelectData[0]?.nickName;
this.qcForm.inspector = this.$refs.userRef.tableSelectData[0]?.userName;
},
async getIpqcList(type) { async getIpqcList(type) {
let params = { ipqcType: type } let params = { ipqcType: type || this.curQcType };
if (this.curQcType == 'SJQR') { if (this.curQcType == 'SJQR') {
params = {status:'PENDING'} params = { status: 'PENDING' };
} }
const res = await this.$u.api.ipqcList(params); const res = await this.$u.api.ipqcList(params);
if (res.code === 200) { if (res.code === 200) {
...@@ -446,31 +551,31 @@ export default { ...@@ -446,31 +551,31 @@ export default {
async submitIpqc(status = 'PREPARE') { async submitIpqc(status = 'PREPARE') {
if (this.curQcType == 'SJQR') { if (this.curQcType == 'SJQR') {
this.firstCONFIRMED(this.qcForm) this.firstCONFIRMED(this.qcForm);
return return;
} }
if (!this.taskInfo) { if (!this.taskInfo) {
this.$u.toast('请输入任务单号!'); this.$u.toast('请输入任务单号!');
return; return;
} }
const qcIpqclineList = this.qcLines.map(item => { const qcIpqclineList = this.qcLines.map((item) => {
let selectValues = item.selectValues let selectValues = item.selectValues;
let qualityCheckResults = item.qualityCheckResults let qualityCheckResults = item.qualityCheckResults;
if (item.inputType == 2) { if (item.inputType == 2) {
selectValues = item.selectValues.map(item => { selectValues = item.selectValues.map((item) => {
return { return {
name: item.value name: item.value
} };
}) });
selectValues = JSON.stringify(selectValues) selectValues = JSON.stringify(selectValues);
qualityCheckResults = JSON.stringify(item.qualityCheckResults) qualityCheckResults = JSON.stringify(item.qualityCheckResults);
} }
return { return {
...item, ...item,
selectValues, selectValues,
qualityCheckResults qualityCheckResults
} };
}) });
const ipqcCode = await this.$u.api.getIpqcCode(); const ipqcCode = await this.$u.api.getIpqcCode();
const param = { const param = {
ipqcId: this.qcForm.ipqcId, ipqcId: this.qcForm.ipqcId,
...@@ -507,7 +612,7 @@ export default { ...@@ -507,7 +612,7 @@ export default {
checkResult: this.qcForm.checkResult, checkResult: this.qcForm.checkResult,
workorderId: this.qcForm.workorderId, workorderId: this.qcForm.workorderId,
inspectDate: new Date(), inspectDate: new Date(),
inspector: this.vuex_user.userName, inspector: this.qcForm.inspector,
status: 'PREPARE', status: 'PREPARE',
qcIpqclineList qcIpqclineList
}; };
...@@ -530,38 +635,53 @@ export default { ...@@ -530,38 +635,53 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
console.log(res.rows, 'rows88999655') console.log(res.rows, 'rows88999655');
this.qcLines = res.rows.map(item => { this.qcLines = res.rows.map((item) => {
let selectValues = item.selectValues let selectValues = item.selectValues;
let qualityCheckResults = item.qualityCheckResults let qualityCheckResults = item.qualityCheckResults;
if (item.inputType == 2) { if (item.inputType == 2) {
// selectValues = selectValues? JSON.parse(item.selectValues) : [] // selectValues = selectValues? JSON.parse(item.selectValues) : []
if (selectValues) { if (selectValues) {
const data = JSON.parse(item.selectValues) const data = JSON.parse(item.selectValues);
selectValues = data.map(item => { selectValues = data.map((item) => {
return { return {
text: item.name, text: item.name,
value: item.name value: item.name
} };
}) });
} else { } else {
selectValues = [] selectValues = [];
} }
qualityCheckResults = qualityCheckResults? JSON.parse(item.qualityCheckResults) : [] qualityCheckResults = qualityCheckResults ? JSON.parse(item.qualityCheckResults) : [];
} }
return { return {
...item, ...item,
selectValues, selectValues,
qualityCheckResults qualityCheckResults
} };
}) });
console.log(this.qcLines, 'this.qcLines') console.log(this.qcLines, 'this.qcLines');
} }
}); });
}, },
handleAddClick() { handleAddClick() {
this.qcForm = {}; this.qcForm = {
quantityCheck: 0
};
this.qcModalFlag = true; this.qcModalFlag = true;
if (this.curQcType === 'FIRST') {
this.setDefaultQcForm()
}
},
setDefaultQcForm() {
this.qcForm.checkResult = "REJECT"
this.qcForm.quantityCheck = 1
this.qcForm.quantityQualified = 1
this.qcForm.quantityUnqualified = 0
},
handleChangeQuantityCheck() {
const sum = this.qcForm.quantityQualified + this.qcForm.quantityUnqualified
this.$set(this.qcForm, 'quantityCheck', sum)
}, },
getAddShow() { getAddShow() {
const type = this.curQcType; const type = this.curQcType;
...@@ -592,11 +712,21 @@ export default { ...@@ -592,11 +712,21 @@ export default {
// this.qcModalFlag = true; // this.qcModalFlag = true;
// } // }
}, },
qcLineClick(item, flag) { qcLineClick(item, flag, btnType) {
this.qcModalFlag = true; this.qcModalFlag = true;
this.qcForm = item; this.qcForm = Object.assign({},item)
console.log(this.qcForm); console.log(item,' itme33344')
this.showIpqcConfirmButton = flag === false? false: true if (btnType === 'firstEdit'|| btnType === 'sjqrFinish') {
this.qcForm.inspector = this.vuex_user.userName
this.qcForm.inspectorName = this.vuex_user.nickName
}
if (btnType === 'firstEdit') {
this.qcForm.checkResult = this.qcForm.checkResult? this.qcForm.checkResult: "REJECT"
this.qcForm.quantityCheck = this.qcForm.quantityCheck? this.qcForm.quantityCheck: 1
this.qcForm.quantityQualified = this.qcForm.quantityQualified? this.qcForm.quantityQualified: 1
this.qcForm.quantityUnqualified = this.qcForm.quantityUnqualified? this.qcForm.quantityUnqualified: 0
}
this.showIpqcConfirmButton = flag === false ? false : true;
this.getTemplateLineList(); this.getTemplateLineList();
}, },
qcLineItemClick(item) { qcLineItemClick(item) {
......
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