This commit is contained in:
parent
2710040308
commit
5ee4f3a9ca
|
|
@ -9,10 +9,10 @@
|
|||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="租赁单位" prop="unitId">
|
||||
<el-form-item label="租赁单位" prop="leaseUnitId">
|
||||
<el-select
|
||||
v-model="maForm.unitId"
|
||||
placeholder="租赁单位"
|
||||
v-model="maForm.leaseUnitId"
|
||||
placeholder="请选择租赁单位"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
|
|
@ -26,10 +26,10 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<el-form-item label="租赁工程" prop="leaseProjectId">
|
||||
<el-select
|
||||
v-model="maForm.projectId"
|
||||
placeholder="租赁工程"
|
||||
v-model="maForm.leaseProjectId"
|
||||
placeholder="请选择租赁工程"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
|
|
@ -119,10 +119,10 @@
|
|||
/>
|
||||
<el-table-column align="center" label="计量单位" prop="unitName" />
|
||||
<el-table-column align="center" label="当前库存" prop="storageNum" />
|
||||
<el-table-column label="预领数量" prop="purchaseNum" align="center">
|
||||
<el-table-column label="预领数量" prop="preNum" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchaseNum"
|
||||
v-model="scope.row.preNum"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="1"
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="出货数量" prop="unitName" />
|
||||
<el-table-column align="center" label="出货数量" prop="alNum" />
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="remark"
|
||||
|
|
@ -172,6 +172,7 @@ import {
|
|||
getListUnite,
|
||||
addApplyInfo,
|
||||
updateApplyInfo,
|
||||
getApplyInfo,
|
||||
} from "@/api/lease/apply";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
|
|
@ -237,23 +238,6 @@ export default {
|
|||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
fileDataList: [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
],
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
equipmentId: undefined,
|
||||
|
|
@ -275,14 +259,14 @@ export default {
|
|||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
unitId: [
|
||||
leaseUnitId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择租赁单位",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
projectId: [
|
||||
leaseProjectId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择租赁工程",
|
||||
|
|
@ -297,9 +281,10 @@ export default {
|
|||
},
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "联系电话不能为空", trigger: "blur" },
|
||||
{
|
||||
required: true,
|
||||
message: "请输入联系电话",
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
|
|
@ -336,14 +321,16 @@ export default {
|
|||
console.log("isEdit", this.isEdit);
|
||||
this.taskId = this.editTaskId;
|
||||
this.id = this.editId;
|
||||
// this.getTaskInfo();
|
||||
this.getTaskInfo();
|
||||
}
|
||||
|
||||
this.projectInfoList();
|
||||
this.equipmentType();
|
||||
},
|
||||
methods: {
|
||||
uniteChange(val) {
|
||||
if (this.isEdit) {
|
||||
this.maForm.leaseProjectId = null;
|
||||
getListProject({ unitId: val }).then((response) => {
|
||||
if (response.data.length != 0) {
|
||||
this.projectList = response.data;
|
||||
|
|
@ -355,6 +342,7 @@ export default {
|
|||
},
|
||||
projectChange(val) {
|
||||
if (this.isEdit) {
|
||||
this.maForm.leaseUnitId = null;
|
||||
getListUnite({ projectId: val }).then((response) => {
|
||||
if (response.data.length != 0) {
|
||||
this.uniteList = response.data;
|
||||
|
|
@ -392,8 +380,8 @@ export default {
|
|||
item3.children.forEach((item4) => {
|
||||
item4.maTypeName = item3.typeName;
|
||||
item4.specificationType = item4.typeName;
|
||||
this.$set(item4, "purchaseTaxPrice", 0);
|
||||
this.$set(item4, "purchasePrice", 0);
|
||||
// this.$set(item4, "purchaseTaxPrice", 0);
|
||||
// this.$set(item4, "purchasePrice", 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -424,12 +412,8 @@ export default {
|
|||
if (z.data.typeId === i) {
|
||||
const obj = JSON.parse(JSON.stringify(z.data));
|
||||
// obj.supplierId = ''
|
||||
obj.createTime = null;
|
||||
obj.productionTime = "";
|
||||
obj.purchaseTaxPrice = 0;
|
||||
obj.purchaseTaxPrice = 0;
|
||||
obj.purchaseNum = 1;
|
||||
obj.fixCode = "0";
|
||||
|
||||
obj.preNum = 1;
|
||||
tempList.push(obj);
|
||||
break;
|
||||
}
|
||||
|
|
@ -459,22 +443,10 @@ export default {
|
|||
//获取任务详情--- 编辑回显数据
|
||||
getTaskInfo() {
|
||||
// this.loading = true;
|
||||
getPurchaseCheckInfo({
|
||||
taskId: this.taskId,
|
||||
id: this.id,
|
||||
taskStatus: 1,
|
||||
}).then((response) => {
|
||||
this.maForm = response.data.purchaseCheckInfo;
|
||||
this.maForm.id = response.data.purchaseCheckInfo.id;
|
||||
this.maForm.taskId = response.data.purchaseCheckInfo.taskId;
|
||||
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime;
|
||||
this.maForm.supplierId = response.data.purchaseCheckInfo.supplierId;
|
||||
this.maForm.remark = response.data.purchaseCheckInfo.remark;
|
||||
this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate;
|
||||
// this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
// this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList;
|
||||
console.log(this.equipmentList);
|
||||
getApplyInfo(this.id).then((response) => {
|
||||
this.maForm = response.data.leaseApplyInfo;
|
||||
console.log("this.maForm", this.maForm);
|
||||
this.equipmentList = response.data.leaseApplyDetailsList;
|
||||
// this.loading = false;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -114,45 +114,45 @@
|
|||
align="center"
|
||||
width="160"
|
||||
label="申请时间"
|
||||
prop="arrivalTime"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="申请人"
|
||||
width="150"
|
||||
align="center"
|
||||
prop="code"
|
||||
prop="createBy"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁单位"
|
||||
align="center"
|
||||
prop="purchaseMaTypeName"
|
||||
prop="leaseUnit"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁工程"
|
||||
align="center"
|
||||
prop="purchaseMaNumber"
|
||||
prop="leaseProject"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="领料物资类型"
|
||||
align="center"
|
||||
prop="purchaseTaxPrice"
|
||||
prop="leaseType"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="协议号"
|
||||
align="center"
|
||||
prop="purchasePrice"
|
||||
prop="agreementCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁申请单号"
|
||||
align="center"
|
||||
prop="taxRate"
|
||||
prop="code"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
|
|
@ -161,14 +161,14 @@
|
|||
<el-table-column
|
||||
label="领料人"
|
||||
align="center"
|
||||
prop="supplier"
|
||||
prop="leasePerson"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="领料人电话"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
prop="phone"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
label="操作时间"
|
||||
align="center"
|
||||
width="160"
|
||||
prop="createTime"
|
||||
prop="updateTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -229,18 +229,10 @@
|
|||
v-hasPermi="['purchase:person:notice']"
|
||||
>发布</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handlePrint(scope.row)"
|
||||
v-if="scope.row.status == '2'"
|
||||
<el-button size="mini" type="warning" @click="handlePrint(scope.row)"
|
||||
>领料单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handlePrint(scope.row)"
|
||||
v-if="scope.row.status == '2'"
|
||||
<el-button size="mini" type="warning" @click="handlePrint(scope.row)"
|
||||
>出库检验单</el-button
|
||||
>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="租赁单位" prop="unitId">
|
||||
<el-form-item label="租赁单位" prop="leaseUnitId">
|
||||
<el-select
|
||||
v-model="maForm.unitId"
|
||||
placeholder="租赁单位"
|
||||
v-model="maForm.leaseUnitId"
|
||||
placeholder="请选择租赁单位"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
|
|
@ -25,10 +25,10 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<el-form-item label="租赁工程" prop="leaseProjectId">
|
||||
<el-select
|
||||
v-model="maForm.projectId"
|
||||
placeholder="租赁工程"
|
||||
v-model="maForm.leaseProjectId"
|
||||
placeholder="请选择租赁工程"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
|
|
@ -84,13 +84,13 @@
|
|||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="maTypeName"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
prop="typeModelName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -103,20 +103,20 @@
|
|||
<el-table-column
|
||||
label="当前库存"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
prop="storageNum"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="预领数量"
|
||||
align="center"
|
||||
prop="purchaseTaxPrice"
|
||||
prop="preNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库数量"
|
||||
align="center"
|
||||
prop="purchasePrice"
|
||||
prop="alNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -135,7 +135,7 @@ import {
|
|||
uploadPurchaseFile,
|
||||
getPurchaseFileList,
|
||||
} from "@/api/purchase/goodsAccept";
|
||||
import { getApplyInfo } from "@/api/lease/apply";
|
||||
import { getApplyInfo, getListProject, getListUnite } from "@/api/lease/apply";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "QueryTools",
|
||||
|
|
@ -165,171 +165,58 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
fixCodeList: ["否", "是"],
|
||||
//任务ID
|
||||
taskId: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
//任务数据
|
||||
taskInfo: {},
|
||||
//租赁单位
|
||||
uniteList: [],
|
||||
//租赁工程
|
||||
projectList: [],
|
||||
// 表格数据
|
||||
equipmentList: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
maForm: {},
|
||||
fileDataList: [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
],
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||
maForm: {
|
||||
leaseUnitId: undefined,
|
||||
leaseProjectId: undefined,
|
||||
},
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.taskId = this.queryTaskId;
|
||||
this.id = this.queryId;
|
||||
this.projectInfoList();
|
||||
this.getTaskInfo();
|
||||
},
|
||||
methods: {
|
||||
/** 租赁单位和工程-下拉选 */
|
||||
projectInfoList() {
|
||||
getListUnite({ id: null }).then((response) => {
|
||||
this.uniteList = response.data;
|
||||
});
|
||||
getListProject({ id: null }).then((response) => {
|
||||
this.projectList = response.data;
|
||||
});
|
||||
},
|
||||
//获取任务详情-列表数据
|
||||
getTaskInfo() {
|
||||
this.loading = true;
|
||||
getApplyInfo(this.id).then((response) => {
|
||||
this.taskInfo = response.data;
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList;
|
||||
this.equipmentList.forEach((item) => {
|
||||
item.fixCode = this.fixCodeList[Number(item.fixCode)];
|
||||
});
|
||||
this.maForm = response.data.leaseApplyInfo;
|
||||
this.equipmentList = response.data.leaseApplyDetailsList;
|
||||
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row) {
|
||||
this.rowData = row;
|
||||
this.fileDataList = [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
];
|
||||
this.getFileData();
|
||||
this.open = true;
|
||||
},
|
||||
getFileData() {
|
||||
let param = {
|
||||
modelId: this.rowData.typeId,
|
||||
taskType: 0,
|
||||
taskId: this.rowData.taskId,
|
||||
};
|
||||
getPurchaseFileList(param)
|
||||
.then((response) => {
|
||||
if (response.rows.length > 0) {
|
||||
response.rows.forEach((item) => {
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == item.fileType
|
||||
);
|
||||
this.fileDataList[index].name = item.name;
|
||||
this.fileDataList[index].url = item.url;
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
beforeFileUpload(row) {
|
||||
this.rowData.fileType = row.fileType;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
if (this.taskId == "") {
|
||||
//新增逻辑
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
let obj = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
};
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == this.rowData.fileType
|
||||
);
|
||||
this.fileDataList[index].name = response.data.name;
|
||||
this.fileDataList[index].url = response.data.url;
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(
|
||||
(v) => v.fileType == this.rowData.fileType
|
||||
);
|
||||
if (index2 > -1) {
|
||||
//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2, 0, obj);
|
||||
} else {
|
||||
//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj);
|
||||
}
|
||||
} else {
|
||||
this.rowData.bmFileInfos.push(obj);
|
||||
}
|
||||
} else {
|
||||
//编辑逻辑
|
||||
let param = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
};
|
||||
uploadPurchaseFile(param)
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess("上传成功");
|
||||
this.getFileData();
|
||||
})
|
||||
.catch(() => {
|
||||
this.$modal.msgError("上传失败");
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
const parts = file.name.split(".");
|
||||
const extension = parts.pop();
|
||||
if (extension === "doc" || extension === "docx" || extension === "pdf") {
|
||||
const windowName = file.name;
|
||||
window.open(file.url, windowName);
|
||||
} else {
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/material/purchase_check_info/exportDetails",
|
||||
{ taskId: this.taskId },
|
||||
`新购到货详情_${new Date().getTime()}.xlsx`
|
||||
`领料申请详情_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
|
|
@ -49,7 +51,7 @@
|
|||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="taxRateChange"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -61,7 +63,7 @@
|
|||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="taxRateChange"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -102,7 +104,31 @@
|
|||
|
||||
<el-table-column align="center" label="已领数量" prop="unitName" />
|
||||
<el-table-column align="center" label="管理模式" prop="unitName" />
|
||||
<el-table-column align="center" label="出库数量" prop="unitName" />
|
||||
<el-table-column align="center" label="出库数量" prop="unitName">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="scope.row.unitName != null && scope.row.unitName != ''"
|
||||
@click="codeBind(scope.row)"
|
||||
style="color: #02a7f0; cursor: pointer"
|
||||
>
|
||||
{{ scope.row.unitName }}
|
||||
</div>
|
||||
<el-input-number
|
||||
v-else
|
||||
v-model="scope.row.preNum"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</template>
|
||||
<!-- <template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-if="scope.row.unitName != null && scope.row.unitName != ''"
|
||||
v-model="scope.row.preNum"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
></el-input-number>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-input
|
||||
|
|
@ -126,6 +152,86 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 绑定弹框-->
|
||||
<el-dialog
|
||||
width="70%"
|
||||
append-to-body
|
||||
title="编码绑定"
|
||||
:visible.sync="bindCodeVisible"
|
||||
>
|
||||
<el-form
|
||||
size="small"
|
||||
:inline="true"
|
||||
ref="queryFormBindRef"
|
||||
:model="queryBindForm"
|
||||
:rules="queryBindFormRules"
|
||||
@close="closeCancel"
|
||||
>
|
||||
<el-form-item label="前缀" prop="codePrefix">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="20"
|
||||
placeholder="请输入前缀"
|
||||
v-model="queryBindForm.codePrefix"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="后缀范围" prop="codeSuffixStart">
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="开始数值"
|
||||
v-model="queryBindForm.codeSuffixStart"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="codeSuffixEnd">
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="结束数值"
|
||||
v-model="queryBindForm.codeSuffixEnd"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input
|
||||
clearable
|
||||
maxlength="20"
|
||||
placeholder="请输入编码"
|
||||
v-model="queryBindForm.code"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="handleAdd"
|
||||
>填充</el-button
|
||||
>
|
||||
<el-button type="primary" size="mini" @click="handleCodeBinding"
|
||||
>绑定</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table border max-height="600px" :data="codeTableList">
|
||||
<el-table-column align="center" label="序号" type="index" />
|
||||
<el-table-column align="center" label="设备名称" prop="materialName" />
|
||||
<el-table-column align="center" label="规格型号" prop="materialModel" />
|
||||
<el-table-column align="center" label="设备编码">
|
||||
<template slot-scope="{ row }">
|
||||
<el-input clearable v-model="row.maCode" placeholder="请填写编码" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态"> </el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-remove"
|
||||
@click="handleRemove(scope.$index)"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -186,36 +292,22 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
bindCodeVisible: false, // 绑定弹框
|
||||
// 总条数
|
||||
total: 0,
|
||||
//物资厂家
|
||||
supplierList: [],
|
||||
//机具类型
|
||||
equipmentTypeList: [],
|
||||
//绑定的数据
|
||||
codeTableList: [],
|
||||
// 角色表格数据
|
||||
equipmentList: [],
|
||||
equipmentList: [{ unitName: 4 }, { unitName: null }],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
fileDataList: [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
],
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
equipmentId: undefined,
|
||||
|
|
@ -234,6 +326,16 @@ export default {
|
|||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
// 编码绑定表单数据源
|
||||
queryBindForm: {
|
||||
typeId: "", // 物资typeId
|
||||
typeName: "", // 规格型号
|
||||
codePrefix: "", // 编码前缀
|
||||
maTypeName: "", // 物资名称
|
||||
codeSuffixEnd: "", // 后缀结束
|
||||
codeSuffixStart: "", // 后缀开始
|
||||
code: "", //编码
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// deviceType: [
|
||||
|
|
@ -250,9 +352,35 @@ export default {
|
|||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
// purchaser: [
|
||||
// { required: true, message: "采购员不能为空", trigger: "blur" }
|
||||
// ]
|
||||
},
|
||||
// 编码校验规则
|
||||
queryBindFormRules: {
|
||||
codePrefix: [
|
||||
{ required: true, message: "请输入前缀", trigger: "blur" },
|
||||
],
|
||||
codeSuffixStart: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请输入前缀",
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9][0-9]*$/,
|
||||
message: "请输入大于0且不能以0开头的正整数",
|
||||
},
|
||||
],
|
||||
codeSuffixEnd: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请输入后缀",
|
||||
},
|
||||
|
||||
{
|
||||
pattern: /^[1-9][0-9]*$/,
|
||||
message: "请输入大于0且不能以0开头的正整数",
|
||||
},
|
||||
],
|
||||
},
|
||||
deviceTypeTreeProps: {
|
||||
children: "children",
|
||||
|
|
@ -263,6 +391,7 @@ export default {
|
|||
},
|
||||
deviceType: [],
|
||||
propsKey: 1000,
|
||||
waitBindNum: 0, // 待绑定数量
|
||||
// taxRate:0,
|
||||
};
|
||||
},
|
||||
|
|
@ -283,35 +412,62 @@ export default {
|
|||
console.log("isEdit", this.isEdit);
|
||||
this.taskId = this.editTaskId;
|
||||
this.id = this.editId;
|
||||
this.getTaskInfo();
|
||||
// this.getTaskInfo();
|
||||
}
|
||||
this.supplierInfoList();
|
||||
this.equipmentType();
|
||||
},
|
||||
methods: {
|
||||
// 税率
|
||||
taxRateChange(val) {
|
||||
this.maForm.taxRate = val.replace(/[^\d.]/g, "");
|
||||
this.equipmentList.forEach((item) => {
|
||||
item.purchaseTaxPrice = item.purchasePrice * (1 + val / 100);
|
||||
});
|
||||
//取消弹窗
|
||||
closeCancel() {},
|
||||
codeBind(row) {
|
||||
this.bindCodeVisible = true;
|
||||
this.waitBindNum = row.unitName;
|
||||
},
|
||||
// 含税单价
|
||||
purchaseTaxPriceChange(row, val) {
|
||||
// this.equipmentList[val].purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||
row.purchasePrice = (
|
||||
row.purchaseTaxPrice /
|
||||
(1 + this.maForm.taxRate / 100)
|
||||
).toFixed(2);
|
||||
},
|
||||
// 不含税单价
|
||||
purchasePriceChange(row, val) {
|
||||
// this.equipmentList[val].purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||
row.purchaseTaxPrice = (
|
||||
row.purchasePrice *
|
||||
(1 + this.maForm.taxRate / 100)
|
||||
).toFixed(2);
|
||||
handleAdd() {
|
||||
if (this.queryBindForm.code != "") {
|
||||
console.log("this.queryBindForm.code", this.queryBindForm.code);
|
||||
} else {
|
||||
// 1. 校验表单
|
||||
this.$refs.queryFormBindRef.validate((valid) => {
|
||||
if (valid) {
|
||||
// 1.1 判断结束值是否大于开始值
|
||||
const {
|
||||
typeName,
|
||||
codePrefix,
|
||||
maTypeName,
|
||||
codeSuffixEnd,
|
||||
codeSuffixStart,
|
||||
} = this.queryBindForm;
|
||||
if (parseInt(codeSuffixEnd) < parseInt(codeSuffixStart)) {
|
||||
this.$modal.msgError("结束值不可小于开始值");
|
||||
return;
|
||||
}
|
||||
// 1.2 判断可编码数量
|
||||
let waitCodeNum = this.waitBindNum; // 待编码数量
|
||||
// 可编码数量 如相减大于代编码数量 则取待编码数量 如小于待编码数量 则取相减后值
|
||||
let passCodeNUm =
|
||||
codeSuffixEnd - codeSuffixStart > waitCodeNum
|
||||
? waitCodeNum
|
||||
: codeSuffixEnd - codeSuffixStart;
|
||||
|
||||
this.codeTableList = [];
|
||||
// 1.3 循环生成编码
|
||||
for (let i = 0; i < passCodeNUm; i++) {
|
||||
const codeItem = {
|
||||
typeName,
|
||||
maTypeName,
|
||||
outFacCode: "",
|
||||
productDate: "",
|
||||
maCode: `${codePrefix}${parseInt(codeSuffixStart) + i}`,
|
||||
};
|
||||
this.codeTableList.push(codeItem);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleCodeBinding() {},
|
||||
/** 物资厂家-下拉选 */
|
||||
supplierInfoList() {
|
||||
let param = {
|
||||
|
|
@ -407,12 +563,6 @@ export default {
|
|||
this.equipmentList = [];
|
||||
}
|
||||
},
|
||||
//选择出厂日期
|
||||
productionTimeChange(val) {
|
||||
this.equipmentList.forEach((item) => {
|
||||
item.productionTime = val;
|
||||
});
|
||||
},
|
||||
//获取任务详情--- 编辑回显数据
|
||||
getTaskInfo() {
|
||||
// this.loading = true;
|
||||
|
|
@ -497,128 +647,7 @@ export default {
|
|||
this.$modal.msgError("请先添加机具类型");
|
||||
}
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row) {
|
||||
this.rowData = row;
|
||||
this.fileDataList = [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
];
|
||||
if (this.taskId == "") {
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
this.rowData.bmFileInfos.forEach((item) => {
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == item.fileType
|
||||
);
|
||||
this.fileDataList[index].name = item.name;
|
||||
this.fileDataList[index].url = item.url;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.getFileData();
|
||||
}
|
||||
this.open = true;
|
||||
},
|
||||
getFileData() {
|
||||
let param = {
|
||||
modelId: this.rowData.typeId,
|
||||
taskType: 0,
|
||||
taskId: this.rowData.taskId,
|
||||
};
|
||||
getPurchaseFileList(param)
|
||||
.then((response) => {
|
||||
if (response.rows.length > 0) {
|
||||
response.rows.forEach((item) => {
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == item.fileType
|
||||
);
|
||||
this.fileDataList[index].name = item.name;
|
||||
this.fileDataList[index].url = item.url;
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
beforeFileUpload(row) {
|
||||
this.rowData.fileType = row.fileType;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
if (this.taskId == "") {
|
||||
//新增逻辑
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
let obj = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
};
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == this.rowData.fileType
|
||||
);
|
||||
this.fileDataList[index].name = response.data.name;
|
||||
this.fileDataList[index].url = response.data.url;
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(
|
||||
(v) => v.fileType == this.rowData.fileType
|
||||
);
|
||||
if (index2 > -1) {
|
||||
//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2, 0, obj);
|
||||
} else {
|
||||
//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj);
|
||||
}
|
||||
} else {
|
||||
this.rowData.bmFileInfos.push(obj);
|
||||
}
|
||||
} else {
|
||||
//编辑逻辑
|
||||
let param = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
};
|
||||
uploadPurchaseFile(param)
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess("上传成功");
|
||||
this.getFileData();
|
||||
})
|
||||
.catch(() => {
|
||||
this.$modal.msgError("上传失败");
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
const parts = file.name.split(".");
|
||||
const extension = parts.pop();
|
||||
if (extension === "doc" || extension === "docx" || extension === "pdf") {
|
||||
const windowName = file.name;
|
||||
window.open(file.url, windowName);
|
||||
} else {
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
},
|
||||
|
||||
//树结构数据获取父
|
||||
getParentsById(list, id) {
|
||||
for (let i in list) {
|
||||
|
|
|
|||
|
|
@ -83,45 +83,45 @@
|
|||
align="center"
|
||||
width="160"
|
||||
label="申请时间"
|
||||
prop="arrivalTime"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="申请人"
|
||||
width="150"
|
||||
align="center"
|
||||
prop="code"
|
||||
prop="createBy"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁单位"
|
||||
align="center"
|
||||
prop="purchaseMaTypeName"
|
||||
prop="leaseUnit"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁工程"
|
||||
align="center"
|
||||
prop="purchaseMaNumber"
|
||||
prop="leaseProject"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="领料物资类型"
|
||||
align="center"
|
||||
prop="purchaseTaxPrice"
|
||||
prop="leaseType"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="协议号"
|
||||
align="center"
|
||||
prop="purchasePrice"
|
||||
prop="agreementCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁申请单号"
|
||||
align="center"
|
||||
prop="taxRate"
|
||||
prop="code"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
|
|
@ -130,14 +130,14 @@
|
|||
<el-table-column
|
||||
label="领料人"
|
||||
align="center"
|
||||
prop="supplier"
|
||||
prop="leasePerson"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="领料人电话"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
prop="phone"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
label="操作时间"
|
||||
align="center"
|
||||
width="160"
|
||||
prop="createTime"
|
||||
prop="updateTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
|
|||
|
|
@ -109,7 +109,19 @@
|
|||
<el-table-column
|
||||
label="预领数量"
|
||||
align="center"
|
||||
prop="purchaseTaxPrice"
|
||||
prop="preNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="已领数量"
|
||||
align="center"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="管理模式"
|
||||
align="center"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -176,23 +188,6 @@ export default {
|
|||
open: false,
|
||||
rowData: {},
|
||||
maForm: {},
|
||||
fileDataList: [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
],
|
||||
//上传
|
||||
upload: {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/file/upload",
|
||||
},
|
||||
//图片查看弹窗
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
|
@ -205,125 +200,13 @@ export default {
|
|||
//获取任务详情-列表数据
|
||||
getTaskInfo() {
|
||||
this.loading = true;
|
||||
getPurchaseCheckInfo({ taskId: this.taskId, id: this.id }).then(
|
||||
(response) => {
|
||||
this.taskInfo = response.data;
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList;
|
||||
this.equipmentList.forEach((item) => {
|
||||
item.fixCode = this.fixCodeList[Number(item.fixCode)];
|
||||
});
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row) {
|
||||
this.rowData = row;
|
||||
this.fileDataList = [
|
||||
{ dictLabel: "合格证", fileType: "0", name: "", url: "" },
|
||||
{ dictLabel: "型式试验报告", fileType: "1", name: "", url: "" },
|
||||
{ dictLabel: "出厂检测报告", fileType: "2", name: "", url: "" },
|
||||
{ dictLabel: "第三方监测报告", fileType: "3", name: "", url: "" },
|
||||
{ dictLabel: "其他报告", fileType: "4", name: "", url: "" },
|
||||
];
|
||||
this.getFileData();
|
||||
this.open = true;
|
||||
},
|
||||
getFileData() {
|
||||
let param = {
|
||||
modelId: this.rowData.typeId,
|
||||
taskType: 0,
|
||||
taskId: this.rowData.taskId,
|
||||
};
|
||||
getPurchaseFileList(param)
|
||||
.then((response) => {
|
||||
if (response.rows.length > 0) {
|
||||
response.rows.forEach((item) => {
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == item.fileType
|
||||
);
|
||||
this.fileDataList[index].name = item.name;
|
||||
this.fileDataList[index].url = item.url;
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
beforeFileUpload(row) {
|
||||
this.rowData.fileType = row.fileType;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
if (this.taskId == "") {
|
||||
//新增逻辑
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
let obj = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
};
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(
|
||||
(v) => v.fileType == this.rowData.fileType
|
||||
);
|
||||
this.fileDataList[index].name = response.data.name;
|
||||
this.fileDataList[index].url = response.data.url;
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(
|
||||
(v) => v.fileType == this.rowData.fileType
|
||||
);
|
||||
if (index2 > -1) {
|
||||
//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2, 0, obj);
|
||||
} else {
|
||||
//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj);
|
||||
}
|
||||
} else {
|
||||
this.rowData.bmFileInfos.push(obj);
|
||||
}
|
||||
} else {
|
||||
//编辑逻辑
|
||||
let param = {
|
||||
taskId: this.taskId,
|
||||
taskType: "0",
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
};
|
||||
uploadPurchaseFile(param)
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess("上传成功");
|
||||
this.getFileData();
|
||||
})
|
||||
.catch(() => {
|
||||
this.$modal.msgError("上传失败");
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
const parts = file.name.split(".");
|
||||
const extension = parts.pop();
|
||||
if (extension === "doc" || extension === "docx" || extension === "pdf") {
|
||||
const windowName = file.name;
|
||||
window.open(file.url, windowName);
|
||||
} else {
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
getApplyInfo({ taskId: this.taskId, id: this.id }).then((response) => {
|
||||
this.taskInfo = response.data;
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
|
|
|
|||
Loading…
Reference in New Issue