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>
...@@ -77,13 +81,18 @@ ...@@ -77,13 +81,18 @@
<u-button type="primary" @click="commonClick('MaterialRequest')">领料申请</u-button> <u-button type="primary" @click="commonClick('MaterialRequest')">领料申请</u-button>
<u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button> <u-button type="primary" @click="commonClick('MaterialReturn')">退料申请</u-button>
<u-button type="success" @click="commonClick('StockIn')">完工入库申请</u-button> <u-button type="success" @click="commonClick('StockIn')">完工入库申请</u-button>
<u-button type="primary" @click="commonClick('ViewPpicture')">查看图片</u-button> <u-button type="primary" @click="commonClick('ViewPpicture')">查看图片</u-button>
</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>
...@@ -114,90 +123,90 @@ ...@@ -114,90 +123,90 @@
<u-col span="6"> <u-col span="6">
<u-form-item label="编排单号" prop="quantity"> <u-form-item label="编排单号" prop="quantity">
<!-- <u-input v-model="feedback.arrangeCode" ></u-input> --> <!-- <u-input v-model="feedback.arrangeCode" ></u-input> -->
{{ feedback.arrangeCode }} {{ feedback.arrangeCode }}
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<u-form-item label="生产工单" prop="workorderId"> <u-form-item label="生产工单" prop="workorderId">
<!-- <u-input v-model="feedback.nickName" @change=""></u-input> --> <!-- <u-input v-model="feedback.nickName" @change=""></u-input> -->
<!-- <uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select> --> <!-- <uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select> -->
<uni-data-select :localdata="feedback.workorderList" @change="workorderSelect($event, feedback)"></uni-data-select> <uni-data-select :localdata="feedback.workorderList" @change="workorderSelect($event, feedback)"></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<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>
<u-row> <u-row>
<u-col span="6"> <u-col span="6">
<!-- <u-form-item label="是否打印" prop="printName"> <!-- <u-form-item label="是否打印" prop="printName">
<u-input v-model="feedback.printName"></u-input> --> <u-input v-model="feedback.printName"></u-input> -->
<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-group>
<u-radio name="fou"> </view>
</u-form-item>
</u-radio> </u-col>
</u-radio-group> </u-row>
</view>
</u-form-item>
</u-col>
</u-row>
</u-form> </u-form>
</view> </view>
</u-modal> </u-modal>
<u-modal
title="刀模版上下机"
@confirm="knifeTemp()"
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-row>
<u-col span="6">
<u-form-item label="扫描刃模版条码" prop="quantity">
<u-input v-model="knifeTempSearch.knifeTempCode"></u-input>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item label="扫描库位条码" prop="nickName">
<u-input v-model="knifeTempSearch.locationCode"></u-input>
</u-form-item>
</u-col>
</u-row>
</u-form>
<dModelList :data="dModelData" @action="upDownGetList" />
</u-modal>
<u-modal title="刀模版上下机" @confirm="knifeTemp()" show-cancel-button <u-modal
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" title="暂停原因"
v-model="knifeTempVisible" width="1300rpx"> @confirm="stopReasonSubmit()"
<u-form label-width="130px" :model="knifeTempSearch" :rules="rules"> show-cancel-button
<u-row> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<u-col span="6"> v-model="stopReasonVisible"
<u-form-item label="扫描刃模版条码" prop="quantity"> width="1300rpx"
<u-input v-model="knifeTempSearch.knifeTempCode"></u-input> >
</u-form-item> <view class="feedback-card" style="height: 200px">
</u-col> <u-form label-width="120px" :model="feedback" :rules="rules">
<u-col span="6"> <u-form-item label="暂停原因" prop="quantity">
<u-form-item label="扫描库位条码" prop="nickName"> <uni-data-select :localdata="exception" @change="stopReas"></uni-data-select>
<u-input v-model="knifeTempSearch.locationCode"></u-input> </u-form-item>
</u-form-item> <u-form-item label="暂停描述" prop="nickName">
</u-col> <uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select>
</u-row> </u-form-item>
</u-form> </u-form>
<dModelList :data="dModelData" @action="upDownGetList" /> <!-- <uni-forms :modelValue="feedback" label-width="120px">
</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">
<view>
<u-form label-width="120px" :model="feedback" :rules="rules">
<u-form-item label="暂停原因" prop="quantity">
<uni-data-select :localdata="exception" @change="stopReas"></uni-data-select>
</u-form-item>
<u-form-item label="暂停描述" prop="nickName">
<uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select>
</u-form-item>
</u-form>
<!-- <uni-forms :modelValue="feedback" label-width="120px">
<uni-forms-item label="暂停原因" name="quantity"> <uni-forms-item label="暂停原因" name="quantity">
<uni-data-select :localdata="exception" @change="stopReas"></uni-data-select> <uni-data-select :localdata="exception" @change="stopReas"></uni-data-select>
</uni-forms-item> </uni-forms-item>
...@@ -205,648 +214,696 @@ ...@@ -205,648 +214,696 @@
<uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select> <uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select>
</uni-forms-item> </uni-forms-item>
</uni-forms> --> </uni-forms> -->
</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' }"
<u-form label-width="90px" :rules="rules"> v-model="aopen"
<!-- <u-form-item label="异常时间" prop="abnormalTime"> width="1300rpx"
>
<view class="feedback-card">
<u-form label-width="90px" :rules="rules">
<!-- <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>
<uni-datetime-picker class="times" type="date" :clear-icon="false" v-model="ExceptionForms.abnormalTime" /> <uni-datetime-picker class="times" type="date" :clear-icon="false" v-model="ExceptionForms.abnormalTime" />
</u-form-item> --> </u-form-item> -->
<u-row> <u-row>
<u-col span="6"> <u-col span="6">
<u-form-item label="异常类型" prop="abnormalType"> <u-form-item label="异常类型" prop="abnormalType">
<uni-data-select :localdata="exception" @change="stopReas"></uni-data-select> <uni-data-select :localdata="exception" @change="stopReas"></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
<u-col span="6"> <u-col span="6">
<u-form-item label="原因" prop="abnormalReason"> <u-form-item label="原因" prop="abnormalReason">
<uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select> <uni-data-select :localdata="reasonList" @change="changeReason"></uni-data-select>
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<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-input :border="true" v-model="ExceptionForms.processName"></u-input> -->
{{ExceptionForms.processName}}
</u-form-item>
<u-form-item label="作业单元" prop="workstationName">
<!-- <u-input :border="true" v-model="ExceptionForms.workstationName"></u-input> -->
{{ExceptionForms.workstationName}}
</u-form-item>
</u-form> <u-form-item label="工序" prop="processName">
</u-modal> <!-- <u-input :border="true" v-model="ExceptionForms.processName"></u-input> -->
<u-modal title="投料校验" @confirm="feedingInspectionScan()" show-cancel-button confirmText="继续扫码" cancelText="关闭" {{ ExceptionForms.processName }}
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" </u-form-item>
v-model="feedingInspectionVisible" width="1300rpx"> <u-form-item label="作业单元" prop="workstationName">
<view class="list-bar"> <!-- <u-input :border="true" v-model="ExceptionForms.workstationName"></u-input> -->
<scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> {{ ExceptionForms.workstationName }}
<uni-table border stripe :loading="loading" emptyText="未查询到数据"> </u-form-item>
<uni-tr> </u-form>
<uni-th width="100px" align="center">操作</uni-th> </view>
<uni-th width="65px" align="center">状态</uni-th> </u-modal>
<uni-th width="110px" align="center">产品物料编码</uni-th> <u-modal
<uni-th width="110px" align="center">产品物料名称</uni-th> title="投料校验"
<uni-th width="80px" align="center">领料数量</uni-th> @confirm="feedingInspectionScan()"
<uni-th width="110px" align="center">批次号</uni-th> show-cancel-button
</uni-tr> confirmText="继续扫码"
<uni-tr v-for="(line,index) in feedingInspectionList" :key="index"> cancelText="关闭"
<uni-td align="center"> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<view class="uni-group"> v-model="feedingInspectionVisible"
<button class="uni-button" size="mini" type="primary" @click="validateFeedingInspection(line)">校验 width="1300rpx"
</button> >
</view> <view class="list-bar">
</uni-td> <scroll-view scroll-y="true" scroll-x="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-td align="center">{{ line.attr3 == 1 ? '校验':'未校验' }}</uni-td> <uni-table border stripe :loading="loading" emptyText="未查询到数据">
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-tr>
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <uni-th width="100px" align="center">操作</uni-th>
<uni-td align="center">{{ line.quantityIssued }}</uni-td> <uni-th width="65px" align="center">状态</uni-th>
<uni-td align="center">{{ line.batchCode }}</uni-td> <uni-th width="110px" align="center">产品物料编码</uni-th>
</uni-tr> <uni-th width="110px" align="center">产品物料名称</uni-th>
</uni-table> <uni-th width="80px" align="center">领料数量</uni-th>
</scroll-view> <uni-th width="110px" align="center">批次号</uni-th>
</view> </uni-tr>
</u-modal> <uni-tr v-for="(line, index) in feedingInspectionList" :key="index">
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="validateFeedingInspection(line)">校验</button>
</view>
</uni-td>
<uni-td align="center">{{ line.attr3 == 1 ? '校验' : '未校验' }}</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.quantityIssued }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</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()"
<view class="list-bar"> show-cancel-button
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> confirmText="继续扫码"
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据"> cancelText="关闭"
<uni-tr> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<uni-th width="100px" align="center">操作</uni-th> v-model="recoilMaterialVisible"
<uni-th width="110px" align="center">产品物料编码</uni-th> width="1300rpx"
<uni-th width="110px" align="center">产品物料名称</uni-th> >
<uni-th width="110px" align="center">批次号</uni-th> <view class="list-bar">
</uni-tr> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-tr v-for="(line,index) in recoilMaterialList" :key="index"> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-td align="center"> <uni-tr>
<view class="uni-group"> <uni-th width="100px" align="center">操作</uni-th>
<button class="uni-button" size="mini" type="primary" @click="recoilMaterialDelete(line)">删除 <uni-th width="110px" align="center">产品物料编码</uni-th>
</button> <uni-th width="110px" align="center">产品物料名称</uni-th>
</view> <uni-th width="110px" align="center">批次号</uni-th>
</uni-td> </uni-tr>
<uni-td align="center">{{ line.itemCode }}</uni-td> <uni-tr v-for="(line, index) in recoilMaterialList" :key="index">
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <uni-td align="center">
<uni-td align="center">{{ line.batchNo }}</uni-td> <view class="uni-group">
</uni-tr> <button class="uni-button" size="mini" type="primary" @click="recoilMaterialDelete(line)">删除</button>
</uni-table> </view>
</scroll-view> </uni-td>
</view> <uni-td align="center">{{ line.itemCode }}</uni-td>
</u-modal> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.batchNo }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</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()"
<view class="list-bar"> show-cancel-button
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<uni-table ref="materialRequestTable" border stripe :loading="loading" emptyText="未查询到数据"> v-model="materialRequestVisible"
<uni-tr> width="1300rpx"
<uni-th width="100px" align="center">操作</uni-th> >
<uni-th width="110px" align="center">产品物料编码</uni-th> <view class="list-bar">
<uni-th width="110px" align="center">产品物料名称</uni-th> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-th width="80px" align="center">领取数量</uni-th> <uni-table ref="materialRequestTable" border stripe :loading="loading" emptyText="未查询到数据">
</uni-tr> <uni-tr>
<uni-tr v-for="(line,index) in materialRequestList" :key="index"> <uni-th width="100px" align="center">操作</uni-th>
<uni-td align="center"> <uni-th width="110px" align="center">产品物料编码</uni-th>
<view class="uni-group"> <uni-th width="110px" align="center">产品物料名称</uni-th>
<button class="uni-button" size="mini" type="primary" @click="materialRequestFormShow(line)">补料 <uni-th width="80px" align="center">领取数量</uni-th>
</button> </uni-tr>
</view> <uni-tr v-for="(line, index) in materialRequestList" :key="index">
</uni-td> <uni-td align="center">
<uni-td align="center">{{ line.itemCode }}</uni-td> <view class="uni-group">
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <button class="uni-button" size="mini" type="primary" @click="materialRequestFormShow(line)">补料</button>
<uni-td align="center">{{line.applyNum}}</uni-td> </view>
</uni-tr> </uni-td>
</uni-table> <uni-td align="center">{{ line.itemCode }}</uni-td>
</scroll-view> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
</view> <uni-td align="center">{{ line.applyNum }}</uni-td>
</u-modal> </uni-tr>
</uni-table>
</scroll-view>
</view>
</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()"
<view class=""> show-cancel-button
<u-form label-width="100px"> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<u-row> v-model="materialRequestFormVisible"
<u-col> width="700rpx"
<u-form-item label="产品物料名称"> >
{{materialRequestFormData.itemName}} <view class="">
</u-form-item> <u-form label-width="100px">
</u-col> <u-row>
</u-row> <u-col>
<u-row> <u-form-item label="产品物料名称">
<u-col> {{ materialRequestFormData.itemName }}
<u-form-item label="领料数量"> </u-form-item>
<u-number-box v-model="materialRequestFormData.applyNum" :long-press="false" :positive-integer="false" :size="50" :input-width="190"></u-number-box> </u-col>
</u-form-item> </u-row>
</u-col> <u-row>
</u-row> <u-col>
</u-form> <u-form-item label="领料数量">
</view> <u-number-box v-model="materialRequestFormData.applyNum" :long-press="false" :positive-integer="false" :size="50" :input-width="190"></u-number-box>
</u-modal> </u-form-item>
</u-col>
</u-row>
</u-form>
</view>
</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()"
<view class="list-bar"> show-cancel-button
<u-form label-width="100px"> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<u-row> v-model="materialReturnVisible"
<u-col span="6"> width="1600rpx"
<u-form-item label="编排单号"> >
{{curTaskInfo.arrangeCode}} <view class="list-bar">
</u-form-item> <u-form label-width="100px">
</u-col> <u-row>
<u-col span="6"> <u-col span="6">
<u-form-item label="生产工单" prop="workorderCode"> <u-form-item label="编排单号">
<uni-data-select @change="materialReturnWorkorderChange" :localdata="curTaskInfo.workorderOption"></uni-data-select> {{ curTaskInfo.arrangeCode }}
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> <u-col span="6">
</u-form> <u-form-item label="生产工单" prop="workorderCode">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }"> <uni-data-select @change="materialReturnWorkorderChange" :localdata="curTaskInfo.workorderOption"></uni-data-select>
<uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据"> </u-form-item>
<uni-tr> </u-col>
<uni-th width="60px" align="center">操作</uni-th> </u-row>
<uni-th width="110px" align="center">产品物料编码</uni-th> </u-form>
<uni-th width="110px" align="center">产品物料名称</uni-th> <scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-th width="80px" align="center">领料数量</uni-th> <uni-table ref="qcTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-th width="80px" align="center">本次退料数</uni-th> <uni-tr>
<uni-th width="80px" align="center">累计退料数</uni-th> <uni-th width="60px" align="center">操作</uni-th>
<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="110px" align="center">产品物料名称</uni-th>
</uni-tr> <uni-th width="80px" align="center">领料数量</uni-th>
<uni-tr v-for="(line,index) in materialReturnList" :key="index"> <uni-th width="80px" align="center">本次退料数</uni-th>
<uni-td align="center"> <uni-th width="80px" align="center">累计退料数</uni-th>
<view class="uni-group"> <uni-th width="110px" align="center">批次号</uni-th>
<button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料 <uni-th width="60" align="center">合格</uni-th>
</button> </uni-tr>
</view> <uni-tr v-for="(line, index) in materialReturnList" :key="index">
</uni-td> <uni-td align="center">
<uni-td align="center">{{ line.itemCode }}</uni-td> <view class="uni-group">
<uni-td align="center">{{ line.itemName }}({{line.specification}})/{{line.unitOfMeasure}}</uni-td> <button class="uni-button" size="mini" type="primary" @click="materialReturnFormShow(line)">退料</button>
<uni-td align="center">{{ line.quantityIssued }}</uni-td> </view>
<uni-td align="center">{{ line.applyNum }}</uni-td> </uni-td>
<uni-td align="center">{{ line.totalBackNum }}</uni-td> <uni-td align="center">{{ line.itemCode }}</uni-td>
<uni-td align="center">{{ line.batchCode }}</uni-td> <uni-td align="center">{{ line.itemName }}({{ line.specification }})/{{ line.unitOfMeasure }}</uni-td>
<uni-td align="center">{{ line.isQualified==1?'是':'' }}{{ line.isQualified==0?'否':'' }}</uni-td> <uni-td align="center">{{ line.quantityIssued }}</uni-td>
</uni-tr> <uni-td align="center">{{ line.applyNum }}</uni-td>
</uni-table> <uni-td align="center">{{ line.totalBackNum }}</uni-td>
</scroll-view> <uni-td align="center">{{ line.batchCode }}</uni-td>
</view> <uni-td align="center">{{ line.isQualified == 1 ? '是' : '' }}{{ line.isQualified == 0 ? '否' : '' }}</uni-td>
</u-modal> </uni-tr>
</uni-table>
</scroll-view>
</view>
</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()"
<view class=""> show-cancel-button
<u-form label-width="100px"> :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
<u-row> v-model="materialReturnFormVisible"
<u-col> width="700rpx"
<u-form-item label="产品物料名称"> >
{{materialReturnFormData.itemName}} <view class="">
</u-form-item> <u-form label-width="100px">
</u-col> <u-row>
</u-row> <u-col>
<u-row> <u-form-item label="产品物料名称">
<u-col> {{ materialReturnFormData.itemName }}
<u-form-item label="退料数量"> </u-form-item>
<u-number-box v-model="materialReturnFormData.applyNum" :long-press="false" :positive-integer="false" :size="50" :input-width="190"></u-number-box> </u-col>
</u-form-item> </u-row>
</u-col> <u-row>
</u-row> <u-col>
<u-row> <u-form-item label="退料数量">
<u-col> <u-number-box v-model="materialReturnFormData.applyNum" :long-press="false" :positive-integer="false" :size="50" :input-width="190"></u-number-box>
<u-form-item label="是否合格" prop="printName"> </u-form-item>
<view class="uni-list-item__extra"> </u-col>
<u-radio-group v-model="materialReturnFormData.isQualified"> </u-row>
<u-radio name="1"> <u-row>
<u-col>
</u-radio> <u-form-item label="是否合格" prop="printName">
<u-radio name="0"> <view class="uni-list-item__extra">
<u-radio-group v-model="materialReturnFormData.isQualified">
</u-radio> <u-radio name="1"></u-radio>
</u-radio-group> <u-radio name="0"></u-radio>
</view> </u-radio-group>
</u-form-item> </view>
</u-col> </u-form-item>
</u-row> </u-col>
</u-form> </u-row>
</u-form>
</view>
</u-modal>
<u-modal
title="详细数据"
:showConfirmButton="true"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="showRowDeatilFlag"
width="1800rpx"
>
<view class="">
<zb-table :columns="tableDetailColumn" :stripe="true" :border="true" :data="tableDataDetail"></zb-table>
</view>
</u-modal>
<u-modal
title="生产工单"
@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">
<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="80px" align="center">来源类型</uni-th>
<uni-th width="80px" align="center">产品名称</uni-th>
<uni-th width="110px" align="center">编排单号</uni-th>
</uni-tr>
<uni-tr v-for="(line, index) in viewSopPicture" :key="index">
<uni-td align="center">
<view class="uni-group">
<!-- <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(line)">查看</button>
</view>
</uni-td>
<uni-td align="center">{{ line.workorderId }}</uni-td>
<uni-td align="center">{{ line.workorderName }}</uni-td>
<uni-td align="center">{{ line.orderSource }}</uni-td>
<uni-td align="center">{{ line.productName }}</uni-td>
<uni-td align="center">{{ line.arrangeCode }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
<u-modal
title="显示图片"
@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">
<scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<view>
<image v-for="(line, index) in viewSop" class="u-avatar-demo" :src="line" mode="aspectFill"></image>
</view> </view>
</u-modal> </scroll-view>
<u-modal title="详细数据" :showConfirmButton="true" </view>
:title-style="{'background-color':'#1E3770','color': '#FFFFFF' ,'line-height': '37px','padding-top': '0px'}" </u-modal>
v-model="showRowDeatilFlag" width="1800rpx"> </view>
<view class="">
<zb-table :columns="tableDetailColumn" :stripe="true" :border="true"
:data="tableDataDetail"></zb-table>
</view>
</u-modal>
<u-modal title="生产工单" @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">
<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="80px" align="center">来源类型</uni-th>
<uni-th width="80px" align="center">产品名称</uni-th>
<uni-th width="110px" align="center">编排单号</uni-th>
</uni-tr>
<uni-tr v-for="(line,index) in viewSopPicture" :key="index">
<uni-td align="center">
<view class="uni-group">
<!-- <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(line)">查看
</button>
</view>
</uni-td>
<uni-td align="center">{{ line.workorderId}}</uni-td>
<uni-td align="center">{{ line.workorderName }}</uni-td>
<uni-td align="center">{{ line.orderSource }}</uni-td>
<uni-td align="center">{{ line.productName }}</uni-td>
<uni-td align="center">{{ line.arrangeCode }}</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
<u-modal title="显示图片" @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">
<scroll-view scroll-y="true" class="scroll-list" :style="{ 'height': (this.screenHeight -280) + 'px' }">
<view >
<image v-for="(line,index) in viewSop" class="u-avatar-demo" :src="line" mode="aspectFill"></image>
</view>
</scroll-view>
</view>
</u-modal>
</view>
</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
}, },
data() { data() {
return { return {
screenHeight: 768, screenHeight: 768,
title: '生产报工', title: '生产报工',
open: false, open: false,
aopen: false, aopen: false,
form: {}, form: {},
feedbackForm: {}, feedbackForm: {},
tableData: [], tableData: [],
knifeTempVisible: false, knifeTempVisible: false,
knifeTempSearch: { knifeTempSearch: {
knifeTempCode: '', knifeTempCode: '',
locationCode: '' locationCode: ''
}, },
knifeTempInfo: { knifeTempInfo: {
knifeTemplateCode: '', knifeTemplateCode: '',
knifeTemplateName: '', knifeTemplateName: '',
knifeTemplateSpec: '', knifeTemplateSpec: '',
locationCode: '', locationCode: '',
locationName: '', locationName: '',
locationType: '', locationType: '',
locationTypeCode: '', locationTypeCode: '',
locationTypeDesc: '', locationTypeDesc: '',
locationTypeDescCode: '', locationTypeDescCode: '',
locationTypeDescName: '', locationTypeDescName: '',
locationTypeDescNameCode: '', locationTypeDescNameCode: '',
locationTypeDescNameCode2: '' locationTypeDescNameCode2: ''
}, },
stopReasonList: [ stopReasonList: [
{value: '中午休息吃饭。', text: "休息吃饭"}, { value: '中午休息吃饭。', text: '休息吃饭' },
{value: '刀头模具到期更换,更换期间。', text: "刀头模具到期更换"}, { value: '刀头模具到期更换,更换期间。', text: '刀头模具到期更换' },
{value: '没料了,正在领料', text: "领料加仓"} { value: '没料了,正在领料', text: '领料加仓' }
], ],
exception: [{ exception: [
value: 'PROD', {
text: "生产异常" value: 'PROD',
}, text: '生产异常'
{ },
value: 'QUAL', {
text: "质量异常" value: 'QUAL',
}, text: '质量异常'
{ },
value: 'DEVI', {
text: "设备异常" value: 'DEVI',
}, text: '设备异常'
{ },
value: 'WORK', {
text: "车间异常" value: 'WORK',
} text: '车间异常'
],
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: [
{
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: {
'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: {},
viewSopPicture: [],
viewSop: [],
reasonList: [],
workorderList: [],
materialUsageRecordList: [],
materialusagerecordLoading: false,
issusLineList: [],
issusLineColumn: [
{
name: 'itemCode',
label: '产品物料编码',
},
{
name: 'itemName',
label: '产品物料名称',
},
{
name: 'specification',
label: '规格型号',
},
{
name: 'unitOfMeasure',
label: '单位',
},
{
name: 'quantityIssued',
label: '领料数量',
},
{
name: 'batchCode',
label: '批次号',
},
{
name: 'warehouseName',
label: '仓库名称',
},
{
name: 'locationName',
label: '库区名称',
},
{
name: 'areaName',
label: '库位名称',
}],
feedingInspectionVisible:false,
recoilMaterialVisible:false,
materialRequestVisible:false,
materialReturnVisible:false,
materialReturn:false,
stockInVisible:false,
material:false,
feedingInspectionList: [],
recoilMaterialList: [],
materialRequestList: [],
materialReturnList: [],
materialRequestFormData: {
itemName:null,
applyNum:null
},
materialRequestFormVisible:false,
materialRequestSelected:{},
materialReturnFormData: {
itemName:null,
applyNum:null,
workorderCode:null
},
materialReturnFormVisible:false,
materialReturnSelected:{},
tableDetailColumn: [
{
name: 'workorderCode',
label: '生产工单号',
width: 140,
},
{
name: 'productCode',
label: '产品编号',
width: 140,
},
{
name: 'productName',
label: '产品名称',
width: 140,
},
{
name: 'productSpc',
label: '规格',
width: 140,
},
{
name: 'requestDate',
label: '需求日期',
width: 140,
},
],
tableDataDetail: [],
showRowDeatilFlag: false,
loading: false,
} }
}, ],
mounted() { //监听工作站切换事件 stopReason: '',
uni.$on('switchWorkunit', (station) => { stopReasonVisible: false,
this.getTaskList(); rules: {
}) quantity: [
}, {
created() { 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: [
{
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: {
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: {},
viewSopPicture: [],
viewSop: [],
reasonList: [],
workorderList: [],
materialUsageRecordList: [],
materialusagerecordLoading: false,
issusLineList: [],
issusLineColumn: [
{
name: 'itemCode',
label: '产品物料编码'
},
{
name: 'itemName',
label: '产品物料名称'
},
{
name: 'specification',
label: '规格型号'
},
{
name: 'unitOfMeasure',
label: '单位'
},
{
name: 'quantityIssued',
label: '领料数量'
},
{
name: 'batchCode',
label: '批次号'
},
{
name: 'warehouseName',
label: '仓库名称'
},
{
name: 'locationName',
label: '库区名称'
},
{
name: 'areaName',
label: '库位名称'
}
],
feedingInspectionVisible: false,
recoilMaterialVisible: false,
materialRequestVisible: false,
materialReturnVisible: false,
materialReturn: false,
stockInVisible: false,
material: false,
feedingInspectionList: [],
recoilMaterialList: [],
materialRequestList: [],
materialReturnList: [],
materialRequestFormData: {
itemName: null,
applyNum: null
},
materialRequestFormVisible: false,
materialRequestSelected: {},
materialReturnFormData: {
itemName: null,
applyNum: null,
workorderCode: null
},
materialReturnFormVisible: false,
materialReturnSelected: {},
tableDetailColumn: [
{
name: 'workorderCode',
label: '生产工单号',
width: 140
},
{
name: 'productCode',
label: '产品编号',
width: 140
},
{
name: 'productName',
label: '产品名称',
width: 140
},
{
name: 'productSpc',
label: '规格',
width: 140
},
{
name: 'requestDate',
label: '需求日期',
width: 140
}
],
tableDataDetail: [],
showRowDeatilFlag: false,
loading: false
};
},
mounted() {
//监听工作站切换事件
uni.$on('switchWorkunit', (station) => {
this.getTaskList();
});
},
created() {
//获取屏幕高度 //获取屏幕高度
uni.getSystemInfo({ uni.getSystemInfo({
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,35 +940,35 @@ export default { ...@@ -883,35 +940,35 @@ 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;
case 'ViewPpicture':
this.viewiPctureShow();
break; break;
case 'ViewPpicture':
this.viewiPctureShow()
break;
case 'FeedingInspection': case 'FeedingInspection':
this.feedingInspectionShow(); this.feedingInspectionShow();
break; break;
...@@ -929,75 +986,72 @@ export default { ...@@ -929,75 +986,72 @@ 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,
workunitId: selectData.workunitId, workunitId: selectData.workunitId,
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;
} }
}); });
}, },
rowClick(row, index) { rowClick(row, index) {
...@@ -1005,108 +1059,116 @@ export default { ...@@ -1005,108 +1059,116 @@ 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) => {
return { this.reasonList = res.rows.map((item) => {
value: item.abnormalReason, return {
text: item.abnormalReason value: item.abnormalReason,
} text: item.abnormalReason
}) };
}) });
});
},
stopWorkorder(item) {
// 查询原因
this.$u.api
.getWorkorder({
pageNum: 1,
pageSize: 10,
arrangeCode: item.arrangeCode
})
.then((res) => {
item.workorderList = res.rows.map((item) => {
return {
value: item.workorderId,
text: item.workorderCode
};
});
});
}, },
stopWorkorder(item) {
// 查询原因
this.$u.api.getWorkorder({
pageNum: 1,
pageSize: 10,
arrangeCode:item.arrangeCode
}).then(res => {
item.workorderList = res.rows.map(item => {
return {
value: item.workorderId,
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
if (res.code === 200) { })
this.tableData = res.rows; .then((res) => {
if (res.code === 200) {
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 {
}
} }
} });
});
}, },
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
workstationId: this.vuex_workstation.workstationId, .materialusagerecordList({
depletionMethod: this.currentType + 1, workstationId: this.vuex_workstation.workstationId,
taskId: this.curTaskInfo.taskId depletionMethod: this.currentType + 1,
}).then(res => { taskId: this.curTaskInfo.taskId
this.materialusagerecordLoading = false })
if (res.code === 200) { .then((res) => {
this.materialUsageRecordList = res.rows; this.materialusagerecordLoading = false;
} if (res.code === 200) {
}); this.materialUsageRecordList = res.rows;
}
});
}, },
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,39 +1176,43 @@ export default { ...@@ -1114,39 +1176,43 @@ 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
if (res.code === 200) { })
this.form = res.data; .then((res) => {
this.$u.vuex('vuex_task', res.data); if (res.code === 200) {
this.form.progress = Math.round((this.form.quantityProduced / this.form.quantity) * 100, 0); this.form = res.data;
} this.$u.vuex('vuex_task', res.data);
}); this.form.progress = Math.round((this.form.quantityProduced / this.form.quantity) * 100, 0);
}
});
}, },
changeStatus(taskId, status) { changeStatus(taskId, status) {
// this.form.status = status; // this.form.status = status;
this.$u.api.changeStatus({ this.$u.api
taskId: taskId, .changeStatus({
status: status, taskId: taskId,
attr1: this.stopReason status: status,
}).then(res => { attr1: this.stopReason
if (res.code === 200) { })
this.$u.toast('变更成功'); .then((res) => {
uni.$emit('taskStatusChanged'); //任务状态变更 if (res.code === 200) {
this.getTaskList() this.$u.toast('变更成功');
} uni.$emit('taskStatusChanged'); //任务状态变更
}); this.getTaskList();
}
});
}, },
// reset() { // reset() {
// this.feedbackForm = { // this.feedbackForm = {
...@@ -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,35 +1244,33 @@ export default { ...@@ -1178,35 +1244,33 @@ 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,
processId: item.processId, processId: item.processId,
processCode: item.processCode, processCode: item.processCode,
processName: item.processName, processName: item.processName,
workstationId: this.vuex_workunit.workunitId, workstationId: this.vuex_workunit.workunitId,
workstationCode: this.vuex_workunit.workunitCode, workstationCode: this.vuex_workunit.workunitCode,
workstationName: this.vuex_workunit.workunitName, workstationName: this.vuex_workunit.workunitName,
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,233 +1311,233 @@ export default { ...@@ -1246,233 +1311,233 @@ export default {
workstationCode: item.workstationCode, workstationCode: item.workstationCode,
workstationName: item.workstationName, workstationName: item.workstationName,
startTime: item.startTime startTime: item.startTime
}).then(res => { })
if (res.code === 200) { .then((res) => {
if(res.msg === ""){ if (res.code === 200) {
this.$u.toast('上报成功'); if (res.msg === '') {
}else{ this.$u.toast('上报成功');
this.$u.toast(res.msg); } else {
} 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;
}
});
} }
}); });
}
});
}, },
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){
this.materialReturnFormData.workorderCode=s;
}, },
materialReturnFormShow(line){ materialReturnWorkorderChange(s) {
this.materialReturnFormVisible=true; this.materialReturnFormData.workorderCode = s;
this.materialReturnFormData = {
itemName: line.itemName,
orkorderCode:this.materialReturnFormData.workorderCode,
isQualified:1
};
this.materialReturnSelected = line;
}, },
viewSopsShow(row){ materialReturnFormShow(line) {
this.material=true; this.materialReturnFormVisible = true;
// this.viewSopPicture = this.tableSelectData[0]; this.materialReturnFormData = {
this.$u.api.viewpicture.viewSop({"workorderId":Number(row.workorderId)}).then(res => { itemName: line.itemName,
if (res.code === 200) { orkorderCode: this.materialReturnFormData.workorderCode,
console.log(res.data) isQualified: 1
this.viewSop = res.data; };
} this.materialReturnSelected = line;
});
},
materialReturnSetting(){
this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum;
this.materialReturnSelected.isQualified =this.materialReturnFormData.isQualified;
this.materialReturnFormVisible=false;
}, },
materialReturnSave(){ viewSopsShow(row) {
const taskInfo = this.tableSelectData[0]; this.material = true;
const rst = []; // this.viewSopPicture = this.tableSelectData[0];
const t = this; this.$u.api.viewpicture.viewSop({ workorderId: Number(row.workorderId) }).then((res) => {
this.materialReturnList.forEach(s=>{ if (res.code === 200) {
if(s.applyNum!=null){ console.log(res.data);
rst.push({ this.viewSop = res.data;
"itemId":s.itemId, }
"taskId":taskInfo.taskId, });
"backNum":s.applyNum,
"issueLineId":s.lineId,
"workOrderId":s.workorderId,
"batchNo":s.batchCode,
"packNo":s.packNo,
"isQualified":s.isQualified,
"workorderCode":t.materialReturnFormData.workorderCode,
});
}
});
this.$u.api.addMaterialReturn(rst).then(res => {
t.materialReturnFormVisible=false;
if (res.code === 200) {
t.$u.toast('保存成功');
}
});
}, },
stockInShow(){ materialReturnSetting() {
this.stockInVisible=true; this.materialReturnSelected.applyNum = this.materialReturnFormData.applyNum;
this.materialReturnSelected.isQualified = this.materialReturnFormData.isQualified;
this.materialReturnFormVisible = false;
},
materialReturnSave() {
const taskInfo = this.tableSelectData[0];
const rst = [];
const t = this;
this.materialReturnList.forEach((s) => {
if (s.applyNum != null) {
rst.push({
itemId: s.itemId,
taskId: taskInfo.taskId,
backNum: s.applyNum,
issueLineId: s.lineId,
workOrderId: s.workorderId,
batchNo: s.batchCode,
packNo: s.packNo,
isQualified: s.isQualified,
workorderCode: t.materialReturnFormData.workorderCode
});
}
});
this.$u.api.addMaterialReturn(rst).then((res) => {
t.materialReturnFormVisible = false;
if (res.code === 200) {
t.$u.toast('保存成功');
}
});
},
stockInShow() {
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