Commit a12c9159 authored by 张海景's avatar 张海景

update:修复下拉框不滚动

parent d824f7d5
...@@ -16,5 +16,11 @@ export default { ...@@ -16,5 +16,11 @@ export default {
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "@/uview-ui/index.scss"; @import "@/uview-ui/index.scss";
/deep/ .uni-select__selector-scroll {
max-height: 100px !important;
}
/deep/ .times .uni-date-picker__container {
height: 275px !important;
}
</style> </style>
...@@ -15,13 +15,18 @@ ...@@ -15,13 +15,18 @@
<!-- </view>--> <!-- </view>-->
<view class="prod-body-left-task"> <view class="prod-body-left-task">
<zb-table :columns="tableColumn" :stripe="true" @rowClick="rowClick" @cellClick='cellClick' <zb-table
@toggleRowSelection="toggleRowSelection" @toggleAllSelection="toggleAllSelection" :border="true" :columns="tableColumn"
:data="tableData"></zb-table> :stripe="true"
</view> @rowClick="rowClick"
<view class="prod-body-left-num"> @cellClick="cellClick"
总报工订单数:{{ tableData.length }} @toggleRowSelection="toggleRowSelection"
@toggleAllSelection="toggleAllSelection"
:border="true"
:data="tableData"
></zb-table>
</view> </view>
<view class="prod-body-left-num">总报工订单数:{{ tableData.length }}</view>
<view class="prod-body-left-bom"> <view class="prod-body-left-bom">
<!-- <view class="prod-body-left-bom-type">--> <!-- <view class="prod-body-left-bom-type">-->
<!-- <u-subsection :list="typeList" :current="currentType" type="primary" font-size="28"--> <!-- <u-subsection :list="typeList" :current="currentType" type="primary" font-size="28"-->
...@@ -56,13 +61,12 @@ ...@@ -56,13 +61,12 @@
<!-- </u-col>--> <!-- </u-col>-->
<!-- </u-row>--> <!-- </u-row>-->
<!-- </u-form>--> <!-- </u-form>-->
<zb-table :columns="issusLineColumn" :stripe="true" :fit="true" :border="true" <zb-table :columns="issusLineColumn" :stripe="true" :fit="true" :border="true" :data="issusLineList"></zb-table>
:data="issusLineList"></zb-table>
<!-- </view>--> <!-- </view>-->
</view> </view>
</view> </view>
<scroll-view class="prod-body-right" scroll-y> <scroll-view class="prod-body-right" scroll-y>
<view style="text-align: center;line-height: 80rpx;font-size: 28rpx;font-weight: 600;"> <view style="text-align: center; line-height: 80rpx; font-size: 28rpx; font-weight: 600">
{{ this.vuex_workunit == null ? '请选择工作单元' : this.vuex_workunit.workunitName }} {{ this.vuex_workunit == null ? '请选择工作单元' : this.vuex_workunit.workunitName }}
</view> </view>
<u-button type="warning" @click="commonClick('KnifeTemp')">刀模版上下机</u-button> <u-button type="warning" @click="commonClick('KnifeTemp')">刀模版上下机</u-button>
...@@ -81,9 +85,14 @@ ...@@ -81,9 +85,14 @@
</scroll-view> </scroll-view>
</view> </view>
<u-modal :title="title" @confirm="feedback()" show-cancel-button <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" :title="title"
v-model="open" width="1800rpx"> @confirm="feedback()"
show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="open"
width="1800rpx"
>
<view class="feedback-card" v-for="feedback in feedbackForms"> <view class="feedback-card" v-for="feedback in feedbackForms">
<u-form label-width="100px" :model="feedback" :rules="rules"> <u-form label-width="100px" :model="feedback" :rules="rules">
<u-row> <u-row>
...@@ -128,14 +137,12 @@ ...@@ -128,14 +137,12 @@
<u-row> <u-row>
<u-col span="6"> <u-col span="6">
<u-form-item label="合格品数量" prop="quantityQualify"> <u-form-item label="合格品数量" prop="quantityQualify">
<u-number-box :min="0" @change="quantityChanged" <u-number-box :min="0" @change="quantityChanged" v-model="feedback.quantityQualify"></u-number-box>
v-model="feedback.quantityQualify"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<u-form-item label="不良品数量" prop="quantityUnqualify"> <u-form-item label="不良品数量" prop="quantityUnqualify">
<u-number-box :min="0" @change="quantityChanged" <u-number-box :min="0" @change="quantityChanged" v-model="feedback.quantityUnqualify"></u-number-box>
v-model="feedback.quantityUnqualify"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
...@@ -146,26 +153,25 @@ ...@@ -146,26 +153,25 @@
<u-form-item label="是否打印" prop="printName"> <u-form-item label="是否打印" prop="printName">
<view class="uni-list-item__extra"> <view class="uni-list-item__extra">
<u-radio-group v-model="feedback.printName"> <u-radio-group v-model="feedback.printName">
<u-radio name="shi"> <u-radio name="shi"></u-radio>
<u-radio name="fou"></u-radio>
</u-radio>
<u-radio name="fou">
</u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
</u-form> </u-form>
</view> </view>
</u-modal> </u-modal>
<u-modal
<u-modal title="刀模版上下机" @confirm="knifeTemp()" show-cancel-button title="刀模版上下机"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" @confirm="knifeTemp()"
v-model="knifeTempVisible" width="1300rpx"> show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="knifeTempVisible"
width="1300rpx"
>
<u-form label-width="130px" :model="knifeTempSearch" :rules="rules"> <u-form label-width="130px" :model="knifeTempSearch" :rules="rules">
<u-row> <u-row>
<u-col span="6"> <u-col span="6">
...@@ -181,14 +187,17 @@ ...@@ -181,14 +187,17 @@
</u-row> </u-row>
</u-form> </u-form>
<dModelList :data="dModelData" @action="upDownGetList" /> <dModelList :data="dModelData" @action="upDownGetList" />
</u-modal> </u-modal>
<u-modal
<u-modal title="暂停原因" @confirm="stopReasonSubmit()" show-cancel-button title="暂停原因"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" @confirm="stopReasonSubmit()"
v-model="stopReasonVisible" width="1300rpx"> show-cancel-button
<view> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="stopReasonVisible"
width="1300rpx"
>
<view class="feedback-card" style="height: 200px">
<u-form label-width="120px" :model="feedback" :rules="rules"> <u-form label-width="120px" :model="feedback" :rules="rules">
<u-form-item label="暂停原因" prop="quantity"> <u-form-item label="暂停原因" prop="quantity">
<uni-data-select :localdata="exception" @change="stopReas"></uni-data-select> <uni-data-select :localdata="exception" @change="stopReas"></uni-data-select>
...@@ -208,11 +217,15 @@ ...@@ -208,11 +217,15 @@
</view> </view>
</u-modal> </u-modal>
<u-modal
title="异常报告"
<u-modal title="异常报告" @confirm="newlyAddss()" show-cancel-button @confirm="newlyAddss()"
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '60px','padding-top': '0px'}" show-cancel-button
v-model="aopen" width="1300rpx"> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '60px', 'padding-top': '0px' }"
v-model="aopen"
width="1300rpx"
>
<view class="feedback-card">
<u-form label-width="90px" :rules="rules"> <u-form label-width="90px" :rules="rules">
<!-- <u-form-item label="异常时间" prop="abnormalTime"> <!-- <u-form-item label="异常时间" prop="abnormalTime">
<u-input :border="true" v-model="ExceptionForms.abnormalTime"></u-input> <u-input :border="true" v-model="ExceptionForms.abnormalTime"></u-input>
...@@ -234,27 +247,32 @@ ...@@ -234,27 +247,32 @@
<u-form-item label="编批单号" prop="batchNumber"> <u-form-item label="编批单号" prop="batchNumber">
<!-- <u-input :border="true" v-model="ExceptionForms.batchNumber" ></u-input> --> <!-- <u-input :border="true" v-model="ExceptionForms.batchNumber" ></u-input> -->
{{ExceptionForms.batchNumber}} {{ ExceptionForms.batchNumber }}
</u-form-item> </u-form-item>
<u-form-item label="工序" prop="processName"> <u-form-item label="工序" prop="processName">
<!-- <u-input :border="true" v-model="ExceptionForms.processName"></u-input> --> <!-- <u-input :border="true" v-model="ExceptionForms.processName"></u-input> -->
{{ExceptionForms.processName}} {{ ExceptionForms.processName }}
</u-form-item> </u-form-item>
<u-form-item label="作业单元" prop="workstationName"> <u-form-item label="作业单元" prop="workstationName">
<!-- <u-input :border="true" v-model="ExceptionForms.workstationName"></u-input> --> <!-- <u-input :border="true" v-model="ExceptionForms.workstationName"></u-input> -->
{{ExceptionForms.workstationName}} {{ ExceptionForms.workstationName }}
</u-form-item> </u-form-item>
</u-form> </u-form>
</view>
</u-modal> </u-modal>
<u-modal title="投料校验" @confirm="feedingInspectionScan()" show-cancel-button confirmText="继续扫码" cancelText="关闭" <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="投料校验"
v-model="feedingInspectionVisible" width="1300rpx"> @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"> <view class="list-bar">
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <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-table border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr> <uni-tr>
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
...@@ -264,16 +282,15 @@ ...@@ -264,16 +282,15 @@
<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="110px" align="center">批次号</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line,index) in feedingInspectionList" :key="index"> <uni-tr v-for="(line, index) in feedingInspectionList" :key="index">
<uni-td align="center"> <uni-td align="center">
<view class="uni-group"> <view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="validateFeedingInspection(line)">校验 <button class="uni-button" size="mini" type="primary" @click="validateFeedingInspection(line)">校验</button>
</button>
</view> </view>
</uni-td> </uni-td>
<uni-td align="center">{{ line.attr3 == 1 ? '校验':'未校验' }}</uni-td> <uni-td align="center">{{ line.attr3 == 1 ? '校验' : '未校验' }}</uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.quantityIssued }}</uni-td> <uni-td align="center">{{ line.quantityIssued }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td> <uni-td align="center">{{ line.batchCode }}</uni-td>
</uni-tr> </uni-tr>
...@@ -282,11 +299,18 @@ ...@@ -282,11 +299,18 @@
</view> </view>
</u-modal> </u-modal>
<u-modal title="反冲料登记" @confirm="recoilMaterialScan()" show-cancel-button confirmText="继续扫码" cancelText="关闭" <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="反冲料登记"
v-model="recoilMaterialVisible" width="1300rpx"> @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"> <view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据"> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr> <uni-tr>
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
...@@ -294,15 +318,14 @@ ...@@ -294,15 +318,14 @@
<uni-th width="110px" align="center">产品物料名称</uni-th> <uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="110px" align="center">批次号</uni-th> <uni-th width="110px" align="center">批次号</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line,index) in recoilMaterialList" :key="index"> <uni-tr v-for="(line, index) in recoilMaterialList" :key="index">
<uni-td align="center"> <uni-td align="center">
<view class="uni-group"> <view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="recoilMaterialDelete(line)">删除 <button class="uni-button" size="mini" type="primary" @click="recoilMaterialDelete(line)">删除</button>
</button>
</view> </view>
</uni-td> </uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.batchNo }}</uni-td> <uni-td align="center">{{ line.batchNo }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
...@@ -310,11 +333,16 @@ ...@@ -310,11 +333,16 @@
</view> </view>
</u-modal> </u-modal>
<u-modal title="领料申请" @confirm="materialRequestSave()" show-cancel-button <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="领料申请"
v-model="materialRequestVisible" width="1300rpx"> @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"> <view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="materialRequestTable" border stripe :loading="loading" emptyText="未查询到数据"> <uni-table ref="materialRequestTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr> <uni-tr>
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
...@@ -322,31 +350,35 @@ ...@@ -322,31 +350,35 @@
<uni-th width="110px" align="center">产品物料名称</uni-th> <uni-th width="110px" align="center">产品物料名称</uni-th>
<uni-th width="80px" align="center">领取数量</uni-th> <uni-th width="80px" align="center">领取数量</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line,index) in materialRequestList" :key="index"> <uni-tr v-for="(line, index) in materialRequestList" :key="index">
<uni-td align="center"> <uni-td align="center">
<view class="uni-group"> <view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="materialRequestFormShow(line)">补料 <button class="uni-button" size="mini" type="primary" @click="materialRequestFormShow(line)">补料</button>
</button>
</view> </view>
</uni-td> </uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{line.applyNum}}</uni-td> <uni-td align="center">{{ line.applyNum }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</scroll-view> </scroll-view>
</view> </view>
</u-modal> </u-modal>
<u-modal title="领料申请数量" @confirm="materialRequestSetting()" show-cancel-button <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="领料申请数量"
v-model="materialRequestFormVisible" width="700rpx"> @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=""> <view class="">
<u-form label-width="100px"> <u-form label-width="100px">
<u-row> <u-row>
<u-col> <u-col>
<u-form-item label="产品物料名称"> <u-form-item label="产品物料名称">
{{materialRequestFormData.itemName}} {{ materialRequestFormData.itemName }}
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
...@@ -361,15 +393,20 @@ ...@@ -361,15 +393,20 @@
</view> </view>
</u-modal> </u-modal>
<u-modal title="退料申请" @confirm="materialReturnSave()" show-cancel-button <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="退料申请"
v-model="materialReturnVisible" width="1600rpx"> @confirm="materialReturnSave()"
show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="materialReturnVisible"
width="1600rpx"
>
<view class="list-bar"> <view class="list-bar">
<u-form label-width="100px"> <u-form label-width="100px">
<u-row> <u-row>
<u-col span="6"> <u-col span="6">
<u-form-item label="编排单号"> <u-form-item label="编排单号">
{{curTaskInfo.arrangeCode}} {{ curTaskInfo.arrangeCode }}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
...@@ -379,7 +416,7 @@ ...@@ -379,7 +416,7 @@
</u-col> </u-col>
</u-row> </u-row>
</u-form> </u-form>
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据"> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr> <uni-tr>
<uni-th width="60px" align="center">操作</uni-th> <uni-th width="60px" align="center">操作</uni-th>
...@@ -391,35 +428,39 @@ ...@@ -391,35 +428,39 @@
<uni-th width="110px" align="center">批次号</uni-th> <uni-th width="110px" align="center">批次号</uni-th>
<uni-th width="60" align="center">合格</uni-th> <uni-th width="60" align="center">合格</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line,index) in materialReturnList" :key="index"> <uni-tr v-for="(line, index) in materialReturnList" :key="index">
<uni-td align="center"> <uni-td align="center">
<view class="uni-group"> <view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料 <button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料</button>
</button>
</view> </view>
</uni-td> </uni-td>
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.quantityIssued }}</uni-td> <uni-td align="center">{{ line.quantityIssued }}</uni-td>
<uni-td align="center">{{ line.applyNum }}</uni-td> <uni-td align="center">{{ line.applyNum }}</uni-td>
<uni-td align="center">{{ line.totalBackNum }}</uni-td> <uni-td align="center">{{ line.totalBackNum }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td> <uni-td align="center">{{ line.batchCode }}</uni-td>
<uni-td align="center">{{ line.isQualified==1?'是':'' }}{{ line.isQualified==0?'否':'' }}</uni-td> <uni-td align="center">{{ line.isQualified == 1 ? '是' : '' }}{{ line.isQualified == 0 ? '否' : '' }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</scroll-view> </scroll-view>
</view> </view>
</u-modal> </u-modal>
<u-modal title="退料申请数量" @confirm="materialReturnSetting()" show-cancel-button <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="退料申请数量"
v-model="materialReturnFormVisible" width="700rpx"> @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=""> <view class="">
<u-form label-width="100px"> <u-form label-width="100px">
<u-row> <u-row>
<u-col> <u-col>
<u-form-item label="产品物料名称"> <u-form-item label="产品物料名称">
{{materialReturnFormData.itemName}} {{ materialReturnFormData.itemName }}
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
...@@ -435,12 +476,8 @@ ...@@ -435,12 +476,8 @@
<u-form-item label="是否合格" prop="printName"> <u-form-item label="是否合格" prop="printName">
<view class="uni-list-item__extra"> <view class="uni-list-item__extra">
<u-radio-group v-model="materialReturnFormData.isQualified"> <u-radio-group v-model="materialReturnFormData.isQualified">
<u-radio name="1"> <u-radio name="1"></u-radio>
<u-radio name="0"></u-radio>
</u-radio>
<u-radio name="0">
</u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
</u-form-item> </u-form-item>
...@@ -449,19 +486,29 @@ ...@@ -449,19 +486,29 @@
</u-form> </u-form>
</view> </view>
</u-modal> </u-modal>
<u-modal title="详细数据" :showConfirmButton="true" <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="详细数据"
v-model="showRowDeatilFlag" width="1800rpx"> :showConfirmButton="true"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="showRowDeatilFlag"
width="1800rpx"
>
<view class=""> <view class="">
<zb-table :columns="tableDetailColumn" :stripe="true" :border="true" <zb-table :columns="tableDetailColumn" :stripe="true" :border="true" :data="tableDataDetail"></zb-table>
:data="tableDataDetail"></zb-table>
</view> </view>
</u-modal> </u-modal>
<u-modal title="生产工单" @confirm="materialReturnSave()" show-cancel-button :show-confirm-button="false" cancel-text="返回" <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="生产工单"
v-model="materialReturn" width="1300rpx"> @confirm="materialReturnSave()"
show-cancel-button
:show-confirm-button="false"
cancel-text="返回"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="materialReturn"
width="1300rpx"
>
<view class="list-bar"> <view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据"> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr> <uni-tr>
<uni-th width="100px" align="center">操作</uni-th> <uni-th width="100px" align="center">操作</uni-th>
...@@ -471,16 +518,15 @@ ...@@ -471,16 +518,15 @@
<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="110px" align="center">编排单号</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(line,index) in viewSopPicture" :key="index"> <uni-tr v-for="(line, index) in viewSopPicture" :key="index">
<uni-td align="center"> <uni-td align="center">
<view class="uni-group"> <view class="uni-group">
<!-- <button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料 --> <!-- <button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料 -->
<!-- <button class="uni-button" size="mini" type="primary" @click="viewSopsShow()">查看 --> <!-- <button class="uni-button" size="mini" type="primary" @click="viewSopsShow()">查看 -->
<button class="uni-button" size="mini" type="primary" @click="viewSopsShow(line)">查看 <button class="uni-button" size="mini" type="primary" @click="viewSopsShow(line)">查看</button>
</button>
</view> </view>
</uni-td> </uni-td>
<uni-td align="center">{{ line.workorderId}}</uni-td> <uni-td align="center">{{ line.workorderId }}</uni-td>
<uni-td align="center">{{ line.workorderName }}</uni-td> <uni-td align="center">{{ line.workorderName }}</uni-td>
<uni-td align="center">{{ line.orderSource }}</uni-td> <uni-td align="center">{{ line.orderSource }}</uni-td>
<uni-td align="center">{{ line.productName }}</uni-td> <uni-td align="center">{{ line.productName }}</uni-td>
...@@ -490,14 +536,20 @@ ...@@ -490,14 +536,20 @@
</scroll-view> </scroll-view>
</view> </view>
</u-modal> </u-modal>
<u-modal title="显示图片" @confirm="materialReturnSave()" show-cancel-button :show-confirm-button="false" cancel-text="返回" <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="显示图片"
v-model="material" width="1300rpx"> @confirm="materialReturnSave()"
show-cancel-button
:show-confirm-button="false"
cancel-text="返回"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="material"
width="1300rpx"
>
<view class="list-bar"> <view class="list-bar">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<view>
<view > <image v-for="(line, index) in viewSop" class="u-avatar-demo" :src="line" mode="aspectFill"></image>
<image v-for="(line,index) in viewSop" class="u-avatar-demo" :src="line" mode="aspectFill"></image>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -506,10 +558,10 @@ ...@@ -506,10 +558,10 @@
</template> </template>
<script> <script>
import SearchInput from "@/components/ScanInput/index.vue"; import SearchInput from '@/components/ScanInput/index.vue';
import dModelList from './components/dModelList.vue' import dModelList from './components/dModelList.vue';
export default { export default {
name: "ProdReport", name: 'ProdReport',
components: { components: {
SearchInput, SearchInput,
dModelList dModelList
...@@ -543,35 +595,38 @@ export default { ...@@ -543,35 +595,38 @@ export default {
locationTypeDescNameCode2: '' locationTypeDescNameCode2: ''
}, },
stopReasonList: [ stopReasonList: [
{value: '中午休息吃饭。', text: "休息吃饭"}, { value: '中午休息吃饭。', text: '休息吃饭' },
{value: '刀头模具到期更换,更换期间。', text: "刀头模具到期更换"}, { value: '刀头模具到期更换,更换期间。', text: '刀头模具到期更换' },
{value: '没料了,正在领料', text: "领料加仓"} { value: '没料了,正在领料', text: '领料加仓' }
], ],
exception: [{ exception: [
{
value: 'PROD', value: 'PROD',
text: "生产异常" text: '生产异常'
}, },
{ {
value: 'QUAL', value: 'QUAL',
text: "质量异常" text: '质量异常'
}, },
{ {
value: 'DEVI', value: 'DEVI',
text: "设备异常" text: '设备异常'
}, },
{ {
value: 'WORK', value: 'WORK',
text: "车间异常" text: '车间异常'
} }
], ],
stopReason: '', stopReason: '',
stopReasonVisible: false, stopReasonVisible: false,
rules: { rules: {
quantity: [{ quantity: [
{
required: true, required: true,
message: "请输入合格品数量或者不良品数量!", message: '请输入合格品数量或者不良品数量!',
trigger: "blur" trigger: 'blur'
}] }
]
}, },
typeList: [ typeList: [
{ {
...@@ -599,13 +654,13 @@ export default { ...@@ -599,13 +654,13 @@ export default {
{ {
name: 'taskCode', name: 'taskCode',
label: '物料批次', label: '物料批次',
align: "center", align: 'center',
width: 150 width: 150
}, },
{ {
name: 'status', name: 'status',
label: 'ERP物料批次', label: 'ERP物料批次',
align: "center", align: 'center',
width: 150 width: 150
}, },
{ {
...@@ -625,7 +680,7 @@ export default { ...@@ -625,7 +680,7 @@ export default {
}, },
{ {
name: 'itemCode', name: 'itemCode',
label: '物料描述', label: '物料描述'
} }
], ],
tableColumn: [ tableColumn: [
...@@ -637,36 +692,36 @@ export default { ...@@ -637,36 +692,36 @@ export default {
name: 'arrangeCode', name: 'arrangeCode',
label: '编排单号', label: '编排单号',
width: 140, width: 140,
func: "numclik" func: 'numclik'
}, },
{ {
name: 'startTime', name: 'startTime',
label: '计划开始时间', label: '计划开始时间',
width: 140, width: 140,
func: "numclik" func: 'numclik'
}, },
{ {
name: 'endTime', name: 'endTime',
label: '计划结束时间', label: '计划结束时间',
width: 140, width: 140
}, },
{ {
name: 'quantity', name: 'quantity',
label: '待加工数量', label: '待加工数量',
width: 140, width: 140
}, },
{ {
name: 'status', name: 'status',
label: '状态', label: '状态',
filters: { filters: {
'PREPARE': '未开工', PREPARE: '未开工',
'BEGINNING': '已开工', BEGINNING: '已开工',
'PAUSE': '暂停', PAUSE: '暂停',
'ERROR_STOP': '异常停工', ERROR_STOP: '异常停工',
'FINISH': '完工' FINISH: '完工'
}, },
width: 60, width: 60,
align: "center" align: 'center'
}, },
// { // {
// name: 'date', // name: 'date',
...@@ -676,12 +731,12 @@ export default { ...@@ -676,12 +731,12 @@ export default {
{ {
name: 'taskCode', name: 'taskCode',
label: '任务单号', label: '任务单号',
width: 110, width: 110
}, },
{ {
name: 'workorderCode', name: 'workorderCode',
label: '生产单号', label: '生产单号',
width: 120, width: 120
}, },
// { // {
// name: 'itemCode', // name: 'itemCode',
...@@ -695,32 +750,32 @@ export default { ...@@ -695,32 +750,32 @@ export default {
{ {
name: 'processName', name: 'processName',
label: '工序', label: '工序',
width: 60, width: 60
}, },
{ {
name: 'quantity', name: 'quantity',
label: '数量', label: '数量',
width: 60, width: 60,
align: "center" align: 'center'
}, },
{ {
name: 'quantityQuanlify', name: 'quantityQuanlify',
label: '合格数量', label: '合格数量',
width: 60, width: 60,
align: "center" align: 'center'
}, },
{ {
name: 'quantityUnquanlify', name: 'quantityUnquanlify',
label: '不合格数量', label: '不合格数量',
width: 60, width: 60,
align: "center" align: 'center'
}, },
{ {
name: 'clientName', name: 'clientName',
label: '作业人员', label: '作业人员',
width: 60, width: 60,
align: "center" align: 'center'
}, }
], ],
dModelData: [], dModelData: [],
tableSelectData: [], tableSelectData: [],
...@@ -736,100 +791,102 @@ export default { ...@@ -736,100 +791,102 @@ export default {
issusLineColumn: [ issusLineColumn: [
{ {
name: 'itemCode', name: 'itemCode',
label: '产品物料编码', label: '产品物料编码'
}, },
{ {
name: 'itemName', name: 'itemName',
label: '产品物料名称', label: '产品物料名称'
}, },
{ {
name: 'specification', name: 'specification',
label: '规格型号', label: '规格型号'
}, },
{ {
name: 'unitOfMeasure', name: 'unitOfMeasure',
label: '单位', label: '单位'
}, },
{ {
name: 'quantityIssued', name: 'quantityIssued',
label: '领料数量', label: '领料数量'
}, },
{ {
name: 'batchCode', name: 'batchCode',
label: '批次号', label: '批次号'
}, },
{ {
name: 'warehouseName', name: 'warehouseName',
label: '仓库名称', label: '仓库名称'
}, },
{ {
name: 'locationName', name: 'locationName',
label: '库区名称', label: '库区名称'
}, },
{ {
name: 'areaName', name: 'areaName',
label: '库位名称', label: '库位名称'
}], }
feedingInspectionVisible:false, ],
recoilMaterialVisible:false, feedingInspectionVisible: false,
materialRequestVisible:false, recoilMaterialVisible: false,
materialReturnVisible:false, materialRequestVisible: false,
materialReturn:false, materialReturnVisible: false,
stockInVisible:false, materialReturn: false,
material:false, stockInVisible: false,
material: false,
feedingInspectionList: [], feedingInspectionList: [],
recoilMaterialList: [], recoilMaterialList: [],
materialRequestList: [], materialRequestList: [],
materialReturnList: [], materialReturnList: [],
materialRequestFormData: { materialRequestFormData: {
itemName:null, itemName: null,
applyNum:null applyNum: null
}, },
materialRequestFormVisible:false, materialRequestFormVisible: false,
materialRequestSelected:{}, materialRequestSelected: {},
materialReturnFormData: { materialReturnFormData: {
itemName:null, itemName: null,
applyNum:null, applyNum: null,
workorderCode:null workorderCode: null
}, },
materialReturnFormVisible:false, materialReturnFormVisible: false,
materialReturnSelected:{}, materialReturnSelected: {},
tableDetailColumn: [ tableDetailColumn: [
{ {
name: 'workorderCode', name: 'workorderCode',
label: '生产工单号', label: '生产工单号',
width: 140, width: 140
}, },
{ {
name: 'productCode', name: 'productCode',
label: '产品编号', label: '产品编号',
width: 140, width: 140
}, },
{ {
name: 'productName', name: 'productName',
label: '产品名称', label: '产品名称',
width: 140, width: 140
}, },
{ {
name: 'productSpc', name: 'productSpc',
label: '规格', label: '规格',
width: 140, width: 140
}, },
{ {
name: 'requestDate', name: 'requestDate',
label: '需求日期', label: '需求日期',
width: 140, width: 140
}, }
], ],
tableDataDetail: [], tableDataDetail: [],
showRowDeatilFlag: false, showRowDeatilFlag: false,
loading: false, loading: false
} };
}, },
mounted() { //监听工作站切换事件 mounted() {
//监听工作站切换事件
uni.$on('switchWorkunit', (station) => { uni.$on('switchWorkunit', (station) => {
this.getTaskList(); this.getTaskList();
}) });
}, },
created() { created() {
//获取屏幕高度 //获取屏幕高度
...@@ -837,16 +894,16 @@ export default { ...@@ -837,16 +894,16 @@ export default {
success(res) { success(res) {
this.screenHeight = res.windowHeight; this.screenHeight = res.windowHeight;
} }
}) });
//监听工作站切换事件 //监听工作站切换事件
uni.$on('switchWorkunit', (station) => { uni.$on('switchWorkunit', (station) => {
// this.reset(); // this.reset();
this.getTaskList(); this.getTaskList();
}) });
uni.$on('taskStatusChanged', () => { uni.$on('taskStatusChanged', () => {
this.getTaskList(); //刷新任务状态 this.getTaskList(); //刷新任务状态
}) });
if (this.vuex_workunit != null) { if (this.vuex_workunit != null) {
this.getTaskList(); this.getTaskList();
...@@ -860,14 +917,14 @@ export default { ...@@ -860,14 +917,14 @@ export default {
uni.$off('taskStatusChanged'); uni.$off('taskStatusChanged');
}, },
methods: { methods: {
cellClick(row ,index,column){ cellClick(row, index, column) {
if(column.name === "arrangeCode"){ if (column.name === 'arrangeCode') {
this.tableDataDetail = row.proWorkorderList this.tableDataDetail = row.proWorkorderList;
this.showRowDeatilFlag = true this.showRowDeatilFlag = true;
} }
}, },
numclik(...arg) { numclik(...arg) {
console.log('99999999', arg) console.log('99999999', arg);
}, },
changeWorkstation() { changeWorkstation() {
uni.$emit('changeWorkunit'); uni.$emit('changeWorkunit');
...@@ -875,7 +932,7 @@ export default { ...@@ -875,7 +932,7 @@ export default {
commonClick(oper) { commonClick(oper) {
if (['Refresh', 'MaterialUsageRecord'].indexOf(oper) === -1 && this.tableSelectData.length === 0) { if (['Refresh', 'MaterialUsageRecord'].indexOf(oper) === -1 && this.tableSelectData.length === 0) {
this.$u.toast('请选择工作任务!'); this.$u.toast('请选择工作任务!');
return return;
} }
switch (oper) { switch (oper) {
case 'Refresh': case 'Refresh':
...@@ -883,34 +940,34 @@ export default { ...@@ -883,34 +940,34 @@ export default {
break; break;
case 'StartTask': case 'StartTask':
this.tableSelectData.forEach((item) => { this.tableSelectData.forEach((item) => {
this.changeStatus(item.taskId, 'BEGINNING') this.changeStatus(item.taskId, 'BEGINNING');
}) });
this.getTaskList() this.getTaskList();
break; break;
case 'StopTask': case 'StopTask':
this.stopReason = '' this.stopReason = '';
this.stopReasonVisible = true this.stopReasonVisible = true;
break; break;
case 'FinshTask': case 'FinshTask':
this.tableSelectData.forEach((item) => { this.tableSelectData.forEach((item) => {
this.changeStatus(item.taskId, 'FINISHED') this.changeStatus(item.taskId, 'FINISHED');
}) });
this.getTaskList() this.getTaskList();
break; break;
case 'Prod': case 'Prod':
this.doFeedback() this.doFeedback();
break; break;
case 'MaterialUsageRecord': case 'MaterialUsageRecord':
this.addMaterialUsageRecord() this.addMaterialUsageRecord();
break; break;
case 'KnifeTemp': case 'KnifeTemp':
this.knifeTempShow() this.knifeTempShow();
break; break;
case 'abnormal': case 'abnormal':
this.doException() this.doException();
break; break;
case 'ViewPpicture': case 'ViewPpicture':
this.viewiPctureShow() this.viewiPctureShow();
break; break;
case 'FeedingInspection': case 'FeedingInspection':
this.feedingInspectionShow(); this.feedingInspectionShow();
...@@ -929,44 +986,41 @@ export default { ...@@ -929,44 +986,41 @@ export default {
break; break;
default: default:
this.$u.toast('功能正在开发中!'); this.$u.toast('功能正在开发中!');
break break;
} }
}, },
async knifeTempShow() { async knifeTempShow() {
if (this.tableSelectData.length > 1) { if (this.tableSelectData.length > 1) {
return return;
} }
const params = { const params = {
arrangeCode: this.tableSelectData[0].arrangeCode || '', arrangeCode: this.tableSelectData[0].arrangeCode || '',
processId: this.tableSelectData[0].processId processId: this.tableSelectData[0].processId
} };
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params) const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params);
// 如果有数据 // 如果有数据
if (records?.data && records.data.length) { if (records?.data && records.data.length) {
return this.$u.toast('该刀模版具不属于该工单') return this.$u.toast('该刀模版具不属于该工单');
} else { } else {
this.dModelData = records.data this.dModelData = records.data;
this.knifeTempVisible = true this.knifeTempVisible = true;
return return;
} }
this.addDModelRecord(params) this.addDModelRecord(params);
}, },
async upDownGetList() { async upDownGetList() {
const params = { const params = {
arrangeCode: this.tableSelectData[0].arrangeCode || '', arrangeCode: this.tableSelectData[0].arrangeCode || '',
processId: this.tableSelectData[0].processId processId: this.tableSelectData[0].processId
} };
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params) const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params);
this.dModelData = records.data this.dModelData = records.data;
}, },
// 新增刀模版上下机记录 // 新增刀模版上下机记录
async addDModelRecord(params) { async addDModelRecord(params) {
const { const { data } = await this.$u.api.dModel.getToolsByProcessIdAndArrangeCode(params);
data
} = await this.$u.api.dModel.getToolsByProcessIdAndArrangeCode(params)
if (data?.length) { if (data?.length) {
const [selectData] = this.tableSelectData const [selectData] = this.tableSelectData;
const ps = { const ps = {
toolMachinesCode: '', toolMachinesCode: '',
arrangeCode: selectData.arrangeCode, arrangeCode: selectData.arrangeCode,
...@@ -974,27 +1028,27 @@ export default { ...@@ -974,27 +1028,27 @@ export default {
processId: selectData.processId, processId: selectData.processId,
workorderId: selectData.workorderId, workorderId: selectData.workorderId,
toolRequestUseId: data[0].toolRequestUseId, toolRequestUseId: data[0].toolRequestUseId,
toolMachinesRecordList: data.map(v => { toolMachinesRecordList: data.map((v) => {
return { return {
toolRequestUseItemId: v.toolRequestUseItemId, toolRequestUseItemId: v.toolRequestUseItemId,
type: 3, type: 3,
upDate: '', upDate: '',
downDate: '' downDate: ''
} };
}) })
} };
// 新增 // 新增
const data2 = await this.$u.api.dModel.tmToolMachines(ps) const data2 = await this.$u.api.dModel.tmToolMachines(ps);
if (data2.code == 200) { if (data2.code == 200) {
const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params) const records = await this.$u.api.dModel.getRecordsByProcessIdAndArrangeCode(params);
this.dModelData = records.data || [] this.dModelData = records.data || [];
this.knifeTempVisible = true this.knifeTempVisible = true;
} }
} }
}, },
getIssusLinebyWorkorderCodes() { getIssusLinebyWorkorderCodes() {
this.issusLineList = [] this.issusLineList = [];
this.$u.api.getIssusLinebyWorkorderCodes({workorderCodes: this.curTaskInfo.workorderCodes?.split(',')}).then(res => { this.$u.api.getIssusLinebyWorkorderCodes({ workorderCodes: this.curTaskInfo.workorderCodes?.split(',') }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.issusLineList = res.rows; this.issusLineList = res.rows;
} }
...@@ -1005,77 +1059,83 @@ export default { ...@@ -1005,77 +1059,83 @@ export default {
this.getMaterialUsageRecordList(); this.getMaterialUsageRecordList();
}, },
toggleAllSelection(checked, arr) { toggleAllSelection(checked, arr) {
this.tableSelectData = arr this.tableSelectData = arr;
}, },
toggleRowSelection(checked, arr) { toggleRowSelection(checked, arr) {
this.tableSelectData = arr this.tableSelectData = arr;
}, },
knifeTemp() { knifeTemp() {
this.$u.toast('刀具校验通过!'); this.$u.toast('刀具校验通过!');
}, },
stopReasonSubmit() { stopReasonSubmit() {
this.tableSelectData.forEach((item) => { this.tableSelectData.forEach((item) => {
this.changeStatus(item.taskId, 'PAUSE') this.changeStatus(item.taskId, 'PAUSE');
}) });
this.getTaskList() this.getTaskList();
}, },
stopReasonChange(e) { stopReasonChange(e) {
this.stopReason += e; this.stopReason += e;
}, },
changeReason(abnormalReason) { changeReason(abnormalReason) {
this.ExceptionForms.abnormalReason = abnormalReason this.ExceptionForms.abnormalReason = abnormalReason;
}, },
workorderSelect(id, row) { workorderSelect(id, row) {
console.log(id, row) console.log(id, row);
const items= row.workorderList.find(item => item.value === id) const items = row.workorderList.find((item) => item.value === id);
console.log(items, 'items') console.log(items, 'items');
row.workorderCode = items.text row.workorderCode = items.text;
row.printName = items.text row.printName = items.text;
}, },
stopReas(abnormalType) { stopReas(abnormalType) {
this.ExceptionForms.abnormalType = abnormalType this.ExceptionForms.abnormalType = abnormalType;
// 查询原因 // 查询原因
this.$u.api.abnormal.detail({ this.$u.api.abnormal
.detail({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
abnormalType abnormalType
}).then(res => { })
this.reasonList = res.rows.map(item => { .then((res) => {
this.reasonList = res.rows.map((item) => {
return { return {
value: item.abnormalReason, value: item.abnormalReason,
text: item.abnormalReason text: item.abnormalReason
} };
}) });
}) });
}, },
stopWorkorder(item) { stopWorkorder(item) {
// 查询原因 // 查询原因
this.$u.api.getWorkorder({ this.$u.api
.getWorkorder({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
arrangeCode:item.arrangeCode arrangeCode: item.arrangeCode
}).then(res => { })
item.workorderList = res.rows.map(item => { .then((res) => {
item.workorderList = res.rows.map((item) => {
return { return {
value: item.workorderId, value: item.workorderId,
text: item.workorderCode text: item.workorderCode
} };
}) });
}) });
}, },
getTaskList() { getTaskList() {
this.form = {} this.form = {};
const t = this; const t = this;
this.$u.api.getTaskList({ this.$u.api
workunitId: t.vuex_workunit.workunitId, .getTaskList({
}).then(res => { workunitId: t.vuex_workunit.workunitId
})
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.tableData = res.rows; this.tableData = res.rows;
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
this.curTaskInfo = this.tableData[0] this.curTaskInfo = this.tableData[0];
this.getMaterialUsageRecordList(); this.getMaterialUsageRecordList();
} else { } else {
} }
...@@ -1084,16 +1144,18 @@ export default { ...@@ -1084,16 +1144,18 @@ export default {
}, },
typeChange(index) { typeChange(index) {
this.currentType = index; this.currentType = index;
this.getMaterialUsageRecordList() this.getMaterialUsageRecordList();
}, },
getMaterialUsageRecordList() { getMaterialUsageRecordList() {
this.materialusagerecordLoading = true this.materialusagerecordLoading = true;
this.$u.api.materialusagerecordList({ this.$u.api
.materialusagerecordList({
workstationId: this.vuex_workstation.workstationId, workstationId: this.vuex_workstation.workstationId,
depletionMethod: this.currentType + 1, depletionMethod: this.currentType + 1,
taskId: this.curTaskInfo.taskId taskId: this.curTaskInfo.taskId
}).then(res => { })
this.materialusagerecordLoading = false .then((res) => {
this.materialusagerecordLoading = false;
if (res.code === 200) { if (res.code === 200) {
this.materialUsageRecordList = res.rows; this.materialUsageRecordList = res.rows;
} }
...@@ -1102,11 +1164,11 @@ export default { ...@@ -1102,11 +1164,11 @@ export default {
addMaterialUsageRecord() { addMaterialUsageRecord() {
if (this.materialRecordInfo.materialBatchNumber !== this.curTaskInfo.itemCode && this.currentType === 0) { if (this.materialRecordInfo.materialBatchNumber !== this.curTaskInfo.itemCode && this.currentType === 0) {
this.$u.toast('物料不在生产目录中!'); this.$u.toast('物料不在生产目录中!');
return return;
} }
if (this.materialRecordInfo.quantity === 0) { if (this.materialRecordInfo.quantity === 0) {
this.$u.toast('请输入物料数量!'); this.$u.toast('请输入物料数量!');
return return;
} }
this.materialRecordInfo.operatorTime = new Date(); this.materialRecordInfo.operatorTime = new Date();
this.materialRecordInfo.operatorId = this.vuex_user.userId; this.materialRecordInfo.operatorId = this.vuex_user.userId;
...@@ -1114,19 +1176,21 @@ export default { ...@@ -1114,19 +1176,21 @@ export default {
this.materialRecordInfo.taskId = this.curTaskInfo.taskId; this.materialRecordInfo.taskId = this.curTaskInfo.taskId;
this.materialRecordInfo.depletionMethod = this.currentType + 1; this.materialRecordInfo.depletionMethod = this.currentType + 1;
this.materialRecordInfo.workstationId = this.vuex_workstation.workstationId; this.materialRecordInfo.workstationId = this.vuex_workstation.workstationId;
this.$u.api.addMaterialusagerecord(this.materialRecordInfo).then(res => { this.$u.api.addMaterialusagerecord(this.materialRecordInfo).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.materialRecordInfo.quantity = 0; this.materialRecordInfo.quantity = 0;
this.materialRecordInfo.materialBatchNumber = ''; this.materialRecordInfo.materialBatchNumber = '';
this.$u.toast('上报成功'); this.$u.toast('上报成功');
this.getMaterialUsageRecordList() this.getMaterialUsageRecordList();
} }
}); });
}, },
shiftTask(tid) { shiftTask(tid) {
this.$u.api.getTaskInfo({ this.$u.api
taskId: tid, .getTaskInfo({
}).then(res => { taskId: tid
})
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.form = res.data; this.form = res.data;
this.$u.vuex('vuex_task', res.data); this.$u.vuex('vuex_task', res.data);
...@@ -1136,15 +1200,17 @@ export default { ...@@ -1136,15 +1200,17 @@ export default {
}, },
changeStatus(taskId, status) { changeStatus(taskId, status) {
// this.form.status = status; // this.form.status = status;
this.$u.api.changeStatus({ this.$u.api
.changeStatus({
taskId: taskId, taskId: taskId,
status: status, status: status,
attr1: this.stopReason attr1: this.stopReason
}).then(res => { })
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$u.toast('变更成功'); this.$u.toast('变更成功');
uni.$emit('taskStatusChanged'); //任务状态变更 uni.$emit('taskStatusChanged'); //任务状态变更
this.getTaskList() this.getTaskList();
} }
}); });
}, },
...@@ -1164,7 +1230,7 @@ export default { ...@@ -1164,7 +1230,7 @@ export default {
}, },
doFeedback() { doFeedback() {
// this.reset(); // this.reset();
this.feedbackForms = [] this.feedbackForms = [];
this.tableSelectData.forEach((item) => { this.tableSelectData.forEach((item) => {
const feedback = { const feedback = {
...item, ...item,
...@@ -1178,18 +1244,16 @@ export default { ...@@ -1178,18 +1244,16 @@ export default {
printName: false, printName: false,
nickName: this.vuex_user.nicfeedbackkName, nickName: this.vuex_user.nicfeedbackkName,
workorderList: [] workorderList: []
} };
this.stopWorkorder(feedback) this.stopWorkorder(feedback);
this.feedbackForms.push(feedback) this.feedbackForms.push(feedback);
}) });
this.open = true; this.open = true;
}, },
doException() { doException() {
this.ExceptionForms = {} this.ExceptionForms = {};
const item = this.tableSelectData[0] const item = this.tableSelectData[0];
Object.assign(this.ExceptionForms, { Object.assign(this.ExceptionForms, {
...item, ...item,
batchNumber: item.arrangeCode, batchNumber: item.arrangeCode,
...@@ -1202,11 +1266,11 @@ export default { ...@@ -1202,11 +1266,11 @@ export default {
abnormalType: '', abnormalType: '',
abnormalReason: '', abnormalReason: '',
abnormalTime: '' abnormalTime: ''
}) });
this.aopen = true; this.aopen = true;
}, },
async newlyAddss(){ async newlyAddss() {
const res = await this.$u.api.abnormal.newlyAdd(this.ExceptionForms); const res = await this.$u.api.abnormal.newlyAdd(this.ExceptionForms);
this.getTaskList(); this.getTaskList();
}, },
...@@ -1224,9 +1288,10 @@ export default { ...@@ -1224,9 +1288,10 @@ export default {
this.feedbackForms.forEach((item) => { this.feedbackForms.forEach((item) => {
if (item.quantityQualify === 0 && item.quantityUnqualify === 0) { if (item.quantityQualify === 0 && item.quantityUnqualify === 0) {
this.$u.toast('请填写合格/不合格产品数量!'); this.$u.toast('请填写合格/不合格产品数量!');
return return;
} }
this.$u.api.feedback({ this.$u.api
.feedback({
taskId: item.taskId, taskId: item.taskId,
taskCode: item.taskCode, taskCode: item.taskCode,
quantityFeedback: item.quantity, quantityFeedback: item.quantity,
...@@ -1246,55 +1311,56 @@ export default { ...@@ -1246,55 +1311,56 @@ export default {
workstationCode: item.workstationCode, workstationCode: item.workstationCode,
workstationName: item.workstationName, workstationName: item.workstationName,
startTime: item.startTime startTime: item.startTime
}).then(res => { })
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
if(res.msg === ""){ if (res.msg === '') {
this.$u.toast('上报成功'); this.$u.toast('上报成功');
}else{ } else {
this.$u.toast(res.msg); this.$u.toast(res.msg);
} }
this.getTaskList() this.getTaskList();
} }
}); });
}) });
this.open = false; this.open = false;
}, },
feedingInspectionShow(){ feedingInspectionShow() {
this.feedingInspectionVisible=true; this.feedingInspectionVisible = true;
this.feedingInspectionLoadAndScan(); this.feedingInspectionLoadAndScan();
}, },
feedingInspectionLoadAndScan(){ feedingInspectionLoadAndScan() {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.listFeedingInspection({"taskId":taskInfo.taskId}).then(res => { this.$u.api.listFeedingInspection({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.feedingInspectionList = res.data; t.feedingInspectionList = res.data;
t.$u.toast('保存成功'); t.$u.toast('保存成功');
let timer = setTimeout(()=> { let timer = setTimeout(() => {
t.feedingInspectionScan(); t.feedingInspectionScan();
},1000) }, 1000);
} }
}) });
}, },
feedingInspectionScan(){ feedingInspectionScan() {
const t = this; const t = this;
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
t.$u.api.validateFeedingInspection({"plnr":res.result}).then(res2=>{ t.$u.api.validateFeedingInspection({ plnr: res.result }).then((res2) => {
if (res2.code === 200) { if (res2.code === 200) {
t.feedingInspectionLoadAndScan(); t.feedingInspectionLoadAndScan();
} }
}); });
} }
}); });
this.feedingInspectionVisible=true; this.feedingInspectionVisible = true;
}, },
validateFeedingInspection(line){ validateFeedingInspection(line) {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.validateFeedingInspectionById({"lineId":line.lineId}).then(res2=>{ this.$u.api.validateFeedingInspectionById({ lineId: line.lineId }).then((res2) => {
if (res2.code === 200) { if (res2.code === 200) {
t.$u.api.listFeedingInspection({"taskId":taskInfo.taskId}).then(res => { t.$u.api.listFeedingInspection({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.feedingInspectionList = res.data; t.feedingInspectionList = res.data;
} }
...@@ -1302,177 +1368,176 @@ export default { ...@@ -1302,177 +1368,176 @@ export default {
} }
}); });
}, },
recoilMaterialShow(){ recoilMaterialShow() {
this.recoilMaterialVisible=true; this.recoilMaterialVisible = true;
this.recoilMaterialLoadAndScan(); this.recoilMaterialLoadAndScan();
}, },
recoilMaterialLoadAndScan(){ recoilMaterialLoadAndScan() {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.recoilMaterialList({"taskId":taskInfo.taskId}).then(res => { this.$u.api.recoilMaterialList({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.recoilMaterialList = res.data; t.recoilMaterialList = res.data;
t.$u.toast('保存成功'); t.$u.toast('保存成功');
let timer = setTimeout(()=> { let timer = setTimeout(() => {
t.recoilMaterialScan(); t.recoilMaterialScan();
},1000) }, 1000);
} }
}) });
}, },
recoilMaterialScan(){ recoilMaterialScan() {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
uni.scanCode({ uni.scanCode({
success: function (res) { success: function (res) {
t.$u.api.addRecoilMaterial({"taskId":taskInfo.taskId, "plnr": res.result}).then(res2=>{ t.$u.api.addRecoilMaterial({ taskId: taskInfo.taskId, plnr: res.result }).then((res2) => {
if (res2.code === 200) { if (res2.code === 200) {
t.recoilMaterialLoadAndScan(); t.recoilMaterialLoadAndScan();
} }
}); });
} }
}); });
this.recoilMaterialVisible=true; this.recoilMaterialVisible = true;
}, },
recoilMaterialDelete(line){ recoilMaterialDelete(line) {
const t = this; const t = this;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.$u.api.deleteRecoilMaterial({"id":line.recoilMaterialId}).then(res2=>{ this.$u.api.deleteRecoilMaterial({ id: line.recoilMaterialId }).then((res2) => {
t.$u.api.recoilMaterialList({"taskId":taskInfo.taskId}).then(res => { t.$u.api.recoilMaterialList({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.recoilMaterialList = res.data; t.recoilMaterialList = res.data;
} }
}); });
}); });
}, },
materialRequestShow(){ materialRequestShow() {
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
const t = this; const t = this;
this.materialRequestVisible=true; this.materialRequestVisible = true;
this.$u.api.listMaterialRequest({"taskId":taskInfo.taskId}).then(res => { this.$u.api.listMaterialRequest({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.materialRequestList = res.data; t.materialRequestList = res.data;
} }
}); });
}, },
materialRequestFormShow(line){ materialRequestFormShow(line) {
this.materialRequestFormVisible=true; this.materialRequestFormVisible = true;
this.materialRequestFormData = {itemName: line.itemName}; this.materialRequestFormData = { itemName: line.itemName };
this.materialRequestSelected = line; this.materialRequestSelected = line;
}, },
materialRequestSetting(){ materialRequestSetting() {
this.materialRequestSelected.applyNum = this.materialRequestFormData.applyNum; this.materialRequestSelected.applyNum = this.materialRequestFormData.applyNum;
this.materialRequestFormVisible=false; this.materialRequestFormVisible = false;
}, },
materialRequestSave(){ materialRequestSave() {
const rst = []; const rst = [];
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
const t = this; const t = this;
this.materialRequestList.forEach(s=>{ this.materialRequestList.forEach((s) => {
if(s.applyNum!=null){ if (s.applyNum != null) {
rst.push({ rst.push({
"itemId":s.itemId, itemId: s.itemId,
"taskId":taskInfo.taskId, taskId: taskInfo.taskId,
"applyNum":s.applyNum, applyNum: s.applyNum,
"applyType":1 applyType: 1
}); });
} }
}); });
this.$u.api.addMaterialRequest(rst).then(res => { this.$u.api.addMaterialRequest(rst).then((res) => {
t.materialRequestFormVisible=false; t.materialRequestFormVisible = false;
if (res.code === 200) { if (res.code === 200) {
t.$u.toast('保存成功'); t.$u.toast('保存成功');
} }
}); });
}, },
materialReturnShow(){ materialReturnShow() {
const t = this; const t = this;
this.materialReturnVisible=true; this.materialReturnVisible = true;
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
this.curTaskInfo = this.tableSelectData[0]; this.curTaskInfo = this.tableSelectData[0];
this.curTaskInfo.workorderOption = this.curTaskInfo.proWorkorderList.map(s=>{ this.curTaskInfo.workorderOption = this.curTaskInfo.proWorkorderList.map((s) => {
return {"value":s.workorderCode,"text":s.workorderCode}; return { value: s.workorderCode, text: s.workorderCode };
}); });
this.$u.api.listMaterialReturn({"taskId":taskInfo.taskId}).then(res => { this.$u.api.listMaterialReturn({ taskId: taskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
t.materialReturnList = res.data; t.materialReturnList = res.data;
} }
}); });
}, },
viewiPctureShow(){ viewiPctureShow() {
this.materialReturn=true; this.materialReturn = true;
// this.viewSopPicture = this.tableSelectData[0]; // this.viewSopPicture = this.tableSelectData[0];
this.$u.api.viewpicture.viewWorkorder({"taskId":this.curTaskInfo.taskId}).then(res => { this.$u.api.viewpicture.viewWorkorder({ taskId: this.curTaskInfo.taskId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.viewSopPicture = res.data; this.viewSopPicture = res.data;
} }
}); });
}, },
materialReturnWorkorderChange(s){ materialReturnWorkorderChange(s) {
this.materialReturnFormData.workorderCode=s; this.materialReturnFormData.workorderCode = s;
}, },
materialReturnFormShow(line){ materialReturnFormShow(line) {
this.materialReturnFormVisible=true; this.materialReturnFormVisible = true;
this.materialReturnFormData = { this.materialReturnFormData = {
itemName: line.itemName, itemName: line.itemName,
orkorderCode:this.materialReturnFormData.workorderCode, orkorderCode: this.materialReturnFormData.workorderCode,
isQualified:1 isQualified: 1
}; };
this.materialReturnSelected = line; this.materialReturnSelected = line;
}, },
viewSopsShow(row){ viewSopsShow(row) {
this.material=true; this.material = true;
// this.viewSopPicture = this.tableSelectData[0]; // this.viewSopPicture = this.tableSelectData[0];
this.$u.api.viewpicture.viewSop({"workorderId":Number(row.workorderId)}).then(res => { this.$u.api.viewpicture.viewSop({ workorderId: Number(row.workorderId) }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
console.log(res.data) console.log(res.data);
this.viewSop = res.data; this.viewSop = res.data;
} }
}); });
}, },
materialReturnSetting(){ materialReturnSetting() {
this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum; this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum;
this.materialReturnSelected.isQualified =this.materialReturnFormData.isQualified; this.materialReturnSelected.isQualified = this.materialReturnFormData.isQualified;
this.materialReturnFormVisible=false; this.materialReturnFormVisible = false;
}, },
materialReturnSave(){ materialReturnSave() {
const taskInfo = this.tableSelectData[0]; const taskInfo = this.tableSelectData[0];
const rst = []; const rst = [];
const t = this; const t = this;
this.materialReturnList.forEach(s=>{ this.materialReturnList.forEach((s) => {
if(s.applyNum!=null){ if (s.applyNum != null) {
rst.push({ rst.push({
"itemId":s.itemId, itemId: s.itemId,
"taskId":taskInfo.taskId, taskId: taskInfo.taskId,
"backNum":s.applyNum, backNum: s.applyNum,
"issueLineId":s.lineId, issueLineId: s.lineId,
"workOrderId":s.workorderId, workOrderId: s.workorderId,
"batchNo":s.batchCode, batchNo: s.batchCode,
"packNo":s.packNo, packNo: s.packNo,
"isQualified":s.isQualified, isQualified: s.isQualified,
"workorderCode":t.materialReturnFormData.workorderCode, workorderCode: t.materialReturnFormData.workorderCode
}); });
} }
}); });
this.$u.api.addMaterialReturn(rst).then(res => { this.$u.api.addMaterialReturn(rst).then((res) => {
t.materialReturnFormVisible=false; t.materialReturnFormVisible = false;
if (res.code === 200) { if (res.code === 200) {
t.$u.toast('保存成功'); t.$u.toast('保存成功');
} }
}); });
}, },
stockInShow(){ stockInShow() {
this.stockInVisible=true; this.stockInVisible = true;
} }
} }
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.commonBody { .commonBody {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #FEFEFF; background-color: #fefeff;
margin: 0 0; margin: 0 0;
padding: 0 0; padding: 0 0;
} }
...@@ -1545,10 +1610,8 @@ export default { ...@@ -1545,10 +1610,8 @@ export default {
.workstation { .workstation {
display: inline-block; display: inline-block;
} }
} }
.prod-body-left-task { .prod-body-left-task {
height: calc(100vh - 80rpx - 500rpx); height: calc(100vh - 80rpx - 500rpx);
min-height: 400rpx; min-height: 400rpx;
...@@ -1560,10 +1623,8 @@ export default { ...@@ -1560,10 +1623,8 @@ export default {
line-height: 60rpx; line-height: 60rpx;
padding: 0 16rpx; padding: 0 16rpx;
background-color: #add8e6; background-color: #add8e6;
} }
.prod-body-left-bom { .prod-body-left-bom {
height: 500rpx; height: 500rpx;
...@@ -1596,10 +1657,9 @@ export default { ...@@ -1596,10 +1657,9 @@ export default {
font-size: 40rpx; font-size: 40rpx;
} }
} }
.times{ .times {
/deep/ .uni-date-picker__container{ /deep/ .uni-date-picker__container {
height: 360rpx; height: 360rpx;
} }
} }
</style> </style>
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