更新打印状态

This commit is contained in:
z 2025-07-24 17:35:36 +08:00
parent b607ef3026
commit 22837fdc12
25 changed files with 271 additions and 76 deletions

View File

@ -151,7 +151,7 @@ public class bdgzsomthingController {
BeanUtils.toBean(list, bdgzsomthingRespVO.class)); BeanUtils.toBean(list, bdgzsomthingRespVO.class));
} }
@Scheduled(fixedRate = 10800000) // @Scheduled(fixedRate = 10800000)
public void scheduledTask() { public void scheduledTask() {
bdgzsomthingService.selectds(); bdgzsomthingService.selectds();
} }
@ -159,8 +159,8 @@ public class bdgzsomthingController {
//@Scheduled(cron = "0 2 0 * * ?") //每天十天执行一次 //@Scheduled(cron = "0 2 0 * * ?") //每天十天执行一次
@PostConstruct @PostConstruct
public void init() { public void init() {
selectHasPrice(); // selectHasPrice();
selectSafeStorageAndDeliverOneYear(); // selectSafeStorageAndDeliverOneYear();
// bdgzsomthingService.selectds(); // bdgzsomthingService.selectds();
} }
@Scheduled(cron = "0 0 2 * * ?") @Scheduled(cron = "0 0 2 * * ?")

View File

@ -118,6 +118,7 @@ public class PgMasterLinePageReqVO extends PageParam {
@Schema(description = "报工状态") @Schema(description = "报工状态")
private String active; private String active;
@Schema(description = "项目或子项目id")
private String subOrDetailName;
} }

View File

@ -158,5 +158,10 @@ public class PurchaseOrderNoController {
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) {
return purchaseOrderNoService.deleteForm(id); return purchaseOrderNoService.deleteForm(id);
} }
@GetMapping("/updateIsPrint")
@Operation(summary = "打印")
@PreAuthorize("@ss.hasPermission('heli:process-bom:create')")
public CommonResult<Boolean> updateIsPrint(@RequestParam("id") Long id) {
return purchaseOrderNoService.updateIsPrint(id);
}
} }

View File

@ -113,4 +113,12 @@ public class StorageInController {
public CommonResult<Boolean> warehousing(@RequestParam("id") Long id) { public CommonResult<Boolean> warehousing(@RequestParam("id") Long id) {
return storageInService.warehousing(id); return storageInService.warehousing(id);
} }
@GetMapping("/updateIsPrint")
@Operation(summary = "修改打印状态")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:storage-in:query')")
public CommonResult<Boolean> updateIsPrint(@RequestParam("id") Long id) {
return success(storageInService.updateIsPrint(id));
}
} }

View File

@ -81,5 +81,6 @@ public class ZjPgMasterLinePageReqVO extends PageParam {
@Schema(description = "派工状态", example = "1-2-3") @Schema(description = "派工状态", example = "1-2-3")
private Integer dispatchStatus; private Integer dispatchStatus;
@Schema(description = "扫码查询")
private String subOrDetailName;
} }

View File

@ -91,10 +91,16 @@ public interface PgMasterLineMapper extends BaseMapperX<PgMasterLineDO> {
} }
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType()) .eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) .eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus());
if (reqVO.getSubOrDetailName() != null && !reqVO.getSubOrDetailName().trim().equals("")){
query.and( e ->e.like(PgMasterLineDO::getProjectName, reqVO.getSubOrDetailName()).or().like(
PgMasterLineDO::getProjectSubName, reqVO.getSubOrDetailName()
).or().like(PgMasterLineDO::getMaterialName, reqVO.getSubOrDetailName()));
// query.eq(" (b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
}
;
return selectPage(reqVO, query); return selectPage(reqVO, query);
} }

View File

