2379 lines
72 KiB
Vue
Executable File
2379 lines
72 KiB
Vue
Executable File
<template>
|
||
<view class="check-content">
|
||
<view class="topBar">
|
||
<view class="topBar-back-btn" >
|
||
<image @click="backClick" class="topBar-img" src="../../static/icon/leftarrowwhite.png"></image>
|
||
</view>
|
||
<view class="topBar-text">{{pageTitle}}</view>
|
||
<view class="topBar-btn" style="padding-right: 16px;">
|
||
<text class="btn-temp" @click="submit('temp')">暂存</text>
|
||
<text class="btn-submit" @click="submit('submit')">提交</text>
|
||
</view>
|
||
</view>
|
||
<view class="detail-tabs-class" style="margin-top: 70px;">
|
||
<view @click="tabChange(1)"
|
||
:class="[tabType==1?'detail-tabs-btn-gray-class':'detail-tabs-btn-handle-class']">检验</view>
|
||
<view style="border-left-width:1.5px; border-left-color: #E5E5E5; border-left-style: solid;
|
||
height:40rpx; flex-grow: 0; flex-shrink: 0;"
|
||
v-show="currentTranType=='BD_OQC'" />
|
||
<view @click="tabChange(4)" :class="[tabType==4?'detail-tabs-btn-gray-class':'detail-tabs-btn-base-class']"
|
||
v-show="currentTranType=='BD_OQC'" >条码明细</view>
|
||
<view style="border-left-width:1.5px; border-left-color: #E5E5E5; border-left-style: solid;
|
||
height:40rpx; flex-grow: 0; flex-shrink: 0;" />
|
||
<view @click="tabChange(2)" :class="[tabType==2?'detail-tabs-btn-gray-class':'detail-tabs-btn-base-class']">
|
||
标准文件</view>
|
||
<view style="border-left-width:1.5px; border-left-color: #E5E5E5; border-left-style: solid;
|
||
height:40rpx; flex-grow: 0; flex-shrink: 0;" />
|
||
<view @click="tabChange(3)"
|
||
:class="[tabType==3?'detail-tabs-btn-gray-class':'detail-tabs-btn-total-class']">上传文件</view>
|
||
</view>
|
||
<view class="list" style="margin-top: 20rpx;" v-if="inspectionItemDetailInfo.length>0">
|
||
<view class="list-item">
|
||
<view class="list-item-detail">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">检验结果:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FQCRESULT==1?'未知':((inspectionItemDetailInfo[0].FQCRESULT==2)?'合格':
|
||
((inspectionItemDetailInfo[0].FQCRESULT==3)?'不合格':''))}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">检验单号:</view>
|
||
<view class="list-item-detail-describe" style="margin-left: 0;">
|
||
{{inspectionItemDetailInfo[0].FBILLNO?inspectionItemDetailInfo[0].FBILLNO:'-'}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">物料编码:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FMATERNUMBER?inspectionItemDetailInfo[0].FMATERNUMBER:'-'}}
|
||
</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">物料名称:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FMATERNAME?inspectionItemDetailInfo[0].FMATERNAME:'-'}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="list-item-detail">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">送检数量:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FMQTY?inspectionItemDetailInfo[0].FMQTY:'-'}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title" style="width: 260rpx;">合格数/不合格数:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FGODBADQTY?inspectionItemDetailInfo[0].FGODBADQTY:'-'}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">报废数:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FSCRAPQTY?inspectionItemDetailInfo[0].FSCRAPQTY:'-'}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">物料规格:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FSPECIFICATION?inspectionItemDetailInfo[0].FSPECIFICATION:'-'}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="list-item-detail">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">版本:</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FAUXPROPNAME?inspectionItemDetailInfo[0].FAUXPROPNAME:'-'}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">送检时间:</view>
|
||
<view class="list-item-detail-describe" style="width: 500rpx;">
|
||
{{inspectionItemDetailInfo[0].C_YMD?inspectionItemDetailInfo[0].C_YMD:'-'}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="list-item-detail">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">单据状态</view>
|
||
<view class="list-item-detail-describe">
|
||
{{inspectionItemDetailInfo[0].FSTATUS?inspectionItemDetailInfo[0].FSTATUS:'-'}}</view>
|
||
</view>
|
||
</view>
|
||
<view class="list-item-detail">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">检验文件号:</view>
|
||
<view class="list-item-detail-describe">
|
||
<input v-model="FFILENO " placeholder="输入文件编号"/>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="list-item-detail" style="width: 50%;">
|
||
<view class="list-item-detail-title">检验文件版本:</view>
|
||
<xfl-selectsimple class="header-row-select-class" style="" :list="checkFileVersionList"
|
||
:showItemNum="5" :isCanInput="false" :clearable="false" ref="checkFileVersionList"
|
||
@change="checkFileVersionListChange" :defaultSelectText="defaultCheckFileVersion" />
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">图纸文件号:</view>
|
||
<view class="list-item-detail-describe">
|
||
<input v-model="FDRAWNO" placeholder="输入图纸编号"/>
|
||
</view>
|
||
</view>
|
||
<view class="list-item-detail" style="width: 50%;">
|
||
<view class="list-item-detail-title">图纸文件版本:</view>
|
||
<xfl-selectsimple class="header-row-select-class" style="" :list="drawVersionList"
|
||
:showItemNum="5" :isCanInput="false" :clearable="false" ref="drawVersionList"
|
||
@change="drawVersionListChange" :defaultSelectText="defaultDrawVersion" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
<view class="tab-check" v-if="tabType==1">
|
||
<view class="list-item-detail" style="padding: 20rpx 20rpx;">
|
||
<view class="list-item-detail-area">
|
||
<text class="list-item-detail-title">抽样标签</text>
|
||
<input class="list-item-detail-input" placeholder="录入抽样条码"
|
||
placeholder-class="placeholder-class-input" v-model="checkBarcode"
|
||
@confirm="checkBarcodeConfirm" :focus="barcodeFocuse"
|
||
style="background-color: #FFFFFF;flex-grow: 1;padding: 0 20rpx;text-align: start;z-index: 99;" />
|
||
<image class="list-item-img" src="@/static/img/scan-blue.png" @click="checkBarcodeScan" style="z-index: 99;">
|
||
</image>
|
||
</view>
|
||
<view class="list-item-detail-add" @click="addItem" style="z-index: 99;">新增检验项</view>
|
||
</view>
|
||
|
||
<view class="list-card" @touchstart="touchS($event,index,'checkItemList')"
|
||
@touchmove="touchM($event,index,'checkItemList')" @touchend="touchE($event,index,'checkItemList')"
|
||
:style="{'left': (currIndex==index?leftStyle + 'rpx':'')}" v-for="(item,index) in checkItemList"
|
||
v-if="checkItemList.length>0">
|
||
<view class="">
|
||
<view class="list-item">
|
||
<view class="list-item-detail">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">检验项目:</view>
|
||
<view class="list-item-detail-describe">{{item.FQCITEMNAME}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">抽样数量</view>
|
||
<input v-model="item.FSAMPLEQTY" type="number" :disabled="item.disFSAMPLEQTY"
|
||
:class="[item.disFSAMPLEQTY?'list-item-detail-input':'list-item-detail-input-white']"
|
||
style="margin-left: 0;" @confirm="checkQtyConfirm(item)"/>
|
||
</view>
|
||
|
||
<view class="list-item-detail" style="margin-left: 32rpx;width: 60%;">
|
||
<view class="list-item-detail-title">检验水平</view>
|
||
<xfl-selectsimple class="header-row-select-class" style="margin-left: 20rpx;overflow: hidden;"
|
||
:list="item.checkLevelsList" :showItemNum="5" :isCanInput="false" :clearable="false"
|
||
ref="checkLevelsList" @change="checkLevelsChange" :defaultSelectText="checkLevelsList[item.FQCLEV].value" />
|
||
</view>
|
||
|
||
<view class="list-item-detail-area" style="width: 40%;">
|
||
<view class="list-item-detail-title">检验方法:</view>
|
||
<view class="list-item-detail-describe">{{(item.FQCMETHOD==1)?'定性':'定量'}}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="list-item-detail" style="margin-top: 20rpx;">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">测试次数</view>
|
||
<input class="list-item-detail-input-white" v-model="item.FQCCOUNT"
|
||
@confirm="testTimesConfirm(item)"/>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">AC~RE</view>
|
||
<input v-model="item.FAC" type="number" :disabled="item.disACRE"
|
||
:class="[item.disACRE?'list-item-detail-input':'list-item-detail-input-white']"
|
||
style="margin-left: 0;" @confirm="ACConfirm(item)"/>~
|
||
<input v-model="item.FRE" type="number" :disabled="item.disACRE"
|
||
:class="[item.disACRE?'list-item-detail-input':'list-item-detail-input-white']"
|
||
style="margin-left: 0;" @confirm="REConfirm(item)"/>
|
||
</view>
|
||
<view class="list-item-detail-area" style="width: 60%;">
|
||
<view class="list-item-detail-title">检验标准</view>
|
||
<input class="list-item-detail-input" v-model="item.FQCSTD" disabled="true"
|
||
style="background-color: #f0f0f0;width: auto;" />
|
||
{{item.FUNITNAME?item.FUNITNAME:''}}
|
||
</view>
|
||
<view class="list-item-detail-area" style="width: 40%;">
|
||
<view class="list-item-detail-title" style="width: 200rpx;">检验工具类型:</view>
|
||
<view class="list-item-detail-describe">{{item.FGROUPNAME}}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="list-item-detail" style="margin: 20rpx 32rpx 0 32rpx;" @click="checkItemSelectClick(index)">
|
||
<view class="list-item-detail-title" style="margin-right: 20rpx;">AQL</view>
|
||
<xfl-selectsimple class="header-row-select-class" :key = 'keys'
|
||
:disabled="item.disFAQL" :clearable="false" :list="item.AQLlist" ref="AQLlist"
|
||
:showItemNum="5" :isCanInput="false" :defaultSelectText="item.FAQL"
|
||
@change="AQLChange"/>
|
||
<view class="list-item-detail-title" style="margin-left: 60rpx;margin-right: 20rpx;">检验工具
|
||
</view>
|
||
<xfl-selectsimple class="header-row-select-class" :list="item.ToolList" :clearable="false"
|
||
:showItemNum="5" :isCanInput="true" ref="checkBillTypeList" @change="checkBillTypeChange"
|
||
v-model="checkBillTypeName" :defaultSelectText="item.FTOOLNAME" />
|
||
</view>
|
||
<view class="list-item-detail" style="margin: 20rpx 32rpx 0 32rpx;height: 36px;padding: 20px 20px;">
|
||
<view class="list-item-detail-title">检验结果</view>
|
||
<view class="list-item-detail-describe" v-if="item.FQCMETHOD==2">
|
||
<text style="margin-right: 20rpx;">合格</text>
|
||
<checkbox :checked="item.itemCheckPass" disabled="true" />
|
||
</view>
|
||
<view class="list-item-detail-describe" v-if="item.FQCMETHOD==2">
|
||
<text style="margin-right: 20rpx;">不合格</text>
|
||
<checkbox :checked="item.itemCheckFail" disabled="true" />
|
||
</view>
|
||
|
||
<view class="list-item-detail-describe" v-if="item.FQCMETHOD==1" :k="keys">
|
||
<text style="margin-right: 20rpx;">合格</text>
|
||
<checkbox :checked="item.itemCheckPass" @click="passClick(item,index)"/>
|
||
</view>
|
||
<view class="list-item-detail-describe" v-if="item.FQCMETHOD==1" :k="keys">
|
||
<text style="margin-right: 20rpx;">不合格</text>
|
||
<checkbox :checked="item.itemCheckFail" @click="failClick(item,index)"/>
|
||
</view>
|
||
<input v-model="item.FSTDATA" v-if="item.FQCMETHOD==1" placeholder="录入检测值" :k="keys"
|
||
class="list-item-detail-input" style="background-color: #FFFFFF;width: 200rpx;"/>
|
||
</view>
|
||
<view style="height: 100px;padding: 20px 20px; border-radius: 8rpx; border: #cacaca solid 1px;
|
||
width: 96.2%" v-if="item.testValue.length>0">
|
||
<scroll-view scroll-y="true" style="width: 100%;height: 100%;">
|
||
<view class="list-item-detail" v-for="(testValue,indexTestValue) in item.testValue"
|
||
style="margin-top: 20rpx;">
|
||
<view class="list-item-detail-area" style="position: relative;">
|
||
<view class="list-item-detail-title" style="width: 220rpx;">测试条码{{testValue.FQCSEQ}}
|
||
</view>
|
||
<input class="list-item-detail-input" v-model="testValue.FBARCODE"
|
||
@confirm="checkBarConfirm(item,index,testValue,indexTestValue)"
|
||
style="background-color: #FFFFFF;flex-grow: 1;padding: 0 20rpx;text-align: start;" />
|
||
<image class="list-item-img" src="@/static/img/scan-blue.png"
|
||
@click="checkBarScan(item,index,testValue,indexTestValue)"></image>
|
||
</view>
|
||
<view class="list-item-detail-area" @click="checkItemSelectClick(index)">
|
||
<view class="list-item-detail-title" style="width: 120rpx;">测试值</view>
|
||
<input class="list-item-detail-input" type="number" v-model="testValue.FQCVALUE"
|
||
@input="testValueInput(item,index,testValue,indexTestValue)"
|
||
style="background-color: #FFFFFF;" />{{checkToolUnit}}
|
||
|
||
<view class="list-item-detail-title" style="width: 120rpx;margin-left: 20rpx;">检验结果</view>
|
||
|
||
<input disabled="true" v-model="testValue.resultShow" @click="changeValueResult(item,index,testValue,indexTestValue)"
|
||
:class="[testValue.resultShow=='合格'?'list-item-detail-input-green':'list-item-detail-input-red']" :k='keys'/>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
<view class="list-item-detail" style="margin: 20rpx 32rpx 0 32rpx;">
|
||
<textarea placeholder="添加备注……" v-model="item.FNOTE"></textarea>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="delete-icon" @click="delItem(item,index)">
|
||
删除
|
||
</view>
|
||
</view>
|
||
|
||
<view class="list-card-broken" @touchstart="touchS($event,index,'brokenBarList')"
|
||
@touchmove="touchM($event,index,'brokenBarList')" @touchend="touchE($event,index,'brokenBarList')"
|
||
:style="{'left': (currBrokenBarIndex==index?leftStyleBrokenBar + 'rpx':'')}"
|
||
v-for="(item,index) in brokenBarList" v-if="brokenBarList.length>0">
|
||
|
||
<view class="">
|
||
<view class="list-item">
|
||
<view class="list-item-detail" style="margin-top: 20rpx;">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">条码</view>
|
||
<input class="list-item-detail-input" v-model="item.FBARCODE" disabled="true"
|
||
style="background-color: #f0f0f0;flex-grow: 1;" />
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title">破坏数量</view>
|
||
<input class="list-item-detail-input" v-model="item.FSCRAPQTY"
|
||
style="background-color: #FFFFFF;z-index: 10;" />
|
||
|
||
<view class="list-item-detail-title" style="margin-left: 20px;">不良数量</view>
|
||
<input class="list-item-detail-input" v-model="item.FBADQTY"
|
||
style="background-color: #FFFFFF;z-index: 10;" />
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="delete-icon" @click="delbrokenBarItem(item,index)">
|
||
删除
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="tab-check" v-if="tabType==2">
|
||
<view class="list-card-Info">
|
||
<view class="list-card-Info-item" style="margin-top: 50rpx;">标准文件</view>
|
||
</view>
|
||
<view class="file-content">
|
||
<uni-grid :column="7" :show-border="false" :square="false">
|
||
<uni-grid-item v-for="(item ,index) in proStandardFile" :key="index">
|
||
<view class="grid-item-box" v-if="item.FileUrl.includes('.png')">
|
||
<image class="image" :src="item.FileUrl" @click="showPdf(item,index)" />
|
||
<span class="text-name">{{item.FFILENAME}}</span>
|
||
<span class="text-time">{{item.FNOTE}}</span>
|
||
</view>
|
||
<view class="grid-item-box" v-if="!item.FileUrl.includes('.png')">
|
||
<image class="image" src="@/static/icon/file.png" @click="showPdf(item,index)" />
|
||
<span class="text-name">{{item.FFILENAME}}</span>
|
||
<span class="text-time">{{item.FNOTE}}</span>
|
||
</view>
|
||
</uni-grid-item>
|
||
</uni-grid>
|
||
</view>
|
||
</view>
|
||
<view class="tab-check" v-if="tabType==3">
|
||
<view class="list-card-Info">
|
||
<view class="list-card-Info-item" style="margin-top: 50rpx;">检验文件</view>
|
||
</view>
|
||
<view class="file-content">
|
||
<uni-grid :column="7" :show-border="false" :square="false">
|
||
<uni-grid-item v-for="(item ,index) in checkFile" :key="index">
|
||
<view class="grid-item-box" v-if="item.FileUrl.includes('.png')||item.FileUrl.includes('.jpg')" :k='keys'>
|
||
<image class="image" :src="item.FileUrl" @click="prewViewCheckFile(item,index)"/>
|
||
<span class="text-name">{{item.FNAME}}</span>
|
||
<span class="text-time">{{item.FNOTE}}</span>
|
||
</view>
|
||
<view class="grid-item-box" v-if="!(item.FileUrl.includes('.png')||item.FileUrl.includes('.jpg'))" :k='keys'>
|
||
<image class="image" src="@/static/icon/IASSE01.png" @click="prewViewCheckFile(item,index)"/>
|
||
<span class="text-name">{{item.FNAME}}</span>
|
||
<span class="text-time">{{item.FNOTE}}</span>
|
||
</view>
|
||
</uni-grid-item>
|
||
</uni-grid>
|
||
</view>
|
||
</view>
|
||
<!-- <l-file ref="lFile" @up-success="onSuccess"></l-file> -->
|
||
<view class="submitBtn" style="display: flex;flex-direction: row;" v-if="tabType==3">
|
||
<view style="width: 100%;height: 80rpx;line-height: 80rpx;border-right: #FFFAF0 solid 1px;" @tap="onUpload" >
|
||
文件上传
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 添加检验项目 -->
|
||
<view class="gray-layer" v-if="showGrayLayer" @click="hideGrayLayer"></view>
|
||
<view class="Alter" v-if="showAlter">
|
||
<view class="Alter-item">
|
||
<view class="Alter-item-title">新增检验项目</view>
|
||
</view>
|
||
<view class="Alter-item">
|
||
<view class="list-item-detail-title">检验项目</view>
|
||
<xfl-selectsimple class="header-row-select-class" :list="checkItemAddList" ref="checkItemAddList"
|
||
:showItemNum="5" :isCanInput="false" :clearable="false" @change="checkItemAddListChange"/>
|
||
</view>
|
||
<view class="Alter-item">
|
||
<view class="list-item-detail-title">抽样数量</view>
|
||
<input v-model="alterCheckQty" :disabled="alterDisableQty" @input="checkAlterCheckQty"
|
||
:class="alterDisableQty?'Alter-item-input-gray':'Alter-item-input'"/>
|
||
<view class="list-item-detail-title" style="margin-left: 20rpx;">测试次数</view>
|
||
<input v-model="alterCheckTimes" :disabled="alterDisableTimes"
|
||
:class="alterDisableTimes?'Alter-item-input-gray':'Alter-item-input'"/>
|
||
<view class="list-item-detail-title" style="margin-left: 20rpx;">AC~RE</view>
|
||
<input v-model="alterAC" :disabled="alterDisableACRE"
|
||
:class="alterDisableACRE?'Alter-item-input-gray':'Alter-item-input'"/>
|
||
<input v-model="alterRE" style="margin-left: 20rpx;" :disabled="alterDisableACRE"
|
||
:class="alterDisableACRE?'Alter-item-input-gray':'Alter-item-input'"/>
|
||
</view>
|
||
|
||
<view class="Alter-item" style="margin-bottom: 0;">
|
||
<view class="Alter-item-cancel" @click="alterCancelClick">取消</view>
|
||
<view class="Alter-item-confirm" @click="alterConfirmClick">确定</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="tab-check" v-if="tabType==4">
|
||
<view class="list-item" v-for="item,index in snList" style="margin-bottom: 0rpx; padding-bottom: 0rpx;">
|
||
<view class="list-item-detail" style="border: #cacaca solid 1px;border-radius: 5px;">
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title" style="width: 100rpx;">条码:</view>
|
||
<view class="list-item-detail-describ" style="width: 250rpx;">{{item.FBARCODE}}</view>
|
||
</view>
|
||
<view class="list-item-detail-area">
|
||
<view class="list-item-detail-title" style="width: 100rpx;">批号:</view>
|
||
<view class="list-item-detail-describe" style="width: 250rpx;">{{item.FLOT}}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<opsoft-dialog-notice
|
||
:dialogNoticeShow="showDialog"
|
||
:dialogNoticeType="dialogNoticeType"
|
||
:dialogNoticeTitle="dialogNoticeTitle"
|
||
:dialogNoticeContent="dialogNoticeContent"
|
||
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
||
>
|
||
</opsoft-dialog-notice>
|
||
<opsoft-dialog
|
||
@dialogCancelClick="dialogCancelClick"
|
||
@dialogConfirmClick="dialogConfirmClick"
|
||
:dialogContent="dialogContent"
|
||
:dialogTitle="dialogTitle"
|
||
:dialogShow="dialogShow"
|
||
></opsoft-dialog>
|
||
</view>
|
||
</template>
|
||
<script>
|
||
import Vue from 'vue';
|
||
import zTable from "@/components/z-table/z-table.vue";
|
||
import xflSelectsimple from '@/components/xfl-selectsimple/xfl-selectsimple.vue';
|
||
import uniGrid from '@/components/uni-grid/uni-grid.vue';
|
||
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue';
|
||
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
||
import opsoftDialog from '@/components/opsoft-dialog/opsoft-dialog.vue'
|
||
import errorStrUntil from '@/common/errorStrUntil.js';
|
||
export default {
|
||
components: {
|
||
zTable,
|
||
xflSelectsimple,
|
||
uniGrid,
|
||
uniGridItem,
|
||
opsoftDialogNotice,
|
||
opsoftDialog
|
||
},
|
||
data() {
|
||
return {
|
||
dialogNoticeContent:'',
|
||
dialogNoticeTitle:'',
|
||
dialogNoticeType:'',
|
||
showDialog:false,
|
||
|
||
dialogShow:false,
|
||
dialogTitle:'',
|
||
dialogContent:'',
|
||
dialogType:'',
|
||
dialogParams:new Object,
|
||
|
||
keys:1,
|
||
FFILENO:'',
|
||
FDRAWNO:'',
|
||
drawVersionList:[],
|
||
defaultDrawVersion:'',
|
||
checkFileVersionList:[],
|
||
defaultCheckFileVersion:'',
|
||
|
||
checkLevelsList:[
|
||
{FQCLEV:0,value:'一般检验水平一'},{FQCLEV:1,value:'一般检验水平二'},{FQCLEV:2,value:'一般检验水平三'},
|
||
{FQCLEV:3,value:'特殊检验水平一'},{FQCLEV:4,value:'特殊检验水平二'},{FQCLEV:5,value:'特殊检验水平三'},
|
||
{FQCLEV:6,value:'特殊检验水平四'},{FQCLEV:7,value:'C=0'},{FQCLEV:8,value:'自定义'},{FQCLEV:9,value:'全检'},
|
||
],
|
||
alterCheckLevelSelected:'',
|
||
AQLList:[],
|
||
alterCheckAQLSelected:'',
|
||
checkItemAddList:[],
|
||
showGrayLayer:false,
|
||
showAlter:false,
|
||
alterDisableQty:false,
|
||
alterDisableTimes:false,
|
||
alterDisableACRE:false,
|
||
alterCheckQty:'',
|
||
alterCheckTimes:'',
|
||
alterAC:'',
|
||
alterRE:'',
|
||
addItemObj:new Object(),
|
||
|
||
checkFile:[],
|
||
ckeckFileUrl:[],
|
||
|
||
proStandardFile: [],
|
||
imgFile: [],
|
||
|
||
tabType: 1,
|
||
FISMODIFY:false,
|
||
checkBarcode: '',
|
||
barcodeFocuse: false,
|
||
|
||
brokenBarList: [],
|
||
|
||
checkBillTypeList: [],
|
||
checkBillTypeName: '',
|
||
billTypeFocus: false,
|
||
checkBillTypeSelectText: '请选择',
|
||
|
||
checkStandard: 8,
|
||
checkTimes: 1,
|
||
checkStandardAC: 0,
|
||
checkStandardRE: 1,
|
||
checkBarList: [],
|
||
|
||
inspectionItemDetailInfo: [],
|
||
checkItemList: [],
|
||
testValueResultList:[{value:'合格'},{value:'不合格'}],
|
||
checkToolUnit:'',
|
||
|
||
leftStyle: 0,
|
||
startX: 0,
|
||
hiddenFlag: true,
|
||
delBtnWidth: 220,
|
||
currIndex: '',
|
||
|
||
leftStyleBrokenBar: 0,
|
||
startXBrokenBar: 0,
|
||
hiddenFlagBrokenBar: true,
|
||
delBtnWidthBrokenBar: 220,
|
||
currBrokenBarIndex: '',
|
||
|
||
deletedItem: [],
|
||
|
||
FINTERID:'',
|
||
FUNITID:'',
|
||
FTOOLUNITID:'',
|
||
currCheckItemSelectIndex:0,
|
||
snList: [],
|
||
}
|
||
},
|
||
|
||
mounted() {
|
||
let finterID;
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
finterID = uni.getStorageSync('inStockQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
finterID = uni.getStorageSync('IQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
finterID = uni.getStorageSync('OQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
finterID = uni.getStorageSync('overDueQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_RETREATQC'){
|
||
finterID = uni.getStorageSync('RETREATQCID');
|
||
}
|
||
this.getInspectionItems(finterID);
|
||
},
|
||
props: {
|
||
currentTranType: {
|
||
type: [String, Number],
|
||
default:'BD_IQC'
|
||
},
|
||
pageTitle: {
|
||
type: String,
|
||
default:'当前页面'
|
||
}
|
||
},
|
||
methods: {
|
||
dialogNoticeConfirmClick(){
|
||
this.showDialog = false;
|
||
},
|
||
dialogNoticeProps(err,type){
|
||
err = errorStrUntil.handle(err);
|
||
this.showDialog = true;
|
||
this.dialogNoticeType = 'error';
|
||
this.dialogNoticeTitle = '异常提示';
|
||
if(type=='success'){
|
||
this.dialogNoticeType = 'success';
|
||
this.dialogNoticeTitle = '执行成功';
|
||
}
|
||
this.dialogNoticeContent = err;
|
||
},
|
||
dialogProps(dialogContent,type,params){
|
||
this.dialogShow = true;
|
||
this.dialogTitle = '提示';
|
||
this.dialogContent = dialogContent;
|
||
this.dialogType = type
|
||
this.dialogParams.params = params
|
||
},
|
||
dialogConfirmClick:function() {
|
||
let _self = this;
|
||
console.log("dialogConfirmClick");
|
||
this.dialogShow=false;
|
||
if(this.dialogType=='bluePrintBarcode'){
|
||
this.bluePrintBarcode(this.dialogParams.params)
|
||
}
|
||
if(this.dialogType=='judgeCash'){
|
||
this.loadByCash();
|
||
}
|
||
if(this.dialogType=='delCkeckItem'){
|
||
_self.leftStyle = 0;
|
||
let arr = {
|
||
FDETAILID: this.dialogParams.params.FDETAILID
|
||
};
|
||
_self.deletedItem.push(arr);
|
||
_self.checkItemList.splice(this.dialogParams.params.index, 1);
|
||
}
|
||
if(this.dialogType=='delBrokenBar'){
|
||
_self.leftStyleBrokenBar = 0;
|
||
_self.brokenBarList.splice(this.dialogParams.params.index, 1);
|
||
}
|
||
},
|
||
dialogCancelClick:function() {
|
||
console.log("dialogCancelClick");
|
||
this.dialogShow=false
|
||
if(this.dialogType=='judgeCash'){
|
||
this.getSourceBillTypeInfo();
|
||
}
|
||
},
|
||
onUpload() {
|
||
let token = uni.getStorageSync('token');
|
||
let requestUrl = uni.getStorageSync('RequestUrl') + '/SysConfigData/Upload';
|
||
let finterID;
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
finterID = uni.getStorageSync('inStockQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
finterID = uni.getStorageSync('IQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
finterID = uni.getStorageSync('OQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
finterID = uni.getStorageSync('overDueQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_RETREATQC'){
|
||
finterID = uni.getStorageSync('RETREATQCID');
|
||
}
|
||
|
||
let that = this
|
||
uni.chooseImage({
|
||
count: 9, //默认9
|
||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||
sourceType: ['camera','album'], //从相册选择
|
||
success: function(res) {
|
||
console.log(res);
|
||
let requestHeader = {};
|
||
requestHeader.Authorization = "Bearer " + token;
|
||
uni.showLoading({
|
||
mask:true,
|
||
title:'上传中……'
|
||
})
|
||
uni.uploadFile({
|
||
url: requestUrl,
|
||
filePath: res.tempFilePaths[0],
|
||
name: 'file',
|
||
formData: {
|
||
// 'action': 'Upload',
|
||
'FINTERID': finterID,
|
||
},
|
||
header: requestHeader,
|
||
success: (uploadFileRes) => {
|
||
uni.hideLoading();
|
||
if (uploadFileRes) {
|
||
let response = JSON.parse(uploadFileRes.data);
|
||
let arr = {FileUrl: response.Data}
|
||
that.checkFile.push(arr);
|
||
console.log(that.checkFile);
|
||
uni.showToast({
|
||
title:'上传成功'
|
||
})
|
||
}
|
||
},
|
||
fail:(e)=>{
|
||
uni.hideLoading();
|
||
uni.showToast({
|
||
title:'上传失败',
|
||
icon:'error'
|
||
})
|
||
}
|
||
})
|
||
}
|
||
});
|
||
|
||
},
|
||
|
||
checkItemSelectClick(index){
|
||
this.currCheckItemSelectIndex = index;
|
||
},
|
||
hideGrayLayer(){
|
||
this.showGrayLayer = false;
|
||
this.showAlter = false;
|
||
},
|
||
addItem(){
|
||
this.showGrayLayer = true;
|
||
this.showAlter = true;
|
||
let finterID;
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
finterID = uni.getStorageSync('inStockQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
finterID = uni.getStorageSync('IQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
finterID = uni.getStorageSync('OQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
finterID = uni.getStorageSync('overDueQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_RETREATQC'){
|
||
finterID = uni.getStorageSync('RETREATQCID');
|
||
}
|
||
this.getAddItemList(finterID);
|
||
},
|
||
alterCancelClick(){
|
||
let _self = this;
|
||
this.showGrayLayer = false;
|
||
this.showAlter = false;
|
||
},
|
||
alterConfirmClick(){
|
||
let _self = this;
|
||
if(!this.$refs.checkItemAddList){
|
||
uni.showToast({
|
||
title:'选择检验项目',
|
||
icon:'none'
|
||
})
|
||
return false
|
||
}
|
||
if(!this.$refs.checkItemAddList.selectText){
|
||
uni.showToast({
|
||
title:'选择检验项目',
|
||
icon:'none'
|
||
})
|
||
return false
|
||
}
|
||
this.showGrayLayer = false;
|
||
this.showAlter = false;
|
||
if(this.alterCheckQty){
|
||
this.addItemObj.add.FSAMPLEQTY = this.alterCheckQty;
|
||
}
|
||
if(this.alterCheckTimes){
|
||
this.addItemObj.add.FQCCOUNT = this.alterCheckTimes;
|
||
}
|
||
if(this.alterAC){
|
||
this.addItemObj.add.FAC = this.alterAC;
|
||
}
|
||
if(this.alterRE){
|
||
this.addItemObj.add.FRE = this.alterRE;
|
||
}
|
||
this.checkItemList.push(this.addItemObj.add);
|
||
let length = this.checkItemList.length;
|
||
this.checkItemList.forEach(function(el,index){
|
||
if((index+1) == length){
|
||
el.checkLevelsList = _self.checkLevelsList;
|
||
_self.checkToolUnit = el.FTOOLUNITNAME;
|
||
_self.FTOOLUNITID = el.FTOOLUNITID;
|
||
// _self.FUNITID = el.FUNITID;
|
||
if(el.FQCRESULT==1){
|
||
el.itemCheckFail = false;
|
||
el.itemCheckPass = false;
|
||
}
|
||
else if(el.FQCRESULT==2){
|
||
el.itemCheckFail = false;
|
||
el.itemCheckPass = true;
|
||
}
|
||
else if(el.FQCRESULT==3){
|
||
el.itemCheckFail = true;
|
||
el.itemCheckPass = false;
|
||
}
|
||
if(el.ToolList.length>0){
|
||
el.ToolList.forEach(e => {
|
||
e.value = e.FNAME;
|
||
});
|
||
}
|
||
|
||
if (el.FQCMETHOD==2) {
|
||
let testValueLength = parseInt(el.FQCCOUNT) * parseInt(el.FSAMPLEQTY);
|
||
if (el.testValue.length>0) {
|
||
el.testValue.forEach(e => {
|
||
if(e.FQCRESULT==2){
|
||
e.resultShow = '合格'
|
||
}else if(e.FQCRESULT==3){
|
||
e.resultShow = '不合格'
|
||
}
|
||
});
|
||
}
|
||
else {
|
||
if (testValueLength>0) {
|
||
for (var i=0; i<testValueLength; i++) {
|
||
let arr = {
|
||
"FQCSEQ": i+1,
|
||
"FBARCODE": "",
|
||
"FQCVALUE": "",
|
||
"FQCRESULT": "3" ,
|
||
"resultShow":"不合格"
|
||
}
|
||
el.testValue.push(arr);
|
||
}
|
||
}
|
||
else {
|
||
el.testValue = [];
|
||
}
|
||
}
|
||
}
|
||
|
||
_self.currIndex = index;
|
||
|
||
if(el.FQCLEV==8||el.FQCLEV==9){
|
||
_self.checkItemList[_self.currIndex].disFAQL = true;
|
||
_self.checkItemList[_self.currIndex].disACRE = false;
|
||
}
|
||
else {
|
||
_self.checkItemList[_self.currIndex].disFAQL = false;
|
||
_self.checkItemList[_self.currIndex].disACRE = true;
|
||
|
||
// 重新获取AQLlist
|
||
_self.getAQLList(el.FQCLEV);
|
||
}
|
||
if (el.FQCLEV==8){
|
||
_self.checkItemList[_self.currIndex].disFSAMPLEQTY = false;
|
||
}
|
||
else {
|
||
_self.checkItemList[_self.currIndex].disFSAMPLEQTY = true;
|
||
}
|
||
if (el.FQCLEV==9){
|
||
_self.checkItemList[_self.currIndex].FSAMPLEQTY = _self.inspectionItemDetailInfo[0].FMQTY;
|
||
}
|
||
_self.keys = _self.keys + 1;
|
||
}
|
||
})
|
||
|
||
let obj = {};
|
||
this.checkItemList = this.checkItemList.reduce((cur,next) => {
|
||
obj[next.FQCITEMID] ? "" : obj[next.FQCITEMID] = true && cur.push(next);
|
||
return cur;
|
||
},[]);
|
||
|
||
_self.keys = _self.keys + 1;
|
||
},
|
||
getBarcode(barcode, callback){
|
||
let orgID = uni.getStorageSync('orgID');
|
||
let requestParams = {
|
||
"barcode": barcode,
|
||
"orgID": orgID
|
||
};
|
||
|
||
this.$request.get('/Barcode/GetBarcodeMsg',{params:requestParams}).then(res => {
|
||
if (res.FBARCODE) {
|
||
if (callback) {
|
||
callback(res.FBARCODE);
|
||
}
|
||
}
|
||
else {
|
||
|
||
this.dialogNoticeProps('条码:' + barcode + '系统解析失败','error')
|
||
}
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
checkItemAddListChange({newVal,oldVal,index,orignItem}){
|
||
this.alterCheckQty = orignItem.FSAMPLEQTY;
|
||
this.alterCheckTimes = orignItem.FQCCOUNT;
|
||
this.alterAC = orignItem.FAC;
|
||
this.alterRE = orignItem.FRE;
|
||
if(parseInt(orignItem.FQCLEV)>=0 &&
|
||
parseInt(orignItem.FQCLEV)<=7){
|
||
this.alterDisableQty = true;
|
||
this.alterDisableTimes = false;
|
||
this.alterDisableACRE = true;
|
||
|
||
}
|
||
if(parseInt(orignItem.FQCLEV)==8){
|
||
this.alterDisableQty = false;
|
||
this.alterDisableTimes = false;
|
||
this.alterDisableACRE = false;
|
||
}
|
||
if(parseInt(orignItem.FQCLEV)==9){
|
||
this.alterDisableQty = true;
|
||
this.alterDisableTimes = false;
|
||
this.alterDisableACRE = false;
|
||
this.alterCheckQty = this.inspectionItemDetailInfo[0].FMQTY
|
||
}
|
||
this.addItemObj.add = orignItem;
|
||
},
|
||
checkAlterCheckQty(){
|
||
if(parseInt(this.alterCheckQty)>parseInt(this.inspectionItemDetailInfo[0].FMQTY)){
|
||
uni.showToast({
|
||
title:'抽样数量不能大于送检数量',
|
||
icon:'none'
|
||
})
|
||
this.alterCheckQty = '';
|
||
}
|
||
},
|
||
getAddItemList(finterID){
|
||
let _self = this;
|
||
let orgID = uni.getStorageSync('orgID');
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
mask: true
|
||
})
|
||
let requestParams = {
|
||
"FMQTY": this.inspectionItemDetailInfo[0].FMQTY,
|
||
"orgID":orgID,
|
||
"FINTERID":finterID
|
||
};
|
||
this.$request.get('/STKAPPINSPECT/GetTestItems', {
|
||
params: requestParams
|
||
}).then(res => {
|
||
uni.hideLoading();
|
||
if(!res || res.length == 0){
|
||
uni.showToast({
|
||
title:'无检验项目',
|
||
icon:'none'
|
||
})
|
||
return false
|
||
}
|
||
res.forEach(e => {
|
||
e.value = e.FQCITEMNAME;
|
||
});
|
||
this.checkItemAddList = res;
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
getAQLList(Type){
|
||
let _self = this;
|
||
let orgID = uni.getStorageSync('orgID');
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
mask: true
|
||
});
|
||
let requestParams = {
|
||
"fType": Type
|
||
};
|
||
this.$request.get('/STKAPPINSPECT/GetAQL', {
|
||
params: requestParams
|
||
}).then(res => {
|
||
uni.hideLoading();
|
||
let arrList = [];
|
||
if(res.length==0 || !res){
|
||
uni.showToast({
|
||
title:'当前水平无AQL',
|
||
icon:'none'
|
||
})
|
||
_self.checkItemList[_self.currIndex].FAQL = '';
|
||
_self.keys = _self.keys + 1;
|
||
return false
|
||
}
|
||
res.forEach(e => {
|
||
let arr = {value:e};
|
||
arrList.push(arr)
|
||
})
|
||
if(_self.checkItemList.length == _self.currIndex){
|
||
uni.showToast({
|
||
title:'当前新增检验项目已存在,无需重复添加',
|
||
icon:'none'
|
||
})
|
||
return false
|
||
}
|
||
_self.checkItemList[_self.currIndex].AQLlist = arrList;
|
||
_self.checkItemList[_self.currIndex].AQLlist[0].value?_self.checkItemList[_self.currIndex].AQLlist[0].value:'';
|
||
|
||
let FAQL = _self.checkItemList[_self.currIndex].FAQL;
|
||
let FMQTY = _self.inspectionItemDetailInfo[0].FMQTY;
|
||
_self.getACRE(Type,FAQL,FMQTY);
|
||
|
||
_self.keys = _self.keys + 1;
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
getACRE(Type,FAQL,FMQTY){
|
||
let _self = this;
|
||
let orgID = uni.getStorageSync('orgID');
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
mask: true
|
||
})
|
||
let requestParams = {
|
||
"FQCLEV": Type,
|
||
"FAQL": FAQL,
|
||
"FMQTY": FMQTY
|
||
};
|
||
this.$request.get('/STKAPPINSPECT/GetACRE', {
|
||
params: requestParams
|
||
}).then(res => {
|
||
uni.hideLoading();
|
||
let curItem = _self.checkItemList[_self.currIndex];
|
||
curItem.FSAMPLEQTY = res.FSAMPLEQTY;
|
||
curItem.FAC = res.FAC;
|
||
curItem.FRE = res.FRE;
|
||
if(curItem.FQCMETHOD == 2){
|
||
let testValueLength = parseInt(curItem.FQCCOUNT) * parseInt(curItem.FSAMPLEQTY);
|
||
curItem.testValue = [];
|
||
for (var i=0; i<testValueLength; i++) {
|
||
let arr = {
|
||
"FQCSEQ": i+1,
|
||
"FBARCODE": "",
|
||
"FQCVALUE": "",
|
||
"FQCRESULT": "3" ,
|
||
"resultShow":"不合格"
|
||
}
|
||
curItem.testValue.push(arr)
|
||
}
|
||
}
|
||
|
||
_self.keys = _self.keys + 1;
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
|
||
backClick(){
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
uni.redirectTo({
|
||
url:'../../views/BD_INSTOCKQC/BD_INSTOCKQC',
|
||
fail: (res) => {console.log(res)}
|
||
})
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
uni.redirectTo({
|
||
url:'../../views/BD_IQC/BD_IQC',
|
||
fail: (res) => {console.log(res)}
|
||
})
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
uni.redirectTo({
|
||
url:'../../views/BD_OQC/BD_OQC',
|
||
fail: (res) => {console.log(res)}
|
||
})
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
uni.redirectTo({
|
||
url:'../../views/BD_OVERDUEQC/BD_OVERDUEQC',
|
||
fail: (res) => {console.log(res)}
|
||
})
|
||
}
|
||
},
|
||
passClick(el,index){
|
||
el.itemCheckPass = !el.itemCheckPass;
|
||
if(el.itemCheckPass){
|
||
el.itemCheckPass = true;
|
||
el.itemCheckFail = false;
|
||
}else{
|
||
el.itemCheckPass = false;
|
||
el.itemCheckFail = true;
|
||
}
|
||
this.keys++
|
||
},
|
||
failClick(el,index){
|
||
el.itemCheckFail = !el.itemCheckFail
|
||
if(el.itemCheckFail){
|
||
el.itemCheckPass = false;
|
||
el.itemCheckFail = true;
|
||
}else{
|
||
el.itemCheckPass = true;
|
||
el.itemCheckFail = false;
|
||
}
|
||
this.keys++
|
||
},
|
||
uploadFile(){
|
||
let finterID;
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
finterID = uni.getStorageSync('inStockQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
finterID = uni.getStorageSync('IQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
finterID = uni.getStorageSync('OQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
finterID = uni.getStorageSync('overDueQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_RETREATQC'){
|
||
finterID = uni.getStorageSync('RETREATQCID');
|
||
}
|
||
let requestParams = {
|
||
file:this.fileData,
|
||
FINTERID:finterID
|
||
}
|
||
this.$request.post('/STKAPPINSPECT/UploadTestFile',requestParams).then(res => {
|
||
uni.showToast({
|
||
title:'success'
|
||
})
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
tabChange(tabType) {
|
||
this.tabType = tabType;
|
||
console.log(this.tabType)
|
||
},
|
||
getInspectionItems(finterID) {
|
||
let _self = this;
|
||
let orgID = uni.getStorageSync('orgID');
|
||
this.FINTERID = finterID;
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
mask: true
|
||
})
|
||
let requestParams = {
|
||
"finterID": finterID,
|
||
"orgID":orgID
|
||
};
|
||
this.$request.get('/STKAPPINSPECT/InspectionItems', {
|
||
params: requestParams
|
||
}).then(res => {
|
||
uni.hideLoading();
|
||
_self.inspectionItemDetailInfo = res;
|
||
_self.FISMODIFY = res[0].FISMODIFY;
|
||
_self.checkItemList = res[0].Body1;
|
||
_self.proStandardFile = res[0].Body2;
|
||
_self.checkFile = res[0].Body4;
|
||
_self.checkFileVersionList = res[0].EDITIONLIST;
|
||
_self.checkFileVersionList.forEach(e => {
|
||
e.value = e.FNAME
|
||
})
|
||
_self.drawVersionList = res[0].EDITIONLIST;
|
||
_self.drawVersionList.forEach(e => {
|
||
e.value = e.FNAME
|
||
})
|
||
_self.FFILENO = res[0].FFILENO;
|
||
_self.FDRAWNO = res[0].FDRAWNO;
|
||
_self.defaultCheckFileVersion = res[0].FFILEAUXPROPNAME;
|
||
_self.defaultDrawVersion = res[0].FDRAWAUXPROPNAME;
|
||
if (res[0].Body2.length > 0) {
|
||
res[0].Body2.forEach(e => {
|
||
_self.imgFile.push(e.FileUrl)
|
||
});
|
||
}
|
||
|
||
if (res[0].Body3.length > 0) {
|
||
_self.snList = res[0].Body3;
|
||
}
|
||
|
||
if (res[0].Body4.length > 0) {
|
||
res[0].Body4.forEach(e => {
|
||
_self.ckeckFileUrl.push(e.FileUrl)
|
||
});
|
||
}
|
||
_self.checkItemList.forEach(function(el,index){
|
||
_self.checkToolUnit = el.FTOOLUNITNAME;
|
||
_self.FTOOLUNITID = el.FTOOLUNITID;
|
||
if(el.FQCRESULT==1){
|
||
el.itemCheckFail = false;
|
||
el.itemCheckPass = false;
|
||
}else if(el.FQCRESULT==2){
|
||
el.itemCheckFail = false;
|
||
el.itemCheckPass = true;
|
||
}else if(el.FQCRESULT==3){
|
||
el.itemCheckFail = true;
|
||
el.itemCheckPass = false;
|
||
}
|
||
|
||
el.checkLevelsList = _self.checkLevelsList;
|
||
if(el.FQCLEV != 8 || el.FQCLEV != 9){//AQL禁用状态:8,9禁用
|
||
el.disFAQL = false;
|
||
}else{
|
||
el.disFAQL = true;
|
||
}
|
||
if(el.FQCLEV == 8){//抽样数量禁用状态:8不禁用
|
||
el.disFSAMPLEQTY = false;
|
||
}else{
|
||
el.disFSAMPLEQTY = true;
|
||
}
|
||
if(el.FQCLEV == 8 || el.FQCLEV == 9){//ACRE禁用状态:8,9不禁用
|
||
el.disACRE = false;
|
||
}else{
|
||
el.disACRE = true;
|
||
}
|
||
if(el.ToolList.length>0){
|
||
el.ToolList.forEach(e => {
|
||
e.value = e.FNAME;
|
||
})
|
||
}
|
||
if(el.AQLlist.length>0){
|
||
let arrList = [];
|
||
el.AQLlist.forEach((e,index) => {
|
||
let arr = {value:e}
|
||
arrList.push(arr)
|
||
})
|
||
el.AQLlist = arrList;
|
||
}
|
||
if(el.FQCMETHOD==2){
|
||
let testValueLength = parseInt(el.FQCCOUNT) * parseInt(el.FSAMPLEQTY);
|
||
if(el.testValue.length>0){
|
||
el.testValue.forEach(e => {
|
||
if(e.FQCRESULT==2){
|
||
e.resultShow = '合格'
|
||
}else if(e.FQCRESULT==3){
|
||
e.resultShow = '不合格'
|
||
}
|
||
})
|
||
}else{
|
||
for (var i=0; i<testValueLength; i++) {
|
||
let arr = {
|
||
"FQCSEQ": i+1,
|
||
"FBARCODE": "",
|
||
"FQCVALUE": "",
|
||
"FQCRESULT": "3" ,
|
||
"resultShow":"不合格"
|
||
}
|
||
el.testValue.push(arr)
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
this.getAddItemList(finterID);
|
||
_self.keys = _self.keys + 1;
|
||
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
|
||
checkBarConfirm(item, index, testValue, indexTestValue) {
|
||
let currBarIndex = indexTestValue;
|
||
let currBar = testValue.FBARCODE;
|
||
let _self = this;
|
||
|
||
let orgID = uni.getStorageSync('orgID');
|
||
let requestParams = {
|
||
"FBARCODE": currBar,
|
||
"orgID": orgID,
|
||
"FINTERID": this.FINTERID
|
||
};
|
||
this.$request.get('/STKAPPINSPECT/TestBarcode',{params:requestParams}).then(res => {
|
||
|
||
this.getBarcode(currBar,
|
||
function(barcode){
|
||
item.testValue.forEach((e, indexE) => {
|
||
if (indexE > currBarIndex) {
|
||
e.FBARCODE = currBar
|
||
}
|
||
});
|
||
}
|
||
);
|
||
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
testValue.FBARCODE = '';
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
|
||
|
||
},
|
||
checkBarScan(item, index, testValue, indexTestValue) {
|
||
let _self = this;
|
||
let currBarIndex = indexTestValue;
|
||
uni.scanCode({
|
||
success: function(res) {
|
||
testValue.FBARCODE = res.result;
|
||
item.testValue.forEach((e, indexE) => {
|
||
if (indexE > currBarIndex) {
|
||
e.FBARCODE = testValue.FBARCODE
|
||
}
|
||
})
|
||
}
|
||
})
|
||
},
|
||
changeValueResult(item,index,testValue,indexTestValue){
|
||
if (testValue.resultShow == '合格') {
|
||
testValue.resultShow = '不合格';
|
||
testValue.FQCRESULT = 3;
|
||
}
|
||
else if(testValue.resultShow == '不合格') {
|
||
testValue.resultShow = '合格';
|
||
testValue.FQCRESULT = 2;
|
||
}
|
||
|
||
let RE = item.FRE;
|
||
let passList = item.testValue.filter(e => {
|
||
return e.FQCRESULT == 3
|
||
})
|
||
|
||
if (passList.length >= RE) {
|
||
item.itemCheckPass = false;
|
||
item.itemCheckFail = true;
|
||
} else {
|
||
item.itemCheckPass = true;
|
||
item.itemCheckFail = false;
|
||
}
|
||
this.keys++
|
||
},
|
||
testValueInput(item, index, testValue, indexTestValue) {
|
||
//debugger
|
||
let _self = this;
|
||
let currTestValue = testValue.FQCVALUE;
|
||
let standardValue = item.FQCSTD;
|
||
let RE = item.FRE;
|
||
if (!currTestValue) {
|
||
return false
|
||
}
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
mask: true
|
||
})
|
||
let requestParams = {
|
||
"FQCSTD": standardValue,
|
||
"TestValue": currTestValue,
|
||
"FUNITID":item.FUNITID,
|
||
"FTOOLUNITID":item.FTOOLUNITID,
|
||
"FINTERID":this.FINTERID
|
||
};
|
||
this.$request.get('/STKAPPINSPECT/ValueIsQualified', {
|
||
params: requestParams
|
||
}).then(res => {
|
||
uni.hideLoading();
|
||
let result = res;
|
||
//debugger
|
||
if (result) {
|
||
testValue.FQCRESULT = 2;
|
||
testValue.resultShow = '合格'
|
||
}
|
||
else {
|
||
testValue.FQCRESULT = 3;
|
||
testValue.resultShow = '不合格'
|
||
}
|
||
let passList = item.testValue.filter(e => {
|
||
return e.FQCRESULT == 3
|
||
})
|
||
|
||
if (passList.length >= RE) {
|
||
item.itemCheckPass = false;
|
||
item.itemCheckFail = true;
|
||
}
|
||
else {
|
||
item.itemCheckPass = true;
|
||
item.itemCheckFail = false;
|
||
}
|
||
this.keys++;
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
|
||
delItem(item, index) {
|
||
let _self = this;
|
||
item.index = index;
|
||
this.dialogProps('删除检验项','delCkeckItem',item)
|
||
},
|
||
|
||
checkBarcodeConfirm() {
|
||
let _self = this;
|
||
let isExit = this.brokenBarList.some(e => {
|
||
return e.FBARCODE == _self.checkBarcode
|
||
});
|
||
if(isExit){
|
||
uni.showToast({
|
||
title:'当前条码'+ _self.checkBarcode +'已经存在',
|
||
icon:'none'
|
||
});
|
||
return false;
|
||
}
|
||
let FINTERID;
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
FINTERID = uni.getStorageSync('inStockQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
FINTERID = uni.getStorageSync('IQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
FINTERID = uni.getStorageSync('OQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
FINTERID = uni.getStorageSync('overDueQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_RETREATQC'){
|
||
FINTERID = uni.getStorageSync('RETREATQCID');
|
||
}
|
||
let orgID = uni.getStorageSync('orgID');
|
||
let requestParams = {
|
||
"FINTERID":FINTERID,
|
||
"FBARCODE":this.checkBarcode,
|
||
"orgID":orgID
|
||
}
|
||
this.$request.get('/STKAPPINSPECT/TestBarcode', {
|
||
params: requestParams
|
||
}).then(res => {
|
||
uni.showToast({
|
||
title: '成功',
|
||
icon: 'success',
|
||
duration: 3000,
|
||
});
|
||
|
||
let _self = this;
|
||
this.getBarcode(this.checkBarcode,
|
||
function(barcode){
|
||
let arr = {
|
||
"FBARCODE": barcode,
|
||
"FSCRAPQTY": 0,
|
||
"FBADQTY": 0
|
||
}
|
||
_self.brokenBarList.push(arr);
|
||
_self.checkBarcode = '';
|
||
}
|
||
);
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.checkBarcode='';
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
checkBarcodeScan() {
|
||
let _self = this;
|
||
uni.scanCode({
|
||
success: function(res) {
|
||
_self.checkBarcode = res.result;
|
||
_self.checkBarcodeConfirm()
|
||
}
|
||
});
|
||
},
|
||
delbrokenBarItem(item, index) {
|
||
let _self = this;
|
||
item.index = index;
|
||
this.dialogProps('删除破坏条码','delBrokenBar',item)
|
||
},
|
||
checkLevelsChange({newVal,oldVal,index,orignItem}) {
|
||
let _self = this;
|
||
this.checkItemList[this.currIndex].FQCLEV = orignItem.FQCLEV;
|
||
if(orignItem.FQCLEV==8||orignItem.FQCLEV==9){
|
||
this.checkItemList[this.currIndex].disFAQL = true;
|
||
this.checkItemList[this.currIndex].disACRE = false;
|
||
}
|
||
else {
|
||
this.checkItemList[this.currIndex].disFAQL = false;
|
||
this.checkItemList[this.currIndex].disACRE = true;
|
||
|
||
// 重新获取AQLlist
|
||
this.getAQLList(orignItem.FQCLEV)
|
||
}
|
||
|
||
if (orignItem.FQCLEV==8) {
|
||
this.checkItemList[this.currIndex].disFSAMPLEQTY = false;
|
||
}
|
||
else {
|
||
this.checkItemList[this.currIndex].disFSAMPLEQTY = true;
|
||
}
|
||
|
||
if (orignItem.FQCLEV==9) {
|
||
this.checkItemList[this.currIndex].FSAMPLEQTY = this.inspectionItemDetailInfo[0].FMQTY;
|
||
}
|
||
|
||
this.keys = this.keys + 1;
|
||
},
|
||
checkFileVersionListChange({newVal,oldVal,index,orignItem}) {
|
||
let _self = this;
|
||
_self.inspectionItemDetailInfo[0].FFILEAUXPROPID = orignItem.FINTERID
|
||
this.keys = this.keys + 1;
|
||
},
|
||
drawVersionListChange({newVal,oldVal,index,orignItem}) {
|
||
let _self = this;
|
||
_self.inspectionItemDetailInfo[0].FDRAWAUXPROPID = orignItem.FINTERID
|
||
this.keys = this.keys + 1;
|
||
},
|
||
|
||
AQLChange({newVal,oldVal,index,orignItem}) {
|
||
this.checkItemList[this.currIndex].FAQL = orignItem.value;
|
||
let FAQL = orignItem.value;
|
||
let FMQTY = this.inspectionItemDetailInfo[0].FMQTY;
|
||
let Type = this.checkItemList[this.currIndex].FQCLEV;
|
||
this.getACRE(Type,FAQL,FMQTY)
|
||
},
|
||
|
||
checkBillTypeChange({newVal,oldVal,index,orignItem}) {
|
||
let _self = this;
|
||
this.checkItemList[this.currIndex].FTOOLID = orignItem.FINTERID;
|
||
this.checkItemList[this.currIndex].FTOOLUNITID = orignItem.FTOOLUNITID;
|
||
this.FUNITID = orignItem.FUNITID;
|
||
this.FTOOLUNITID = orignItem.FTOOLUNITID;
|
||
this.checkToolUnit = orignItem.FTOOLUNITNAME;
|
||
this.checkItemList[this.currIndex].testValue.forEach(e => {
|
||
e.FQCRESULT = 3;
|
||
e.resultShow = '不合格';
|
||
e.FQCVALUE = '';
|
||
});
|
||
},
|
||
|
||
checkQtyConfirm(item){
|
||
let _self = this;
|
||
let curItem = _self.checkItemList[_self.currIndex];
|
||
if(curItem.FQCMETHOD == 2){
|
||
let testValueLength = parseInt(curItem.FQCCOUNT) * parseInt(curItem.FSAMPLEQTY);
|
||
curItem.testValue = [];
|
||
for (var i=0; i<testValueLength; i++) {
|
||
let arr = {
|
||
"FQCSEQ": i+1,
|
||
"FBARCODE": "",
|
||
"FQCVALUE": "",
|
||
"FQCRESULT": "3" ,
|
||
"resultShow":"不合格"
|
||
}
|
||
curItem.testValue.push(arr);
|
||
}
|
||
}
|
||
|
||
_self.keys = _self.keys + 1;
|
||
},
|
||
testTimesConfirm(item){
|
||
let _self = this;
|
||
let curItem = _self.checkItemList[_self.currIndex];
|
||
if(curItem.FQCMETHOD == 2){
|
||
let testValueLength = parseInt(curItem.FQCCOUNT) * parseInt(curItem.FSAMPLEQTY);
|
||
curItem.testValue = [];
|
||
for (var i=0; i<testValueLength; i++) {
|
||
let arr = {
|
||
"FQCSEQ": i+1,
|
||
"FBARCODE": "",
|
||
"FQCVALUE": "",
|
||
"FQCRESULT": "3" ,
|
||
"resultShow":"不合格"
|
||
}
|
||
curItem.testValue.push(arr)
|
||
}
|
||
}
|
||
|
||
_self.keys = _self.keys + 1;
|
||
},
|
||
ACConfirm(item){
|
||
let _self = this;
|
||
let curItem = _self.checkItemList[_self.currIndex];
|
||
let AC = parseFloat(curItem.FAC);
|
||
let RE = parseFloat(curItem.FRE);
|
||
if(RE-AC != 1){
|
||
uni.showToast({
|
||
title:'RE-AC差值需为1',
|
||
icon:'none'
|
||
});
|
||
|
||
curItem.FAC = '';
|
||
return false;
|
||
}
|
||
},
|
||
REConfirm(item){
|
||
let _self = this;
|
||
let curItem = _self.checkItemList[_self.currIndex];
|
||
let AC = parseFloat(curItem.FAC);
|
||
let RE = parseFloat(curItem.FRE);
|
||
if(RE-AC != 1){
|
||
uni.showToast({
|
||
title:'RE-AC差值需为1',
|
||
icon:'none'
|
||
});
|
||
|
||
curItem.FRE = '';
|
||
return false;
|
||
}
|
||
},
|
||
submit(type) {
|
||
let _self = this;
|
||
let FINTERID;
|
||
let FSTATUS;
|
||
|
||
if (!this.FISMODIFY) {
|
||
if (type=='submit') {
|
||
uni.showToast({
|
||
title:'已提交过该检验单',
|
||
icon:'none'
|
||
});
|
||
}
|
||
if (type=='temp') {
|
||
uni.showToast({
|
||
title:'已暂存过该检验单',
|
||
icon:'none'
|
||
});
|
||
}
|
||
return false;
|
||
}
|
||
|
||
if(this.currentTranType=='BD_INSTOCKQC'){
|
||
FINTERID = uni.getStorageSync('inStockQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_IQC'){
|
||
FINTERID = uni.getStorageSync('IQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OQC'){
|
||
FINTERID = uni.getStorageSync('OQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_OVERDUEQC'){
|
||
FINTERID = uni.getStorageSync('overDueQCBillID');
|
||
}
|
||
if(this.currentTranType=='BD_RETREATQC'){
|
||
FINTERID = uni.getStorageSync('RETREATQCID');
|
||
}
|
||
this.checkItemList.forEach(el => {
|
||
if(!el.itemCheckFail && !el.itemCheckPass){
|
||
el.FQCRESULT = 1;
|
||
}
|
||
else if(el.itemCheckFail) {
|
||
el.FQCRESULT = 3
|
||
}
|
||
else if(el.itemCheckPass) {
|
||
el.FQCRESULT = 2
|
||
}
|
||
});
|
||
|
||
if (type == 'temp') {
|
||
FSTATUS = 10;
|
||
}
|
||
else if(type == 'submit') {
|
||
FSTATUS = 20;
|
||
let unCheckItems = this.checkItemList.filter(f => f.FQCRESULT == 1).map(m => m.FQCITEMNAME).join(',');
|
||
if (unCheckItems) return this.dialogNoticeProps(unCheckItems+'没有检验结果不可提交','error')
|
||
}
|
||
let orgID = uni.getStorageSync('orgID');
|
||
this.checkItemList.forEach(
|
||
function(item){
|
||
if (!item.FNOTE) {
|
||
item.FNOTE = '';
|
||
}
|
||
}
|
||
);
|
||
|
||
let requestParams = {
|
||
deletedItem: this.deletedItem,
|
||
FINTERID: FINTERID,
|
||
FSTATUS:FSTATUS,
|
||
repair: this.checkItemList,
|
||
scarpNum: this.brokenBarList,
|
||
orgID:orgID,
|
||
FFILENO:this.FFILENO,
|
||
FFILEAUXPROPID:this.inspectionItemDetailInfo[0].FFILEAUXPROPID,
|
||
FDRAWNO:this.FDRAWNO,
|
||
FDRAWAUXPROPID:this.inspectionItemDetailInfo[0].FDRAWAUXPROPID
|
||
};
|
||
|
||
uni.showLoading({
|
||
title:'正在上传数据中...',
|
||
mask:true,
|
||
});
|
||
|
||
this.$request.post('/STKAPPINSPECT/InspectionItemsSubmit', requestParams).then(res => {
|
||
uni.hideLoading();
|
||
if(type=='submit'){
|
||
this.dialogNoticeProps('提交成功!','success')
|
||
}
|
||
if(type=='temp'){
|
||
this.dialogNoticeProps('暂存成功!','success')
|
||
}
|
||
this.brokenBarList = [];
|
||
this.getInspectionItems(FINTERID);
|
||
}).catch(err => {
|
||
uni.hideLoading();
|
||
this.dialogNoticeProps(err,'error')
|
||
});
|
||
},
|
||
|
||
prewViewCheckFile(item, index) {
|
||
let _self = this;
|
||
let pdfUrl = item.FileUrl;
|
||
if (pdfUrl.includes('.png')||pdfUrl.includes('.jpg')) {
|
||
uni.previewImage({
|
||
urls: [item.FileUrl],
|
||
count: item.FileUrl,
|
||
current: index
|
||
});
|
||
|
||
uni.downloadFile({
|
||
url: pdfUrl,
|
||
success: (res) => {
|
||
if(res.statusCode==200){
|
||
let tempFilePaths = res.tempFilePath;
|
||
uni.saveFile({
|
||
tempFilePath: tempFilePaths,
|
||
success: (res) => {
|
||
res.savedFilePath;
|
||
console.log('savedFilePath:++++++++++++'+res.savedFilePath)
|
||
},
|
||
fail:()=>console.log('下载失败s')
|
||
})
|
||
}
|
||
|
||
},
|
||
fail:()=>console.log('下载失败d')
|
||
});
|
||
}
|
||
else {
|
||
uni.downloadFile({
|
||
url: pdfUrl,
|
||
success: function(res) {
|
||
var filePath = res.tempFilePath;
|
||
if (!filePath) return
|
||
uni.openDocument({
|
||
filePath: filePath,
|
||
success: function(res) {
|
||
console.log('打开文档成功');
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
},
|
||
|
||
showPdf(item, index) {
|
||
let _self = this;
|
||
let pdfUrl = item.FileUrl;
|
||
if (pdfUrl.includes('.png')||pdfUrl.includes('.jpg')) {
|
||
uni.previewImage({
|
||
urls: this.imgFile,
|
||
count: item.FileUrl,
|
||
current: index
|
||
});
|
||
}
|
||
else {
|
||
uni.downloadFile({
|
||
url: pdfUrl,
|
||
success: function(res) {
|
||
var filePath = res.tempFilePath;
|
||
if (!filePath) return
|
||
uni.openDocument({
|
||
filePath: filePath,
|
||
success: function(res) {
|
||
console.log('打开文档成功');
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
},
|
||
|
||
touchS($event, index, type) {
|
||
// startX记录开始移动的位置
|
||
if (type == 'brokenBarList') {
|
||
this.currBrokenBarIndex = index;
|
||
if ($event.touches.length === 1) {
|
||
this.startXBrokenBar = $event.touches[0].clientX;
|
||
}
|
||
// hiddenFlag为true则是从右向左,为false则是从左向右
|
||
if (this.leftStyleBrokenBar === 0) {
|
||
this.hiddenFlagBrokenBar = true;
|
||
}
|
||
else {
|
||
this.hiddenFlagBrokenBar = false;
|
||
}
|
||
}
|
||
if (type == 'checkItemList') {
|
||
this.currIndex = index;
|
||
if ($event.touches.length === 1) {
|
||
this.startX = $event.touches[0].clientX;
|
||
}
|
||
// hiddenFlag为true则是从右向左,为false则是从左向右
|
||
if (this.leftStyle === 0) {
|
||
this.hiddenFlag = true;
|
||
}
|
||
else {
|
||
this.hiddenFlag = false;
|
||
}
|
||
}
|
||
|
||
// if($event.touches.length === 1) {
|
||
// this.startX = $event.touches[0].clientX;
|
||
// }
|
||
// // hiddenFlag为true则是从右向左,为false则是从左向右
|
||
// if(this.leftStyle === 0) {
|
||
// this.hiddenFlag = true;
|
||
// } else {
|
||
// this.hiddenFlag = false;
|
||
// }
|
||
},
|
||
touchM($event, index, type) {
|
||
if ($event.touches.length === 1) {
|
||
//手指移动时水平方向位置
|
||
const moveX = $event.touches[0].clientX;
|
||
this.moveFunc(moveX, type);
|
||
}
|
||
},
|
||
touchE($event, index, type) {
|
||
const { leftStyle } = this;
|
||
const { delBtnWidth } = this;
|
||
const { leftStyleBrokenBar } = this;
|
||
const { delBtnWidthBrokenBar } = this;
|
||
// 如果停止滑动的距离大于二分之一则直接弹出删除按钮,不然则left为0
|
||
if (type == 'brokenBarList') {
|
||
if (-leftStyleBrokenBar > delBtnWidthBrokenBar / 2) {
|
||
this.leftStyleBrokenBar = -delBtnWidthBrokenBar;
|
||
}
|
||
else {
|
||
this.leftStyleBrokenBar = 0;
|
||
}
|
||
}
|
||
if (type == 'checkItemList') {
|
||
if (-leftStyle > delBtnWidth / 2) {
|
||
this.leftStyle = -delBtnWidth;
|
||
}
|
||
else {
|
||
this.leftStyle = 0;
|
||
}
|
||
}
|
||
},
|
||
moveFunc(moveX, type) {
|
||
// 原始位置向左,leftStyle为小于0;原始位置向右,leftStyle为大于0
|
||
// disX为相对最初位置的左右距离
|
||
// 大于0为向右,小于0为向左
|
||
const disX = moveX - this.startX;
|
||
const delBtnWidth = this.delBtnWidth;
|
||
const disXBrokenBar = moveX - this.startXBrokenBar;
|
||
const delBtnWidthBrokenBar = this.delBtnWidthBrokenBar;
|
||
let offsetNum = 0;
|
||
if (type == 'brokenBarList') {
|
||
if (-disXBrokenBar >= delBtnWidthBrokenBar && this.leftStyleBrokenBar === -delBtnWidthBrokenBar) {
|
||
return;
|
||
}
|
||
console.log(disXBrokenBar, this.hiddenFlagBrokenBar);
|
||
// this.hiddenFlag为true则是从左到右,则应该将container向左移动
|
||
// this.hiddenFlag为false则是从右向左,则应该将container向右移动
|
||
if (this.hiddenFlagBrokenBar) {
|
||
// 此时container为最右边,则应该将container向左移动
|
||
// disX大于0为相对原始位置的向右移动,则直接将offsetNum置为0
|
||
// 否则为向左移动,offsetNum为disX相反的值,判断是否超过设置的最大位置
|
||
if (disXBrokenBar == 0 || disXBrokenBar > 0) {
|
||
offsetNum = 0;
|
||
}
|
||
else {
|
||
offsetNum = disXBrokenBar;
|
||
if (disXBrokenBar <= -delBtnWidthBrokenBar) {
|
||
//控制手指移动距离最大值为删除按钮的宽度
|
||
offsetNum = -delBtnWidthBrokenBar;
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
// 此时container为最左边,应该向右移动
|
||
// disX小于0为相对原始位置的向左移动,则直接将offsetNum置为-this.delBtnWidth
|
||
// 否则为相对原始位置的向右移动,此时应该将最大位置与向右位置的差值为此刻位置,判断是否为大于0
|
||
if (disXBrokenBar < 0) {
|
||
offsetNum = -this.delBtnWidthBrokenBar;
|
||
}
|
||
else {
|
||
offsetNum = -this.delBtnWidthBrokenBar + disXBrokenBar;
|
||
if (offsetNum > 0) {
|
||
offsetNum = 0;
|
||
}
|
||
}
|
||
}
|
||
this.leftStyleBrokenBar = offsetNum;
|
||
}
|
||
if (type == 'checkItemList') {
|
||
if (-disX >= delBtnWidth && this.leftStyle === -delBtnWidth) {
|
||
return;
|
||
}
|
||
console.log(disX, this.hiddenFlag);
|
||
// this.hiddenFlag为true则是从左到右,则应该将container向左移动
|
||
// this.hiddenFlag为false则是从右向左,则应该将container向右移动
|
||
if (this.hiddenFlag) {
|
||
// 此时container为最右边,则应该将container向左移动
|
||
// disX大于0为相对原始位置的向右移动,则直接将offsetNum置为0
|
||
// 否则为向左移动,offsetNum为disX相反的值,判断是否超过设置的最大位置
|
||
if (disX == 0 || disX > 0) {
|
||
offsetNum = 0;
|
||
}
|
||
else {
|
||
offsetNum = disX;
|
||
if (disX <= -delBtnWidth) {
|
||
//控制手指移动距离最大值为删除按钮的宽度
|
||
offsetNum = -delBtnWidth;
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
// 此时container为最左边,应该向右移动
|
||
// disX小于0为相对原始位置的向左移动,则直接将offsetNum置为-this.delBtnWidth
|
||
// 否则为相对原始位置的向右移动,此时应该将最大位置与向右位置的差值为此刻位置,判断是否为大于0
|
||
if (disX < 0) {
|
||
offsetNum = -this.delBtnWidth;
|
||
}
|
||
else {
|
||
offsetNum = -this.delBtnWidth + disX;
|
||
if (offsetNum > 0) {
|
||
offsetNum = 0;
|
||
}
|
||
}
|
||
}
|
||
this.leftStyle = offsetNum;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
<style>
|
||
.gray-layer {position: fixed;left: 0;right: 0;top: 0;bottom: 0;background-color: #333333;opacity: 0.5;}
|
||
.Alter{padding: 20rpx 20rpx;width: 50%;z-index: 99;
|
||
position: fixed;top: 25%;left: 25%;right: 25%;
|
||
background-color: #FFFFFF;
|
||
border: solid 1px #cacaca;border-radius: 10rpx;}
|
||
.Alter-item{display: flex;flex-direction: row;margin-bottom: 20rpx;align-items: center;}
|
||
.Alter-item-input{border: #cacaca solid 1px;height: 64rpx;line-height: 64rpx;border-radius: 10rpx;width: 80px;}
|
||
.Alter-item-input-gray{border: #cacaca solid 1px;height: 64rpx;line-height: 64rpx;border-radius: 10rpx;width: 80px;background: #cacaca;}
|
||
.Alter-item-title{width: 100%;text-align: center;}
|
||
.Alter-item-cancel{width: 50%;text-align: center;color:#cacaca ;border-right: solid #cacaca 1px;}
|
||
.Alter-item-confirm{width: 50%;text-align: center;color:#007AFF ;}
|
||
.check-content {
|
||
overflow-x: hidden;
|
||
}
|
||
.topBar{
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
height: 70px;
|
||
line-height: 70px;
|
||
width: 100%;
|
||
background: #2560C9;
|
||
|
||
font-size: 32.6rpx;
|
||
font-family: PingFangSC-Semibold, PingFang SC;
|
||
font-weight: 600;
|
||
color: #FFFFFF;
|
||
position: fixed;
|
||
z-index: 999;
|
||
}
|
||
.topBar-back-btn{height: 40px;padding-left: 16px;}
|
||
.topBar-btn{position: absolute;bottom: 10px;right: 0px;width: 200px;}
|
||
.topBar-text{text-align: center;flex-grow: 1;}
|
||
.btn-temp{height: 25px;line-height: 25px;text-align: center;font-size: 32rpx;
|
||
background-color: #FAAE12;border-radius: 5px;padding:5px 20px}
|
||
.btn-submit{height: 25px;line-height: 25px;text-align: center;font-size: 32rpx;
|
||
background-color: #09BB07;border-radius: 5px;margin-left: 30px;padding:5px 20px}
|
||
.topBar-img{height: 20px;width: 20px;margin-top: 10px;}
|
||
.detail-tabs-class {
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
height: 80rpx;
|
||
}
|
||
|
||
.detail-tabs-btn-gray-class {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
text-align: center;
|
||
font-size: 28rpx;
|
||
font-family: MicrosoftYaHei;
|
||
color: #4662FF;
|
||
}
|
||
|
||
.detail-tabs-btn-gray-class::after {
|
||
position: absolute;
|
||
content: " ";
|
||
width: 2rem;
|
||
height: 0.12rem;
|
||
background: #4662FF;
|
||
bottom: -0.1rem;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
}
|
||
|
||
.detail-tabs-btn-handle-class {
|
||
width: 100%;
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
text-align: center;
|
||
font-size: 28rpx;
|
||
font-family: MicrosoftYaHei;
|
||
color: #666666;
|
||
}
|
||
|
||
.detail-tabs-btn-total-class {
|
||
width: 100%;
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
text-align: center;
|
||
font-size: 28rpx;
|
||
font-family: MicrosoftYaHei;
|
||
color: #666666;
|
||
}
|
||
|
||
.detail-tabs-btn-base-class {
|
||
width: 100%;
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
text-align: center;
|
||
font-size: 28rpx;
|
||
font-family: MicrosoftYaHei;
|
||
color: #666666;
|
||
}
|
||
|
||
.search {
|
||
padding: 10rpx 0;
|
||
margin: 0 0;
|
||
}
|
||
|
||
.search-title {
|
||
text-align: start;
|
||
width: 200rpx;
|
||
}
|
||
|
||
.search-img {
|
||
height: 28rpx;
|
||
width: 28rpx;
|
||
margin-top: 20rpx;
|
||
}
|
||
|
||
.list-item-img {
|
||
height: 28rpx;
|
||
width: 28rpx;
|
||
position: absolute;
|
||
right: 10rpx;
|
||
top: 20rpx;
|
||
}
|
||
|
||
.active-input {
|
||
position: relative;
|
||
width: 100%;
|
||
border: #cacaca solid 1px;
|
||
margin-left: 20rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.placeholder-class-input {
|
||
font-size: 30rpx;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: #cacaca;
|
||
}
|
||
|
||
.list {
|
||
border: #cacaca solid 1rpx;
|
||
margin: 0rpx 32rpx 32rpx 32rpx;
|
||
background-color: #FFFFFF;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.list-item {padding: 30rpx 20rpx;}
|
||
|
||
.list-item-detail {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
}
|
||
|
||
.list-item-detail-area {
|
||
display: flex;
|
||
flex-direction: row;
|
||
margin-left: 32rpx;
|
||
width: 50%;
|
||
align-items: center;
|
||
position: relative;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.list-item-detail-area-add {
|
||
display: flex;
|
||
flex-direction: row;
|
||
margin-left: 32rpx;
|
||
width: 100%;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.list-item-detail-area-del {
|
||
display: flex;
|
||
flex-direction: row;
|
||
margin-left: 32rpx;
|
||
width: 100%;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
justify-content: space-between;
|
||
margin-top: 20rpx;
|
||
}
|
||
.list-item-detail-add{
|
||
position: absolute;
|
||
right: 80rpx;
|
||
color: #FFFFFF;
|
||
background-color: #007BFF;
|
||
padding: 10rpx 20rpx;
|
||
border-radius: 10rpx;
|
||
}
|
||
.list-item-detail-title {
|
||
text-align: start;
|
||
width: 190rpx;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.list-item-detail-title-del {
|
||
text-align: start;
|
||
width: 200rpx;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.list-item-detail-describe {
|
||
width: 200rpx;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
margin-left: 20rpx;
|
||
}
|
||
|
||
.list-item-detail-describe input{border: solid 1px #CACACA;
|
||
border-radius: 10rpx;height: 60rpx;line-height: 60rpx;}
|
||
|
||
.list-item-detail-describe-add {
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
border-radius: 50%;
|
||
color: #FFFFFF;
|
||
background-color: #4662FF;
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
line-height: 40rpx;
|
||
margin-right: 32rpx;
|
||
text-align: center;
|
||
}
|
||
|
||
.list-item-detail-describe-del {
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
border-radius: 50%;
|
||
color: #FFFFFF;
|
||
background-color: #F76260;
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
line-height: 40rpx;
|
||
margin-right: 32rpx;
|
||
text-align: center;
|
||
}
|
||
.list-item-detail-input-white{
|
||
border: #cacaca solid 1px;
|
||
border-radius: 10rpx;
|
||
width: 100rpx;
|
||
margin-left: 20rpx;
|
||
height: 34px;
|
||
line-height: 34px;
|
||
background-color: #FFFFFF;
|
||
text-align: center;
|
||
}
|
||
.list-item-detail-input {
|
||
border: #cacaca solid 1px;
|
||
border-radius: 10rpx;
|
||
width: 100rpx;
|
||
margin-left: 20rpx;
|
||
height: 34px;
|
||
line-height: 34px;
|
||
background-color: #f0f0f0;
|
||
text-align: center;
|
||
}
|
||
.list-item-detail-input-green{
|
||
border: #cacaca solid 1px;
|
||
border-radius: 10rpx;
|
||
width: 100rpx;
|
||
margin-left: 20rpx;
|
||
height: 34px;
|
||
line-height: 34px;
|
||
background-color: #f0f0f0;
|
||
text-align: center;
|
||
background-color: #1AAD19;color: #FFFFFF;
|
||
}
|
||
.list-item-detail-input-red{
|
||
border: #cacaca solid 1px;
|
||
border-radius: 10rpx;
|
||
width: 100rpx;
|
||
margin-left: 20rpx;
|
||
height: 34px;
|
||
line-height: 34px;
|
||
background-color: #f0f0f0;
|
||
text-align: center;
|
||
background-color: #F76260;color: #FFFFFF;
|
||
}
|
||
|
||
.check-bar-input {
|
||
border: #cacaca solid 1px;
|
||
border-radius: 10rpx;
|
||
margin: 0 10rpx;
|
||
}
|
||
|
||
.pre-next {
|
||
background-color: #FFFFFF;
|
||
border-radius: 10rpx;
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
margin: 0rpx 32rpx;
|
||
}
|
||
|
||
.pre-item {
|
||
color: #4662FF;
|
||
}
|
||
|
||
.next-item {
|
||
color: #4662FF;
|
||
}
|
||
|
||
.check-item {
|
||
border: #cacaca solid 1rpx;
|
||
margin: 0rpx 32rpx 32rpx 32rpx;
|
||
background-color: #FFFFFF;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.search-item {
|
||
margin: 0rpx 32rpx 32rpx 32rpx;
|
||
background-color: #FFFFFF;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.gray-layer {
|
||
position: fixed;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
bottom: 0;
|
||
background-color: #333333;
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.bottom-select {
|
||
position: fixed;
|
||
left: 0rpx;
|
||
right: 0rpx;
|
||
bottom: 0rpx;
|
||
height: 80%;
|
||
background-color: #FFFFFF;
|
||
opacity: 1;
|
||
z-index: 999;
|
||
}
|
||
|
||
.bottom-select-head {
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
border-bottom: 1px solid #f9f9f9;
|
||
}
|
||
|
||
.bottom_select-head-cancel {
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
width: 100%;
|
||
font-size: 32rpx;
|
||
text-align: left;
|
||
margin-left: 32rpx;
|
||
color: #666666;
|
||
}
|
||
|
||
.bottom_select-head-confirm {
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
width: 100%;
|
||
font-size: 32rpx;
|
||
text-align: end;
|
||
margin-right: 32rpx;
|
||
color: #0184ff;
|
||
}
|
||
|
||
.bottom-select-list {
|
||
display: flex;
|
||
width: 100%;
|
||
align-items: center;
|
||
}
|
||
|
||
.bottom-select-list-item {
|
||
height: 72rpx;
|
||
line-height: 72rpx;
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 16px;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.list-card {
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: #FFFFFF;
|
||
margin: 16rpx 40rpx;
|
||
padding: 15rpx 20rpx 15rpx 0rpx;
|
||
border-radius: 8rpx;
|
||
border: #cacaca solid 1px;
|
||
}
|
||
|
||
.list-card-broken {
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: #FFFFFF;
|
||
}
|
||
|
||
.delete-icon {
|
||
position: absolute;
|
||
top: 50%;
|
||
-webkit-transform: translateY(-50%);
|
||
transform: translateY(-50%);
|
||
right: -175rpx;
|
||
width: 130rpx;
|
||
height: 62rpx;
|
||
line-height: 62rpx;
|
||
border-radius: 31rpx;
|
||
font-weight: 500;
|
||
font-size: 32rpx;
|
||
text-align: center;
|
||
color: #FFFFFF;
|
||
background: #FF1C1C;
|
||
}
|
||
|
||
.list-card-Info {
|
||
margin: 0 32rpx;
|
||
}
|
||
|
||
.list-card-Info-detil {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
margin: 20rpx 32rpx 0 32rpx;
|
||
width: 100%;
|
||
}
|
||
|
||
.list-card-Info-detil-item-report {
|
||
font-size: 28rpx;
|
||
width: 50%;
|
||
}
|
||
|
||
.list-card-Info-item {
|
||
font-size: 32rpx;
|
||
font-family: PingFangSC, PingFangSC-Semibold;
|
||
font-weight: 600;
|
||
text-align: left;
|
||
color: #000000;
|
||
}
|
||
|
||
.file-content {
|
||
margin: 0 32rpx;
|
||
padding: 0rpx 0 50rpx 0;
|
||
border-bottom: 1px solid #f0f0f0;
|
||
}
|
||
|
||
.image {
|
||
width: 75px;
|
||
height: 80px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.img-icon{width: 20px;height: 20px;position: absolute;right: -10px;z-index: 999;}
|
||
|
||
.grid-item-box {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
margin-top: 50rpx;
|
||
}
|
||
|
||
.text-name {
|
||
text-align: center;
|
||
font-size: 14px;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: rgba(60, 60, 67, 0.85);
|
||
}
|
||
|
||
.text-time {
|
||
text-align: center;
|
||
font-size: 10px;
|
||
font-family: PingFangSC, PingFangSC-Regular;
|
||
font-weight: 400;
|
||
color: rgba(60, 60, 67, 0.50);
|
||
}
|
||
|
||
.submitBtn {
|
||
width: 100%;
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
font-size: 32rpx;
|
||
font-family: MicrosoftYaHei;
|
||
color: #FFFFFF;
|
||
text-align: center;
|
||
background-color: #007BFF;
|
||
border-radius: unset;
|
||
position: fixed;
|
||
left: 0;
|
||
bottom: 0;
|
||
}
|
||
</style>
|