Browse Source

修改按计划完工 2024/7/19 11:25:56

pull/1/head
zhang_li 5 months ago
parent
commit
f4097fede8
  1. 27
      src/api/request2.js
  2. 13
      src/common/basic.js
  3. 8
      src/common/style/new_style.css
  4. 1
      src/mycomponents/scan/winComScanFg.vue
  5. 168
      src/pages/fg/coms/comReceiptPopup.vue
  6. 423
      src/pages/fg/receiptByPlan.vue
  7. 4
      src/pages/repleinsh/job/repleinshJob.vue

27
src/api/request2.js

@ -2641,14 +2641,37 @@ export function getPlaneInfoByproductLine(productionLine,planDate) {
}
/**
*
* 计划完工提交
* @param {*}
*/
export function planReceiptSubmit(data) {
return http.post("/wms/production-main/getPlanProductionByProductionLineAndPlanDate",data)
return http.post( "/wms/productreceipt-record-main/createByPlan",data)
}
/**
* @param {Object} params 创建计划完工后调用上架申请 number
*/
export function createPutawayRequestByPlan(number) {
return http.post("/wms/productreceipt-record-main/createPutawayRequest?number="+number)
}
/**
* @param {Object} params 创建检验申请 number
*/
export function createInspectRequestByPlan(number) {
return http.post("/wms/productreceipt-record-main/createInspectRequest?number="+number)
}
/**
* @param {Object} params 查询计划报工单号 number
*/
export function getPlanByNumber(data) {
return http.post("/wms/production-detail/senior",data)
}
//查询生产线
export function getProductionlineAndWorkStation() {
return http.get("/wms/production-main/getProductionlineAndWorkStation")
}

13
src/common/basic.js