@ -58,11 +58,11 @@ public interface TaskReportMapper extends BaseMapperX<TaskReportDO> {
.like(!StringUtils.isEmpty(reqVO.getMaterialName()), ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName()) .like(!StringUtils.isEmpty(reqVO.getMaterialName()), ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName())
.like(!StringUtils.isEmpty(reqVO.getOwnerName()), AdminUserDO::getNickname, reqVO.getOwnerName()) .like(!StringUtils.isEmpty(reqVO.getOwnerName()), AdminUserDO::getNickname, reqVO.getOwnerName())
.eq(!StringUtils.isEmpty(reqVO.getDispatchDetailId()),TaskReportDO::getDispatchDetailId,reqVO.getDispatchDetailId()); .eq(!StringUtils.isEmpty(reqVO.getDispatchDetailId()),TaskReportDO::getDispatchDetailId,reqVO.getDispatchDetailId());
if (reqVO.getStartTime() != null) { // if (reqVO.getStartTime() != null) {
query.between( TaskReportDO::getStartTime, reqVO.getStartTime()[0], reqVO.getStartTime()[1]); // query.between( TaskReportDO::getStartTime, reqVO.getStartTime()[0], reqVO.getStartTime()[1]);
} // }
if (reqVO.getStartTime() != null) { if (reqVO.getEndTime() != null) {
query.between(TaskReportDO::getEndTime, reqVO.getEndTime()[0], reqVO.getEndTime()[1]); query.between(TaskReportDO::getReportTime, reqVO.getEndTime()[0], reqVO.getEndTime()[1]);
} }
return selectPage(reqVO, query); return selectPage(reqVO, query);
} }

View File

@ -118,7 +118,12 @@ public interface ZjPgMasterLineMapper extends BaseMapperX<ZjPgMasterLineDO> {
.eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) .eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
; ;
if (reqVO.getSubOrDetailName() != null && !reqVO.getSubOrDetailName().trim().equals("")){
query.and( e ->e.like(ZjPgMasterLineDO::getProjectName, reqVO.getSubOrDetailName()).or().like(
ZjPgMasterLineDO::getProjectSubName, reqVO.getSubOrDetailName()
));
// query.eq(" (b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
}
return selectPage(reqVO, query); return selectPage(reqVO, query);
} }
default int deleteByZlPgId(Integer zlPgId) { default int deleteByZlPgId(Integer zlPgId) {

View File

@ -1120,6 +1120,8 @@ public class ProcessBomServiceImpl implements ProcessBomService {
boomDO.setBoomDetailId(processBomDetailDO.getId()); boomDO.setBoomDetailId(processBomDetailDO.getId());
boomDO.setBoomAmount(new BigDecimal(processBomDetailDO.getAmounts())); boomDO.setBoomAmount(new BigDecimal(processBomDetailDO.getAmounts()));
boomDO.setBoomArriveDate(processBomDetailDO.getBoomArriveDate()); boomDO.setBoomArriveDate(processBomDetailDO.getBoomArriveDate());
boomDO.setArriveTime(processBomDetailDO.getBoomArriveDate());
boomDO.setPurchaseAmount(new BigDecimal(processBomDetailDO.getAmounts()));
boomDO.setMatName(processBomDetailDO.getMaterialName()); boomDO.setMatName(processBomDetailDO.getMaterialName());
boomDO.setDuEmpId(processBomDetailDO.getDuEmpId()); boomDO.setDuEmpId(processBomDetailDO.getDuEmpId());
boomDO.setProjectPlanSubId(processBomDetailDO.getProjectSubId()); boomDO.setProjectPlanSubId(processBomDetailDO.getProjectSubId());

View File

@ -63,4 +63,6 @@ public interface PurchaseOrderNoService {
CommonResult<Boolean> deleteForm(Long id); CommonResult<Boolean> deleteForm(Long id);
void updatePORSById(Long id); void updatePORSById(Long id);
CommonResult<Boolean> updateIsPrint(Long id);
} }

View File

@ -400,4 +400,13 @@ public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
purchaseOrderNoMapper.update(wrapper); purchaseOrderNoMapper.update(wrapper);
} }
@Override
public CommonResult<Boolean> updateIsPrint(Long id) {
LambdaUpdateWrapper<PurchaseOrderNoDO> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(PurchaseOrderNoDO::getId,id);
wrapper.set(PurchaseOrderNoDO::getIsPrint,"Y");
purchaseOrderNoMapper.update(wrapper);
return CommonResult.success(true);
}
} }

