打印修改

This commit is contained in:
z 2025-09-15 18:56:07 +08:00
parent e9a3483cb1
commit 6539c548fb
9 changed files with 183 additions and 66 deletions

View File

@ -245,6 +245,7 @@ public interface PurchaseOrderNoDetailMapper extends BaseMapperX<PurchaseOrderNo
query.selectAll(PurchaseOrderNoDetailDO.class) query.selectAll(PurchaseOrderNoDetailDO.class)
.select("t.composition as compositionName","t.purchase_rem_amount as purchaseRemAmounts","mat.code as matCode","pro.name as procedureName","bom.blueprint_no as blueprintNo","psub.id as projectSubId") .select("t.composition as compositionName","t.purchase_rem_amount as purchaseRemAmounts","mat.code as matCode","pro.name as procedureName","bom.blueprint_no as blueprintNo","psub.id as projectSubId")
.select("ROUND(t.estimated_price / t.purchase_amount, 1) as unitPrice","bom.spec as matSpec") .select("ROUND(t.estimated_price / t.purchase_amount, 1) as unitPrice","bom.spec as matSpec")
.select("s.brief as supplierName")
.leftJoin(PurchaseOrderNoDO.class, "pb", PurchaseOrderNoDO::getId, PurchaseOrderBoomDO::getPurchaseOrderId) .leftJoin(PurchaseOrderNoDO.class, "pb", PurchaseOrderNoDO::getId, PurchaseOrderBoomDO::getPurchaseOrderId)
.leftJoin(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderNoDO::getSupplierId) .leftJoin(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderNoDO::getSupplierId)
.leftJoin(ProcessBomDetailDO.class,"bom", ProcessBomDetailDO::getId, PurchaseOrderNoDetailDO::getBoomDetailId) .leftJoin(ProcessBomDetailDO.class,"bom", ProcessBomDetailDO::getId, PurchaseOrderNoDetailDO::getBoomDetailId)

View File

@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.system.controller.admin.user;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chanko.yunxi.mes.framework.common.enums.CommonStatusEnum; import com.chanko.yunxi.mes.framework.common.enums.CommonStatusEnum;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam; import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
@ -12,7 +13,9 @@ import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.module.system.controller.admin.user.vo.user.*; import com.chanko.yunxi.mes.module.system.controller.admin.user.vo.user.*;
import com.chanko.yunxi.mes.module.system.convert.user.UserConvert; import com.chanko.yunxi.mes.module.system.convert.user.UserConvert;
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO; import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.permission.UserRoleDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
import com.chanko.yunxi.mes.module.system.dal.mysql.permission.UserRoleMapper;
import com.chanko.yunxi.mes.module.system.enums.common.SexEnum; import com.chanko.yunxi.mes.module.system.enums.common.SexEnum;
import com.chanko.yunxi.mes.module.system.service.dept.DeptService; import com.chanko.yunxi.mes.module.system.service.dept.DeptService;
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService; import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
@ -37,6 +40,7 @@ import java.util.Map;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success; import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import static com.chanko.yunxi.mes.framework.common.util.collection.CollectionUtils.convertList; import static com.chanko.yunxi.mes.framework.common.util.collection.CollectionUtils.convertList;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
@Tag(name = "管理后台 - 用户") @Tag(name = "管理后台 - 用户")
@RestController @RestController
@ -48,7 +52,8 @@ public class UserController {
private AdminUserService userService; private AdminUserService userService;
@Resource @Resource
private DeptService deptService; private DeptService deptService;
@Resource
private UserRoleMapper userRoleMapper;
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "新增用户") @Operation(summary = "新增用户")
@PreAuthorize("@ss.hasPermission('system:user:create')") @PreAuthorize("@ss.hasPermission('system:user:create')")
@ -142,6 +147,13 @@ public class UserController {
DeptDO dept = deptService.getDept(user.getDeptId()); DeptDO dept = deptService.getDept(user.getDeptId());
return success(UserConvert.INSTANCE.convert(user, dept)); return success(UserConvert.INSTANCE.convert(user, dept));
} }
@GetMapping("/isAdministrator")
@Operation(summary = "获得用户详情")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:user:query')")
public CommonResult<Boolean> isAdministrator() {
return success(userService.isAdministrator());
}
@GetMapping("/getDeptId") @GetMapping("/getDeptId")
@Operation(summary = "根据部门获取用户") @Operation(summary = "根据部门获取用户")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")

