<!-- 查看皮毛净明细 -->
|
<template>
|
|
<view class="main">
|
<u-subsection class="tabs" :fontSize = '30' :list="list" :current="current" @change="tabChange"></u-subsection>
|
<view v-if="current">
|
<u-empty mode="data"
|
icon="http://cdn.uviewui.com/uview/empty/data.png"
|
textSize="30"
|
iconSize="1000"
|
text="暂无数据"
|
v-if="showWeigh.length===0"></u-empty>
|
<view class="main-block"
|
v-for="(item,i) in showWeigh"
|
:key="item.id">
|
<view class="weigh-item">
|
<view class="item">
|
<view class="concrete"
|
:style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/skin.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }">
|
皮
|
</view>
|
<view class="num">{{ item.skin ? item.skin.toFixed(2) : '' }}</view>
|
</view>
|
<view class="item">
|
<view class="concrete"
|
:style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/hair.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }">
|
毛
|
</view>
|
<view class="num">{{ item.hair ? item.hair.toFixed(2) : '' }}</view>
|
</view>
|
<view class="item">
|
<view class="concrete"
|
:style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/clean.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }">
|
净
|
</view>
|
<view class="num">{{ item.clean ? item.clean.toFixed(2) : '' }}</view>
|
</view>
|
</view>
|
<view v-if="isShow(item) && isYanz()">
|
<view class="discount">
|
<view class="rate">
|
<view class="label-text">
|
扣渣
|
</view>
|
<view v-if='roleType===4&&!flag'
|
class="count-input">
|
<u--input placeholder="请输入扣渣"
|
border="bottom"
|
type="digit"
|
clearable
|
v-model="item.cinderWeight"
|
@input='v=>discountInputHandle(v,i,item.clean)'></u--input>
|
</view>
|
<view v-else-if='flag'
|
class="count">{{ item.cinderWeight ? item.cinderWeight + '吨' :"" }}
|
</view>
|
</view>
|
<!-- 净重div -->
|
<view class="weight-box">
|
<view class="weigh-qualified">
|
<view v-if="!unqualifiedArr(i).length">
|
|
<view> 扣渣后净重:<text class="count"> {{ cleanWeight(item) ? cleanWeight(item) + '吨' : ''}}</text></view>
|
</view>
|
<view v-else-if ='unqualifiedArr(i).length && item.clean' class='weigh-qualified-no'>
|
<view > 扣渣后净重:<text class="count">{{ cleanWeight(item) ? cleanWeight(item) + '吨' : '' }}</text></view>
|
<view > 合格净重: <text class="count">{{ qualifiedWeight(item,i) ? qualifiedWeight(item,i) + '吨' : '' }}</text></view>
|
</view>
|
<view v-else-if ='unqualifiedArr(i).length && !item.clean' class='weigh-qualified-no'>
|
|
</view>
|
|
</view>
|
<view class="weigh-qualified" v-for="el,index in unqualifiedArr(i)">
|
<view>
|
不合格净重:
|
</view>
|
<view class="count"> {{el.unqualifiedWeight ? el.unqualifiedWeight + '吨' : ''}}</view>
|
</view>
|
</view>
|
|
</view>
|
</view>
|
<!-- 判断是否检验质量 -->
|
<view v-if="isShow(item) && isYanz()">
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="供应商"
|
size='32'></u--text>
|
|
</view>
|
<view style="font-size: 35rpx;">{{ coalDetailsData.customerName || '' }}</view>
|
</view>
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="车牌号"
|
size='32'></u--text>
|
|
</view>
|
<view style="font-size: 35rpx;">{{ item.carNo || '' }}</view>
|
</view>
|
<!-- 物资明细 -->
|
<view class="level" v-if="!flag">
|
<view style="width: 180rpx;">
|
<u--text text="物资明细"
|
size='32'></u--text>
|
</view>
|
|
<view class="tag-select"
|
@click="goodsPopoverShow(i,'goods')"
|
v-if='roleType===4'>
|
<text>
|
{{item.newModifygoodsName || item.breed+"/"+item.spec||item.modifygoodsName||'暂无'}}
|
</text>
|
</view>
|
</view>
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="品名"
|
size='32'></u--text>
|
|
</view>
|
<!-- (coalDetailsData.coalName ? coalDetailsData.coalName: '') -->
|
<view class="tag-select" @click="productNamePopoverShow(i)">{{ item.breed }}</view>
|
</view>
|
|
<view class="level"
|
v-if='item.modifygoodsName ||globalShowWeigh[i].modifyProductName'>
|
<view style="width: 180rpx;">
|
<u--text text="规格"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select"
|
@click="productNamePopoverShow(i)">
|
<!-- !flag?(globalShowWeigh[i].modifyProductName?globalShowWeigh[i].modifyProductName:item.modifygoodsName):(item.breed+'/'+item.spec) -->
|
<text>
|
{{item.spec}}
|
</text>
|
</view>
|
|
</view>
|
<view class="level" v-if="flag">
|
<view style="width: 180rpx;">
|
<u--text text="规格"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<!-- !flag?(globalShowWeigh[i].modifyProductName?globalShowWeigh[i].modifyProductName:item.modifygoodsName):(item.breed+'/'+item.spec) -->
|
<text>
|
{{item.spec}}
|
</text>
|
</view>
|
|
</view>
|
<!-- <view class="unqualifiedBreed">
|
<view style="width: 180rpx;">
|
<u--text text="不合格品名"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select"
|
@click="selectunqualifiedBreed(i)">
|
<text>
|
{{!flag?(globalShowWeigh[i].unqualifiedBreed?globalShowWeigh[i].unqualifiedBreed:item.unqualifiedBreed):(item.unqualifiedBreed||"请选择")}}
|
</text>
|
</view>
|
</view>
|
<view class="notice-num">
|
<view class="num-text">
|
<u--text text="不合格重量"
|
size='32'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'>
|
<u--input placeholder="请输入不合格重量"
|
border="bottom"
|
clearable
|
v-model="item.unqualifiedWeight"
|
@input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{item.unqualifiedWeight}}
|
</view>
|
</view> -->
|
|
<view class="notice-num">
|
<view class="num-text"
|
style="margin-left: 10rpx;">
|
<u--text text="通知数量"
|
size='32'></u--text>
|
</view>
|
<view class="num-input "
|
v-if='roleType===4&&!flag'>
|
<u-input placeholder="请输入通知数量"
|
border="bottom"
|
clearable
|
disabled
|
style="width: 70%;"
|
v-model="item.num">
|
<template slot="suffix">
|
<text class="inp-unit">{{ item.numUnit}}</text>
|
</template>
|
</u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{item.num + item.numUnit}}
|
</view>
|
</view>
|
<view class="notice-num">
|
<view class="num-text"
|
style="margin-left: 10rpx;">
|
<u--text text="通知重量"
|
size='32'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'
|
>
|
<u-input placeholder="请输入通知重量"
|
border="bottom"
|
clearable
|
disabled
|
style="width: 70%;"
|
v-model="item.weight1">
|
<template slot="suffix">
|
<text class="inp-unit">{{ item.weightUnit }}</text>
|
</template>
|
</u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{item.weight1 + item.weightUnit }}
|
</view>
|
</view>
|
<!-- 新增扣罚种类、 扣罚金额,不合格判定种类-->
|
<!-- <view class="notice-num">
|
<view class="num-text"
|
style="margin-left: 10rpx;">
|
<u--text text="扣罚种类"
|
size='32'></u--text>
|
</view>
|
<view class="num-radio"
|
v-if='roleType===4&&!flag'
|
>
|
<u-radio-group size='34' v-model="item.penaltyType">
|
<u-radio :label-size="32" :name="'0'" :label="'无扣罚'" :disabled="disabled">无扣罚</u-radio>
|
<u-radio :label-size="32" :name="'其他扣罚'" :label="'其他扣罚'" :disabled="disabled">其他扣罚</u-radio>
|
</u-radio-group>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{item.penaltyType == '0' ? '无扣罚' : '其他扣罚'}}
|
</view>
|
</view> -->
|
<!-- 单价 -->
|
<view class="notice-num">
|
<view class="num-text"
|
style="margin-left: 10rpx;">
|
<u--text text="单价"
|
size='32'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'
|
>
|
<u-input placeholder="请输入单价"
|
border="bottom"
|
clearable
|
v-model="item.unitPrice">
|
<template slot="suffix">
|
<text class="inp-unit">元</text>
|
</template>
|
</u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{item.unitPrice ? item.unitPrice + '元' : ''}}
|
</view>
|
</view>
|
<!-- 扣罚容器 -->
|
<view class="kouFa-box">
|
<!-- 超尺扣罚金额 -->
|
<view class="notice-num koufaBox-item">
|
<view class="num-text"
|
v-if="(roleType===4&&!flag) || (flag && item.oveForfeit)"
|
style="margin-left: 10rpx;">
|
<u--text text=" 超尺扣罚"
|
size='29'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'
|
>
|
<u-input
|
v-model="item.oveForfeit"
|
placeholder="请输入"
|
border="bottom"
|
clearable
|
>
|
<template slot="suffix">
|
<text class="inp-unit">元</text>
|
</template>
|
</u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag && item.oveForfeit" >
|
{{ item.oveForfeit + '元'}}
|
</view>
|
</view>
|
|
<view class="notice-num koufaBox-item" >
|
<view class="num-text"
|
v-if="(roleType===4&&!flag) || (flag && item.thiForfeit)"
|
style="margin-left: 10rpx;">
|
<u--text text="厚度扣罚"
|
size='29'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'
|
>
|
<u-input placeholder="请输入"
|
border="bottom"
|
clearable
|
v-model="item.thiForfeit">
|
<template slot="suffix">
|
<text class="inp-unit">元</text>
|
</template>
|
</u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag && item.thiForfeit">
|
{{ item.thiForfeit+ '元' }}
|
</view>
|
</view>
|
|
<view class="notice-num koufaBox-item" >
|
<view class="num-text"
|
v-if="(roleType===4&&!flag) || (flag && item.obtForfeit)"
|
style="margin-left: 10rpx;">
|
<u--text text="密闭器"
|
size='29'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'
|
>
|
<u-input placeholder="请输入"
|
border="bottom"
|
clearable
|
v-model="item.obtForfeit">
|
<template slot="suffix">
|
<text class="inp-unit">元</text>
|
</template></u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag && item.obtForfeit">
|
{{ item.obtForfeit+ '元' }}
|
</view>
|
</view>
|
|
<view class="notice-num koufaBox-item">
|
<view class="num-text"
|
v-if="(roleType===4&&!flag) || (flag && item.othForfeit)"
|
style="margin-left: 10rpx;">
|
<u--text text="其他扣罚"
|
size='29'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'
|
>
|
<u-input placeholder="请输入"
|
border="bottom"
|
clearable
|
v-model="item.othForfeit">
|
<template slot="suffix">
|
<text class="inp-unit">元</text>
|
</template></u-input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag && item.othForfeit">
|
{{ item.othForfeit+ '元'}}
|
</view>
|
</view>
|
</view>
|
|
|
<!--不合格判定种类 -->
|
<!-- <view class="notice-num">
|
<view class="num-text"
|
style="margin-left: 10rpx;">
|
<u--text text="扣罚类型"
|
size='32'></u--text>
|
</view>
|
<view class="num-radio"
|
v-if='roleType===4&&!flag'
|
@click.stop="onFoucus"
|
style="height: 50rpx;"
|
>
|
<u-checkbox-group
|
placement="row"
|
size="32"
|
:value="this.penaltyType"
|
ref="checkbox"
|
@change="(event)=>checkboxChange(event,item)"
|
>
|
<u-checkbox :label-size="25" :name="'1'" :label="'超尺扣罚'" :value="item.penaltyAmount" :checked="item.penaltyAmount" :disabled="disabled">超尺扣罚</u-checkbox>
|
<u-checkbox :label-size="25" :name="'2'" :label="'厚度扣罚'" :value="item.thickPenaltyAmount" :checked="item.thickPenaltyAmount" :disabled="disabled">厚度扣罚</u-checkbox>
|
<u-checkbox :label-size="25" :name="'3'" :label="'密闭器'" :value="item.obturatorPenaltyAmount" :checked="item.obturatorPenaltyAmount" :disabled="disabled">密闭器</u-checkbox>
|
<u-checkbox :label-size="25" :name="'4'" :label="'其他扣罚'" :value="item.qita" :checked="item.qita" :disabled="disabled">其他扣罚</u-checkbox>
|
</u-checkbox-group>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
<view>
|
<text> {{item.penaltyType == 1 ? '超尺扣罚' : item.penaltyType == 2 ? '厚度扣罚' :item.penaltyType == 3 ? '密闭器' : null }} </text>
|
</view>
|
|
</view>
|
</view> -->
|
</view>
|
<view v-if="!isYanz()"><view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="车牌号"
|
size='32'></u--text>
|
|
</view>
|
<view style="font-size: 35rpx;">{{ item.carNo || '' }}</view>
|
</view></view>
|
<u-empty v-if=" isYanz() && !isShow(item) " icon-size="200" text="''" >
|
<text>暂未验质</text>
|
</u-empty>
|
<u-empty v-if="!isYanz()" icon-size="200" text="''" >
|
<text>暂无数据</text>
|
</u-empty>
|
<view style="display: flex;margin-top: 20rpx;margin-left: 20rpx;"
|
v-if="item.isImage">
|
<view style="width: 100px;"
|
v-for="(val,index) in item.inspectionJpg"
|
:key="index">
|
<u--image :showLoading="true"
|
:src="`${BaseUrl}${val}`"
|
width="80px"
|
height="80px"
|
@click="imageClick(val)"
|
>
|
<view slot="error"
|
style="font-size: 24rpx;">加载失败</view>
|
</u--image>
|
</view>
|
</view>
|
<view v-else-if='!item.isImage&&!flag'
|
style="margin: 30rpx 80rpx;">
|
<u-upload :fileList="item.fileList"
|
deletable
|
@afterRead="afterRead"
|
@delete="deletePic"
|
:name="i"
|
multiple
|
:maxCount="4"
|
width="250"
|
height="150"
|
:previewFullImage="true">
|
</u-upload>
|
</view>
|
<u--list
|
:height="0"
|
style=" margin-left: 50rpx;margin-top: 30rpx;"
|
>
|
<u--list-item
|
|
v-for="(el,index) in unqualifiedArr(i) "
|
style=" box-shadow: 0px 0 0 0px #ccc;"
|
:key="index"
|
:height="0"
|
>
|
<u-cell
|
:title="(index + 1) + '.' + '不合格品类'"
|
style="text-indent: 30RPX;"
|
@click="editItem(i,index)"
|
>
|
<text slot="value" @click.stop="deleteItem(i,index)" style="color: red;">删除</text>
|
</u-cell>
|
|
<view>
|
<view class="unqualifiedBreed">
|
<view style="width: 180rpx;">
|
<u--text text="不合格品名"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<text>
|
<!-- {{!flag?(globalShowWeigh[i].unqualifiedBreed?globalShowWeigh[i].unqualifiedBreed:item.unqualifiedBreed):(item.unqualifiedBreed||"请选择")}} -->
|
{{ el.unsecondClass }}
|
</text>
|
</view>
|
</view>
|
<view class="unqualifiedBreed">
|
<view style="width: 180rpx;">
|
<u--text text="不合格规格"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<text>
|
<!-- {{!flag?(globalShowWeigh[i].unqualifiedBreed?globalShowWeigh[i].unqualifiedBreed:item.unqualifiedBreed):(item.unqualifiedBreed||"请选择")}} -->
|
{{ el.unSpecifications }}
|
</text>
|
</view>
|
</view>
|
</view>
|
<view>
|
<view class="notice-num">
|
<view class="num-text">
|
<u--text text="不合格重量"
|
size='32'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'>
|
<!-- <u--input placeholder="请输入不合格重量"
|
border="bottom"
|
clearable
|
v-model="el.unqualifiedWeight"
|
readonly
|
@input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input> -->
|
<view class="num-show"
|
> {{el.unqualifiedWeight ? el.unqualifiedWeight + '吨': ''}}
|
</view>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{el.unqualifiedWeight ? el.unqualifiedWeight + '吨': ''}}
|
</view>
|
|
</view>
|
<!-- <view class="notice-num">
|
<view class="num-text">
|
<u--text text="不合格品判定"
|
size='32'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'>
|
<view class="num-show">
|
{{selectlist.find(item=>item.value ==el.unqualifiedType ) ? selectlist.find(item=>item.value ==el.unqualifiedType ).name : '' }}
|
</view>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{selectlist.find(item=>item.value ==el.unqualifiedType ) ? selectlist.find(item=>item.value ==el.unqualifiedType ).name : '' }}
|
</view>
|
|
</view> -->
|
<view class="notice-num">
|
<view class="num-text">
|
<u--text text="单价"
|
size='32'></u--text>
|
</view>
|
<view class="num-input"
|
v-if='roleType===4&&!flag'>
|
<!-- <u--input placeholder="请输入不合格重量"
|
border="bottom"
|
clearable
|
v-model="el.unqualifiedWeight"
|
readonly
|
@input='v=>unqualifiedWeightInputHandle(v,i,item.clean)'></u--input> -->
|
<view class="num-show"
|
> {{el.penaltyUnitPrice ? el.penaltyUnitPrice + '元' : ''}}
|
</view>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{el.penaltyUnitPrice ? el.penaltyUnitPrice + '元' : ''}}
|
</view>
|
|
</view>
|
|
</view>
|
</u--list-item>
|
</u--list>
|
<!-- 增加不合格规矩 -->
|
|
<button class="addBtn" v-if="isShow(item) && isYanz()" type="primary" :plain="false" @click="addUnqualified(i)">不合格判定</button>
|
<!-- 物资明细 -->
|
<u-action-sheet :actions="goodsList"
|
:show="goodsShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='goodsNameClose'
|
@select="goodsselectClick"></u-action-sheet>
|
<!-- 品名与规格 -->
|
<view class="">
|
<u-action-sheet :actions="actionsList"
|
:show="actionShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='productNameClose'
|
@select="selectClick"></u-action-sheet>
|
</view>
|
<!-- 不合格品名 -->
|
<view class="">
|
<u-action-sheet :actions="actionsList"
|
:show="unqualifiedShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='unqualifiedClose'
|
@select="selectUnqualifiedClick"></u-action-sheet>
|
</view>
|
</view>
|
<!-- 原发出场时间 -->
|
<!-- <view v-if="roleType!==3">
|
<view>
|
<text>货物发货地出场时间或发货磅单时间:</text>
|
</view>
|
<view>
|
<uni-datetime-picker
|
v-model="outDate"
|
type="datetime"
|
@change="datechange"
|
/>
|
</view>
|
</view> -->
|
<!-- 新增 验质备注。验质说明 -->
|
<view v-if=" isYanz()">
|
<view v-if="coalDetailsData.orderType == '外购'">
|
<view style="padding: 10rpx;">
|
<u-row >
|
<!-- <u-col span="24" >
|
<view class="demo-layout bg-purple-light" style="display: flex;">
|
<text style="font-size: 32rpx;">验质说明:</text>
|
<view style="display: inline-block;"
|
v-if='roleType===4&&!flag'
|
>
|
<u--input placeholder="请输入验质说明"
|
border="bottom"
|
clearable
|
v-model="qualityInstructions"></u--input>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{ qualityInstructions }}
|
</view>
|
</view>
|
</u-col> -->
|
</u-row>
|
</view>
|
<view style="padding: 10rpx;">
|
<u-row >
|
<u-col span="24">
|
<view class="demo-layout bg-purple-light" >
|
<text style="font-size: 32rpx;">验质备注:</text>
|
<view style="width: 50%;"
|
v-if='roleType===4&&!flag'
|
>
|
<u-textarea border="surround" v-model="remarks" ref="textarea" placeholder="请输入验质备注"></u-textarea>
|
</view>
|
<view class="num-show"
|
v-else-if="flag">
|
{{ remarks }}
|
</view>
|
</view>
|
</u-col>
|
</u-row>
|
</view>
|
</view>
|
<view class="confirm-button"
|
v-if='roleType===4&&!flag'>
|
<u-button type="primary"
|
shape="circle"
|
text="确认"
|
@click="confirmInput"
|
:loading="loading"
|
loading-text="确认"></u-button>
|
</view></view>
|
</view>
|
|
<!-- 物料明细 -->
|
<view v-if="!current">
|
<view class="main-block"
|
v-for="(item,i) in goodsList"
|
:key="item.id">
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="物资名称"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select"
|
>
|
<text class="num-text">
|
{{item.breed}}
|
</text>
|
</view>
|
</view>
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="明细编号"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<text>
|
{{item.itemId}}
|
</text>
|
</view>
|
</view>
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="通知数量"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<text>
|
{{item.num}}
|
</text>
|
</view>
|
</view>
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="规格"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<text>
|
{{item.spec}}
|
</text>
|
</view>
|
</view>
|
<view class="level">
|
<view style="width: 180rpx;">
|
<u--text text="通知重量"
|
size='32'></u--text>
|
</view>
|
<view class="tag-select">
|
<text>
|
{{item.weight}}
|
</text>
|
</view>
|
</view>
|
<!-- 物资明细 -->
|
<u-action-sheet :actions="goodsList"
|
:show="goodsShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='goodsNameClose'
|
@select="goodsselectClick"></u-action-sheet>
|
<!-- 品名与规格 -->
|
<view class="">
|
<u-action-sheet :actions="actionsList"
|
:show="actionShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='productNameClose'
|
@select="selectClick"></u-action-sheet>
|
</view>
|
<!-- 不合格品名 -->
|
<view class="">
|
<u-action-sheet :actions="actionsList"
|
:show="unqualifiedShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='unqualifiedClose'
|
@select="selectUnqualifiedClick"></u-action-sheet>
|
</view>
|
|
|
</view>
|
</view>
|
<!-- 图片预览弹出框 -->
|
<view class="previewImage-container">
|
<u-popup :show="previewImageShow"
|
mode="center"
|
@close="previewImageClose"
|
@open="previewImageOpen">
|
<u--image :src="previewImageSrc != null ? BaseUrl + previewImageSrc : ''"
|
width="400px"
|
height="400px"></u--image>
|
</u-popup>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
|
import BigNumber from "bignumber.js"
|
import formatDate from '@/utils/date'
|
import { BaseUrl } from '@/api/publicInterface.js';
|
import { onlineurl } from '@/api/request.js'
|
import { mapState, mapMutations } from "vuex"
|
export default {
|
data() {
|
return {
|
dateInpShow:false,
|
outDate:'',
|
dateValue:'',
|
previewImageShow:false,
|
qualityInstructions:"",
|
previewImageSrc: '',
|
penaltyType:[],
|
indexFlag:0, // 下标标志位
|
remarks:'',
|
checkboxList:[
|
{
|
name: '超尺扣罚',
|
disabled: false,
|
value:'1',
|
},
|
{
|
name: '厚度扣罚',
|
disabled: false,
|
value:'2',
|
},
|
{
|
name: '密闭器',
|
disabled: false,
|
value:'3',
|
}
|
],
|
selectlist:[
|
{
|
value: '1',
|
name:'超尺扣罚',
|
fontSize:'40'
|
},
|
{
|
value: '2',
|
name:'厚度扣罚',
|
fontSize:'40'
|
|
},
|
{
|
value: '3',
|
name:'密闭器',
|
fontSize:'40'
|
}
|
],
|
orderPlanId: "",
|
title: '素胚勾勒出青花,笔锋浓转淡',
|
isWeighingType:'',
|
subTitle: '2020-05-15',
|
thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
|
coalDetailsData: {},
|
list: [
|
{
|
name: '物资明细'
|
},
|
{
|
name: '称重明细'
|
},
|
],
|
current: 1,
|
showWeigh: [],
|
|
cityPickerValueDefault: [0, 0, 1],
|
form:{},
|
showWeighCopy: [],
|
discountrate: "",
|
loading: false,
|
show: false,
|
selectIndex: null,
|
// 物资明细
|
goodsList: [],
|
goodsShow: false,
|
goodsIndex: null,
|
// 产品列表
|
actionsList: [],
|
actionShow: false,
|
actionIndex: null,
|
onlineurl,
|
havedInput: false,
|
flag: false,
|
orderCode: null,
|
modifyProductName: null,
|
// 是否修改
|
isModify: false,
|
// 上传图片
|
fileList1: [],
|
BaseUrl,
|
// 不合格品名
|
unqualifiedShow: false,
|
unqualifiedIndex: null,
|
dataForm: {},
|
// // 判断是修改品名与规格还是不合格品名
|
ModifiedOrderIndex: null,
|
willProductName: true,
|
willUnqualified: true,
|
alterProductName: false,
|
alterUnqualified: false,
|
// 存储中间态
|
showWeighCopyStorge: [],
|
havedSubmit: false
|
};
|
},
|
computed: {
|
...mapState(["globalShowWeigh"]),
|
roleType() {
|
return uni.getStorageSync('roleType')
|
},
|
showWeighCopyStorgeOther() {
|
return uni.getStorageSync('showWeighCopyStorgeOther')
|
},
|
isShow(){
|
//是否显示 是否已验质
|
return function(item){
|
return uni.getStorageSync('roleType')!== 4 && item.iszj == 1 ? true : uni.getStorageSync('roleType')== 4 ? true : false;
|
// 已经验质
|
}
|
},
|
//判断需不需要验质
|
isYanz(){
|
return function(item){
|
// return ( this.coalDetailsData.orderType !=='外购' || this.coalDetailsData.weighingType !=='回磅') ? false : true;
|
if(this.coalDetailsData.orderType =='外购'){
|
if(this.coalDetailsData.weighingType == '回磅'){
|
return true
|
}else{
|
return false
|
}
|
}else if(this.coalDetailsData.orderType =='外销'){
|
return false;
|
|
}
|
// 已经验质
|
}
|
},
|
//计算不合格规格数组
|
unqualifiedArr(){
|
return function(index){
|
let arr = [];
|
let temp = [];
|
let noPin = [];
|
let noPrice = [];
|
const item = this.globalShowWeigh[index];
|
if(item){
|
if(item.unqualifiedBreed){
|
arr = item.unqualifiedBreed.split(",");
|
if(item.unqualifiedWeights){
|
temp = item.unqualifiedWeights.toString().split(',');
|
}
|
if(item.unqualifiedType){
|
noPin = item.unqualifiedType.toString().split(',');
|
|
}
|
if(item.penaltyUnitPrice){
|
noPrice = item.penaltyUnitPrice.toString().split(',')
|
}
|
// if(item.penaltyType){
|
// noPin = item.penaltyType.toString().split(',');
|
// }
|
|
let result = arr.length && arr.map((el,index)=>{
|
const pinming = el.split("/")[0];
|
const guige = el.split("/")[1];
|
let obj = {unqualifiedBreed:el,unqualifiedWeight:temp[index],unqualifiedType:noPin[index],penaltyUnitPrice:noPrice[index],
|
unsecondClass:pinming,unSpecifications:guige
|
}
|
return obj
|
})
|
console.log(result,temp,'arr')
|
return result;
|
|
}else{
|
return []
|
}
|
}
|
|
|
}
|
},
|
cleanWeight(){
|
return function(item){
|
// if(!item.weight){
|
// return ''
|
// }else if(item.weight && !item.unqualifiedWeight){
|
// return item.weight
|
// }else if(item.weight && item.unqualifiedWeight){
|
// return item.weight
|
// }
|
if(item.weight){
|
return item.weight
|
}else if(!item.clean){
|
return ''
|
|
} else if(item.clean && !item.unqualifiedWeight){
|
return item.clean
|
}else if(item.clean && item.cinderWeight){
|
return new BigNumber(item.clean - 0).minus(item.cinderWeight - 0);
|
}
|
console.log(item,'clearnWeight')
|
}
|
},
|
//合格净重
|
qualifiedWeight(){
|
return function(item,i){
|
console.log(item,'itemnsssajdakdj');
|
let znums;
|
if(this.globalShowWeigh[i].unqualifiedWeights){
|
znums = this.globalShowWeigh[i].unqualifiedWeights.split(',')
|
}else{
|
znums = []
|
}
|
let z = new BigNumber(znums.reduce((p,n)=>{
|
return (p - 0) + (n - 0)
|
},0))
|
let y = new BigNumber(item.cinderWeight)
|
return new BigNumber(item.clean - 0).minus(z).minus(y);
|
}
|
}
|
|
|
|
},
|
mounted() {
|
this.roleType === 1 ? this.GetOrderPlan() : this.getTakeCoal();
|
|
},
|
onLoad(params) {
|
console.log(params,this.showWeighCopyStorge,this.globalShowWeigh,'params路由')
|
this.orderPlanId = params.orderPlanId ? params.orderPlanId : '';
|
this.flag = params.flag ? params.flag : false;
|
this.ModifiedOrderIndex = params.index
|
this.alterProductName = params.productName === "true" || false
|
this.alterUnqualified = params.unqualified === "true" || false
|
this.havedSubmit = params.havedSubmit === "true" || false;
|
console.log(this.havedSubmit,'this.havedSubmit')
|
uni.$on("handClick", res => {
|
console.log(res,'22222222222');
|
if(res.pageFlag){
|
//不合格的
|
this.showWeigh[res.index].tempArr = res.tempArr;
|
}else{
|
//合格
|
this.showWeigh[res.index].breed = res.data.secondClass;
|
this.showWeigh[res.index].spec = res.data.specifications;
|
this.showWeigh[res.index].firstClass = res.data.firstClass;
|
}
|
|
|
})
|
},
|
onShow(){
|
this.numAll(this.globalShowWeigh[this.indexFlag].unqualifiedWeights.split(","),this.indexFlag,this.showWeigh[this.indexFlag].clean)
|
|
},
|
methods: {
|
...mapMutations(['changeglobalShowWeigh']),
|
numAll(value, index, clean){
|
console.log(value,'valusess')
|
// 计算扣渣净重
|
// 判断是不是有净重才进行计算
|
let x = new BigNumber(clean - 0)
|
// let y = new BigNumber(value - 0) // 因为value 是 0 所以需要循环 取减
|
let z = new BigNumber(this.showWeigh[index].cinderWeight - 0);
|
let y;
|
// if(value.filter(Boolean) .length){
|
// y = value.reduce((p,n)=>{
|
// return (p - 0) + (n - 0);
|
// },0);
|
|
// }else{
|
// y = 0;
|
// }
|
if(clean){
|
if(x.minus(y).minus(z).toFixed(2) <= 0){
|
this.showWeigh[index].weight = '0';
|
this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
|
}else{
|
this.showWeigh[index].weight = x.minus(z).toFixed(4);
|
}
|
}
|
|
|
},
|
checkboxChange(n,item) {
|
if(!n.includes('1')){
|
item.penaltyAmount = ''
|
}
|
if(!n.includes('2')){
|
n.thickPenaltyAmount = ''
|
}
|
if(!n.includes('3')){
|
item.obturatorPenaltyAmount = ''
|
}
|
if(!n.includes('4')){
|
item.qita = ''
|
}
|
|
|
},
|
getTakeCoal() {
|
uni.showLoading({
|
title: '加载中'
|
});
|
this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
|
if (res.code == 0) {
|
uni.hideLoading()
|
this.coalDetailsData = res.data;
|
this.remarks = res.data.remarks;
|
this.dateValue = res.data.startTime;
|
this.outDate = res.data.startTime;
|
this.qualityInstructions = res.data.qualityInstructions
|
this.orderCode = res.data.orderCode
|
this.showWeigh = this.coalDetailsData.tmTaskCoalItems ? this.coalDetailsData
|
.tmTaskCoalItems : [];
|
this.showWeigh = this.showWeigh.map((v,i) => {
|
if(!v.tempArr){
|
v.tempArr = ''
|
}else{
|
v.tempArr = JSON.parse(v.tempArr)
|
}
|
return {
|
...v,
|
modifyProductName: '',
|
modifygoodsName: '',
|
fileList: [],
|
inspectionJpg: v.inspectionJpg.split(','),
|
isImage: v.inspectionJpg,
|
unqualifiedType:v.penaltyType,
|
tempArr:v.tempArr
|
}
|
})
|
console.log(this.showWeigh,'showWeigh')
|
this.showWeighCopy = JSON.parse(JSON.stringify(this.showWeigh))
|
uni.setStorageSync("showWeighCopyStorge", this.showWeighCopy)
|
uni.setStorageSync('showWeighCopyStorgeOther',this.showWeighCopy)
|
// if (this.havedSubmit) {
|
// this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorge'))
|
// this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorgeOther'))
|
// } else {
|
// this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorgeOther'))
|
// this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorge'))
|
// }
|
this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorge'))
|
this.changeglobalShowWeigh(uni.getStorageSync('showWeighCopyStorgeOther'))
|
//称重明细无数据时显示物资明细
|
if(!this.coalDetailsData.tmTaskCoalItems.length){
|
this.current = 0;
|
}
|
this.isWeighingType = res.data.weighingType //当前磅单是否回磅
|
} else {
|
this.$u.toast('加载失败')
|
uni.hideLoading()
|
}
|
}).then(() => {
|
this.$reqGet('getMaterialDetailByOrderCode', { orderCode: this.orderCode }).then(r => {
|
this.goodsList = r.data.map(v => {
|
return {
|
...v,
|
name: v.breed + '/' + v.spec
|
}
|
})
|
//新增默认回显第一个
|
if(r.data.length && !this.flag){
|
this.goodsIndex = 0;
|
this.goodsselectClick(this.goodsList[0])
|
}
|
|
uni.hideLoading()
|
})
|
})
|
},
|
previewImageClose() {
|
this.previewImageShow = false;
|
},
|
previewImageOpen() {
|
this.previewImageShow = true;
|
console.log('preview open');
|
},
|
GetOrderPlan() {
|
uni.showLoading({ title: '加载中...' });
|
this.$reqGet('GetOrderPlan').then(res => {
|
if (res.data) {
|
this.coalDetailsData = res.data;
|
this.orderCode = res.data.orderCode
|
this.showWeigh = this.coalDetailsData[this.index].tmTaskCoals ? this.coalDetailsData[
|
this.index].tmTaskCoals : [],
|
uni.hideLoading();
|
} else {
|
this.$u.toast('加载失败')
|
uni.hideLoading()
|
}
|
});
|
},
|
getJcProductList() {
|
this.$reqGet('getJcProductList').then(res => {
|
if (res.code === 0) {
|
this.actionsList = res.data.map(v => {
|
return {
|
...v,
|
name: v.secondCategoryName + v.spec
|
}
|
})
|
}
|
})
|
},
|
imageClick(imgStr){
|
console.log(imgStr,'触发')
|
this.previewImageSrc = imgStr;
|
|
this.$nextTick(() => {
|
this.previewImageShow = true;
|
});
|
|
|
},
|
// 点击确认
|
confirmInput() {
|
let flag = true;
|
let params = {},unqualifiedWeightAll;
|
params.qualityInstructions = this.qualityInstructions;
|
params.remarks = this.remarks;
|
params.startTime = this.dateValue;
|
console.log( this.showWeigh,' this.showWeigh')
|
this.showWeigh = this.showWeigh.map((v, i) => {
|
console.log(this.penaltyType,this.$refs.checkbox,'123')
|
// let tempArr = v.penaltyType.split(',');
|
v.unqualifiedType = '';
|
if(this.globalShowWeigh[i].unqualifiedWeights){
|
unqualifiedWeightAll = this.globalShowWeigh[i].unqualifiedWeights.split(",").reduce((p,n)=>{return (p - 0) + (n - 0)},0).toFixed(4) || ''
|
}else{
|
unqualifiedWeightAll = 0;
|
}
|
return {
|
...v,
|
unqualifiedBreed: this.globalShowWeigh[i].unqualifiedBreed ,
|
breed: this.globalShowWeigh[i].modifyProductName ? this.globalShowWeigh[i].breed : v.breed,
|
spec: this.globalShowWeigh[i].modifyProductName ? this.globalShowWeigh[i].spec : v.spec,
|
inspectionJpg: v.fileList.map(v => v.url.replace(BaseUrl, '')).join(','),
|
unqualifiedWeights :this.globalShowWeigh[i].unqualifiedWeights ? this.globalShowWeigh[i].unqualifiedWeights : 0,
|
unqualifiedWeight :unqualifiedWeightAll ,
|
tempArr:this.globalShowWeigh[i].tempArr ? JSON.stringify(this.globalShowWeigh[i].tempArr) : '',
|
penaltyUnitPrice:this.globalShowWeigh[i].penaltyUnitPrice,
|
|
}
|
});
|
// if(flag){
|
this.loading = true;
|
params.tmTaskCoalItems = this.showWeigh;
|
console.log(params,'params')
|
|
this.$reqPost('updateTmTaskCoalItem', params, 'json').then(
|
res => {
|
if (res.code == 0) {
|
this.loading = false
|
this.$u.toast('操作成功,即将返回上一页')
|
setTimeout(() => {
|
uni.navigateBack({
|
delta: 1
|
})
|
}, 800)
|
} else {
|
this.loading = false
|
this.$u.toast(res.msg ? res.msg : '操作失败')
|
}
|
})
|
// }else{
|
// this.$u.toast('请输入单价')
|
// return
|
// }
|
|
},
|
// 校验数据是否合格
|
checkValue(data,target){
|
if(!data.length){
|
return
|
}
|
let flag = data.find(item=>item[target] <=0);
|
console.log(flag,'flag');
|
if(flag){
|
return false
|
}else{
|
return true;
|
}
|
|
},
|
// 物资明细
|
goodsPopoverShow(index) {
|
if (this.roleType === 4 && !this.flag) {
|
this.goodsShow = true
|
this.goodsIndex = index
|
}
|
|
},
|
goodsNameClose() {
|
this.goodsShow = false
|
},
|
goodsselectClick(val) {
|
this.showWeigh[this.goodsIndex].modifygoodsName = val.name
|
this.showWeigh[this.goodsIndex].newModifygoodsName = val.breed + '/' + val.breed//新增区分物资明细 与 修改后的品名 规格
|
this.showWeigh[this.goodsIndex].itemId = val.itemId
|
this.showWeigh[this.goodsIndex].num = val.num
|
this.showWeigh[this.goodsIndex].numUnit = val.numUnit
|
this.showWeigh[this.goodsIndex].remark = val.remark
|
this.showWeigh[this.goodsIndex].breed = val.breed
|
this.showWeigh[this.goodsIndex].spec = val.spec
|
this.showWeigh[this.goodsIndex].weightUnit = val.weightUnit
|
this.showWeigh[this.goodsIndex].weight1 = val.weight;
|
},
|
// 品名与规格
|
productNamePopoverShow(index) {
|
if (this.roleType === 4 && !this.flag) {
|
// this.actionShow = true
|
// this.actionIndex = index
|
uni.navigateTo({
|
url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${index}&takeCoalId=${this.orderPlanId}&productName=${this.willProductName}&pageFlag=${false}&actionObj=${ JSON.stringify(this.showWeigh[index])}`
|
})
|
}
|
},
|
productNameClose() {
|
this.actionShow = false
|
},
|
selectClick(val) {
|
this.showWeighCopy[this.actionIndex].modifyProductName = val.name
|
this.showWeighCopy[this.actionIndex].breed = val.secondCategoryName
|
this.showWeighCopy[this.actionIndex].spec = val.spec
|
},
|
// 折扣率输入
|
discountInputHandle(value, index, clean) {
|
let znums;
|
if(this.globalShowWeigh[index].unqualifiedWeights){
|
znums = this.globalShowWeigh[index].unqualifiedWeights.split(',')
|
}else{
|
znums = []
|
}
|
console.log('计算净重',value, index, clean)
|
this.indexFlag = index; // 记录标识位
|
if (
|
value &&
|
value.indexOf(".") < 0 &&
|
value != ""
|
) {
|
value = parseFloat(value);
|
value = value + ""; // 变回为字符串
|
}else{
|
value = value.replace(/^(-)*(\d+)\.(\d\d\d\d).*$/,"$1$2.$3");
|
this.$nextTick(()=>{
|
this.showWeigh[index].cinderWeight = value.replace(/[^\d.]/g, "");
|
});
|
} // 如果没有小数点,首位不能为类似于 01、02的值
|
|
// 如果没有净重 ,则不进行计算
|
if(clean){
|
this.showWeigh[index].cinderWeight = (value - 0)
|
let x = new BigNumber(clean - 0)
|
let y = new BigNumber(value - 0)
|
let z = new BigNumber(znums.reduce((p,n)=>{
|
return (p - 0) + (n - 0)
|
},0))
|
console.log(clean,value,'扣渣');
|
if(x.minus(y).toFixed(2) <= 0){
|
this.showWeigh[index].weight = '0';
|
this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
|
}else{
|
console.log(znums.length)
|
this.showWeigh[index].weight = x.minus(y);
|
}
|
}else{
|
this.$u.toast('当前无净重')
|
}
|
|
|
|
},
|
// 选择不合格品名
|
selectunqualifiedBreed(index) {
|
if (this.roleType === 4 && !this.flag) {
|
// this.unqualifiedShow = true
|
// this.unqualifiedIndex = index
|
uni.navigateTo({
|
url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${index}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=edit`
|
})
|
}
|
},
|
unqualifiedClose() {
|
this.unqualifiedShow = false
|
},
|
selectUnqualifiedClick(val) {
|
this.showWeigh[this.unqualifiedIndex].unqualifiedBreed = val.secondCategoryName + val.spec
|
},
|
// 不合格重量输入
|
unqualifiedWeightInputHandle(value, index, clean) {
|
// 判断是不是有净重才进行计算
|
let x = new BigNumber(clean - 0)
|
this.indexFlag = index; // 记录标识位
|
let y = new BigNumber(value - 0)
|
let z = new BigNumber(this.showWeigh[index].cinderWeight - 0);
|
if(x.minus(y).minus(z).toFixed(2) <= 0){
|
this.showWeigh[index].weight = '0';
|
this.$u.toast('当前净重不合格,请检查皮重,毛重是否准确')
|
}else{
|
this.showWeigh[index].weight = x.minus(y).minus(z).toFixed(4) ;
|
}
|
|
|
},
|
// 删除图片
|
deletePic(event) {
|
this.showWeigh[event.name].fileList.splice(event.index, 1);
|
},
|
// 新增图片
|
async afterRead(event) {
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
let lists = [].concat(event.file);
|
let fileListLen = this.showWeigh[event.name].fileList.length;
|
lists.map(item => {
|
this.showWeigh[event.name].fileList.push({
|
...item,
|
status: 'uploading',
|
message: '上传中'
|
});
|
});
|
for (let i = 0; i < lists.length; i++) {
|
const result = await this.uploadFilePromise(lists[i].url, event.name);
|
let item = this.showWeigh[event.name].fileList[fileListLen];
|
this.showWeigh[event.name].fileList.splice(
|
fileListLen,
|
1,
|
Object.assign(item, {
|
status: 'success',
|
message: '上传成功',
|
url: result
|
})
|
);
|
fileListLen++;
|
}
|
},
|
uploadFilePromise(url, num) {
|
return new Promise((resolve, reject) => {
|
let a = uni.uploadFile({
|
url: BaseUrl + '/admin/sys-file/uploadUnToken',
|
filePath: url,
|
name: 'file',
|
formData: {},
|
success: res => {
|
resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
|
}
|
});
|
});
|
},
|
//点击tab 切换展示明细
|
tabChange(val){
|
this.current = val;
|
},
|
//下拉框聚焦时间
|
onFoucus(val){
|
this.focusSelect = true;
|
|
},
|
closeEvent(){
|
this.focusSelect = false;
|
},
|
//增加不合格规矩
|
addUnqualified(i){
|
if (this.roleType === 4 && !this.flag) {
|
// this.unqualifiedShow = true
|
// this.unqualifiedIndex = index
|
this.indexFlag = i; // 记录标识位
|
uni.navigateTo({
|
url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${i}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=add`
|
})
|
console.log(this.globalShowWeigh[i],'2222')
|
// this.numAll(this.globalShowWeigh[i].unqualifiedWeights.split(","),i,this.showWeigh[i].clean)
|
}
|
},
|
deleteItem(i,index){
|
let {unqualifiedBreed,unqualifiedWeights,unqualifiedType,penaltyUnitPrice} = this.globalShowWeigh[i];
|
this.indexFlag = i; // 记录标识位
|
console.log(this.globalShowWeigh[i],'index')
|
if (this.roleType === 4 && !this.flag) {
|
if( unqualifiedBreed !== void 0 && unqualifiedWeights!== void 0 ){
|
if(unqualifiedBreed.split(',').length > 1){
|
// unqualifiedBreed = unqualifiedBreed.split(',').splice(index ,1).join(",")
|
let strArr = unqualifiedBreed.split(',');
|
strArr.splice(index ,1)
|
unqualifiedBreed = strArr.join(",")
|
}else{
|
unqualifiedBreed = '';
|
}
|
|
if(unqualifiedWeights.split(',').length > 1){
|
// unqualifiedWeights = unqualifiedWeights.split(',').splice(index,1).join(",")
|
let strArr = unqualifiedWeights.split(',');
|
strArr.splice(index ,1)
|
unqualifiedWeights = strArr.join(",")
|
}else{
|
unqualifiedWeights = '';
|
}
|
|
// if(unqualifiedType.split(",").length > 1){
|
// let strArr = unqualifiedType.split(',');
|
// strArr.splice(index ,1)
|
// unqualifiedType = strArr.join(",")
|
// }else{
|
// unqualifiedType = '';
|
// }
|
if(penaltyUnitPrice.split(",").length > 1){
|
let strArr = penaltyUnitPrice.split(',');
|
strArr.splice(index ,1)
|
penaltyUnitPrice = strArr.join(",")
|
}else{
|
penaltyUnitPrice = '';
|
}
|
this.globalShowWeigh[i].unqualifiedBreed = unqualifiedBreed;
|
this.globalShowWeigh[i].unqualifiedWeights = unqualifiedWeights;
|
// this.globalShowWeigh[i].unqualifiedType = unqualifiedType;
|
this.globalShowWeigh[i].penaltyUnitPrice = penaltyUnitPrice;
|
this.globalShowWeigh[i].tempArr.splice(index,1)
|
console.log(this.globalShowWeigh[i].unqualifiedBreed,'unqualifiedBreed')
|
this.changeglobalShowWeigh(this.globalShowWeigh)
|
|
}
|
this.numAll(this.globalShowWeigh[this.indexFlag].unqualifiedWeights.split(","),this.indexFlag,this.showWeigh[this.indexFlag].clean)
|
console.log(this.globalShowWeigh[i],'deleteItem');
|
}
|
|
},
|
editItem(i,index){
|
this.indexFlag = i; // 记录标识位
|
if (this.roleType === 4 && !this.flag) {
|
// this.unqualifiedShow = true
|
// this.unqualifiedIndex = index
|
uni.navigateTo({
|
url: `/pages/public-page/selectSpecifications/selectSpecifications?index=${i}&takeCoalId=${this.orderPlanId}&unqualified=${this.willUnqualified}&type=edit&indexTo=${index}`
|
})
|
}
|
},
|
amountChange(value,event){
|
|
// //超尺扣罚
|
// if(event.penaltyAmount){
|
// console.log("触发1")
|
// if(!event.penaltyType.includes('1')){
|
// event.penaltyType.push('1')
|
// console.log("触发PUsh1")
|
// }
|
// }
|
// //厚度
|
// if(event.thickPenaltyAmount){
|
// if(!event.penaltyType.includes('2')){
|
// event.penaltyType.push('2')
|
// }
|
// }
|
// //密闭器
|
// if(event.obturatorPenaltyAmount){
|
// if(!event.penaltyType.includes('3')){
|
// event.penaltyType.push('3')
|
// }
|
// }
|
// //其他
|
// if(event.qita){
|
// if(!event.penaltyType.includes('4')){
|
// event.penaltyType.push('4')
|
// }
|
// }
|
console.log(event,'event')
|
|
},
|
dateInpFoucs(){
|
console.log('聚焦');
|
this.dateInpShow = true;
|
},
|
datechange(value){
|
console.log('dateChange',value,formatDate.formatDate(new Date(value)) );
|
this.dateValue = (formatDate.formatDate(new Date(value)) + ':' + '00');
|
|
|
}
|
},
|
}
|
</script>
|
|
<style lang="scss"
|
scoped>
|
@mixin flex {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.weigh-qualified{
|
display: flex;
|
width: 340rpx;
|
flex-direction: row;
|
height:auto;
|
|
}
|
.weight-box{
|
display: flex;
|
margin-bottom: 20rpx;
|
flex-direction: column;
|
overflow-y: scroll;
|
}
|
|
/deep/ .u-picker {
|
height: 600rpx;
|
}
|
.addBtn{
|
width: 65%;
|
font-size: 26rpx;
|
background-color: #3c9cff;;
|
}
|
|
.main {
|
width: 100%;
|
height: 100%;
|
min-height: 400rpx;
|
background-color: #fff;
|
padding: 10rpx 0;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
overflow-x: hidden;
|
|
.main-block {
|
width: 690rpx;
|
min-height: 360rpx;
|
margin: vww(20) auto;
|
padding: vww(5);
|
background: #ffffff;
|
box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11);
|
border-radius: 20rpx;
|
overflow: hidden;
|
position: relative;
|
|
.weigh-item {
|
width: 100%;
|
height: vww(36);
|
margin: vww(10);
|
@include flex;
|
justify-content: space-around;
|
|
.item {
|
min-width: vww(50);
|
height: vww(45);
|
font-size: 21rpx;
|
font-weight: 400;
|
color: #ffffff;
|
text-align: center;
|
line-height: vww(30);
|
@include flex;
|
|
.concrete {
|
width: vww(36);
|
height: vww(36);
|
}
|
|
.num {
|
font-size: 40rpx;
|
font-weight: 300;
|
color: #303030;
|
}
|
}
|
}
|
|
.discount {
|
@include flex;
|
justify-content: space-around;
|
width: 100%;
|
line-height: vww(36);
|
|
.rate,
|
.weigh {
|
width: 50%;
|
height: vww(80);
|
display: flex;
|
align-items: center;
|
justify-content: space-around;
|
flex-direction: column;
|
|
.count-input {
|
width: 70%;
|
border-bottom: 1px solid rgb(218, 219, 222);
|
}
|
}
|
|
.weigh {
|
justify-content: space-between;
|
}
|
|
.count {
|
font-size: 40rpx;
|
color: rgb(242, 70, 79);
|
}
|
|
}
|
|
.notice-num {
|
@extend .discount;
|
align-items: center;
|
justify-content: space-evenly;
|
margin-left: 50rpx;
|
margin-top: 30rpx;
|
|
.num-text {
|
width: 30%;
|
}
|
|
.num-input {
|
width: 60%;
|
border-bottom: 1px solid rgb(218, 219, 222);
|
position: relative;
|
}
|
.num-radio{
|
width: 100%;
|
font-size: 100rpx;
|
}
|
|
.num-show {
|
width: 60%;
|
color: #303030
|
}
|
}
|
|
.unqualifiedBreed {
|
@extend .level;
|
}
|
|
.level {
|
width: 89%;
|
margin: 30rpx 80rpx;
|
display: flex;
|
justify-content: flex-start;
|
|
.tag-select {
|
flex: 1;
|
margin-left: 14rpx;
|
text-align: center;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
border: 1rpx solid rgb(60, 156, 255);
|
padding: 8rpx 14rpx;
|
color: rgb(60, 156, 255);
|
font-size: 26rpx;
|
|
.tag-select_text {
|
// width: vww(180);
|
// border: 1rpx solid rgb(60, 156, 255);
|
// padding: 8rpx 14rpx;
|
// color: rgb(60, 156, 255);
|
// font-size: 26rpx;
|
}
|
}
|
}
|
|
.select-button {
|
width: 100%;
|
@include flex;
|
justify-content: flex-end;
|
margin-bottom: 40rpx;
|
position: absolute;
|
right: vww(-120);
|
bottom: vww(-10);
|
|
/deep/ .u-button {
|
width: 180rpx !important;
|
}
|
}
|
|
}
|
|
.confirm-button {
|
width: 100%;
|
@include flex;
|
justify-content: center;
|
margin-bottom: 40rpx;
|
}
|
}
|
.tabs{
|
font-size: 20rpx!important;
|
}
|
.u-card-wrap {
|
background-color: $u-bg-color;
|
padding: 1px;
|
}
|
|
.u-body-item {
|
font-size: 32rpx;
|
color: #333;
|
padding: 20rpx 10rpx;
|
}
|
|
.u-body-item image {
|
width: 120rpx;
|
flex: 0 0 120rpx;
|
height: 120rpx;
|
border-radius: 8rpx;
|
margin-left: 12rpx;
|
}
|
.kouFa-box{
|
display: flex;
|
flex-wrap: wrap;
|
.koufaBox-item{
|
width: 42%!important;
|
font-size: 26rpx;
|
.num-text{
|
width: 42%!important;
|
}
|
|
}
|
|
}
|
</style>
|