Commit 80c58191 authored by chenzj's avatar chenzj

异常报告

parent 1726cfb4
......@@ -139,6 +139,12 @@ const install = (Vue, vm) => {
office: {
treeData: (params = {}) => vm.$u.get(config.adminPath + '/sys/office/treeData', params),
},
//查看异常模块信息
abnormal: {
detail: (params = {}) => vm.$u.get(config.adminPath+'/qc/information/list',params),
newlyAdd: (params = {}) => vm.$u.postJson(config.adminPath+'/qc/report',params),
},
// 增删改查例子
testData: {
......
......@@ -158,6 +158,7 @@
<u-button type="warning" @click="commonClick('StopTask')">暂停作业</u-button>
<u-button type="success" @click="commonClick('Prod')">生产报工</u-button>
<u-button type="primary" @click="commonClick('FinshTask')">完成作业</u-button>
<u-button type="primary" @click="commonClick('abnormal')">异常报告</u-button>
<!-- <u-button type="error" @click="commonClick('')">报告异常</u-button>-->
<!-- <u-button type="warning" @click="commonClick('')">检验通知</u-button>-->
<!-- <u-button type="primary" @click="commonClick('')">属性收集</u-button>-->
......@@ -249,6 +250,48 @@
</u-form-item>
</u-form>
</u-modal>
<u-modal title="异常报告" @confirm="newlyAddss()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '60px','padding-top': '0px'}"
v-model="aopen" width="1300rpx">
<u-form label-width="90px" :rules="rules">
<u-form-item label="异常时间" prop="abnormalTime">
<!-- <u-input :border="true" v-model="ExceptionForms.abnormalTime"></u-input> -->
<uni-datetime-picker type="date" :clear-icon="false" v-model="ExceptionForms.abnormalTime" />
</u-form-item>
<u-row>
<u-col span="6">
<u-form-item label="异常类型" prop="abnormalType">
<uni-data-select :localdata="exception" @change="stopReas"></uni-data-select>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item label="原因" prop="abnormalReason">
<uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select>
</u-form-item>
</u-col>
</u-row>
<u-form-item label="编批单号" prop="batchNumber">
<u-input :border="true" v-model="ExceptionForms.batchNumber"></u-input>
</u-form-item>
<u-form-item label="工序" prop="processName">
<u-input :border="true" v-model="ExceptionForms.processName"></u-input>
</u-form-item>
<u-form-item label="作业单元" prop="workstationName">
<u-input :border="true" v-model="ExceptionForms.workstationName"></u-input>
</u-form-item>
</u-form>
</u-modal>
</view>
</template>
......@@ -266,6 +309,7 @@
screenHeight: 768,
title: '生产报工',
open: false,
aopen: false,
form: {},
feedbackForm: {},
tableData: [],
......@@ -301,6 +345,23 @@
text: "领料加仓"
}
],
exception: [{
value: 'PROD',
text: "生产异常"
},
{
value: 'QUAL',
text: "质量异常"
},
{
value: 'DEVI',
text: "设备异常"
},
{
value: 'WORK',
text: "车间异常"
}
],
stopReason: '',
stopReasonVisible: false,
rules: {
......@@ -462,7 +523,9 @@
dModelData: [],
tableSelectData: [],
feedbackForms: [],
ExceptionForms: {},
materialUsageRecordList: [],
reasonList: [],
materialusagerecordLoading: false
}
},
......@@ -536,6 +599,9 @@
case 'KnifeTemp':
this.knifeTempShow()
break;
case 'abnormal':
this.doException()
break;
default:
this.$u.toast('功能正在开发中!');
break
......@@ -622,6 +688,26 @@
stopReasonChange(e) {
this.stopReason += e;
},
changeReason(abnormalReason) {
this.ExceptionForms.abnormalReason = abnormalReason
},
stopReas(abnormalType) {
this.ExceptionForms.abnormalType = abnormalType
// 查询原因
this.$u.api.abnormal.detail({
pageNum: 1,
pageSize: 10,
abnormalType
}).then(res => {
this.reasonList = res.rows.map(item => {
return {
value: item.abnormalReason,
text: item.abnormalReason
}
})
})
},
getTaskList() {
this.form = {}
this.$u.api.getTaskList({
......@@ -737,6 +823,28 @@
})
this.open = true;
},
doException() {
this.ExceptionForms = {}
const item = this.tableSelectData[0]
Object.assign(this.ExceptionForms, {
...item,
batchNumber: item.arrangeCode,
processId: item.processId,
processCode: item.processCode,
processName: item.processName,
workstationId: item.workstationId,
workstationName: item.workstationName,
workstationCode: item.workorderCodes,
abnormalType: '',
abnormalReason: '',
abnormalTime: ''
})
this.aopen = true;
},
async newlyAddss(){
const res = await this.$u.api.abnormal.newlyAdd(this.ExceptionForms);
this.getTaskList();
},
cancel() {
this.open = false;
},
......
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