View File

@ -61,4 +61,6 @@ public interface StorageInService {
CommonResult<Boolean> standardPartsReceived(List<PurchaseOrderNoDetailDO> list); CommonResult<Boolean> standardPartsReceived(List<PurchaseOrderNoDetailDO> list);
CommonResult<Boolean> warehousing(Long id); CommonResult<Boolean> warehousing(Long id);
Boolean updateIsPrint(Long id);
} }

View File

@ -466,4 +466,13 @@ public class StorageInServiceImpl implements StorageInService {
return CommonResult.success(true); return CommonResult.success(true);
} }
@Override
public Boolean updateIsPrint(Long id) {
LambdaUpdateWrapper<StorageInDO> wrapper = new LambdaUpdateWrapper<>();
wrapper.eq(StorageInDO::getId,id);
wrapper.set(StorageInDO::getIsPrint,"Y");
storageInMapper.update(wrapper);
return true;
}
} }

View File

@ -77,3 +77,7 @@ export const isPrint = async (id: number) => {
export const countReview = async () => { export const countReview = async () => {
return await request.get({ url: `/heli/purchase-order-make/countReview` }) return await request.get({ url: `/heli/purchase-order-make/countReview` })
} }
// 打印接口
export const updateIsPrint = async (id: number) => {
return await request.get({ url: `/heli/purchase-order-no/updateIsPrint?id=` + id })
}

View File

@ -56,3 +56,7 @@ export const standardPartsReceived = async (data: StorageInVO) => {
export const warehousing = async (id: number) => { export const warehousing = async (id: number) => {
return await request.get({ url: `/heli/storage-in/warehousing?id=` + id }) return await request.get({ url: `/heli/storage-in/warehousing?id=` + id })
} }
// 查询入库单详情
export const updateIsPrint = async (id: number) => {
return await request.get({ url: `/heli/storage-in/updateIsPrint?id=` + id })
}

View File

@ -15,8 +15,8 @@
<el-form-item label="零件名称" prop="materialName"> <el-form-item label="零件名称" prop="materialName">
<el-input v-model="queryParams.materialName" placeholder="请输入零件名称" clearable @keyup.enter="handleQuery" class="!w-240px" /> <el-input v-model="queryParams.materialName" placeholder="请输入零件名称" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item> </el-form-item>
<el-form-item label="件状态" prop="status"> <el-form-item label="件状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择标准件状态" clearable class="!w-240px"> <el-select v-model="queryParams.status" placeholder="请选择件状态" clearable class="!w-240px">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_PLAN_BOOM_STATUS)" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_MATERIAL_PLAN_BOOM_STATUS)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -142,7 +142,7 @@ const subBoomFormRef = ref()
const closeForm = async () => { const closeForm = async () => {
router.push({ path: '/purchase/management' }) router.push({ path: '/purchase/partmanagement' })
tagsViewStore.delVisitedView(router.currentRoute.value) tagsViewStore.delVisitedView(router.currentRoute.value)
} }
const userList = ref<UserApi.UserVO[]>([]) // const userList = ref<UserApi.UserVO[]>([]) //

View File

@ -1095,10 +1095,9 @@ const closeForm = async () => {
tagsViewStore.delVisitedView(router.currentRoute.value) tagsViewStore.delVisitedView(router.currentRoute.value)
} }
const deleteForm = async () => { const deleteForm = async () => {
//
await message.confirm('确认删除当前采购订单?') await message.confirm('确认删除当前采购订单?')
await PurchaseOrderApi.deletePurchaseOrder(formData.value.id) await PurchaseOrderNoApi.deletePurchaseOrderNo(formData.value.id)
router.push({ path: '/purchase/purchaseorder' }) router.push({ path: '/purchase/purchaseorder' })
tagsViewStore.delVisitedView(router.currentRoute.value) tagsViewStore.delVisitedView(router.currentRoute.value)
} }

