打印修改
This commit is contained in:
parent
e9a3483cb1
commit
6539c548fb
@ -245,6 +245,7 @@ public interface PurchaseOrderNoDetailMapper extends BaseMapperX<PurchaseOrderNo
|
||||
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("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(SupplierDO.class, "s", SupplierDO::getId, PurchaseOrderNoDO::getSupplierId)
|
||||
.leftJoin(ProcessBomDetailDO.class,"bom", ProcessBomDetailDO::getId, PurchaseOrderNoDetailDO::getBoomDetailId)
|
||||
|
@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.system.controller.admin.user;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
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.pojo.CommonResult;
|
||||
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.convert.user.UserConvert;
|
||||
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.mysql.permission.UserRoleMapper;
|
||||
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.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.util.collection.CollectionUtils.convertList;
|
||||
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 = "管理后台 - 用户")
|
||||
@RestController
|
||||
@ -48,7 +52,8 @@ public class UserController {
|
||||
private AdminUserService userService;
|
||||
@Resource
|
||||
private DeptService deptService;
|
||||
|
||||
@Resource
|
||||
private UserRoleMapper userRoleMapper;
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "新增用户")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:create')")
|
||||
@ -142,6 +147,13 @@ public class UserController {
|
||||
DeptDO dept = deptService.getDept(user.getDeptId());
|
||||
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")
|
||||
@Operation(summary = "根据部门获取用户")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
|
@ -206,4 +206,6 @@ public interface AdminUserService {
|
||||
List<AdminUserDO> getUserListByDeptName(String name);
|
||||
|
||||
List<AdminUserDO> getList();
|
||||
|
||||
Boolean isAdministrator();
|
||||
}
|
||||
|
@ -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.dal.dataobject.dept.DeptDO;
|
||||
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.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.service.dept.DeptService;
|
||||
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.util.collection.CollectionUtils.convertList;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
@ -74,6 +77,8 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
|
||||
@Resource
|
||||
private UserPostMapper userPostMapper;
|
||||
@Resource
|
||||
private UserRoleMapper userRoleMapper;
|
||||
|
||||
@Resource
|
||||
private FileApi fileApi;
|
||||
@ -461,6 +466,14 @@ public class AdminUserServiceImpl implements AdminUserService {
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对密码进行加密
|
||||
*
|
||||
|
@ -88,7 +88,9 @@ export const updateUserStatus = (id: number, status: number) => {
|
||||
export const getSimpleUserList = (): Promise<UserVO[]> => {
|
||||
return request.get({ url: '/system/user/simple-list' })
|
||||
}
|
||||
|
||||
export const isAdministrator = () => {
|
||||
return request.get({ url: '/system/user/isAdministrator'})
|
||||
}
|
||||
export const getSimpleUserName = async (id: number) => {
|
||||
const user = await getUser(id);
|
||||
return user.nickname;
|
||||
|
@ -68,7 +68,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<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-col>
|
||||
</el-row>
|
||||
@ -261,7 +261,7 @@
|
||||
</template>
|
||||
<el-row>
|
||||
<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-card class="hl-incard">
|
||||
|
@ -62,8 +62,10 @@
|
||||
<td>尺寸(米)</td>
|
||||
<td colspan="2"> 备注 </td>
|
||||
</tr>
|
||||
<tr v-show="subTotalAmount <= splitThreshold" v-for="(item, index) in formData.deliverOrderSubs" :key="index">
|
||||
<td colspan="4">{{ item.name }}</td>
|
||||
<tr v-show="subTotalAmount <= splitThreshold" v-for="(item, index) in formData.deliverOrderSubs" :key="index">
|
||||
<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>{{ item.amount }}</td>
|
||||
<td>{{ item.weight }}</td>
|
||||
@ -71,7 +73,15 @@
|
||||
<td colspan="2">{{ item.remark }}</td>
|
||||
</tr>
|
||||
<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"> </td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@ -79,22 +89,12 @@
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">附光盘+各类报告</td>
|
||||
<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"> </td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td colspan="2"></td>
|
||||
<td colspan="10">{{formData.remark?formData.remark:' '}}</td>
|
||||
<!-- <td></td>-->
|
||||
<!-- <td></td>-->
|
||||
<!-- <td></td>-->
|
||||
<!-- <td></td>-->
|
||||
<!-- <td colspan="2"></td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
<tr>
|
||||
@ -136,7 +136,7 @@
|
||||
</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>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
@ -195,7 +195,7 @@
|
||||
<td>尺寸(米)</td>
|
||||
<td colspan="2"> 备注 </td>
|
||||
</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>{{ getDictLabel(DICT_TYPE.HELI_MATERIAL_UNIT, item.unit) }}</td>
|
||||
<td>{{ item.amount }}</td>
|
||||
@ -204,24 +204,15 @@
|
||||
<td colspan="2">{{ item.remark }}</td>
|
||||
</tr>
|
||||
<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>
|
||||
<td colspan="4">附光盘+各类报告</td>
|
||||
<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">
|
||||
|
||||
<tr v-for="item in num" :key="item">
|
||||
<td colspan="4"> </td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@ -229,7 +220,16 @@
|
||||
<td></td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10">{{formData.remark?formData.remark:' '}}</td>
|
||||
<!-- <td></td>-->
|
||||
<!-- <td></td>-->
|
||||
<!-- <td></td>-->
|
||||
<!-- <td></td>-->
|
||||
<!-- <td colspan="2"></td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"> 发货单位 </td>
|
||||
<td colspan="3">
|
||||
@ -273,7 +273,87 @@
|
||||
<span>制单人:{{ formData.creatorName }}</span>
|
||||
<span>-回单联-</span>
|
||||
</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> </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">
|
||||
@ -300,11 +380,6 @@
|
||||
<td> 数量(套) </td>
|
||||
<td colspan="2">备注 </td>
|
||||
</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">
|
||||
<td> {{ index + 1 }} </td>
|
||||
<td colspan="3">{{ item.name }}</td>
|
||||
@ -313,30 +388,20 @@
|
||||
<td colspan="2">{{ item.remark }} </td>
|
||||
</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">
|
||||
<td> {{ index + 1 }} </td>
|
||||
<td colspan="3">
|
||||
<span>{{ item.name }}</span>
|
||||
<span>备件:{{ item.name }}</span>
|
||||
</td>
|
||||
<td colspan="3">{{ item.blueprintNo }}</td>
|
||||
<td> {{ item.amount }} </td>
|
||||
<td colspan="2">{{ item.remark }} </td>
|
||||
</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">
|
||||
<td> {{ index + 1 }} </td>
|
||||
<td colspan="3">
|
||||
<span>{{ item.name }}</span>
|
||||
<span>刀具:{{ item.name }}</span>
|
||||
</td>
|
||||
<td colspan="3">{{ item.blueprintNo }}</td>
|
||||
<td> {{ item.amount }} </td>
|
||||
@ -380,7 +445,6 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// import { ref, reactive } from 'vue'
|
||||
import { Check } from '@element-plus/icons-vue'
|
||||
import { ref } from 'vue'
|
||||
import { getDictLabel, DICT_TYPE } from '@/utils/dict'
|
||||
import urlimg from '@/assets/imgs/exlogo.png'
|
||||
@ -444,15 +508,19 @@ const onPrint = () => {
|
||||
border-collapse: collapse;
|
||||
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
|
||||
td {
|
||||
line-height: 17px;
|
||||
padding: 5px 0;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
}
|
||||
|
||||
.divide_line {
|
||||
justify-content: center;
|
||||
border-bottom: 1px dashed rgba(51, 51, 51, 1);
|
||||
}
|
||||
.divide_line1 {
|
||||
margin-top: 5px;
|
||||
|
||||
justify-content: center;
|
||||
border-bottom: 1px dashed rgb(255, 255, 255);
|
||||
}
|
||||
@ -516,7 +584,8 @@ const formData: any = ref({
|
||||
})
|
||||
|
||||
const subTotalAmount = ref(0)
|
||||
const splitThreshold = 5
|
||||
const num = ref(0)
|
||||
const splitThreshold = 6
|
||||
const logoDataUrl = ref('') // 存储Logo的Base64编码数据URL
|
||||
|
||||
/** 打开弹窗 */
|
||||
@ -541,6 +610,7 @@ const open = async (id: number) => {
|
||||
subTotalAmount.value = subArr.length
|
||||
|
||||
if (subTotalAmount.value > splitThreshold) {
|
||||
num.value=5
|
||||
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
|
||||
)
|
||||
} else {
|
||||
num.value=6-subTotalAmount.value
|
||||
formData.value.deliverOrderSubs = subArr
|
||||
}
|
||||
|
||||
@ -615,6 +686,7 @@ table {
|
||||
border-collapse: collapse;
|
||||
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
|
||||
td {
|
||||
line-height: 17px;
|
||||
padding: 5px 0;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
@ -624,6 +696,7 @@ table {
|
||||
border-bottom: 1px dashed rgba(51, 51, 51, 1);
|
||||
}
|
||||
.divide_line1 {
|
||||
margin-top: 5px;
|
||||
justify-content: center;
|
||||
border-bottom: 1px dashed rgb(255, 255, 255);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@
|
||||
<el-card class="hl-incard">
|
||||
<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-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 label="客户简称" align="center" prop="brief" min-width="180" fixed />-->
|
||||
@ -306,6 +306,15 @@ const getList = async () => {
|
||||
const data = await MaterialPlanApi.getPartPurchasePages(queryParams)
|
||||
history.state.idid=undefined
|
||||
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=> {
|
||||
// if(item.isFoams == 'Y'){
|
||||
// item.isFoams = true
|
||||
|
@ -28,8 +28,8 @@ v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.ente
|
||||
</el-form-item>
|
||||
<el-form-item label="责任人" prop="username">
|
||||
<el-input
|
||||
v-model="queryParams.username" placeholder="责任人" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
v-model="queryParams.username" placeholder="责任人" clearable @keyup.enter="handleQuery" :readonly="isReadOnly"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货状态" prop="receivingStatus">
|
||||
<el-select v-model="queryParams.receivingStatus" placeholder="下拉选择" clearable class="!w-240px">
|
||||
@ -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="blueprintNo" min-width="100" 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="compositionName" 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>
|
||||
</el-table-column>
|
||||
<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="theWeight" min-width="100" label="理论重量" align="center"/>
|
||||
<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">
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import download from '@/utils/download'
|
||||
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 {useUserStore} from "@/store/modules/user";
|
||||
import routeParamsCache from '@/utils/routeParamsCache'
|
||||
import {dateFormatter1, dateFormatter2} from "@/utils/formatTime";
|
||||
import {dateFormatter1} from "@/utils/formatTime";
|
||||
import * as PurchaseOrderNoDetailApi from "@/api/heli/purchaseordernodetail";
|
||||
defineOptions({ name: 'purchaseordernopartReceived' })
|
||||
const userStore = useUserStore()
|
||||
@ -149,6 +148,7 @@ const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const router = useRouter()
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const isReadOnly = ref(false) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
@ -249,8 +249,8 @@ const receiveGoods = async () => {
|
||||
message.error("零件"+list[i].boomName+"入库数量为空或数量为0,请确认")
|
||||
return
|
||||
}
|
||||
if (list[i].estimatedPrice==null||list[i].estimatedPrice==0){
|
||||
message.error("零件"+list[i].boomName+"预估总价为空或数量为0,请确认")
|
||||
if (list[i].estimatedPrice==null||list[i].estimatedPrice==''){
|
||||
message.error("零件"+list[i].boomName+"预估总价为空,请确认")
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -276,6 +276,11 @@ const receiveGoods = async () => {
|
||||
const route = useRoute()
|
||||
const routeValue = ref('')
|
||||
onMounted(async () => {
|
||||
const newVar = await UserApi.isAdministrator();
|
||||
if (!newVar.data){
|
||||
isReadOnly.value=true
|
||||
}
|
||||
console.log(newVar)
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user