|  |  |  | 
|---|
|  |  |  | <span>扫码产出</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> --> | 
|---|
|  |  |  | <div class="bg_cate"> | 
|---|
|  |  |  | <div @click="clickIten(index)" :class="typeView == index ? 'bg_cate_item active' : 'bg_cate_item'" v-for="(item, index) in cate" :key="index">{{ item.name }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!--  投料明细/合格产出明细/不良产出明细  --> | 
|---|
|  |  |  | <div class="bg_list"> | 
|---|
|  |  |  | <div class="bg_list_item"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left_x"></div> | 
|---|
|  |  |  | <span>投料明细</span> | 
|---|
|  |  |  | <!-- <span class="blue left">{{tlTotal()}}</span> --> | 
|---|
|  |  |  | <div class="bg_list" v-if="typeView === 0"> | 
|---|
|  |  |  | <div class="bg_list_item"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left_x"></div> | 
|---|
|  |  |  | <span>投料明细</span> | 
|---|
|  |  |  | <!-- <span class="blue left">{{tlTotal()}}</span> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_top_right" @click="jumpTL" v-if="proxy.$auth('h5:workorderinput:create') && (info.bomType !== 1 || info.bomType == 0 || !info.bomType)"> | 
|---|
|  |  |  | <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> | 
|---|
|  |  |  | <span>手动录入</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_top_right" @click="jumpTL" v-if="proxy.$auth('h5:workorderinput:create') && (info.bomType !== 1 || info.bomType == 0 || !info.bomType)"> | 
|---|
|  |  |  | <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> | 
|---|
|  |  |  | <span>手动录入</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <template v-if="feedingData && feedingData.length > 0"> | 
|---|
|  |  |  | <van-swipe-cell v-for="(item, index) in feedingData" :key="index"> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <!-- <span>{{item.code}}</span> --> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_wl"> | 
|---|
|  |  |  | <span> {{ item.materialName }}{{ item.procedureName ? ` | ${item.procedureName}` : '' }}</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_wl_lx"> | 
|---|
|  |  |  | <span class="green" v-if="item.qualityType == 0">合格 / </span> | 
|---|
|  |  |  | <span class="yellow" v-if="item.qualityType == 1">不良 / </span> | 
|---|
|  |  |  | <span class="red" v-if="item.qualityType == 2">报废 / </span> | 
|---|
|  |  |  | <span>{{ item.locationName }}</span> | 
|---|
|  |  |  | <span>{{ item.batch ? ` / ${item.batch}` : '' }}</span> | 
|---|
|  |  |  | <template v-if="feedingData && feedingData.length > 0"> | 
|---|
|  |  |  | <van-swipe-cell v-for="(item, index) in feedingData" :key="index"> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <!-- <span>{{item.code}}</span> --> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_wl"> | 
|---|
|  |  |  | <span> {{ item.materialName }}{{ item.procedureName ? ` | ${item.procedureName}` : '' }}</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_wl_lx"> | 
|---|
|  |  |  | <span class="green" v-if="item.qualityType == 0">合格 / </span> | 
|---|
|  |  |  | <span class="yellow" v-if="item.qualityType == 1">不良 / </span> | 
|---|
|  |  |  | <span class="red" v-if="item.qualityType == 2">报废 / </span> | 
|---|
|  |  |  | <span>{{ item.locationName }}</span> | 
|---|
|  |  |  | <span>{{ item.batch ? ` / ${item.batch}` : '' }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <input v-model="item.num" :disabled="!proxy.$auth('h5:workorderinput:update')" @blur="change(item.id, item.num, 'T', item.maxNum, item, item.unitAttribute)" type="number" /> | 
|---|
|  |  |  | <span>{{item.unitName}}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <input v-model="item.num" :disabled="!proxy.$auth('h5:workorderinput:update')" @blur="change(item.id, item.num, 'T', item.maxNum, item, item.unitAttribute)" type="number" /> | 
|---|
|  |  |  | <span>{{item.unitName}}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template #right v-if="proxy.$auth('h5:workorderinput:delete')"> | 
|---|
|  |  |  | <van-button style="height: 100%;" square text="删除" @click="deleItem(item.id, 'T')" type="danger" /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <template v-else> | 
|---|
|  |  |  | <div class="kong"> | 
|---|
|  |  |  | <span>暂无数据</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left_x"></div> | 
|---|
|  |  |  | <span>产出明细</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- <template v-if="produceData && produceData.length > 0"> --> | 
|---|
|  |  |  | <!-- v-for="(item, index) in produceData" :key="index" --> | 
|---|
|  |  |  | <van-swipe-cell> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>良品数({{ info.umodel ? info.umodel.name : '' }})</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" --> | 
|---|
|  |  |  | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" --> | 
|---|
|  |  |  | <input type="number" v-model="produceFrom.qualified" @blur="changeCC('0', produceFrom.qualified, produceFrom.qualifiedId)" placeholder="请输入" /> | 
|---|
|  |  |  | <span v-if="info.umodel">{{info.umodel.name}}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template #right v-if="proxy.$auth('h5:workorderinput:delete')"> | 
|---|
|  |  |  | <van-button style="height: 100%;" square text="删除" @click="deleItem(item.id, 'T')" type="danger" /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <template v-else> | 
|---|
|  |  |  | <div class="kong"> | 
|---|
|  |  |  | <span>暂无数据</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left_x"></div> | 
|---|
|  |  |  | <span>产出明细</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- <template v-if="produceData && produceData.length > 0"> --> | 
|---|
|  |  |  | <!-- v-for="(item, index) in produceData" :key="index" --> | 
|---|
|  |  |  | <van-swipe-cell> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>良品数({{ info.umodel ? info.umodel.name : '' }})</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" --> | 
|---|
|  |  |  | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" --> | 
|---|
|  |  |  | <input type="number" v-model="produceFrom.qualified" @blur="changeCC('0', produceFrom.qualified, produceFrom.qualifiedId)" placeholder="请输入" /> | 
|---|
|  |  |  | <span v-if="info.umodel">{{info.umodel.name}}</span> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | <van-swipe-cell> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" --> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>不良数({{ info.umodel ? info.umodel.name : '' }})</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" --> | 
|---|
|  |  |  | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" --> | 
|---|
|  |  |  | <input type="number" v-model="produceFrom.undesirable" @blur="changeCC('1', produceFrom.undesirable, produceFrom.undesirableId)" placeholder="请输入" /> | 
|---|
|  |  |  | <span v-if="info.umodel">{{info.umodel.name}}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | <van-swipe-cell> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" --> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>不良数({{ info.umodel ? info.umodel.name : '' }})</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" --> | 
|---|
|  |  |  | <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" --> | 
|---|
|  |  |  | <input type="number" v-model="produceFrom.undesirable" @blur="changeCC('1', produceFrom.undesirable, produceFrom.undesirableId)" placeholder="请输入" /> | 
|---|
|  |  |  | <span v-if="info.umodel">{{info.umodel.name}}</span> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | <van-swipe-cell v-if="produceFrom.undesirable > 0"> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item" @click="show = true"> | 
|---|
|  |  |  | <span>不良项</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="wulll" :style="{color: from.defectiveName ? '#305ED5' : ''}">{{from.defectiveName ? from.defectiveName : '设置'}}</span> | 
|---|
|  |  |  | <img src="@/assets/icon/ic_ar@2x.png" alt="" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | <!-- </template> | 
|---|
|  |  |  | <template v-else> | 
|---|
|  |  |  | <div class="kong"> | 
|---|
|  |  |  | <span>暂无数据</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | <van-swipe-cell v-if="produceFrom.undesirable > 0"> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item" @click="show = true"> | 
|---|
|  |  |  | <span>不良项</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="wulll" :style="{color: from.defectiveName ? '#305ED5' : ''}">{{from.defectiveName ? from.defectiveName : '设置'}}</span> | 
|---|
|  |  |  | <img src="@/assets/icon/ic_ar@2x.png" alt="" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_plan" @click="TimeShow = true"> | 
|---|
|  |  |  | <div class="bg_plan_label"> | 
|---|
|  |  |  | <span>报工时长</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_plan_label_val"> | 
|---|
|  |  |  | <span :style="{color: from.durationName ? '#333' : ''}">{{from.durationName ? from.durationName : '请选择'}}</span> | 
|---|
|  |  |  | <img src="@/assets/icon/ic_ar@2x.png" alt="" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item" v-if="arrType && arrType.length > 0"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left_x"></div> | 
|---|
|  |  |  | <span>工资绩效</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>计件方式</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_list"> | 
|---|
|  |  |  | <div :class="item.active ? 'bg_list_item_num_item_list_item active' : 'bg_list_item_num_item_list_item'" v-for="(item, index) in arrType" :key="index" @click="clickPerformanceType(index)">{{ item.name }}</div> | 
|---|
|  |  |  | <!-- <div class="bg_list_item_num_item_list_item active" v-if="infoBox.type == 0">计件</div> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_list_item active" v-if="infoBox.type == 1">计时</div> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </van-swipe-cell> | 
|---|
|  |  |  | <!-- </template> | 
|---|
|  |  |  | <template v-else> | 
|---|
|  |  |  | <div class="kong"> | 
|---|
|  |  |  | <span>暂无数据</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_plan" @click="TimeShow = true"> | 
|---|
|  |  |  | <div class="bg_plan_label"> | 
|---|
|  |  |  | <span><b>*</b>报工时长</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_plan_label_val"> | 
|---|
|  |  |  | <span :style="{color: from.durationName ? '#333' : ''}">{{from.durationName ? from.durationName : '请选择'}}</span> | 
|---|
|  |  |  | <img src="@/assets/icon/ic_ar@2x.png" alt="" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item" v-if="infoBox"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left_x"></div> | 
|---|
|  |  |  | <span>工资绩效</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_h"> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>计件方式</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_list"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_list_item active" v-if="infoBox.type == 0">计件</div> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_list_item active" v-if="infoBox.type == 1">计时</div> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>工资单价</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="color1">{{(arrType[from.index].salary / 10 / 10).toFixed(2)}}元/{{arrType[from.index].type == 0 ? '件' : '时'}}</span> | 
|---|
|  |  |  | <!-- <span class="color1">{{infoBox.salary / 100}}元/{{infoBox.type == 0 ? '件' : '时'}}</span> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>工资单价</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="color1">{{infoBox.salary / 100}}元/{{infoBox.type == 0 ? '件' : '时'}}</span> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>预计工资</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="color1">{{expectedSalary}}元</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>预计工资</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="color1">{{expectedSalary}}元</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>达标率</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="color1">{{complianceRate}}%</span> | 
|---|
|  |  |  | <div class="bg_list_item_num"> | 
|---|
|  |  |  | <div class="bg_list_item_num_item"> | 
|---|
|  |  |  | <span>达标率</span> | 
|---|
|  |  |  | <div class="bg_list_item_num_item_sr"> | 
|---|
|  |  |  | <span class="color1">{{complianceRate}}%</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- <div class="bg_list_item"> | 
|---|
|  |  |  | <div class="bg_list_item_top"> | 
|---|
|  |  |  | <div class="bg_list_item_top_left"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </div> --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="details_dj"> | 
|---|
|  |  |  | <div class="details_dj_title"> | 
|---|
|  |  |  | <div class="details_dj" v-if="typeView === 1"> | 
|---|
|  |  |  | <!-- <div class="details_dj_title"> | 
|---|
|  |  |  | <div class="details_dj_title_left"> | 
|---|
|  |  |  | <div class="details_x"></div> | 
|---|
|  |  |  | <span>生产点检</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> | 
|---|
|  |  |  | <span>手动录入</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> --> | 
|---|
|  |  |  | <div class="details_dj_list"> | 
|---|
|  |  |  | <van-list | 
|---|
|  |  |  | v-model:loading="loading" | 
|---|
|  |  |  | 
|---|
|  |  |  | <template v-if="info.status === 2 || info.procedureNeedcheck === 1"> | 
|---|
|  |  |  | <div class="bh_zw"></div> | 
|---|
|  |  |  | <div class="bg_footer"> | 
|---|
|  |  |  | <div class="bg_footer_submit" @click="submit">确认报工</div> | 
|---|
|  |  |  | <div class="bg_footer_submit" v-if="typeView == 0" @click="submit">确认报工</div> | 
|---|
|  |  |  | <div class="bg_footer_submit1" @click="jumpdj" v-if="proxy.$auth('h5:workorder:processRecord') && typeView == 1"> | 
|---|
|  |  |  | <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" /> | 
|---|
|  |  |  | <span>新增点检</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <!--  扫码组件  --> | 
|---|
|  |  |  | 
|---|
|  |  |  | @closePopup="closePopup" | 
|---|
|  |  |  | @onDecode="onDecode" /> | 
|---|
|  |  |  | <!--  报工统计数据  --> | 
|---|
|  |  |  | <van-popup v-model:show="statistics" round :closeable="true" position="bottom" :style="{ height: '53%' }"> | 
|---|
|  |  |  | <van-popup v-model:show="statistics" round :closeable="true" position="bottom"> | 
|---|
|  |  |  | <div class="tg"> | 
|---|
|  |  |  | <div class="tg_header">请确认报工信息</div> | 
|---|
|  |  |  | <div class="tg_table"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup lang="ts"> | 
|---|
|  |  |  | import { getCurrentInstance, nextTick, onMounted, ref, reactive, computed } from 'vue' | 
|---|
|  |  |  | import { getCurrentInstance, nextTick, onMounted, ref, reactive, computed, onActivated } from 'vue' | 
|---|
|  |  |  | import { useRouter, useRoute } from "vue-router" | 
|---|
|  |  |  | import { Dialog, Toast } from 'vant' | 
|---|
|  |  |  | import { REGULAR } from '@/utils/utils' | 
|---|
|  |  |  | import { categoryExtList, queryOne } from '@/apis/PlanningAPI' | 
|---|
|  |  |  | import { categoryExtList, queryOne, queryList } from '@/apis/PlanningAPI' | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | getBarcodeContent, | 
|---|
|  |  |  | queryById, | 
|---|
|  |  |  | 
|---|
|  |  |  | } from '@/apis/WorkOrderAPI' | 
|---|
|  |  |  | import { QRCodeType } from '@/enum' | 
|---|
|  |  |  | const { proxy }: any = getCurrentInstance() | 
|---|
|  |  |  | const { $Bus }  = getCurrentInstance().appContext.config.globalProperties | 
|---|
|  |  |  | import VWorkOrderInfo from '@/components/common/WorkOrderInfo.vue' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const router = useRouter() | 
|---|
|  |  |  | 
|---|
|  |  |  | let from: any = reactive({ | 
|---|
|  |  |  | time: '', | 
|---|
|  |  |  | defective: [], | 
|---|
|  |  |  | defectiveName: '' | 
|---|
|  |  |  | defectiveName: '', | 
|---|
|  |  |  | durationName: '0小时0分钟', | 
|---|
|  |  |  | duration: 0, | 
|---|
|  |  |  | index: 0 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let cate = ref([{ name: '生产' }, { name: '点检' }]) | 
|---|
|  |  |  | let typeView = ref(0) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const clickIten = (i: number) => { | 
|---|
|  |  |  | typeView.value = i | 
|---|
|  |  |  | if (i === 1) { | 
|---|
|  |  |  | finished.value = false | 
|---|
|  |  |  | page.capacity = 1 | 
|---|
|  |  |  | pageDJs() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 预计工资 | 
|---|
|  |  |  | const expectedSalary = computed(() => { | 
|---|
|  |  |  | if (!infoBox.value) return 0; | 
|---|
|  |  |  | if (arrType.value.length === 0) return 0; | 
|---|
|  |  |  | // 按件计算 | 
|---|
|  |  |  | if (infoBox.value.type == 0) { | 
|---|
|  |  |  | if (arrType.value[from.index].type == 0) { | 
|---|
|  |  |  | if (!produceFrom.qualified) return 0 | 
|---|
|  |  |  | if (infoBox.value.unqualified == 1) {   // 是否计入不良品 | 
|---|
|  |  |  | if (arrType.value[from.index].unqualified == 1) {   // 是否计入不良品 | 
|---|
|  |  |  | let total = Number(produceFrom.qualified) + Number(produceFrom.undesirable) | 
|---|
|  |  |  | return (total * (infoBox.value.salary / 100)).toFixed(2) || 0 | 
|---|
|  |  |  | return (total * (arrType.value[from.index].salary / 100)).toFixed(2) || 0 | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | return (Number(produceFrom.qualified) * (infoBox.value.salary / 100)).toFixed(2) || 0 | 
|---|
|  |  |  | return (Number(produceFrom.qualified) * (arrType.value[from.index].salary / 100)).toFixed(2) || 0 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | if (!from.duration) return 0; | 
|---|
|  |  |  | let h = (from.duration / 60 / 60).toFixed(2) | 
|---|
|  |  |  | return (Number(h) * (infoBox.value.salary / 10 / 10)).toFixed(2) || 0 | 
|---|
|  |  |  | return (Number(h) * (arrType.value[from.index].salary / 10 / 10)).toFixed(2) || 0 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 达标率 | 
|---|
|  |  |  | const complianceRate = computed(() => { | 
|---|
|  |  |  | if (!infoBox.value) return 0; | 
|---|
|  |  |  | if (arrType.value.length === 0) return 0; | 
|---|
|  |  |  | if (!produceFrom.qualified && !produceFrom.undesirable) return 0; | 
|---|
|  |  |  | if (!from.duration) return 0; | 
|---|
|  |  |  | if (!arrType.value[from.index].num) return 0; | 
|---|
|  |  |  | // 按件计算 | 
|---|
|  |  |  | // if (infoBox.value.type == 0) { | 
|---|
|  |  |  | if (infoBox.value.unqualified == 1) {   // 是否计入不良品 | 
|---|
|  |  |  | let a = ((Number(from.qualified) + Number(from.undesirable)) / (from.duration / 60 / 60)).toFixed(2) | 
|---|
|  |  |  | let b = (infoBox.value.num / (infoBox.value.times / 60 / 60)).toFixed(2) | 
|---|
|  |  |  | if (arrType.value[from.index].unqualified == 1) {   // 是否计入不良品 | 
|---|
|  |  |  | let a = ((Number(produceFrom.qualified) + Number(produceFrom.undesirable)) / (from.duration / 3600)).toFixed(2) | 
|---|
|  |  |  | let b = (arrType.value[from.index].num / (arrType.value[from.index].times / 3600)).toFixed(2) | 
|---|
|  |  |  | console.log(a) | 
|---|
|  |  |  | console.log(b) | 
|---|
|  |  |  | return (Number(a) / Number(b)).toFixed(2) || 0 | 
|---|
|  |  |  | return ((Number(a) / Number(b)) * 100).toFixed(2) | 
|---|
|  |  |  | // let total = (Number(from.qualified) + Number(from.undesirable)) / ((from.duration * 60 * 60) * infoBox.value.num / ) | 
|---|
|  |  |  | // return total * infoBox.value.salary; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | let a = (produceFrom.qualified / (from.duration / 60 / 60)).toFixed(2) | 
|---|
|  |  |  | let b = (infoBox.value.num / (infoBox.value.times / 60 / 60)).toFixed(2) | 
|---|
|  |  |  | let a = (produceFrom.qualified / (from.duration / 3600)).toFixed(2) | 
|---|
|  |  |  | let b = (arrType.value[from.index].num / (arrType.value[from.index].times / 3600)).toFixed(2) | 
|---|
|  |  |  | console.log(a) | 
|---|
|  |  |  | console.log(b) | 
|---|
|  |  |  | return (Number(a) / Number(b)).toFixed(2) || 0 | 
|---|
|  |  |  | return ((Number(a) / Number(b)) * 100).toFixed(2) | 
|---|
|  |  |  | // return Number(from.qualified) * infoBox.value.salary; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // } else { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 扫码类型 | 
|---|
|  |  |  | let type: any = ref('') | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let arrType: any = ref([]) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 统计数据 | 
|---|
|  |  |  | let statisticsData: any = ref([ | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | djData.value = [] | 
|---|
|  |  |  | finished.value = false | 
|---|
|  |  |  | page.page = 0 | 
|---|
|  |  |  | page.page = 1 | 
|---|
|  |  |  | djData.value = [] | 
|---|
|  |  |  | pageDJs() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  | return `${total}${scrap.value[0].company}` | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 切换绩效类型 | 
|---|
|  |  |  | const clickPerformanceType = (i: number) => { | 
|---|
|  |  |  | from.index = i | 
|---|
|  |  |  | arrType.value.forEach((item: any, index: number) => { | 
|---|
|  |  |  | if (i === index) { | 
|---|
|  |  |  | from.type = item.id | 
|---|
|  |  |  | } | 
|---|
|  |  |  | item.active = index === i | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 删除产出/投料 | 
|---|
|  |  |  | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | info.value = res.data | 
|---|
|  |  |  | // 获取工资绩效数据 | 
|---|
|  |  |  | queryOne({ | 
|---|
|  |  |  | queryList({ | 
|---|
|  |  |  | deleted: 0, | 
|---|
|  |  |  | departId: res.data.factoryId, | 
|---|
|  |  |  | materialId: res.data.materialId, | 
|---|
|  |  |  | procedureId: res.data.procedureId | 
|---|
|  |  |  | }).then((result: any) => { | 
|---|
|  |  |  | if (result.code === 200) { | 
|---|
|  |  |  | infoBox.value = result.data | 
|---|
|  |  |  | if (result.data && result.data.length > 0) { | 
|---|
|  |  |  | result.data.forEach((item: any, index: number) => { | 
|---|
|  |  |  | item.name = item.type == 0 ? '计件' : '计时' | 
|---|
|  |  |  | item.id = item.type | 
|---|
|  |  |  | item.active = index == 0 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | arrType.value = result.data | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | arrType.value = [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // infoBox.value = result.data | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // if (result.code === 200) { | 
|---|
|  |  |  | //     infoBox.value = result.data | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 确认报工 | 
|---|
|  |  |  | const submitBG = () => { | 
|---|
|  |  |  | if (!from.duration || from.duration <= 0) { | 
|---|
|  |  |  | return Toast('报工时长不能为空') | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // if (!from.duration || from.duration <= 0) { | 
|---|
|  |  |  | //     return Toast('报工时长不能为空') | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | let createUnqualifiedDTOList = from.defective.map((item: any) => { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | categoryId: item.id, | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | let createWorkorderRecordDTO = { | 
|---|
|  |  |  | workorderId: route.query.id, | 
|---|
|  |  |  | duration: from.duration, | 
|---|
|  |  |  | duration: from.duration ? from.duration : 0, | 
|---|
|  |  |  | qualifiedNum: produceFrom.qualified ? produceFrom.qualified : 0, | 
|---|
|  |  |  | unQualifiedNum: produceFrom.undesirable ? produceFrom.undesirable : 0 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onActivated(() => { | 
|---|
|  |  |  | // $Bus.on('callback1', (res: any)=>{ | 
|---|
|  |  |  | //     console.log(res) | 
|---|
|  |  |  | //     if (res == 1) { | 
|---|
|  |  |  | //         djData.value = [] | 
|---|
|  |  |  | //         finished.value = false | 
|---|
|  |  |  | //         page.page = 1 | 
|---|
|  |  |  | //         djData.value = [] | 
|---|
|  |  |  | //         pageDJs() | 
|---|
|  |  |  | //     } | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  | // queryByIds() | 
|---|
|  |  |  | // getOrocessRecords() | 
|---|
|  |  |  | // getData() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | pageDJs() | 
|---|
|  |  |  | // $Bus.on('callback1', (res: any)=>{ | 
|---|
|  |  |  | //     if (res == 1) { | 
|---|
|  |  |  | //         djData.value = [] | 
|---|
|  |  |  | //         finished.value = false | 
|---|
|  |  |  | //         page.page = 1 | 
|---|
|  |  |  | //         djData.value = [] | 
|---|
|  |  |  | //         pageDJs() | 
|---|
|  |  |  | //     } | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  | // pageDJs() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | queryByIds() | 
|---|
|  |  |  | getOrocessRecords() | 
|---|
|  |  |  | getData() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // getOrocessRecordCC() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | color: #ffffff; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .bg_cate { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 88px; | 
|---|
|  |  |  | background: #FFFFFF; | 
|---|
|  |  |  | margin-top: 20px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | .active { | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | color: #305ED5 !important; | 
|---|
|  |  |  | border-bottom: 2PX solid #305ED5; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .bg_cate_item { | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | font-size: 30px; | 
|---|
|  |  |  | font-family: PingFangSC-Regular, PingFang SC; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | color: #555555; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .bg_list { | 
|---|
|  |  |  | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | padding: 0 30px 60px 30px; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | .bg_footer_submit1 { | 
|---|
|  |  |  | width: 690px; | 
|---|
|  |  |  | height: 76px; | 
|---|
|  |  |  | background: #FFFFFF; | 
|---|
|  |  |  | border-radius: 36px; | 
|---|
|  |  |  | border: 1px solid #E5E5E5; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | img { | 
|---|
|  |  |  | width: 28px; | 
|---|
|  |  |  | height: 28px; | 
|---|
|  |  |  | margin-right: 12px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | span { | 
|---|
|  |  |  | font-size: 26px; | 
|---|
|  |  |  | font-family: PingFangSC-Regular, PingFang SC; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | color: #305ED5; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .bg_footer_submit { | 
|---|
|  |  |  | width: 690px; | 
|---|
|  |  |  | height: 88px; | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .tg { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | height: 800px; | 
|---|
|  |  |  | padding: 30px; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | .tg_header { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .nr { | 
|---|
|  |  |  | max-height: 400px; | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | max-height: calc(100% - 133px); | 
|---|
|  |  |  | overflow-x: scroll; | 
|---|
|  |  |  | .tg_table_nr { | 
|---|
|  |  |  | width: 100%; | 
|---|