View File

@ -222,6 +222,7 @@ import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno'
import * as PurchaseOrderNoDetailApi from '@/api/heli/purchaseordernodetail' import * as PurchaseOrderNoDetailApi from '@/api/heli/purchaseordernodetail'
import {PurchaseOrderNoDetailVO} from "@/api/heli/purchaseordernodetail"; import {PurchaseOrderNoDetailVO} from "@/api/heli/purchaseordernodetail";
import {ref} from "vue"; import {ref} from "vue";
import {updateIsPrint} from "@/api/heli/purchaseorderno";
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
@ -391,6 +392,7 @@ function doPrint() {
iframe.contentWindow?.print() iframe.contentWindow?.print()
setTimeout(() => document.body.removeChild(iframe), 1000) setTimeout(() => document.body.removeChild(iframe), 1000)
} }
PurchaseOrderNoApi.updateIsPrint(query.id);
} }

View File

@ -87,7 +87,7 @@
<span style="margin-left:20px;width: 110px">联系人{{ printData.contactName }}</span> <span style="margin-left:20px;width: 110px">联系人{{ printData.contactName }}</span>
<span style="margin-left:20px;width: 150px">电话{{ printData.contactMobile }}</span> <span style="margin-left:20px;width: 150px">电话{{ printData.contactMobile }}</span>
</div> </div>
</div> </div>
</div> </div>
<table class="print-table"> <table class="print-table">
@ -166,7 +166,7 @@
</div> </div>
</div> </div>
</div> </div>
<template #footer> <template #footer>
<el-button @click="printDialogVisible = false">关闭</el-button> <el-button @click="printDialogVisible = false">关闭</el-button>
@ -314,22 +314,22 @@ function doPrint() {
.order-info { .order-info {
justify-content: space-between; justify-content: space-between;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
} }
.stamp-info { .stamp-info {
margin-top: 10px; margin-top: 10px;
} }
.stamp-info span{ .stamp-info span{
font-size: 15px !important; font-size: 15px !important;
} }
.order-info span{ .order-info span{
font-size: 15px !important; font-size: 15px !important;
} }
.print-table { .print-table {
width: 100%; width: 100%;
@ -348,7 +348,7 @@ function doPrint() {
} }
@media print { @media print {
body { margin: 0; } body { margin: 0; }
.print-content { .print-content {
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 10px; padding: 10px;
@ -368,7 +368,8 @@ function doPrint() {
iframe.contentWindow?.print() iframe.contentWindow?.print()
setTimeout(() => document.body.removeChild(iframe), 1000) setTimeout(() => document.body.removeChild(iframe), 1000)
} }
PurchaseOrderNoApi.updateIsPrint(query.id)
} }
function limitTo20Chars(input) { function limitTo20Chars(input) {
@ -412,12 +413,12 @@ const getList = async () => {
body * { body * {
visibility: hidden; visibility: hidden;
} }
/* 只显示打印区域 */ /* 只显示打印区域 */
#printArea, #printArea * { #printArea, #printArea * {
visibility: visible; visibility: visible;
} }
/* 打印区域定位 */ /* 打印区域定位 */
#printArea { #printArea {
position: absolute; position: absolute;
@ -425,7 +426,7 @@ const getList = async () => {
top: 0; top: 0;
width: 100%; width: 100%;
} }
/* 隐藏弹窗相关元素 */ /* 隐藏弹窗相关元素 */
.el-dialog, .el-dialog__wrapper, .el-dialog__header, .el-dialog__footer { .el-dialog, .el-dialog__wrapper, .el-dialog__header, .el-dialog__footer {
display: none !important; display: none !important;
@ -434,7 +435,7 @@ const getList = async () => {
.order-info { .order-info {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -446,11 +447,11 @@ const getList = async () => {
} }
.stamp-info { .stamp-info {
margin-top: 10px; margin-top: 10px;
} }
.stamp-info span{ .stamp-info span{
font-size: 15px !important; font-size: 15px !important;
} }
.print-table { .print-table {
width: 100%; width: 100%;
@ -471,12 +472,12 @@ const getList = async () => {
} }
.print-table th { .print-table th {
background-color: #f5f7fa; background-color: #f5f7fa;
color: #303133; color: #303133;
font-weight: 600; font-weight: 600;
font-size: 13px !important; font-size: 13px !important;
} }
</style> </style>

View File

@ -44,7 +44,7 @@
<!-- 采购单信息 --> <!-- 采购单信息 -->
<el-card class="hl-card-info"> <el-card class="hl-card-info">
<template #header> <template #header>
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购单信息</span> <div class="hl-card-info-icona"></div><span class="hl-card-info-text">入库单信息</span>
</template> </template>
<el-row> <el-row>
<el-col> <el-col>
@ -190,6 +190,7 @@ const tagsViewStore = useTagsViewStore()
import * as StorageinApi from '@/api/heli/storagein' import * as StorageinApi from '@/api/heli/storagein'
import * as StorageinDetailApi from '@/api/heli/storageindetail' import * as StorageinDetailApi from '@/api/heli/storageindetail'
import {ref} from "vue"; import {ref} from "vue";
import {updateIsPrint} from "@/api/heli/storagein";
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
@ -236,7 +237,6 @@ const queryParams = reactive({
}) })
// //
onMounted(async () => { onMounted(async () => {
//
formData.value = await StorageinApi.getStorageIn(query.id) formData.value = await StorageinApi.getStorageIn(query.id)
getList(); getList();
}) })
@ -361,6 +361,7 @@ function doPrint() {
iframe.contentWindow?.print() iframe.contentWindow?.print()
setTimeout(() => document.body.removeChild(iframe), 1000) setTimeout(() => document.body.removeChild(iframe), 1000)
} }
StorageinApi.updateIsPrint(query.id);
} }

View File

@ -412,7 +412,7 @@ v-if="'detail' != active && (scope.row.beginProduce == 0 && scope.row.procedureS
<el-card class="hl-card-info"> <el-card class="hl-card-info">
<template #header> <template #header>
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">操作日志</span> <div class="hl-card-info-icona"></div><span class="hl-card-info-text">操作日志</span>
<el-button @click="goback" size="large"> </el-button> <el-button @click="goback" size="large" style="margin-left: 5rem"> </el-button>
<el-button <el-button
v-if="active != 'detail' && formData.dispatchStatus == 1" @click="submitForm('SAVE')" type="primary" v-if="active != 'detail' && formData.dispatchStatus == 1" @click="submitForm('SAVE')" type="primary"
:disabled="formLoading" size="large"> </el-button> :disabled="formLoading" size="large"> </el-button>

View File

@ -12,17 +12,17 @@
:inline="true" :inline="true"
label-width="110px" label-width="110px"
> >
<el-form-item label="起始日期" prop="startTime"> <!-- <el-form-item label="起始日期" prop="startTime">-->
<el-date-picker <!-- <el-date-picker-->
v-model="queryParams.startTime" <!-- v-model="queryParams.startTime"-->
value-format="YYYY-MM-DD HH:mm:ss" <!-- value-format="YYYY-MM-DD HH:mm:ss"-->
type="daterange" <!-- type="daterange"-->
start-placeholder="开始日期" <!-- start-placeholder="开始日期"-->
end-placeholder="结束日期" <!-- end-placeholder="结束日期"-->
class="!w-280px" <!-- class="!w-280px"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="结束日期" prop="startTime"> <el-form-item label="报工日期" prop="endTime">
<el-date-picker <el-date-picker
v-model="queryParams.endTime" v-model="queryParams.endTime"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@ -248,10 +248,6 @@ const handleDelete = async (id: number) => {
} }
// //
const setDefaultDate = () => { const setDefaultDate = () => {
queryParams.startTime = [
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
]
queryParams.endTime = [ queryParams.endTime = [
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'), dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss') dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')

View File

@ -38,9 +38,10 @@ isReport: 1,
dispatchStatus:2 dispatchStatus:2
} }
const dataList = ref([]) const dataList = ref([])
const searchVal = ref("");
const getListData = async () => { const getListData = async () => {
console.log("props.orderState");
console.log(props.orderState);
queryParams.pgType = props.orderState; queryParams.pgType = props.orderState;
// 退 // 退
if (isLoading.value) return if (isLoading.value) return
@ -79,7 +80,13 @@ onShow(async () => {
dataList.value = [] dataList.value = []
await getListData() await getListData()
}) })
const handleSearch = async (e) => {
queryParams.subOrDetailName = e.inputValue;
queryParams.pageNo = 1;
isFinish.value = false;
dataList.value = [];
await getListData();
};
const viewClick = async (item) => { const viewClick = async (item) => {
const params = { const params = {
id: item.id id: item.id
@ -93,7 +100,17 @@ const viewClick = async (item) => {
uni.navigateTo({ url }) uni.navigateTo({ url })
} }
}; };
const handleScan = () => {
uni.scanCode({
success: (res) => {
searchVal.value = res.result
handleSearch({ inputValue: res.result })
},
fail: () => {
uni.showToast({ title: '扫码失败', icon: 'none' })
}
})
}
const handleDetail = (item) => { const handleDetail = (item) => {
const url = `/pages/pgMaster/pgMaster-detail?id=${item.id}` const url = `/pages/pgMaster/pgMaster-detail?id=${item.id}`
uni.navigateTo({ url }) uni.navigateTo({ url })
@ -132,6 +149,51 @@ const onRefresherrefresh = async () => {
<view class="title"></view> <view class="title"></view>
<input class="uni-input" v-model="searchVal" @change="handleSearch" placeholder="根据编号搜索" /> <input class="uni-input" v-model="searchVal" @change="handleSearch" placeholder="根据编号搜索" />
</view> --> </view> -->
<view class="search" v-if="props.orderState == '0'">
<view
style="
width: 100%;
display: flex;
align-items: center;
background: #e2f3ff;
border-radius: 20rpx;
padding: 0 8rpx;
height: 50px;
"
>
<input
class="uni-input"
v-model="searchVal"
placeholder="请输入项目或子项目名称"
:placeholder-style="'color:#28A0F8;'"
style="
flex: 1;
background: transparent;
border: none;
outline: none;
font-size: 25rpx;
color: #28a0f8;
height: 50px;
line-height: 50px;
"
@input="handleSearch({ inputValue: searchVal })"
clearable
/>
<view
style="
background: none;
border: none;
padding: 0 10rpx;
height: 50px;
display: flex;
align-items: center;
"
@click="handleScan"
>
<uni-icons type="scan" size="28" color="#28A0F8"></uni-icons>
</view>
</view>
</view>
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered" <scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData"> @refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<view class="item" v-for="item in dataList" :key="item.id" > <view class="item" v-for="item in dataList" :key="item.id" >
@ -160,7 +222,7 @@ const onRefresherrefresh = async () => {
<view class="label">派工数量</view> <view class="label">派工数量</view>
<view class="val">{{item.amount}}</view> <view class="val">{{item.amount}}</view>
</view> </view>
</view> </view>
<view class="product-row"> <view class="product-row">
@ -192,17 +254,24 @@ const onRefresherrefresh = async () => {
<style lang="scss"> <style lang="scss">
// //
.search { .search {
padding: 4rpx; padding: 0rpx;
width: 80%; width: 90%;
margin: 30rpx auto; margin: auto;
margin-top: 20rpx;
position: relative;
.uni-input { .uni-input {
border: 1px solid #D1D6DB; border: 1px solid #d1d6db;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
font-size: 32rpx; font-size: 32rpx;
border-radius: 6rpx; border-radius: 10rpx;
}
.icons {
width: 30rpx;
position: absolute;
right: 40rpx;
top: 0rpx;
} }
} }
@ -236,7 +305,7 @@ const onRefresherrefresh = async () => {
font-size: 24rpx; font-size: 24rpx;
background: linear-gradient(149deg, #ffff00 4%, #cfcf00 98%); background: linear-gradient(149deg, #ffff00 4%, #cfcf00 98%);
color: #fff; color: #fff;
} }
} }
@ -264,7 +333,7 @@ const onRefresherrefresh = async () => {
.label { .label {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.val { .val {
color: #1D2129; color: #1D2129;
&.high-color { &.high-color {
@ -272,7 +341,7 @@ const onRefresherrefresh = async () => {
} }
} }
} }
} }
} }

View File

@ -77,7 +77,25 @@ onShow(async () => {
dataList.value = [] dataList.value = []
await getListData() await getListData()
}) })
const searchVal = ref("");
const handleSearch = async (e) => {
queryParams.subOrDetailName = e.inputValue;
queryParams.pageNo = 1;
isFinish.value = false;
dataList.value = [];
await getListData();
};
const handleScan = () => {
uni.scanCode({
success: (res) => {
searchVal.value = res.result
handleSearch({ inputValue: res.result })
},
fail: () => {
uni.showToast({ title: '扫码失败', icon: 'none' })
}
})
}
const handleDetail = (item) => { const handleDetail = (item) => {
const url = `/pages/zjPgMaster/zjPgMaster-detail?id=${item.id}` const url = `/pages/zjPgMaster/zjPgMaster-detail?id=${item.id}`
uni.navigateTo({ url }) uni.navigateTo({ url })
@ -124,6 +142,51 @@ const onRefresherrefresh = async () => {
<view class="title"></view> <view class="title"></view>
<input class="uni-input" v-model="searchVal" @change="handleSearch" placeholder="根据编号搜索" /> <input class="uni-input" v-model="searchVal" @change="handleSearch" placeholder="根据编号搜索" />
</view> --> </view> -->
<view class="search" v-if="props.orderState == '0'">
<view
style="
width: 100%;
display: flex;
align-items: center;
background: #e2f3ff;
border-radius: 20rpx;
padding: 0 8rpx;
height: 50px;
"
>
<input
class="uni-input"
v-model="searchVal"
placeholder="请输入项目或子项目名称"
:placeholder-style="'color:#28A0F8;'"
style="
flex: 1;
background: transparent;
border: none;
outline: none;
font-size: 25rpx;
color: #28a0f8;
height: 50px;
line-height: 50px;
"
@input="handleSearch({ inputValue: searchVal })"
clearable
/>
<view
style="
background: none;
border: none;
padding: 0 10rpx;
height: 50px;
display: flex;
align-items: center;
"
@click="handleScan"
>
<uni-icons type="scan" size="28" color="#28A0F8"></uni-icons>
</view>
</view>
</view>
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered" <scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData"> @refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<view class="item" v-for="item in dataList" :key="item.id" > <view class="item" v-for="item in dataList" :key="item.id" >
@ -187,20 +250,26 @@ const onRefresherrefresh = async () => {
<style lang="scss"> <style lang="scss">
// //
.search { .search {
padding: 4rpx; padding: 0rpx;
width: 80%; width: 90%;
margin: 30rpx auto; margin: auto;
margin-top: 20rpx;
position: relative;
.uni-input { .uni-input {
border: 1px solid #D1D6DB; border: 1px solid #d1d6db;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
font-size: 32rpx; font-size: 32rpx;
border-radius: 6rpx; border-radius: 10rpx;
}
.icons {
width: 30rpx;
position: absolute;
right: 40rpx;
top: 0rpx;
} }
} }
.data-list { .data-list {
height: 90vh; height: 90vh;
.item { .item {