Commit 7d2f8a30 authored by 李驰骋's avatar 李驰骋

合并主分支代码,包括布局兼容调整、添加投料检验、反冲料登记、领料申请、退料申请前端交互逻辑

parent 0030240b
......@@ -21,9 +21,9 @@ const config = {
}
// 设置后台接口服务的基础地址
//config.baseUrl = 'http://localhost:8080';
config.baseUrl = 'http://192.168.25.105:8080';
//config.baseUrl = "http://101.43.244.58:8080/";
//config.baseUrl = "/api";
config.baseUrl = "http://101.200.162.168:8080";
//config.baseUrl = "http://101.200.162.168:8080";
export default config;
\ No newline at end of file
{
"name" : "ktg-mes-pad",
"appid" : "__UNI__5750C3E",
"name" : "mes-pad",
"appid" : "__UNI__EA378AB",
"description" : "MES-PAD",
"versionName" : "1.0.0",
"versionCode" : "100",
......
......@@ -67,19 +67,18 @@
</view>
<u-button type="primary" @click="changeWorkstation">切换工作站</u-button>
<br/>
<u-button type="warning" @click="commonClick('KnifeTemp')">刀模上架</u-button>
<u-button type="warning" @click="commonClick('KnifeTemp')">刀模版上下机</u-button>
<u-button type="primary" @click="commonClick('Refresh')">刷新</u-button>
<u-button type="success" @click="commonClick('StartTask')">开始作业</u-button>
<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>-->
<!-- <u-button type="primary" @click="commonClick('')">反扣冲减</u-button>-->
<!-- <u-button type="primary" @click="commonClick('')">查看图纸</u-button>-->
<!-- <u-button type="warning" @click="commonClick('')">完成全部</u-button>-->
<u-button type="primary" @click="commonClick('abnormal')">异常报告</u-button>
<u-button type="primary" @click="commonClick('FeedingInspection')">投料检验</u-button>
<u-button type="primary" @click="commonClick('RecoilMaterial')">反冲料登记</u-button>
<u-button type="primary" @click="commonClick('MaterialRequest')">领料申请</u-button>
<u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button>
<u-button type="success" @click="commonClick('StockIn')">完工入库申请</u-button>
</view>
</view>
......@@ -153,60 +152,250 @@
</u-modal>
<u-modal title="暂停原因" @confirm="stopReasonSubmit()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="stopReasonVisible" width="1300rpx">
<u-form label-width="100px" :model="feedback" :rules="rules">
<u-form-item label="故障类型" prop="quantity">
<uni-data-select :localdata="stopReasonList" @change="stopReasonChange"></uni-data-select>
</u-form-item>
<u-form-item label="故障原因" prop="nickName">
<u-input type="textarea" height="150" :border="true" v-model="stopReason"></u-input>
</u-form-item>
</u-form>
</u-modal>
<u-modal title="暂停原因" @confirm="stopReasonSubmit()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="stopReasonVisible" width="1300rpx">
<u-form label-width="100px" :model="feedback" :rules="rules">
<u-form-item label="故障类型" prop="quantity">
<uni-data-select :localdata="stopReasonList" @change="stopReasonChange"></uni-data-select>
</u-form-item>
<u-form-item label="故障原因" prop="nickName">
<u-input type="textarea" height="150" :border="true" v-model="stopReason"></u-input>
</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-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="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 label="工序" prop="processName">
<u-input :border="true" v-model="ExceptionForms.processName"></u-input>
</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 label="作业单元" prop="workstationName">
<u-input :border="true" v-model="ExceptionForms.workstationName"></u-input>
</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>
<u-modal title="投料校验" @confirm="feedingInspectionScan()" show-cancel-button confirmText="继续扫码" cancelText="关闭"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="feedingInspectionVisible" width="1300rpx">
<view class="list-bar">
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<uni-table border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr>
<uni-th width="110px" align="center">产品物料编码</uni-th>
<uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="150px" align="center">规格型号</uni-th>
<uni-th width="60px" align="center">单位</uni-th>
<uni-th width="80px" align="center">领料数量</uni-th>
<uni-th width="110px" align="center">批次号</uni-th>
<uni-th width="100px" align="center">备注</uni-th>
<uni-th width="65px" align="center">状态</uni-th>
<uni-th width="100px" align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(line,index) in feedingInspectionList" :key="index">
<uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}</uni-td>
<uni-td align="center">{{ line.specification}}</uni-td>
<uni-td>{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.quantityIssued }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td>
<uni-td align="center">{{ line.remark }}</uni-td>
<uni-td align="center">{{ line.state }}</uni-td>
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="qcLineClick(line)">校验
</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
<u-modal title="反冲料登记" @confirm="recoilMaterialScan()" show-cancel-button confirmText="继续扫码" cancelText="关闭"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="recoilMaterialVisible" width="1300rpx">
<view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr>
<uni-th width="100px" align="center">操作</uni-th>
<uni-th width="110px" align="center">产品物料编码</uni-th>
<uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="150px" align="center">规格型号</uni-th>
<uni-th width="60px" align="center">单位</uni-th>
<uni-th width="110px" align="center">批次号</uni-th>
<uni-th width="100px" align="center">备注</uni-th>
</uni-tr>
<uni-tr v-for="(line,index) in recoilMaterialList" :key="index">
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="recoilMaterialDelete(line)">删除
</button>
</view>
</uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}</uni-td>
<uni-td align="center">{{ line.specification}}</uni-td>
<uni-td>{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td>
<uni-td align="center">{{ line.remark }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
</u-form>
</u-modal>
<u-modal title="领料申请" @confirm="materialRequestSave()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="materialRequestVisible" width="1300rpx">
<view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr>
<uni-th width="100px" align="center">操作</uni-th>
<uni-th width="110px" align="center">产品物料编码</uni-th>
<uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="150px" align="center">规格型号</uni-th>
<uni-th width="60px" align="center">单位</uni-th>
<uni-th width="80px" align="center">补料数量</uni-th>
<uni-th width="110px" align="center">批次号</uni-th>
<uni-th width="100px" align="center">备注</uni-th>
<uni-th width="65px" align="center">状态</uni-th>
</uni-tr>
<uni-tr v-for="(line,index) in materialRequestList" :key="index">
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="materialRequestFormShow(line)">补料
</button>
</view>
</uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}</uni-td>
<uni-td align="center">{{ line.specification}}</uni-td>
<uni-td>{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{line.quantityIssued}}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td>
<uni-td align="center">{{ line.remark }}</uni-td>
<uni-td align="center">{{ line.state }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
<u-modal title="领料申请数量" @confirm="materialRequestSetting()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="materialRequestFormVisible" width="700rpx">
<view class="">
<u-form label-width="100px">
<u-row>
<u-col>
<u-form-item label="产品物料名称">
{{materialRequestFormData.itemName}}
</u-form-item>
</u-col>
</u-row>
<u-row>
<u-col>
<u-form-item label="领料数量">
<u-number-box v-model="materialRequestFormData.applyNum" :long-press="false" :positive-integer="false" :size="50" :input-width="190"></u-number-box>
</u-form-item>
</u-col>
</u-row>
</u-form>
</view>
</u-modal>
<u-modal title="退料申请" @confirm="feedback()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="materialReturnVisible" width="1300rpx">
<view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr>
<uni-th width="100px" align="center">操作</uni-th>
<uni-th width="110px" align="center">产品物料编码</uni-th>
<uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="150px" align="center">规格型号</uni-th>
<uni-th width="60px" align="center">单位</uni-th>
<uni-th width="80px" align="center">领料数量</uni-th>
<uni-th width="80px" align="center">退料数量</uni-th>
<uni-th width="110px" align="center">批次号</uni-th>
<uni-th width="100px" align="center">备注</uni-th>
</uni-tr>
<uni-tr v-for="(line,index) in materialReturnList" :key="index">
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料
</button>
</view>
</uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}</uni-td>
<uni-td align="center">{{ line.specification}}</uni-td>
<uni-td>{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.applyNum }}</uni-td>
<uni-td align="center">{{ line.quantityIssued }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td>
<uni-td align="center">{{ line.remark }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
<u-modal title="退料申请数量" @confirm="materialReturnSetting()" show-cancel-button
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}"
v-model="materialReturnFormVisible" width="700rpx">
<view class="">
<u-form label-width="100px">
<u-row>
<u-col>
<u-form-item label="产品物料名称">
{{materialReturnFormData.itemName}}
</u-form-item>
</u-col>
</u-row>
<u-row>
<u-col>
<u-form-item label="退料数量">
<u-number-box v-model="materialReturnFormData.applyNum" :long-press="false" :positive-integer="false" :size="50" :input-width="190"></u-number-box>
</u-form-item>
</u-col>
</u-row>
</u-form>
</view>
</u-modal>
</view>
</template>
......@@ -219,226 +408,226 @@ export default {
SearchInput,
dModelList
},
data() {
return {
screenHeight: 768,
title: '生产报工',
open: false,
aopen: false,
form: {},
feedbackForm: {},
tableData: [],
knifeTempVisible: false,
knifeTempSearch: {
knifeTempCode: '',
locationCode: ''
},
knifeTempInfo: {
knifeTemplateCode: '',
knifeTemplateName: '',
knifeTemplateSpec: '',
locationCode: '',
locationName: '',
locationType: '',
locationTypeCode: '',
locationTypeDesc: '',
locationTypeDescCode: '',
locationTypeDescName: '',
locationTypeDescNameCode: '',
locationTypeDescNameCode2: ''
},
stopReasonList: [
{value: '中午休息吃饭。', text: "休息吃饭"},
{value: '刀头模具到期更换,更换期间。', text: "刀头模具到期更换"},
{value: '没料了,正在领料', text: "领料加仓"}
],
exception: [{
value: 'PROD',
text: "生产异常"
},
{
value: 'QUAL',
text: "质量异常"
data() {
return {
screenHeight: 768,
title: '生产报工',
open: false,
aopen: false,
form: {},
feedbackForm: {},
tableData: [],
knifeTempVisible: false,
knifeTempSearch: {
knifeTempCode: '',
locationCode: ''
},
knifeTempInfo: {
knifeTemplateCode: '',
knifeTemplateName: '',
knifeTemplateSpec: '',
locationCode: '',
locationName: '',
locationType: '',
locationTypeCode: '',
locationTypeDesc: '',
locationTypeDescCode: '',
locationTypeDescName: '',
locationTypeDescNameCode: '',
locationTypeDescNameCode2: ''
},
stopReasonList: [
{value: '中午休息吃饭。', text: "休息吃饭"},
{value: '刀头模具到期更换,更换期间。', text: "刀头模具到期更换"},
{value: '没料了,正在领料', text: "领料加仓"}
],
exception: [{
value: 'PROD',
text: "生产异常"
},
{
value: 'QUAL',
text: "质量异常"
},
{
value: 'DEVI',
text: "设备异常"
},
{
value: 'WORK',
text: "车间异常"
}
],
stopReason: '',
stopReasonVisible: false,
rules: {
quantity: [{
required: true,
message: "请输入合格品数量或者不良品数量!",
trigger: "blur"
}]
},
typeList: [
{
value: 'DEVI',
text: "设备异常"
name: '物料扣减'
},
{
value: 'WORK',
text: "车间异常"
name: 'BOM外扣减'
}
],
stopReason: '',
stopReasonVisible: false,
rules: {
quantity: [{
required: true,
message: "请输入合格品数量或者不良品数量!",
trigger: "blur"
}]
},
typeList: [
{
name: '物料扣减'
},
{
name: 'BOM外扣减'
}
],
materialRecordInfo: {
taskCode: '',
materialBatchNumber: '',
quantity: 0,
operatorTime: '',
depletionMethod: 1
},
curTaskInfo: {},
currentType: 0,
bomFeeData: [],
bomFeeColumn: [
{
type: 'selection',
width: 35
},
{
name: 'taskCode',
label: '物料批次',
align: "center",
width: 150
},
{
name: 'status',
label: 'ERP物料批次',
align: "center",
width: 150
},
{
name: 'materialBatchNumber',
label: '物料编码',
width: 150
},
{
name: 'taskCode',
label: '序列号',
width: 150
},
{
name: 'quantity',
label: '数量',
width: 150
},
{
name: 'itemCode',
label: '物料描述',
}
],
tableColumn: [
{
],
materialRecordInfo: {
taskCode: '',
materialBatchNumber: '',
quantity: 0,
operatorTime: '',
depletionMethod: 1
},
curTaskInfo: {},
currentType: 0,
bomFeeData: [],
bomFeeColumn: [
{
type: 'selection',
width: 35
},
{
name: 'arrangeCode',
label: '编排单号',
width: 140,
func: "numclik"
},
{
name: 'startTime',
label: '计划开始时间',
width: 140,
func: "numclik"
},
{
name: 'endTime',
label: '计划结束时间',
width: 140,
},
{
name: 'quantity',
label: '待加工数量',
width: 140,
},
{
},
{
name: 'taskCode',
label: '物料批次',
align: "center",
width: 150
},
{
name: 'status',
label: '状态',
filters: {
// 'START': '生产中',
// 'PAUSE': '暂停',
// 'NORMARL': '未开始'
'PREPARE': '未开工',
'BEGINNING': '已开工',
'PAUSE': '暂停',
'ERROR_STOP': '异常停工',
'FINISH': '完工'
},
width: 60,
align: "center"
},
// {
// name: 'date',
// label: '批号',
// width: 50,
// },
{
label: 'ERP物料批次',
align: "center",
width: 150
},
{
name: 'materialBatchNumber',
label: '物料编码',
width: 150
},
{
name: 'taskCode',
label: '任务单号',
width: 110,
},
{
name: 'workorderCode',
label: '生产单号',
width: 120,
},
// {
// name: 'itemCode',
// label: '物料编号',
// width: 110,
// },
// {
// name: 'itemName',
// label: '物料名称'
// },
{
name: 'processName',
label: '工序',
width: 60,
},
{
label: '序列号',
width: 150
},
{
name: 'quantity',
label: '数量',
width: 60,
align: "center"
},
{
name: 'quantityQuanlify',
label: '合格数量',
width: 60,
align: "center"
},
{
name: 'quantityUnquanlify',
label: '不合格数量',
width: 60,
align: "center"
},
{
name: 'clientName',
label: '作业人员',
width: 60,
align: "center"
},
],
dModelData: [],
tableSelectData: [],
feedbackForms: [],
ExceptionForms: {},
reasonList: [],
materialUsageRecordList: [],
materialusagerecordLoading: false,
issusLineList: [],
issusLineColumn: [
width: 150
},
{
name: 'itemCode',
label: '物料描述',
}
],
tableColumn: [
{
type: 'selection',
width: 35
},
{
name: 'arrangeCode',
label: '编排单号',
width: 140,
func: "numclik"
},
{
name: 'startTime',
label: '计划开始时间',
width: 140,
func: "numclik"
},
{
name: 'endTime',
label: '计划结束时间',
width: 140,
},
{
name: 'quantity',
label: '待加工数量',
width: 140,
},
{
name: 'status',
label: '状态',
filters: {
// 'START': '生产中',
// 'PAUSE': '暂停',
// 'NORMARL': '未开始'
'PREPARE': '未开工',
'BEGINNING': '已开工',
'PAUSE': '暂停',
'ERROR_STOP': '异常停工',
'FINISH': '完工'
},
width: 60,
align: "center"
},
// {
// name: 'date',
// label: '批号',
// width: 50,
// },
{
name: 'taskCode',
label: '任务单号',
width: 110,
},
{
name: 'workorderCode',
label: '生产单号',
width: 120,
},
// {
// name: 'itemCode',
// label: '物料编号',
// width: 110,
// },
// {
// name: 'itemName',
// label: '物料名称'
// },
{
name: 'processName',
label: '工序',
width: 60,
},
{
name: 'quantity',
label: '数量',
width: 60,
align: "center"
},
{
name: 'quantityQuanlify',
label: '合格数量',
width: 60,
align: "center"
},
{
name: 'quantityUnquanlify',
label: '不合格数量',
width: 60,
align: "center"
},
{
name: 'clientName',
label: '作业人员',
width: 60,
align: "center"
},
],
dModelData: [],
tableSelectData: [],
feedbackForms: [],
ExceptionForms: {},
reasonList: [],
materialUsageRecordList: [],
materialusagerecordLoading: false,
issusLineList: [],
issusLineColumn: [
{
name: 'itemCode',
label: '产品物料编码',
......@@ -474,10 +663,36 @@ export default {
{
name: 'areaName',
label: '库位名称',
}]
}
},
created() {
}],
feedingInspectionVisible:false,
recoilMaterialVisible:false,
materialRequestVisible:false,
materialReturnVisible:false,
stockInVisible:false,
feedingInspectionList: [],
recoilMaterialList: [],
materialRequestList: [],
materialReturnList: [],
materialRequestFormData: {
itemName:null,
applyNum:null
},
materialRequestFormVisible:false,
materialRequestSelected:{},
materialReturnFormData: {
itemName:null,
applyNum:null
},
materialReturnFormVisible:false,
materialReturnSelected:{}
}
},
mounted() { //监听工作站切换事件
uni.$on('switchWorkstation', (station) => {
this.getTaskList();
})
},
created() {
//获取屏幕高度
uni.getSystemInfo({
success(res) {
......@@ -531,7 +746,6 @@ export default {
case 'StopTask':
this.stopReason = ''
this.stopReasonVisible = true
break;
case 'FinshTask':
this.tableSelectData.forEach((item) => {
......@@ -547,17 +761,31 @@ export default {
break;
case 'KnifeTemp':
this.knifeTempShow()
break;
case 'abnormal':
this.doException()
break;
case 'abnormal':
this.doException()
break;
case 'FeedingInspection':
this.feedingInspectionShow();
break;
case 'RecoilMaterial':
this.recoilMaterialShow();
break;
case 'MaterialRequest':
this.materialRequestShow();
break;
case 'MaterialReturn':
this.materialReturnShow();
break;
case 'StockIn':
this.stockInShow();
break;
default:
this.$u.toast('功能正在开发中!');
break
}
},
knifeTempShow() {
async knifeTempShow() {
if (this.tableSelectData.length > 1) {
return
......@@ -575,55 +803,54 @@ export default {
}
this.addDModelRecord(params)
},
async upDownGetList() {
const params = {
arrangeCode: this.tableSelectData[0].arrangeCode || '',
processId: this.tableSelectData[0].processId
async upDownGetList() {
const params = {
arrangeCode: this.tableSelectData[0].arrangeCode || '',
processId: this.tableSelectData[0].processId
}
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params)
this.dModelData = records.data
},
// 新增刀模版上下机记录
async addDModelRecord(params) {
const {
data
} = await this.$u.api.dModel.getToolsByProcessIdAndArrangeCode(params)
if (data?.length) {
const [selectData] = this.tableSelectData
const ps = {
toolMachinesCode: '',
arrangeCode: selectData.arrangeCode,
workunitId: selectData.workunitId,
processId: selectData.processId,
workorderId: selectData.workorderId,
toolRequestUseId: data[0].toolRequestUseId,
toolMachinesRecordList: data.map(v => {
return {
toolRequestUseItemId: v.toolRequestUseItemId,
type: 3,
upDate: '',
downDate: ''
}
})
}
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params)
this.dModelData = records.data
},
// 新增刀模版上下机记录
async addDModelRecord(params) {
const {
data
} = await this.$u.api.dModel.getToolsByProcessIdAndArrangeCode(params)
if (data?.length) {
const [selectData] = this.tableSelectData
const ps = {
toolMachinesCode: '',
arrangeCode: selectData.arrangeCode,
workunitId: selectData.workunitId,
processId: selectData.processId,
workorderId: selectData.workorderId,
toolRequestUseId: data[0].toolRequestUseId,
toolMachinesRecordList: data.map(v => {
return {
toolRequestUseItemId: v.toolRequestUseItemId,
type: 3,
upDate: '',
downDate: ''
}
})
}
// 新增
const data2 = await this.$u.api.dModel.tmToolMachines(ps)
if (data2.code == 200) {
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params)
this.dModelData = records.data || []
this.knifeTempVisible = true
}
// 新增
const data2 = await this.$u.api.dModel.tmToolMachines(ps)
if (data2.code == 200) {
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params)
this.dModelData = records.data || []
this.knifeTempVisible = true
}
},
getIssusLinebyWorkorderCodes() {
this.issusLineList = []
this.$u.api.getIssusLinebyWorkorderCodes({workorderCodes: this.curTaskInfo.workorderCodes?.split(',')}).then(res => {
if (res.code === 200) {
this.issusLineList = res.rows;
}
});
},
}
},
getIssusLinebyWorkorderCodes() {
this.issusLineList = []
this.$u.api.getIssusLinebyWorkorderCodes({workorderCodes: this.curTaskInfo.workorderCodes?.split(',')}).then(res => {
if (res.code === 200) {
this.issusLineList = res.rows;
}
});
},
rowClick(row, index) {
this.curTaskInfo = row;
this.getMaterialUsageRecordList();
......@@ -646,27 +873,25 @@ export default {
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
}
})
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({
......@@ -783,28 +1008,28 @@ export default {
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();
},
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;
},
......@@ -841,6 +1066,117 @@ export default {
})
this.getTaskList()
this.open = false;
},
feedingInspectionShow(){
this.feedingInspectionVisible=true;
this.feedingInspectionLoadAndScan();
},
feedingInspectionLoadAndScan(){
const t = this;
this.$u.api.listFeedingInspection({"batchNo":""}).then(res => {
if (res.code === 200) {
t.feedingInspectionList = res.data;
t.feedingInspectionScan();
}
});
},
feedingInspectionScan(){
const t = this;
uni.scanCode({
success: function (res) {
t.$u.api.validateFeedingInspection({"batchNo":res.result}).then(res2=>{
if (res2.code === 200) {
t.feedingInspectionLoadAndScan();
}
});
}
});
this.feedingInspectionVisible=true;
},
recoilMaterialShow(){
this.recoilMaterialVisible=true;
this.recoilMaterialLoadAndScan();
},
recoilMaterialLoadAndScan(){
const t = this;
this.$u.api.recoilMaterialList({"batchNo":""}).then(res => {
if (res.code === 200) {
t.recoilMaterialList = res.data;
t.recoilMaterialScan();
}
});
},
recoilMaterialScan(){
const t = this;
uni.scanCode({
success: function (res) {
t.$u.toast(res.result);
t.$u.api.addRecoilMaterial({"batchNo":res.result}).then(res2=>{
if (res2.code === 200) {
t.recoilMaterialLoadAndScan();
}
});
}
});
this.recoilMaterialVisible=true;
},
recoilMaterialDelete(line){
const t = this;
this.$u.api.deleteRecoilMaterial({"id":line.id}).then(res2=>{
t.$u.api.recoilMaterialList({"batchNo":""}).then(res => {
if (res.code === 200) {
t.recoilMaterialList = res.data;
}
});
});
},
materialRequestShow(){
console.log(this.$u.config.v);
const t = this;
this.materialRequestVisible=true;
this.$u.api.listMaterialRequest({"batchNo":""}).then(res => {
if (res.code === 200) {
t.materialRequestList = res.data;
}
});
},
materialRequestFormShow(line){
this.materialRequestFormVisible=true;
this.materialRequestFormData = {itemName: line.itemName};
this.materialRequestSelected = line;
},
materialRequestSetting(){
this.materialRequestSelected.quantityIssued = this.materialRequestFormData.applyNum;
this.materialRequestFormVisible=false;
},
materialRequestSave(){
},
materialReturnShow(){
console.log(this.$u.config.v);
const t = this;
this.materialReturnVisible=true;
this.$u.api.listMaterialReturn({"batchNo":""}).then(res => {
if (res.code === 200) {
t.materialReturnList = res.data;
}
});
},
materialReturnFormShow(line){
this.materialReturnFormVisible=true;
this.materialReturnFormData = {itemName: line.itemName};
this.materialReturnSelected = line;
},
materialReturnSetting(){
this.materialReturnSelected.quantityIssued = this.materialReturnFormData.applyNum;
this.materialReturnFormVisible=false;
},
materialReturnSave(){
},
stockInShow(){
this.stockInVisible=true;
}
}
}
......
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