@ -896,6 +896,15 @@ export function dateFormat(time) {
return result;
}
export function dateFormatData(time) {
var result = ""
if (time != null) {
let date = new Date(time);
result = getDate(date);
}
return result;
}
//获取日期部分
export function getDate(date) {
@ -1069,3 +1078,7 @@ export function deepCopyData(target) {
return cloneTarget;
}
//数组去重重复数据
export function uniqueArray(arr) {
return arr.filter((item, index, self) => self.indexOf(item) === index);
}

8
src/common/style/new_style.css

@ -2480,6 +2480,14 @@ button[disabled] {
text-align: center;
width: 180rpx;
}
.btn_single_clear {
background-color: #EBEEF0;
font-size: 30rpx;
color: #000;
text-align: center;
width: 180rpx;
}
.btn_single_reject {
background-color: #F56C6C;

1
src/mycomponents/scan/winComScanFg.vue

@ -169,6 +169,7 @@ const handelScanMsg = () => {
.then((res) => {
try {
if (res.data.list.length == 0) {
clear()
throw new Error(`没有查找到物料号【${itemCode.value}】对应的生产条码配置`)
}
const result = res.data.list[0] // Mes

168
src/pages/fg/coms/comReceiptPopup.vue

@ -45,7 +45,6 @@
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectLine"> </image>
</view>
</view>
<view class="split_line"></view>
<!-- <view class="title " style="display: flex;align-items: center;padding: 10rpx;">
<text style=" flex-shrink: 0; width: 25%;">计划数量</text>
<view class="customerBorder">
@ -60,9 +59,9 @@
<view class="title" style="display: flex; align-items: center; padding: 10rpx">
<text style="flex-shrink: 0; width: 25%">包装规格</text>
<view class="customerBorder">
{{ packUnit }}
{{ packUnitName }}
</view>
<u-select v-model="showPackUnitSelect" mode="mutil-column" :list="packUnitList" @confirm="confirmSelectPackUnit"></u-select>
<u-select v-model="showPackUnitSelect" mode="single-column" :list="packUnitList" @confirm="confirmSelectPackUnit"></u-select>
<view class="">
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectPackUnit"> </image>
</view>
@ -86,7 +85,9 @@
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js'
import { getPackUnitName, getUomInfo } from '@/common/directory.js'
import { getCurrDate, getBatch8 } from '@/common/basic.js'
import { getCurrDate, getBatch8, dateFormatData } from '@/common/basic.js'
import { calc } from '@/common/calc.js'
import uom from '@/mycomponents/qty/uom.vue'
import packQty from '@/mycomponents/qty/packQty.vue'
@ -104,19 +105,25 @@ export default {
return {
itemCode: '请选择物料信息',
uom: '',
qty: null,
planQty: 0,
number: '',
goodQty: 0,
planNumber: '',
productLineCode: '',
showProductLineSelect: false,
productLineList: [],
productionLineName: '请选择生产线',
productionLineCode: '',
batch: '',
packUnit: '请选择包装规格',
packUnitName: '请选择包装规格',
packUnit: '',
packUnitList: [],
packQtyHint: '',
packQty: 0,
showPackUnitSelect: false,
itemCodeList: [],
showItemCodeSelect: false,
packUnitList: []
workStationCode: ''
}
},
props: {
@ -139,18 +146,22 @@ export default {
this.itemCode = '请选择物料信息'
this.uom = ''
this.planQty = 0
this.number = ''
this.goodQty = 0
this.packQty = 0
this.planNumber = ''
this.productLineCode = ''
this.showProductLineSelect = false
this.productLineList = []
this.productionLineName = '请选择生产线'
this.productionLineCode = ''
this.batch = ''
this.packUnit = '请选择包装规格'
this.packUnitName = '请选择包装规格'
;(this.packUnit = ''), (this.packQtyHint = '')
this.showPackUnitSelect = false
// this.packUnitList = []
this.itemCodeList = []
this.showItemCodeSelect = false
this.workStationCode = ''
},
closeRequestPopup() {
@ -176,7 +187,7 @@ export default {
return
}
if (this.itemCode == '请选择包装规格') {
if (this.packUnitName == '请选择包装规格') {
this.showErrorMessage('请选择包装规格')
return
}
@ -189,11 +200,16 @@ export default {
productionLineName: this.productionLineName,
productionLineCode: this.productionLineCode, // 线
itemCode: this.itemCode,
uom: this.uom,
uom: this.getUomInfo(this.uom),
batch: this.batch,
packUnit: 'packUnit',
packUnitName: this.packUnitName,
packUnit: this.packUnit,
packQtyHint: this.packQtyHint,
packQty: this.packQty,
planQty: this.planQty,
number: this.number
goodQty: this.goodQty,
planNumber: this.planNumber,
workStationCode: this.workStationCode
}
this.closeRequestPopup()
this.$emit('confirm', item)
@ -209,8 +225,9 @@ export default {
},
confirmSelectLine(data) {
this.productionLineName = data[0].label
this.productionLineName = `${data[0].label}${data[1].label}`
this.productionLineCode = data[0].value
this.workStationCode = data[1].value
},
showSelectLine() {
@ -223,9 +240,6 @@ export default {
.then((res) => {
uni.hideLoading()
if (res.data && res.data.length > 0) {
// res.data.forEach(item => {
// item.label = item.name
// })
this.productLineList = res.data
this.showProductLineSelect = true
} else {
@ -245,87 +259,75 @@ export default {
this.showErrorMessage('请先选择生产线')
return
}
if (this.itemCodeList.length == 0) {
console.log('当天', getCurrDate())
uni.showLoading({
title: '加载中',
mask: true
console.log('当天', getCurrDate())
uni.showLoading({
title: '加载中',
mask: true
})
getPlaneInfoByproductLine(this.productionLineCode, getCurrDate())
.then((res) => {
uni.hideLoading()
if (res.data && res.data.length > 0) {
res.data.forEach((item) => {
item.label = `${item.itemCode}${item.planQty}${item.uom})` + `(${dateFormatData(item.planDate)})`
item.value = item
})
this.itemCodeList = res.data
this.showItemCodeSelect = true
} else {
this.showErrorMessage('未查找到物料信息')
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
getPlaneInfoByproductLine(this.productionLineCode, getCurrDate())
.then((res) => {
uni.hideLoading()
if (res.data && res.data.length > 0) {
res.data.forEach((item) => {
item.label = `${item.itemCode}${item.planQty}${item.uom})`
item.value = item
})
this.itemCodeList = res.data
this.showItemCodeSelect = true
} else {
this.showErrorMessage('未查找到物料信息')
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
this.showItemCodeSelect = true
}
},
confirmSelectItem(data) {
const productionPlan = data[0].value
this.itemCode = productionPlan.itemCode
// var item = this.itemCodeList.find(res => res.itemCode == this.itemCode)
this.uom = productionPlan.uom
this.planQty = productionPlan.planQty
this.number = productionPlan.number
// this.itemCode = data[0].label
// var item = this.itemCodeList.find(res => res.itemCode == this.itemCode)
// this.uom = item.uom
// this.planQty = item.planQty
// this.number = item.number
this.goodQty = productionPlan.goodQty
this.planNumber = productionPlan.number
},
showSelectPackUnit() {
if (this.packUnitList.length == 0) {
if (this.itemCode == '请选择物料信息') {
this.showErrorMessage('请先选择物料')
return
}
if (this.itemCode == '请选择物料信息') {
this.showErrorMessage('请先选择物料')
return
}
uni.showLoading({
title: '加载中',
mask: true
uni.showLoading({
title: '加载中',
mask: true
})
getPackUnitByItemCode(this.itemCode)
.then((res) => {
uni.hideLoading()
if (res.data && res.data.list.length > 0) {
res.data.list.forEach((item) => {
item.value = item.packUnit
item.label = `${getPackUnitName(item.packUnit)}(${item.packQty}${this.getUomInfo(item.uom)})`
})
this.packUnitList = res.data.list
this.showPackUnitSelect = true
} else {
this.showErrorMessage('未查找到包装信息')
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
getPackUnitByItemCode(this.itemCode)
.then((res) => {
uni.hideLoading()
if (res.data && res.data.list.length > 0) {
res.data.list.forEach((item) => {
item.value = item.packUnit
item.label = `${getPackUnitName(item.packUnit)}(${item.packQty}${this.getUomInfo(item.uom)})`
})
// this.packUnitList = res.data.list
this.showPackUnitSelect = true
} else {
this.showErrorMessage('未查找到包装信息')
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
this.showPackUnitSelect = true
}
},
confirmSelectPackUnit(data) {
const pack = this.packUnitList.filter((r) => r.packUnit == data[0].value)[0]
// this.packUnit = pack.packQty;
this.packUnit = data[0].label
this.packUnitName = data[0].label
this.packUnit = data[0].value
const pack = this.packUnitList.filter((r) => r.packUnit == this.packUnit)
this.packQtyHint = `${pack[0].packQty}(${this.getUomInfo(pack[0].uom)})`
this.packQty = pack[0].packQty
},
getUomInfo(uom) {
const item = getUomInfo(uom)

423
src/pages/fg/receiptByPlan.vue

@ -1,78 +1,135 @@
<template>
<view class="page-wraper" style="background-color: #fff">
<view class="">
<com-blank-view @goScan="openFg" v-if="!dataContent"></com-blank-view>
</view>
<view class="page-wraper" v-if="dataContent">
<view class="" style="font-size: 35rpx; padding: 10rpx; padding-left: 15rpx"> 生产计划{{ dataContent.number }} </view>
<view class="split_line"></view>
<view class="header">
<view class="">
<item-qty :dataContent="dataContent" :isShowBalanceQty="false"></item-qty>
<com-blank-view @goScan="openFg" v-if="!dataContent"></com-blank-view>
</view>
<view class="split_line"></view>
<view class="" style="margin-left: 20rpx">
<batch :batch="dataContent.batch"></batch>
<view class="card_view">
<text style="color: #ffa500; padding: 5px; font-size: 35rpx">包装规格</text>
<text class="card_content">{{ dataContent.packUnit }}</text>
<view class="" v-if="dataContent">
<view class="" style="font-size: 35rpx; padding: 10rpx; padding-left: 15rpx"> 生产计划{{ dataContent.planNumber }} </view>
<view class="split_line"></view>
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">计划数</view>
<view>{{ dataContent.planQty }}{{ dataContent.uom }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">已完工</view>
<view>{{ dataContent.goodQty }}{{ dataContent.uom }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">未完工</view>
<view>{{ dataContent.noGoodQty }}{{ dataContent.uom }}</view>
</view>
</view>
<view class="split_line"></view>
<view class="" style="padding-top: 10rpx; padding-bottom: 10rpx; margin-left: 10rpx">
<item :dataContent="dataContent"></item>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between" style="align-items: center">
<view style="word-break: break-all">
<batch :batch="dataContent.batch"></batch>
<view class="card_view">
<text style="color: #ffa500; padding: 5px; font-size: 30rpx">包装规格</text>
<text class="card_content">{{ dataContent.packUnit }} </text>
</view>
</view>
<view style="word-break: break-all; font-size: 35rpx; font-weight: bold">
<text v-if="dataContent.handleQty > 0" style="color: #ffa500">{{ dataContent.handleQty }}/</text>
{{ dataContent.packQtyHint }}
</view>
</view>
<view class="split_line" v-if="dataContent"></view>
</view>
<view class="split_line"></view>
<view class="page-main">
<uni-swipe-action>
<view class="scan_view" v-for="(item, index) in dataContent.subList" :key="index">
</view>
<view style="margin-top: 480rpx; padding-bottom: 160rpx" v-if="dataContent">
<scroll-view scroll-y="true" class="">
<view class="scan_view" v-for="(item, index) in showList" :key="index">
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" @click="swipeClick($event, item, index)">
<view class="" style="margin-left: 40rpx; padding-top: 10rpx; padding-bottom: 10rpx">
<text style="font-size: 35rpx; color: #b66463">唯一码</text>
<text style="font-size: 35rpx"> {{ item.code }}</text>
<view class="uni-flex uni-row" style="margin-left: 50rpx; padding-top: 10rpx; padding-bottom: 10rpx">
<view class="auto-wrap" style="font-size: 35rpx; font-weight: bold; width: 100%">
<text style="font-size: 30rpx; color: #b66463">唯一码 </text>
{{ item.content }}
</view>
</view>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class="">
<view class="uni-flex uni-row"> </view>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_clear" style="margin-right: 50rpx" hover-class="btn_clear_after" @click="clear">清空</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
</view>
</scroll-view>
<uni-load-more :status="loadingType" v-if="showList.length > 0" />
</view>
<view class="page-footer" v-if="dataContent">
<view class="uni-flex u-col-center space-between" style="background-color: ghostwhite; width: 100%">
<view class="">
<view class="uni-flex uni-row"> </view>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_clear" hover-class="btn_commit_after" style="margin-right: 50rpx" @click="clear">清空</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<comReceiptPopup ref="comReceiptPopupRef" @confirm="requestConfirm"></comReceiptPopup>
<win-scan-button v-if="dataContent" @goScan="openScanPopup"></win-scan-button>
<win-scan-fg-label ref="scanPopup" @getResult="getScanResult" title="制品标签"></win-scan-fg-label>
<win-scan-fg-label ref=" " @getResult="getScanResult" title="制品标签"></win-scan-fg-label>
<com-message ref="comMessageRef" />
</view>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onShow, onLoad, onNavigationBarButtonTap } from '@dcloudio/uni-app'
import { isCheckMesCode, planReceiptSubmit } from '@/api/request2.js'
import { getRemoveOption } from '@/common/basic.js'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { isCheckMesCode, planReceiptSubmit, createPutawayRequestByPlan, createInspectRequestByPlan, getPlanByNumber } from '@/api/request2.js'
import { calc } from '@/common/calc.js'
import { getRemoveOption, deepCopyData, getCurrDateTime, compare } from '@/common/basic.js'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comReceiptPopup from '@/pages/fg/coms/comReceiptPopup.vue'
import itemQty from '@/mycomponents/item/itemQty.vue'
import item from '@/mycomponents/item/item.vue'
import batch from '@/mycomponents/balance/batch.vue'
import pack from '@/mycomponents/balance/pack.vue'
import winScanFgLabel from '@/mycomponents/scan/winScanFgLabel.vue'
import comFgCard from '@/pages/productReceipt/coms/comFgCard.vue'
const dataContent = ref(null)
const options = ref([])
const showList = ref([])
const allList = ref([])
const index = ref(1)
const loadingType = ref('')
const loadingType = ref('')
const pageSize = ref(20)
const comReceiptPopupRef = ref()
const scanPopup = ref()
const comMessageRef = ref()
const comReceiptPopupRef = ref()
onLoad(() => {
options.value = getRemoveOption()
openFg()
})
onReachBottom(() => {
console.log('onReachBottom')
//
if (loadingType.value == 'nomore') {
return
}
index.value++
const list = getDataPage(index.value, pageSize.value)
if (list.length > 0) {
// this.showList=list
showList.value = showList.value.concat(list)
} else {
//
loadingType.value = 'nomore'
}
})
const openFg = () => {
setTimeout((res) => {
if (comReceiptPopupRef.value) {
@ -83,46 +140,155 @@ const openFg = () => {
const requestConfirm = (result) => {
dataContent.value = {
itemCode: result.itemCode,
number: result.number, //
planNumber: result.planNumber, //
handleQty: 0,
qty: result.planQty,
batch: result.batch,
packUnit: '3031',
qty: 0,
planQty: result.planQty,
goodQty: result.goodQty,
noGoodQty: calc.sub(result.planQty, result.goodQty),
packQtyHint: result.packQtyHint,
packQty: result.packQty,
uom: result.uom,
subList: [
{
code: '1234'
},
{
code: '12345'
}
]
batch: result.batch,
packUnit: result.packUnit,
workStationCode: result.workStationCode,
subList: []
}
}
const initList = () => {
index.value = 1
showList.value = []
loadingType.value = ''
showList.value = getDataPage(index.value, pageSize.value)
}
const getDataPage = (pageNo, pageSize) => {
//
const totalPages = Math.ceil(allList.value.length / pageSize)
//
const start = (pageNo - 1) * pageSize
const end = start + pageSize //
return allList.value.slice(start, end)
}
const swipeClick = (e, dataContent, index) => {
if (e.content.text == '移除') {
dataContent.value.subList.splice(index, 1)
comMessageRef.value.showQuestionMessage('是否要移除', (res) => {
if (res) {
allList.value.splice(index, 1)
initList()
}
})
}
}
const commit = () => {
planReceiptSubmit(params)
.then((res) => {
uni.hideLoading()
if (res.data) {
showCommitSuccessMessage(res.data)
} else {
showErrorMessage(`提交失败[${res.msg}]`)
}
const commit = async () => {
if (allList.value.length == 0) {
showErrorMessage('请先扫描唯一码')
return
}
try {
const params = setParams()
uni.showLoading({
title: '提交中...',
mask: true
})
.catch((error) => {
uni.hideLoading()
showErrorMessage(error)
const list = []
const planData = await planReceiptSubmit(params)
if (planData.data) {
planData.data.forEach((item) => {
list.push({
itemCode: item.itemCode, //
itemName: item.itemName, //
packName: item.packName, //
packageCode: item.toPackingNumber, //
batch: item.toBatch, //
parentNumber: item.parentNumber, //
itemType: item.itemType, //
asnNumber: item.asnNumber, // ASN
supplierCode: item.supplierCode, //
qty: item.qty, //
printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, // 线
barcodeString: item.barcodeString, //
barcodeBase64: '',
requestNumber: item.requestNumber
})
})
} else {
throw new Error('提交失败')
}
createPutawayRequestByPlan(list[0].requestNumber).then((res) => {
createInspectRequestByPlan(list[0].requestNumber)
})
const queryParams = {
filters: [
{
column: 'plan_type',
action: '==',
value: 'assemble'
},
{
column: 'number',
action: '==',
value: dataContent.value.planNumber
}
],
pageNo: 1,
pageSize: 100
}
const planeInfo = await getPlanByNumber(queryParams)
if (planeInfo.data && planeInfo.data.list.length > 0) {
if (planeInfo.data.list[0].goodQty >= planeInfo.data.list[0].planQty) {
clear()
} else {
dataContent.value.planNumber = planeInfo.data.list[0].number
dataContent.value.handleQty = 0
dataContent.value.planQty = planeInfo.data.list[0].planQty
dataContent.value.goodQty = planeInfo.data.list[0].goodQty
;(dataContent.value.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[0].goodQty)), (dataContent.value.subList = [])
showList.value = []
allList.value = []
index.value = 1
}
} else {
throw new Error('未查找到单据信息')
}
uni.hideLoading()
showCommitSuccessMessage('提交成功<br>生成报工记录<br>', list)
} catch (error) {
uni.hideLoading()
const hint = error.message ? error.message : error
showErrorMessage(hint)
}
}
const setParams = () => {
allList.value.forEach((res) => {
res.outsideItemCode = res.itemCode
res.outsideProduceDate = null
res.outsideSerialNumber = res.order
})
dataContent.value.subList = allList.value
return dataContent.value
}
const clear = () => {
comMessageRef.value.showQuestionMessage('是否要清空?', (res) => {
if (res) {
clearData()
openFg()
}
})
}
const clearData = () => {
dataContent.value = null
showList.value = []
allList.value = []
index.value = 1
}
const openScanPopup = () => {
const { itemCode } = dataContent.value
// itemCode = "015553147"
console.log('物料', itemCode)
scanPopup.value.openScanPopup(itemCode)
}
@ -132,28 +298,30 @@ const getScanResult = (result) => {
isCheckMesCode(result.content)
.then((res) => {
if (res.data) {
if (dataContent.value) {
const list = dataContent.value.subList //
const itemIndex = list.findIndex(
(r) =>
r.itemCode == result.itemCode &&
// r.productDate == result.productDate &&
r.order == result.order
)
if (that.dataContent) {
const itemIndex = allList.value.findIndex((r) => r.itemCode == result.itemCode && r.order == result.order)
//
if (itemIndex == -1) {
list.push(result)
// if (this.allList.length > this.dataContent.packQty) {
// this.showErrorMessage("")
// return;
// }
result.countTime = new Date()
allList.value.push(result)
allList.value.sort(compare('countTime')) //
initList()
scanPopupGetFocus()
calcFgQty()
} else {
showErrorMessage(`标签【${result.content}】已经扫描,是否移除`, (confirm) => {
list.splice(itemIndex, 1)
calcFgQty()
comMessageRef.value.showQuestionMessage(`唯一码【${result.content}】已经扫描,是否移除`, (res) => {
if (res) {
allList.value.splice(itemIndex, 1)
allList.value.sort(compare('countTime')) //
initList()
calcFgQty()
}
})
}
setTimeout((r) => {
scanPopupGetFocus()
}, 500)
}
}
})
@ -162,8 +330,11 @@ const getScanResult = (result) => {
})
}
const calcFgQty = () => {
dataContent.value.handleQty = dataContent.value.subList.length
if (dataContent.value.handleQty == dataContent.value.qty) {
dataContent.value.handleQty = allList.value.length
if (dataContent.value.handleQty == dataContent.value.packQty) {
if (scanPopup.value) {
scanPopup.value.closeScanPopup()
}
commit()
}
}
@ -177,12 +348,90 @@ const scanPopupLoseFocus = () => {
scanPopup.value.losefocus()
}
}
const showCommitSuccessMessage = (hint) => {
const showCommitSuccessMessage = (hint, pointData) => {
comMessageRef.value.showSuccessMessage(hint, (res) => {
dataContent.value = null
openFg()
if (pointData.length > 0) {
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
})
}
})
}
const showErrorMessage = (message) => {
comMessageRef.value.showErrorMessage(message, (res) => {
if (res) {
scanPopupGetFocus()
}
})
}
</script>
<style></style>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.header {
position: fixed;
/* #ifdef H5 */
top: 88rpx;
/* #endif */
left: 0;
width: 100%;
background-color: #fff;
z-index: 10;
padding: 10rpx;
/* 确保头部在内容之上 */
}
.page-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
.item {
background-color: #fff;
}
.item_scaned {
background-color: antiquewhite;
}
.auto-wrap {
white-space: normal;
word-break: break-all;
overflow-wrap: break-word;
/* 对于兼容性更好的情况 */
}
</style>

4
src/pages/repleinsh/job/repleinshJob.vue

@ -136,8 +136,8 @@ const getList = (type, fromLocationCode = '') => {
filters,
pageNo: pageNo.value,
pageSize: pageSize.value,
sort: 'fromLocationCode',
by: 'asc'
sort: 'number',
by: 'desc'
}
getRepleinshJobList(params)
.then((res) => {

Loading…
Cancel
Save