1.文件本地预览问题
2.页面弹窗复选问题
This commit is contained in:
parent
3b9d0130bf
commit
a1dfeda855
@ -41,5 +41,4 @@ public class MaterialPlanSaveReqVO {
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String description;
|
||||
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public class ProjectOrderDO extends BaseDO {
|
||||
* 项目编号,唯一
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
/**bubu
|
||||
* 单据状态 已保存/已送审/已审核/已启动/已打回/已终止
|
||||
*
|
||||
* 枚举 {@link TODO heli_project_order_status 对应的类}
|
||||
|
@ -370,21 +370,32 @@ public class ScreenServiceImpl implements ScreenService {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
LocalDateTime firstDayInNewYearTime = LocalDateTime.of(calendar.get(Calendar.YEAR), 1, 1, 0, 0);
|
||||
|
||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProjectOrderDO.class)
|
||||
// .selectCount(ProjectOrderDO::getId, "projectCount")
|
||||
.select("DATE_FORMAT(create_time, '%m') as projectMonth")
|
||||
.ge(ProjectOrderDO::getCreateTime, firstDayInNewYearTime)
|
||||
.eq(ProjectOrderDO::getProperty,1)
|
||||
// MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
// query.selectAll(ProjectOrderDO.class)
|
||||
//// .selectCount(ProjectOrderDO::getId, "projectCount")
|
||||
// .select("DATE_FORMAT(create_time, '%m') as projectMonth")
|
||||
// .ge(ProjectOrderDO::getCreateTime, firstDayInNewYearTime)
|
||||
// .eq(ProjectOrderDO::getProperty,1)
|
||||
// .eq(ProjectOrderDO::getIsSnapshot,0)
|
||||
// .eq(ProjectOrderDO::getOrderStatus, ProjectOrderStatusEnum.APPROVE.getCode())
|
||||
//// .groupBy("t.business_line", "DATE_FORMAT(create_time, '%m')")
|
||||
// ;
|
||||
// List<ProjectOrderDO> projectOrderDOList = projectOrderMapper.selectList(query);
|
||||
MPJLambdaWrapper<PlanSubDO> planQuery = new MPJLambdaWrapper<>();
|
||||
planQuery.selectAll(PlanSubDO.class)
|
||||
.select("DATE_FORMAT(t.create_time, '%m') as projectMonth")
|
||||
.select("po.business_line as businessLine")
|
||||
.leftJoin(ProjectOrderDO.class,"po",ProjectOrderDO::getId,PlanSubDO::getProjectId)
|
||||
.ge(PlanSubDO::getCreateTime, firstDayInNewYearTime)
|
||||
.eq(ProjectOrderDO::getIsSnapshot,0)
|
||||
.eq(ProjectOrderDO::getOrderStatus, ProjectOrderStatusEnum.APPROVE.getCode())
|
||||
// .groupBy("t.business_line", "DATE_FORMAT(create_time, '%m')")
|
||||
;
|
||||
List<ProjectOrderDO> projectOrderDOList = projectOrderMapper.selectList(query);
|
||||
.innerJoin(PlanDO.class, "a", PlanDO::getId, PlanSubDO::getProjectPlanId)
|
||||
.notIn(PlanDO::getStatus, ProjectPlanStatusEnum.TERMINATE.getCode(), ProjectPlanStatusEnum.COMPLETE.getCode());
|
||||
List<PlanSubDO> planSubDOS = planSubMapper.selectList(planQuery);
|
||||
|
||||
Map<Integer, List<ProjectOrderDO>> countWithByBusinessLineGroupMonth = projectOrderDOList.stream().collect(Collectors.groupingBy(ProjectOrderDO::getProjectMonth));
|
||||
|
||||
Map<Integer, List<PlanSubDO>> countWithByBusinessLineGroupMonth = planSubDOS.stream().collect(Collectors.groupingBy(PlanSubDO::getProjectMonth));
|
||||
months.forEach(month -> {
|
||||
List<ProjectOrderDO> monthProjectList = countWithByBusinessLineGroupMonth.get(Integer.valueOf(month.replace("月","")));
|
||||
List<PlanSubDO> monthProjectList = countWithByBusinessLineGroupMonth.get(Integer.valueOf(month.replace("月","")));
|
||||
if (CollUtil.isEmpty(monthProjectList)){
|
||||
total.add(0);
|
||||
black.add(0);
|
||||
@ -393,7 +404,7 @@ public class ScreenServiceImpl implements ScreenService {
|
||||
}
|
||||
int coloredCount = 0;
|
||||
int blackCount=0;
|
||||
Map<String, List<ProjectOrderDO>> countWithByBusinessLine = monthProjectList.stream().collect(Collectors.groupingBy(ProjectOrderDO::getBusinessLine));
|
||||
Map<String, List<PlanSubDO>> countWithByBusinessLine = monthProjectList.stream().collect(Collectors.groupingBy(PlanSubDO::getBusinessLine));
|
||||
if(CollUtil.isNotEmpty(countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()))){
|
||||
blackCount = countWithByBusinessLine.get(BusinessLineEnum.BLACK.getCode()).size() ;
|
||||
}
|
||||
@ -646,10 +657,18 @@ public class ScreenServiceImpl implements ScreenService {
|
||||
data[0][2] = processDesignMapper.selectList(designQuery).size();
|
||||
|
||||
// 在制项目数量:取系统中《生产计划》的状态不为“已完成”或“已终止”的生产计划的子项目的个数和;
|
||||
|
||||
//2025 04 10 更改,改为查询一年的数据
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
LocalDateTime currentYearStart = LocalDateTime.of(now.getYear(), 1, 1, 0, 0, 0);
|
||||
|
||||
|
||||
MPJLambdaWrapper<PlanSubDO> planQuery = new MPJLambdaWrapper<>();
|
||||
planQuery.selectAll(PlanSubDO.class)
|
||||
.ge(PlanSubDO::getCreateTime,currentYearStart)
|
||||
.innerJoin(PlanDO.class, "a", PlanDO::getId, PlanSubDO::getProjectPlanId)
|
||||
.notIn(PlanDO::getStatus, ProjectPlanStatusEnum.TERMINATE.getCode(), ProjectPlanStatusEnum.COMPLETE.getCode());
|
||||
|
||||
data[0][3] = planSubMapper.selectList(planQuery).size();
|
||||
|
||||
screenDO.setData(JSON.toJSONString(data));
|
||||
|
@ -655,6 +655,7 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
|
||||
if(!updateList.isEmpty()){
|
||||
for (TaskDispatchDetailDO taskDispatchDetailDO : updateList) {
|
||||
|
||||
if (taskDispatchDetailDO.getDispatchType() == 2){
|
||||
taskDispatchDetailMapper.updateOwnerAndPostIdById(taskDispatchDetailDO.getId(),1);
|
||||
}else {
|
||||
|
@ -65,7 +65,8 @@ public class FileServiceImpl implements FileService {
|
||||
file.setName(name);
|
||||
file.setPath(path);
|
||||
file.setUrl(url);
|
||||
file.setPreviewUrl(url.replace("/admin-api/infra/file/5/get/","/fileview/"));
|
||||
String[] split = url.split("/");
|
||||
file.setPreviewUrl(url.replace("/"+split[3]+"/"+split[4]+"/"+split[5]+"/"+split[6]+"/"+split[7]+"/","/fileview/"));
|
||||
file.setType(type);
|
||||
file.setSize(content.length);
|
||||
fileMapper.insert(file);
|
||||
|
@ -645,7 +645,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -534,7 +534,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,8 @@
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col v-if="active != 'detail'">
|
||||
<el-upload ref="compositionUploadRef" :file-list="compositionUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="compositionUploadRef" :file-list="compositionUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="compositionUploadData" :on-change="compositionUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
|
||||
@ -57,7 +58,8 @@
|
||||
<Icon icon="ep:upload-filled" />上传材质报告
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-upload ref="heatUploadRef" :file-list="heatUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="heatUploadRef" :file-list="heatUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="heatUploadData" :on-change="heatUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
|
||||
@ -65,7 +67,8 @@
|
||||
<Icon icon="ep:upload-filled" />上传热处理报告
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-upload ref="scanUploadRef" :file-list="scanUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="scanUploadRef" :file-list="scanUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="scanUploadData" :on-change="scanUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
|
||||
@ -73,7 +76,8 @@
|
||||
<Icon icon="ep:upload-filled" />上传扫描报告
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-upload ref="triUploadRef" :file-list="triUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="triUploadRef" :file-list="triUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="triUploadData" :on-change="triUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
|
||||
@ -81,7 +85,8 @@
|
||||
<Icon icon="ep:upload-filled" />上传三坐标检测报告
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-upload ref="certificateUploadRef" :file-list="certificateUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="certificateUploadRef" :file-list="certificateUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="certificateUploadData" :on-change="certificateUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
|
||||
@ -118,7 +123,7 @@
|
||||
</el-card>
|
||||
|
||||
</el-form>
|
||||
<div class="text-center hl-footer">
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="goback" size="large">取 消</el-button>
|
||||
<el-button v-if="active != 'detail'" @click="submitForm('SAVE')" type="primary" :disabled="formLoading" size="large">保 存</el-button>
|
||||
</div>
|
||||
@ -421,7 +426,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,8 @@
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col v-if="active != 'detail'">
|
||||
<el-upload ref="uploadRef" :file-list="uploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="uploadRef" :file-list="uploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="uploadData" :on-change="uploadChange" class="upload-file-uploader">
|
||||
@ -107,7 +108,7 @@
|
||||
</el-card>
|
||||
|
||||
</el-form>
|
||||
<div class="text-center hl-footer">
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="goback" size="large">取 消</el-button>
|
||||
<el-button v-if="active != 'detail' && formData.status == 1" @click="submitForm('SAVE')" type="primary" :disabled="formLoading" size="large">保 存</el-button>
|
||||
<el-button v-if="active != 'detail' && formData.status == 1" @click="submitForm('SUBMIT')" type="success" :disabled="formLoading" size="large">提 交</el-button>
|
||||
@ -276,7 +277,8 @@ const uploadData = ref({
|
||||
})
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,8 @@ formData.value = await MaterialApi.getMaterial(id)
|
||||
}
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -568,7 +568,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -18,8 +18,8 @@
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
<el-card class="hl-table">
|
||||
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800" @row-click="clickRow">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true" :selectable="row=>chkboxEnable" />
|
||||
<el-table ref="multipleTable" :data="list" v-loading="formLoading" class="hl-table" :reserve-selection="true" @selection-change="handleSelectionChange" :row-key="getRowKeys" min-width="1800" @row-click="clickRow">
|
||||
<el-table-column type="selection" width="55" :selectable="row=>chkboxEnable" />
|
||||
<!-- <el-table-column prop="no" label="序号" min-width="120" align="center" /> -->
|
||||
<el-table-column label="序号" type="index" min-width="120" align="center" />
|
||||
<el-table-column prop="materialName" label="零件名称" min-width="120" align="center" />
|
||||
@ -47,6 +47,7 @@ import { ref } from 'vue'
|
||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import * as MaterialPlanBoomApi from '@/api/heli/materialplanboom'
|
||||
import { ElTable } from 'element-plus'
|
||||
import { cursorTo } from 'readline'
|
||||
|
||||
const chkboxEnable = ref(true)
|
||||
|
||||
@ -61,10 +62,64 @@ const planIdInit = ref()
|
||||
|
||||
const multipleTable = ref<InstanceType<typeof ElTable>>()
|
||||
const multipleSelection = ref([])
|
||||
const nowPageIds = ref([])
|
||||
const storage = ref(false)
|
||||
const handleSelectionChange = (val: []) => {
|
||||
multipleSelection.value = val
|
||||
if(selectedRowBeforeKeys.value == null || selectedRowBeforeKeys.value.length == 0 ){
|
||||
selectedRowNowKeys.value = val;
|
||||
selectedRowBeforeKeys.value = val;
|
||||
multipleSelection.value = selectedRowBeforeKeys.value
|
||||
|
||||
}else{
|
||||
if(val != null && val.length > 0){
|
||||
//对比一下,看看多了还是少了,多了selectedRowBeforeKeys.value就添加那个多了的元素,少了selectedRowBeforeKeys.value就移除不同的元素 然后 selectedRowNowKeys.value = val;
|
||||
// 提取新数据中的ID数组
|
||||
const newIds = val.map(item => item.id);
|
||||
// 提取当前页已选中的ID数组
|
||||
const currentIds = selectedRowNowKeys.value.map(item => item.id);
|
||||
// 提取之前所有页已选中的ID数组
|
||||
const beforeIds = selectedRowBeforeKeys.value.map(item => item.id);
|
||||
// 找出在新数据中但不在当前页已选中数组中的ID,这些是需要添加到之前选中数组中的
|
||||
const idsToAdd = newIds.filter(id => !currentIds.includes(id));
|
||||
// 找出在当前页已选中但不在新数据中的ID,这些是需要从之前选中数组中移除的
|
||||
const idsToRemove = currentIds.filter(id => !newIds.includes(id));
|
||||
// 添加新的ID到之前选中数组中
|
||||
idsToAdd.forEach(id => {
|
||||
val.forEach(item =>{
|
||||
if(item.id == id){
|
||||
selectedRowBeforeKeys.value.push(item);
|
||||
}
|
||||
})
|
||||
});
|
||||
// 从之前选中数组中移除不再存在的ID
|
||||
idsToRemove.forEach(id => {
|
||||
const index = beforeIds.indexOf(id);
|
||||
if (index !== -1) {
|
||||
selectedRowBeforeKeys.value.splice(index, 1);
|
||||
}
|
||||
});
|
||||
multipleSelection.value = selectedRowBeforeKeys.value
|
||||
selectedRowNowKeys.value = val;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// if(selectedRowBeforeKeys.value == null || selectedRowBeforeKeys.value.length == 0){
|
||||
// selectedRowBeforeKeys.value = val
|
||||
// }else{
|
||||
// val.forEach(item => {
|
||||
// const isIdExist = selectedRowKeys.value.some(it => it.id === item.id);
|
||||
// if (!isIdExist) {
|
||||
// selectedRowKeys.value.push(item);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// multipleSelection.value = val
|
||||
}
|
||||
const selectedRowKeys = ref([]);
|
||||
const selectedRowBeforeKeys = ref([]);
|
||||
const selectedRowNowKeys = ref([]);
|
||||
const clickRow = (row: any) => {
|
||||
if (chkboxEnable.value) {
|
||||
if (row) {
|
||||
@ -76,7 +131,7 @@ const clickRow = (row: any) => {
|
||||
}
|
||||
//指定key值,数据更新之后保留之前选中的数据
|
||||
const getRowKeys = (row) => {
|
||||
return row.matId
|
||||
return row.id
|
||||
}
|
||||
|
||||
const queryReqVo: any = reactive({
|
||||
@ -88,9 +143,22 @@ const queryReqVo: any = reactive({
|
||||
})
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = async () => {
|
||||
selectedRowNowKeys.value = []
|
||||
const data = await MaterialPlanBoomApi.getBoomDetailList(queryReqVo)
|
||||
nowPageIds.value = data.list.map(item => item.id);
|
||||
storage.value = true;
|
||||
list.value = data.list
|
||||
|
||||
total.value = data.total
|
||||
nextTick(() => {
|
||||
multipleSelection.value.forEach((key) => {
|
||||
const row = list.value.find(item => item.id === key.id);
|
||||
if (row) {
|
||||
selectedRowNowKeys.value.push(key)
|
||||
multipleTable.value!.toggleRowSelection(row, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
|
@ -522,6 +522,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1];
|
||||
const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
@ -644,7 +644,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -738,7 +738,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -771,7 +771,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -764,7 +764,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -561,7 +561,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -1830,7 +1830,8 @@ type="textarea" v-model="formData.activeOpinion" placeholder="请输入打回原
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-upload ref="uploadRef" :file-list="uploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="uploadRef" :file-list="uploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="uploadData" :on-change="uploadChange" class="upload-file-uploader">
|
||||
@ -108,7 +109,8 @@ const submitForm = async () => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -877,7 +877,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -920,7 +920,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -932,7 +932,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,8 @@
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-upload ref="contractUploadRef" :file-list="contractUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="contractUploadRef" :file-list="contractUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="contractUploadData" :on-change="contractUploadChange" :on-error="handleError" :on-success="handleSuccess" :before-upload="before" class="upload-file-uploader">
|
||||
@ -263,7 +264,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
|
||||
|
@ -28,9 +28,11 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="stockInType" label="入库类型">
|
||||
<el-select v-model="formData.stockInType" clearable style="width: 100%" @change="handleStockType"
|
||||
v-bind:disabled="ctrView || ctrSave">
|
||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_IN_TYPE)" :key="dict.value"
|
||||
<el-select
|
||||
v-model="formData.stockInType" clearable style="width: 100%" @change="handleStockType"
|
||||
:disabled="ctrView || ctrSave">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_IN_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -42,7 +44,8 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="industry" label="单据状态">
|
||||
<el-select v-model="formData.status" placeholder="下拉选择" clearable class="!w-700px" disabled>
|
||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_STATUS)" :key="dict.value"
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_STATUS)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -52,9 +55,9 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="headerNo" label="上游单号">
|
||||
<div class="!w-700px">
|
||||
<el-input v-model="formData.headerNo" @click.prevent="handleClick" v-bind:disabled="ctrView || ctrSave || enableHeadNo">
|
||||
<el-input v-model="formData.headerNo" @click.prevent="handleClick" :disabled="ctrView || ctrSave || enableHeadNo">
|
||||
<template #append><el-button
|
||||
:icon="Search" v-bind:disabled="ctrView || ctrSave || enableHeadNo"
|
||||
:icon="Search" :disabled="ctrView || ctrSave || enableHeadNo"
|
||||
@click="openProjectPurchaseorderDialog" /></template>
|
||||
</el-input>
|
||||
</div>
|
||||
@ -69,7 +72,8 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单据日期" prop="createTime">
|
||||
<!-- {{ formatDate(formData.createTime, 'YYYY-MM-DD HH:mm:ss') }} -->
|
||||
<el-date-picker v-model="formData.createTime" value-format="x" placeholder="单据日期" disabled
|
||||
<el-date-picker
|
||||
v-model="formData.createTime" value-format="x" placeholder="单据日期" disabled
|
||||
class="!w-400px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -77,8 +81,9 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="whId" label="入库仓库">
|
||||
<el-select v-model="formData.whId" placeholder="下拉选择" clearable class="!w-400px" @change="handleWh"
|
||||
v-bind:disabled="ctrView || ctrSave">
|
||||
<el-select
|
||||
v-model="formData.whId" placeholder="下拉选择" clearable class="!w-400px" @change="handleWh"
|
||||
:disabled="ctrView || ctrSave">
|
||||
<el-option v-for="dict in whList" :key="dict.id" :label="dict.whName" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -89,8 +94,9 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="description">
|
||||
<el-input type="textarea" v-model="formData.description" show-word-limit maxlength="200"
|
||||
v-bind:disabled="ctrView || ctrSave" />
|
||||
<el-input
|
||||
type="textarea" v-model="formData.description" show-word-limit maxlength="200"
|
||||
:disabled="ctrView || ctrSave" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -105,10 +111,12 @@
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-button class="hl-addbutton" type="primary" size="large" @click="openMatForm"
|
||||
v-bind:disabled="ctrView || ctrSave">新增</el-button>
|
||||
<el-button
|
||||
class="hl-addbutton" type="primary" size="large" @click="openMatForm"
|
||||
:disabled="ctrView || ctrSave">新增</el-button>
|
||||
</el-col>
|
||||
<el-form ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules"
|
||||
<el-form
|
||||
ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules"
|
||||
v-loading="subFormLoading" label-width="0">
|
||||
<el-table :data="formData.matItemDOList" class="hl-table">
|
||||
<el-table-column type="index" label="序号" min-width="80" align="center" fixed />
|
||||
@ -116,7 +124,7 @@
|
||||
<template #header> <span class="hl-table_header">*</span> 物料编码</template>
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.matCode`" :rules="subFormRules.matCode" class="mb-0px!">
|
||||
<el-input class="!w-265px" placeholder="物料编码" v-bind:disabled="true || ctrView || ctrSave" v-model="scope.row.matCode" readonly>
|
||||
<el-input class="!w-265px" placeholder="物料编码" :disabled="true || ctrView || ctrSave" v-model="scope.row.matCode" readonly>
|
||||
<!-- <template #append ><el-button @click="openMatForm" > <Icon icon="ep:search" class="mr-5px" /> </el-button></template> -->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -145,8 +153,9 @@
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.rgId`" :rules="subFormRules.rgId" class="mb-0px!">
|
||||
<el-select v-model="scope.row.rgId" placeholder="" style="width: 100%" @change="handleRg(scope)"
|
||||
v-bind:disabled="ctrView || ctrSave">
|
||||
<el-select
|
||||
v-model="scope.row.rgId" placeholder="" style="width: 100%" @change="handleRg(scope)"
|
||||
:disabled="ctrView || ctrSave">
|
||||
<el-option v-for="dict in rgList" :key="dict.id" :label="dict.rg_name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -158,9 +167,11 @@
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.pnId`" :rules="subFormRules.pnId" class="mb-0px!">
|
||||
<el-select v-model="scope.row.pnId" placeholder="" style="width: 100%"
|
||||
v-bind:disabled="ctrView || ctrSave">
|
||||
<el-option v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pn_name"
|
||||
<el-select
|
||||
v-model="scope.row.pnId" placeholder="" style="width: 100%"
|
||||
:disabled="ctrView || ctrSave">
|
||||
<el-option
|
||||
v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pn_name"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -171,9 +182,10 @@
|
||||
<template #header> <span class="hl-table_header">*</span> 入库数量 </template>
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.storageOkQty`" :rules="subFormRules.storageOkQty"
|
||||
<el-form-item
|
||||
:prop="`${scope.$index}.storageOkQty`" :rules="subFormRules.storageOkQty"
|
||||
class="mb-0px!">
|
||||
<el-input v-model="scope.row.storageOkQty" v-bind:disabled="ctrView || ctrSave" />
|
||||
<el-input v-model="scope.row.storageOkQty" :disabled="ctrView || ctrSave" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -182,9 +194,10 @@
|
||||
<template #header> <span class="hl-table_header">*</span> 入库单价 </template>
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.price`" :rules="subFormRules.price"
|
||||
<el-form-item
|
||||
:prop="`${scope.$index}.price`" :rules="subFormRules.price"
|
||||
class="mb-0px!">
|
||||
<el-input v-model="scope.row.price" v-bind:disabled="ctrView || ctrSave" />
|
||||
<el-input v-model="scope.row.price" :disabled="ctrView || ctrSave" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -193,23 +206,24 @@
|
||||
<template #header>入库单价 </template>
|
||||
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`${scope.$index}.price`"
|
||||
<el-form-item
|
||||
:prop="`${scope.$index}.price`"
|
||||
class="mb-0px!">
|
||||
<el-input v-model="scope.row.price" v-bind:disabled="ctrView || ctrSave" />
|
||||
<el-input v-model="scope.row.price" :disabled="ctrView || ctrSave" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lotNo" label="批次号" align="center" min-width="120" v-if="false">
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.lotNo" v-bind:disabled="ctrView || ctrSave" />
|
||||
<el-input v-model="scope.row.lotNo" :disabled="ctrView || ctrSave" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="projectSubName" label="子项目名称" align="center" min-width="120">
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.projectSubName" v-bind:disabled="ctrView || ctrSave" readonly>
|
||||
<el-input v-model="scope.row.projectSubName" :disabled="ctrView || ctrSave" readonly>
|
||||
<template #append ><el-button @click="openProjectForm(scope)" > <Icon icon="ep:search" class="mr-5px" /> </el-button></template>
|
||||
</el-input>
|
||||
</template>
|
||||
@ -217,14 +231,15 @@
|
||||
<el-table-column prop="description" label="备注" align="center" min-width="180">
|
||||
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.description" v-bind:disabled="ctrView || ctrSave" />
|
||||
<el-input v-model="scope.row.description" :disabled="ctrView || ctrSave" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120" fixed="right">
|
||||
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" @click.prevent="handleDelete2(scope.$index)"
|
||||
v-bind:disabled="ctrView || ctrDelete">
|
||||
<el-button
|
||||
link type="danger" @click.prevent="handleDelete2(scope.$index)"
|
||||
:disabled="ctrView || ctrDelete">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@ -245,18 +260,20 @@
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-col>
|
||||
<el-upload ref="matUploadRef" :file-list="matUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
<el-upload
|
||||
ref="matUploadRef" :file-list="matUploadFiles" multiple :action="uploadUrl" :headers="{
|
||||
Authorization: 'Bearer ' + getAccessToken(),
|
||||
'tenant-id': getTenantId()
|
||||
}" name="files" :show-file-list="false" :auto-upload="false" :data="matUploadData" :on-change="matUploadChange"
|
||||
:on-error="handleError" :on-success="handleSuccess" :before-upload="before"
|
||||
class="upload-file-uploader">
|
||||
<el-button type="primary" v-bind:disabled="ctrView || ctrSave">
|
||||
<el-button type="primary" :disabled="ctrView || ctrSave">
|
||||
<Icon icon="ep:upload-filled" />上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-table :data="formData.attachments" class="hl-table" v-loading.fullscreen.lock="uploading"
|
||||
<el-table
|
||||
:data="formData.attachments" class="hl-table" v-loading.fullscreen.lock="uploading"
|
||||
element-loading-text="附件上传中..." element-loading-background="rgba(122, 122, 122, 0.6)">
|
||||
<el-table-column prop="name" label="文件名称" align="center">
|
||||
<!-- <template #default="scope">
|
||||
@ -269,11 +286,13 @@
|
||||
<el-table-column label="操作" align="center">
|
||||
|
||||
<template #default="scope">
|
||||
<el-button link type="danger" size="small" v-bind:disabled="ctrView || ctrDelete"
|
||||
<el-button
|
||||
link type="danger" size="small" :disabled="ctrView || ctrDelete"
|
||||
@click="handleDeleteAttachment(scope.$index, scope.row.businessFileType)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button link type="primary" size="small" v-bind:disabled="ctrView || ctrDelete"
|
||||
<el-button
|
||||
link type="primary" size="small" :disabled="ctrView || ctrDelete"
|
||||
@click="downloadAttachment(scope.row.name, scope.row.url)">
|
||||
下载
|
||||
</el-button>
|
||||
@ -329,7 +348,7 @@
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<div class="text-center hl-footer">
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="() => router.go(-1)" size="large">取 消</el-button>
|
||||
<el-button @click="submitForm" type="success" v-if="btnSave" size="large">保
|
||||
存</el-button>
|
||||
@ -693,7 +712,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -842,7 +842,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -770,7 +770,9 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
@ -580,7 +580,8 @@ const handleDeleteAttachment = async (index, type) => {
|
||||
// 下载文件
|
||||
const downloadAttachment = async (name, url) => {
|
||||
if (url) {
|
||||
const data = await downloadFile(url)
|
||||
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||
url =baseUrl+'/admin-api/'+ url.split('/admin-api/')[1]; const data = await downloadFile(url)
|
||||
download.any(data, name)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user