View File

@ -206,4 +206,6 @@ public interface AdminUserService {
List<AdminUserDO> getUserListByDeptName(String name); List<AdminUserDO> getUserListByDeptName(String name);
List<AdminUserDO> getList(); List<AdminUserDO> getList();
Boolean isAdministrator();
} }

View File

@ -20,8 +20,10 @@ import com.chanko.yunxi.mes.module.system.controller.admin.user.vo.user.UserPage
import com.chanko.yunxi.mes.module.system.controller.admin.user.vo.user.UserSaveReqVO; import com.chanko.yunxi.mes.module.system.controller.admin.user.vo.user.UserSaveReqVO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO; import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.UserPostDO; import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.UserPostDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.permission.UserRoleDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
import com.chanko.yunxi.mes.module.system.dal.mysql.dept.UserPostMapper; import com.chanko.yunxi.mes.module.system.dal.mysql.dept.UserPostMapper;
import com.chanko.yunxi.mes.module.system.dal.mysql.permission.UserRoleMapper;
import com.chanko.yunxi.mes.module.system.dal.mysql.user.AdminUserMapper; import com.chanko.yunxi.mes.module.system.dal.mysql.user.AdminUserMapper;
import com.chanko.yunxi.mes.module.system.service.dept.DeptService; import com.chanko.yunxi.mes.module.system.service.dept.DeptService;
import com.chanko.yunxi.mes.module.system.service.dept.PostService; import com.chanko.yunxi.mes.module.system.service.dept.PostService;
@ -43,6 +45,7 @@ import java.util.*;
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception; import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.chanko.yunxi.mes.framework.common.util.collection.CollectionUtils.convertList; import static com.chanko.yunxi.mes.framework.common.util.collection.CollectionUtils.convertList;
import static com.chanko.yunxi.mes.framework.common.util.collection.CollectionUtils.convertSet; import static com.chanko.yunxi.mes.framework.common.util.collection.CollectionUtils.convertSet;
import static com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
import static com.chanko.yunxi.mes.module.system.enums.ErrorCodeConstants.*; import static com.chanko.yunxi.mes.module.system.enums.ErrorCodeConstants.*;
/** /**
@ -74,6 +77,8 @@ public class AdminUserServiceImpl implements AdminUserService {
@Resource @Resource
private UserPostMapper userPostMapper; private UserPostMapper userPostMapper;
@Resource
private UserRoleMapper userRoleMapper;
@Resource @Resource
private FileApi fileApi; private FileApi fileApi;
@ -461,6 +466,14 @@ public class AdminUserServiceImpl implements AdminUserService {
return userMapper.selectList(wrapper); return userMapper.selectList(wrapper);
} }
@Override
public Boolean isAdministrator() {
LambdaQueryWrapper<UserRoleDO> userRoleDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
userRoleDOLambdaQueryWrapper.eq(UserRoleDO::getUserId,getLoginUser().getId());
userRoleDOLambdaQueryWrapper.eq(UserRoleDO::getRoleId,3);
return userRoleMapper.selectCount(userRoleDOLambdaQueryWrapper)>0;
}
/** /**
* 对密码进行加密 * 对密码进行加密
* *

View File

@ -88,7 +88,9 @@ export const updateUserStatus = (id: number, status: number) => {
export const getSimpleUserList = (): Promise<UserVO[]> => { export const getSimpleUserList = (): Promise<UserVO[]> => {
return request.get({ url: '/system/user/simple-list' }) return request.get({ url: '/system/user/simple-list' })
} }
export const isAdministrator = () => {
return request.get({ url: '/system/user/isAdministrator'})
}
export const getSimpleUserName = async (id: number) => { export const getSimpleUserName = async (id: number) => {
const user = await getUser(id); const user = await getUser(id);
return user.nickname; return user.nickname;

View File

@ -68,7 +68,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="发货备注" prop="remark"> <el-form-item label="发货备注" prop="remark">
<el-input :disabled="detailDisabled || active!='create'" type="textarea" v-model="formData.remark" show-word-limit maxlength="200" /> <el-input :disabled="detailDisabled || formData.deliverStatus == 2" type="textarea" v-model="formData.remark" show-word-limit maxlength="200" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -261,7 +261,7 @@
</template> </template>
<el-row> <el-row>
<el-col v-if="active != 'detail'"> <el-col v-if="active != 'detail'">
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem2" :disabled="flag">新增</el-button> <el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem2" :disabled="detailDisabled || formData.deliverStatus == 2">新增</el-button>
</el-col> </el-col>
<el-col> <el-col>
<el-card class="hl-incard"> <el-card class="hl-incard">

View File

@ -63,7 +63,9 @@
<td colspan="2"> 备注 </td> <td colspan="2"> 备注 </td>
</tr> </tr>
<tr v-show="subTotalAmount <= splitThreshold" v-for="(item, index) in formData.deliverOrderSubs" :key="index"> <tr v-show="subTotalAmount <= splitThreshold" v-for="(item, index) in formData.deliverOrderSubs" :key="index">
<td colspan="4">{{ item.name }}</td> <td colspan="4" v-if="item.category == 'DELIVER_LIST'">{{ item.name }}</td>
<td colspan="4" v-if="item.category== 'OTHER_LIST' && item.subType == 1">备件:{{ item.name }}</td>
<td colspan="4" v-if="item.category== 'OTHER_LIST' && item.subType == 2">刀具:{{ item.name }}</td>
<td>{{ getDictLabel(DICT_TYPE.HELI_MATERIAL_UNIT, item.unit) }}</td> <td>{{ getDictLabel(DICT_TYPE.HELI_MATERIAL_UNIT, item.unit) }}</td>
<td>{{ item.amount }}</td> <td>{{ item.amount }}</td>
<td>{{ item.weight }}</td> <td>{{ item.weight }}</td>
@ -71,7 +73,15 @@
<td colspan="2">{{ item.remark }}</td> <td colspan="2">{{ item.remark }}</td>
</tr> </tr>
<tr v-if="subTotalAmount > splitThreshold"> <tr v-if="subTotalAmount > splitThreshold">
<td colspan="4">工装模具详见清单附件</td> <td colspan="4">详见清单附件</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="2"></td>
</tr>
<tr v-for="item in num" :key="item">
<td colspan="4"> &nbsp;</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
@ -79,22 +89,12 @@
<td colspan="2"></td> <td colspan="2"></td>
</tr> </tr>
<tr> <tr>
<td colspan="4">附光盘+各类报告</td> <td colspan="10">{{formData.remark?formData.remark:'&nbsp;'}}</td>
<td></td> <!-- <td></td>-->
<td></td> <!-- <td></td>-->
<td></td> <!-- <td></td>-->
<td></td> <!-- <td></td>-->
<td colspan="2"></td> <!-- <td colspan="2"></td>-->
</tr>
</tbody>
<tbody v-if="subTotalAmount > splitThreshold">
<tr v-for="item in 4" :key="item">
<td colspan="4"> &nbsp;</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="2"></td>
</tr> </tr>
</tbody> </tbody>
<tr> <tr>
@ -136,7 +136,7 @@
</div> </div>
<div class="divide_line" style="margin: 20px 0"></div> <div class="divide_line" style="margin: 20px 0"></div>
<!-- 回单联 --> <!-- 回单联 -->
<table border="2" cellspacing="0" id="table1" style="position: relative !important"> <table border="2" cellspacing="0" style="position: relative !important">
<tbody> <tbody>
<tr> <tr>
<td colspan="10"> <td colspan="10">
@ -204,24 +204,15 @@
<td colspan="2">{{ item.remark }}</td> <td colspan="2">{{ item.remark }}</td>
</tr> </tr>
<tr v-if="subTotalAmount > splitThreshold"> <tr v-if="subTotalAmount > splitThreshold">
<td colspan="4">工装模具详见清单附件</td> <td colspan="4">详见清单附件</td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
<td colspan="2"></td> <td colspan="2"></td>
</tr> </tr>
<tr>
<td colspan="4">附光盘+各类报告</td> <tr v-for="item in num" :key="item">
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="2"></td>
</tr>
</tbody>
<tbody v-if="subTotalAmount > splitThreshold">
<tr v-for="item in 4" :key="item">
<td colspan="4"> &nbsp;</td> <td colspan="4"> &nbsp;</td>
<td></td> <td></td>
<td></td> <td></td>
@ -229,7 +220,16 @@
<td></td> <td></td>
<td colspan="2"></td> <td colspan="2"></td>
</tr> </tr>
<tr>
<td colspan="10">{{formData.remark?formData.remark:'&nbsp;'}}</td>
<!-- <td></td>-->
<!-- <td></td>-->
<!-- <td></td>-->
<!-- <td></td>-->
<!-- <td colspan="2"></td>-->
</tr>
</tbody> </tbody>
<tr> <tr>
<td colspan="2"> 发货单位 </td> <td colspan="2"> 发货单位 </td>
<td colspan="3"> <td colspan="3">
@ -273,7 +273,87 @@
<span>制单人{{ formData.creatorName }}</span> <span>制单人{{ formData.creatorName }}</span>
<span>-回单联-</span> <span>-回单联-</span>
</div> </div>
<!-- 附件 --> <!-- 附件 -->
<div v-if="subTotalAmount > splitThreshold">
<div class="divide_line1" style="margin-top: 40px"></div>
<table border="2" cellspacing="0" style="height: 28cm">
<tbody>
<tr>
<td colspan="10">
<div style="display: flex; align-items: center; justify-content: space-between">
<img :src="logoDataUrl" style="width: 100px" alt="" />
<span style="font-size: 20px; font-weight: 700">清单附件</span>
<span style="font-size: 12px">发货编号{{ formData.code }}</span>
</div>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td> 序号 </td>
<td colspan="3">
<span>模具名称</span>
</td>
<td colspan="3">模具图号</td>
<td> 数量() </td>
<td colspan="2">备注 </td>
</tr>
<tr v-for="(item, index) in formData.deliverOrderSubs" :key="index">
<td> {{ index + 1 }} </td>
<td colspan="3">{{ item.name }}</td>
<td colspan="3">{{ item.blueprintNo }}</td>
<td> {{ item.amount }} </td>
<td colspan="2">{{ item.remark }} </td>
</tr>
<tr v-for="(item, index) in formData.deliverOrderOtherSpareSubs" :key="index">
<td> {{ index + 1 }} </td>
<td colspan="3">
<span>备件:{{ item.name }}</span>
</td>
<td colspan="3">{{ item.blueprintNo }}</td>
<td> {{ item.amount }} </td>
<td colspan="2">{{ item.remark }} </td>
</tr>
<tr v-for="(item, index) in formData.deliverOrderOtherCutterSubs" :key="index">
<td> {{ index + 1 }} </td>
<td colspan="3">
<span>刀具:{{ item.name }}</span>
</td>
<td colspan="3">{{ item.blueprintNo }}</td>
<td> {{ item.amount }} </td>
<td colspan="2">{{ item.remark }} </td>
</tr>
</tbody>
<tbody v-if="subTotalAmount <20">
<tr v-for="item in (20-subTotalAmount)" :key="item">
<td> &nbsp;</td>
<td colspan="3">
</td>
<td colspan="3"></td>
<td></td>
<td colspan="2"></td>
</tr>
</tbody>
<tr>
<td colspan="10">
<div style="text-align: left">内部货物门点人签名:</div>
</td>
</tr>
</table>
<div style="
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
">
<span>制单人{{ formData.creatorName }}</span>
<span>-客户联-</span>
</div>
</div>
<!-- 附件需要判断 --> <!-- 附件需要判断 -->
<div v-if="subTotalAmount > splitThreshold"> <div v-if="subTotalAmount > splitThreshold">
@ -300,11 +380,6 @@
<td> 数量() </td> <td> 数量() </td>
<td colspan="2">备注 </td> <td colspan="2">备注 </td>
</tr> </tr>
<tr>
<td colspan="10" style="background-color: rgb(255, 255, 0)">
<div style="text-align: left">模具清单</div>
</td>
</tr>
<tr v-for="(item, index) in formData.deliverOrderSubs" :key="index"> <tr v-for="(item, index) in formData.deliverOrderSubs" :key="index">
<td> {{ index + 1 }} </td> <td> {{ index + 1 }} </td>
<td colspan="3">{{ item.name }}</td> <td colspan="3">{{ item.name }}</td>
@ -313,30 +388,20 @@
<td colspan="2">{{ item.remark }} </td> <td colspan="2">{{ item.remark }} </td>
</tr> </tr>
<tr>
<td colspan="10" style="background-color: rgb(255, 255, 0)">
<div style="text-align: left">备件清单</div>
</td>
</tr>
<tr v-for="(item, index) in formData.deliverOrderOtherSpareSubs" :key="index"> <tr v-for="(item, index) in formData.deliverOrderOtherSpareSubs" :key="index">
<td> {{ index + 1 }} </td> <td> {{ index + 1 }} </td>
<td colspan="3"> <td colspan="3">
<span>{{ item.name }}</span> <span>备件:{{ item.name }}</span>
</td> </td>
<td colspan="3">{{ item.blueprintNo }}</td> <td colspan="3">{{ item.blueprintNo }}</td>
<td> {{ item.amount }} </td> <td> {{ item.amount }} </td>
<td colspan="2">{{ item.remark }} </td> <td colspan="2">{{ item.remark }} </td>
</tr> </tr>
<tr>
<td colspan="10" style="background-color: rgb(255, 255, 0)">
<div style="text-align: left">刀具清单</div>
</td>
</tr>
<tr v-for="(item, index) in formData.deliverOrderOtherCutterSubs" :key="index"> <tr v-for="(item, index) in formData.deliverOrderOtherCutterSubs" :key="index">
<td> {{ index + 1 }} </td> <td> {{ index + 1 }} </td>
<td colspan="3"> <td colspan="3">
<span>{{ item.name }}</span> <span>刀具:{{ item.name }}</span>
</td> </td>
<td colspan="3">{{ item.blueprintNo }}</td> <td colspan="3">{{ item.blueprintNo }}</td>
<td> {{ item.amount }} </td> <td> {{ item.amount }} </td>
@ -380,7 +445,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
// import { ref, reactive } from 'vue' // import { ref, reactive } from 'vue'
import { Check } from '@element-plus/icons-vue'
import { ref } from 'vue' import { ref } from 'vue'
import { getDictLabel, DICT_TYPE } from '@/utils/dict' import { getDictLabel, DICT_TYPE } from '@/utils/dict'
import urlimg from '@/assets/imgs/exlogo.png' import urlimg from '@/assets/imgs/exlogo.png'
@ -444,15 +508,19 @@ const onPrint = () => {
border-collapse: collapse; border-collapse: collapse;
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */ margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
td { td {
line-height: 17px;
padding: 5px 0; padding: 5px 0;
border: 1px solid #333; border: 1px solid #333;
} }
} }
.divide_line { .divide_line {
justify-content: center; justify-content: center;
border-bottom: 1px dashed rgba(51, 51, 51, 1); border-bottom: 1px dashed rgba(51, 51, 51, 1);
} }
.divide_line1 { .divide_line1 {
margin-top: 5px;
justify-content: center; justify-content: center;
border-bottom: 1px dashed rgb(255, 255, 255); border-bottom: 1px dashed rgb(255, 255, 255);
} }
@ -516,7 +584,8 @@ const formData: any = ref({
}) })
const subTotalAmount = ref(0) const subTotalAmount = ref(0)
const splitThreshold = 5 const num = ref(0)
const splitThreshold = 6
const logoDataUrl = ref('') // LogoBase64URL const logoDataUrl = ref('') // LogoBase64URL
/** 打开弹窗 */ /** 打开弹窗 */
@ -541,6 +610,7 @@ const open = async (id: number) => {
subTotalAmount.value = subArr.length subTotalAmount.value = subArr.length
if (subTotalAmount.value > splitThreshold) { if (subTotalAmount.value > splitThreshold) {
num.value=5
formData.value.deliverOrderSubs = subArr.filter((sub) => sub.category == 'DELIVER_LIST') formData.value.deliverOrderSubs = subArr.filter((sub) => sub.category == 'DELIVER_LIST')
// //
@ -551,6 +621,7 @@ const open = async (id: number) => {
(sub) => sub.category == 'OTHER_LIST' && sub.subType == 2 (sub) => sub.category == 'OTHER_LIST' && sub.subType == 2
) )
} else { } else {
num.value=6-subTotalAmount.value
formData.value.deliverOrderSubs = subArr formData.value.deliverOrderSubs = subArr
} }
@ -615,6 +686,7 @@ table {
border-collapse: collapse; border-collapse: collapse;
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */ margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
td { td {
line-height: 17px;
padding: 5px 0; padding: 5px 0;
border: 1px solid #333; border: 1px solid #333;
} }
@ -624,6 +696,7 @@ table {
border-bottom: 1px dashed rgba(51, 51, 51, 1); border-bottom: 1px dashed rgba(51, 51, 51, 1);
} }
.divide_line1 { .divide_line1 {
margin-top: 5px;
justify-content: center; justify-content: center;
border-bottom: 1px dashed rgb(255, 255, 255); border-bottom: 1px dashed rgb(255, 255, 255);
} }

View File

@ -74,7 +74,7 @@
<el-card class="hl-incard"> <el-card class="hl-incard">
<el-form ref="multipleTable" :model="list" v-loading="formLoading" label-width="0" > <el-form ref="multipleTable" :model="list" v-loading="formLoading" label-width="0" >
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" class="hl-table" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries"> <el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" class="hl-table" @selection-change="handleSelectionChange" show-summary :summary-method="getSummaries">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="70" />
<el-table-column fixed label="序号" align="center" type="index" width="60" /> <el-table-column fixed label="序号" align="center" type="index" width="60" />
<!-- <el-table-column label="客户简称" align="center" prop="brief" min-width="180" fixed />--> <!-- <el-table-column label="客户简称" align="center" prop="brief" min-width="180" fixed />-->
@ -306,6 +306,15 @@ const getList = async () => {
const data = await MaterialPlanApi.getPartPurchasePages(queryParams) const data = await MaterialPlanApi.getPartPurchasePages(queryParams)
history.state.idid=undefined history.state.idid=undefined
list.value = data.list list.value = data.list
list.value.forEach(item=> {
if(item.unitPrice == null || item.unitPrice==''){
item.unitPrice=0
}
if(item.estimatedPrices == null || item.estimatedPrices==''){
item.estimatedPrices=0
}
})
// list.value.forEach(item=> { // list.value.forEach(item=> {
// if(item.isFoams == 'Y'){ // if(item.isFoams == 'Y'){
// item.isFoams = true // item.isFoams = true

View File

@ -28,7 +28,7 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
</el-form-item> </el-form-item>
<el-form-item label="责任人" prop="username"> <el-form-item label="责任人" prop="username">
<el-input <el-input
v-model="queryParams.username" placeholder="责任人" clearable @keyup.enter="handleQuery" v-model="queryParams.username" placeholder="责任人" clearable @keyup.enter="handleQuery" :readonly="isReadOnly"
class="!w-240px" /> class="!w-240px" />
</el-form-item> </el-form-item>
<el-form-item label="收货状态" prop="receivingStatus"> <el-form-item label="收货状态" prop="receivingStatus">
@ -85,6 +85,7 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
<el-table-column prop="projectSubCode" min-width="150" label="子项目编码" align="center"/> <el-table-column prop="projectSubCode" min-width="150" label="子项目编码" align="center"/>
<el-table-column prop="blueprintNo" min-width="100" label="图号" align="center"/> <el-table-column prop="blueprintNo" min-width="100" label="图号" align="center"/>
<el-table-column prop="boomName" min-width="120" label="零件名称" align="center"/> <el-table-column prop="boomName" min-width="120" label="零件名称" align="center"/>
<el-table-column prop="supplierName" min-width="120" label="供应商" align="center"/>
<el-table-column prop="procedureName" min-width="120" label="工序" align="center"/> <el-table-column prop="procedureName" min-width="120" label="工序" align="center"/>
<el-table-column prop="compositionName" min-width="100" label="材质" align="center"/> <el-table-column prop="compositionName" min-width="100" label="材质" align="center"/>
<el-table-column prop="purchaseAmount" min-width="100" label="采购数量" align="center" /> <el-table-column prop="purchaseAmount" min-width="100" label="采购数量" align="center" />
@ -106,7 +107,7 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="requireTime" min-width="150" label="需要完成日期" align="center" :formatter="dateFormatter1"/> <el-table-column prop="requireTime" min-width="150" label="需要完成日期" align="center" :formatter="dateFormatter1"/>
<el-table-column prop="arriveTime" min-width="150" label="预计货日期" align="center" :formatter="dateFormatter1" /> <el-table-column prop="arriveTime" min-width="150" label="预计货日期" align="center" :formatter="dateFormatter1" />
<el-table-column prop="description" min-width="150" label="技术要求" align="center"/> <el-table-column prop="description" min-width="150" label="技术要求" align="center"/>
<el-table-column prop="theWeight" min-width="100" label="理论重量" align="center"/> <el-table-column prop="theWeight" min-width="100" label="理论重量" align="center"/>
<el-table-column label="操作" align="center" fixed="right" min-width="200"> <el-table-column label="操作" align="center" fixed="right" min-width="200">
@ -134,13 +135,11 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
<script setup lang="ts"> <script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict' import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import download from '@/utils/download'
import * as PurchaseOrderApi from '@/api/heli/purchaseorder' import * as PurchaseOrderApi from '@/api/heli/purchaseorder'
import * as PurchaseOrderNoApi from '@/api/heli/purchaseorderno' import * as UserApi from '@/api/system/user'
import { ElTable } from 'element-plus' import { ElTable } from 'element-plus'
import {useUserStore} from "@/store/modules/user"; import {useUserStore} from "@/store/modules/user";
import routeParamsCache from '@/utils/routeParamsCache' import {dateFormatter1} from "@/utils/formatTime";
import {dateFormatter1, dateFormatter2} from "@/utils/formatTime";
import * as PurchaseOrderNoDetailApi from "@/api/heli/purchaseordernodetail"; import * as PurchaseOrderNoDetailApi from "@/api/heli/purchaseordernodetail";
defineOptions({ name: 'purchaseordernopartReceived' }) defineOptions({ name: 'purchaseordernopartReceived' })
const userStore = useUserStore() const userStore = useUserStore()
@ -149,6 +148,7 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() // const { t } = useI18n() //
const router = useRouter() const router = useRouter()
const loading = ref(true) // const loading = ref(true) //
const isReadOnly = ref(false) //
const list = ref([]) // const list = ref([]) //
const total = ref(0) // const total = ref(0) //
const queryParams = reactive({ const queryParams = reactive({
@ -249,8 +249,8 @@ const receiveGoods = async () => {
message.error("零件"+list[i].boomName+"入库数量为空或数量为0,请确认") message.error("零件"+list[i].boomName+"入库数量为空或数量为0,请确认")
return return
} }
if (list[i].estimatedPrice==null||list[i].estimatedPrice==0){ if (list[i].estimatedPrice==null||list[i].estimatedPrice==''){
message.error("零件"+list[i].boomName+"预估总价为空或数量为0,请确认") message.error("零件"+list[i].boomName+"预估总价为空,请确认")
return return
} }
} }
@ -276,6 +276,11 @@ const receiveGoods = async () => {
const route = useRoute() const route = useRoute()
const routeValue = ref('') const routeValue = ref('')
onMounted(async () => { onMounted(async () => {
const newVar = await UserApi.isAdministrator();
if (!newVar.data){
isReadOnly.value=true
}
console.log(newVar)
getList() getList()
}) })
</script> </script>