|
|
|
@ -30,13 +30,13 @@ |
|
|
|
|
<td class="line-label ">产品编号</td> |
|
|
|
|
<td class="line-label ">单位内编号</td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.manufacturer" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.productionDate" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.productId" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.internalId" /></td> |
|
|
|
|
<tr v-for="(item, index) in formData.infoList" :key="index"> |
|
|
|
|
<td><el-input class="custom-input" v-model="item.manufacturer" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="item.productionDate" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="item.productId" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="item.internalId" /></td> |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<!-- <tr> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.manufacturer" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.productionDate" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.productId" /></td> |
|
|
|
@ -47,7 +47,7 @@ |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.productionDate" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.productId" /></td> |
|
|
|
|
<td><el-input class="custom-input" v-model="formData.internalId" /></td> |
|
|
|
|
</tr> |
|
|
|
|
</tr> --> |
|
|
|
|
<!-- 其他字段 --> |
|
|
|
|
<tr> |
|
|
|
|
<td class="line-label" >施工单位名称</td> |
|
|
|
@ -133,28 +133,29 @@ |
|
|
|
|
return { |
|
|
|
|
formData: { |
|
|
|
|
"registrationCategory": "",//登记类别 |
|
|
|
|
"equipmentType": "",//设备品种 |
|
|
|
|
"productName": "",//产品名称 |
|
|
|
|
"cylinderQuantity": 1,//气瓶数量 |
|
|
|
|
"fillingMedium": "",//充装介质 |
|
|
|
|
"nominalWorkingPressure": 1,//气瓶公称工作压力 |
|
|
|
|
"cylinderVolume": 1,//气瓶容积 |
|
|
|
|
"manufacturer": "",//制造单位名称 |
|
|
|
|
"productionDate": "2025-04-11",//制造日期 |
|
|
|
|
"productId": "",//产品编号 |
|
|
|
|
"internalId": "",//单位内编号 |
|
|
|
|
"contractor": "",//施工单位名称 |
|
|
|
|
"supervisionAgency": "",//监督检验机构名称 |
|
|
|
|
"userUnit": "",//使用单位名称 |
|
|
|
|
"userAddress": "",//使用单位地址 |
|
|
|
|
"unifiedSocialCode": "",//使用单位统一社会信用代码 |
|
|
|
|
"postalCode": "",//邮政编码 |
|
|
|
|
"licensePlate": "",//车牌号 |
|
|
|
|
"vehicleVin": "",//车辆VIN码 |
|
|
|
|
"commissionDate": "2025-04-11",//投入使用日期 |
|
|
|
|
"telephone": "",//单位固定电话 |
|
|
|
|
"safetyManager": "",//安全管理员 |
|
|
|
|
"mobilePhone": ""//移动电话 |
|
|
|
|
"equipmentType": "",//设备品种 |
|
|
|
|
"productName": "",//产品名称 |
|
|
|
|
"cylinderQuantity": 1,//气瓶数量 |
|
|
|
|
"fillingMedium": "",//充装介质 |
|
|
|
|
"nominalWorkingPressure": 1,//气瓶公称工作压力 |
|
|
|
|
"cylinderVolume": 1,//气瓶容积 |
|
|
|
|
"manufacturer": "",//制造单位名称 |
|
|
|
|
"productionDate": "2025-04-11",//制造日期 |
|
|
|
|
"productId": "",//产品编号 |
|
|
|
|
"internalId": "",//单位内编号 |
|
|
|
|
"contractor": "",//施工单位名称 |
|
|
|
|
"supervisionAgency": "",//监督检验机构名称 |
|
|
|
|
"userUnit": "",//使用单位名称 |
|
|
|
|
"userAddress": "",//使用单位地址 |
|
|
|
|
"unifiedSocialCode": "",//使用单位统一社会信用代码 |
|
|
|
|
"postalCode": "",//邮政编码 |
|
|
|
|
"licensePlate": "",//车牌号 |
|
|
|
|
"vehicleVin": "",//车辆VIN码 |
|
|
|
|
"commissionDate": "2025-04-11",//投入使用日期 |
|
|
|
|
"telephone": "",//单位固定电话 |
|
|
|
|
"safetyManager": "",//安全管理员 |
|
|
|
|
"mobilePhone": "",//移动电话 |
|
|
|
|
"infoList":[] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -175,12 +176,17 @@ |
|
|
|
|
async exportToWord() { |
|
|
|
|
// 加载模板文件(需放在public/templates目录下) |
|
|
|
|
let _this = this; |
|
|
|
|
_this.$modal.loading("正在导出文件,请稍后..."); |
|
|
|
|
|
|
|
|
|
// 读取并获得模板文件的二进制内容 |
|
|
|
|
JSZipUtils.getBinaryContent("/templates/template.docx", function (error, content) { |
|
|
|
|
debugger |
|
|
|
|
// input.docx是模板。我们在导出的时候,会根据此模板来导出对应的数据 |
|
|
|
|
// 抛出异常 |
|
|
|
|
if (error) { |
|
|
|
|
_this.$modal.closeLoading(); |
|
|
|
|
_this.$modal.notify("导出失败,请重试"); |
|
|
|
|
|
|
|
|
|
throw error; |
|
|
|
|
} |
|
|
|
|
// 创建一个JSZip实例,内容为模板的内容 |
|
|
|
@ -214,9 +220,18 @@ |
|
|
|
|
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" |
|
|
|
|
}); |
|
|
|
|
// 将目标文件对象保存为目标类型的文件,并命名 |
|
|
|
|
saveAs(out, "报价单.docx"); |
|
|
|
|
saveAs(out, "特种设备使用登记表(式样二).docx"); |
|
|
|
|
_this.$modal.closeLoading(); |
|
|
|
|
_this.$modal.notify("文件已导出,请注意查看浏览器下载的文件"); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
_this.$tab.closeAllPage(); |
|
|
|
|
const ss = { path: "/eventList", name: "事项清单" }; |
|
|
|
|
_this.$tab.refreshPage(ss); |
|
|
|
|
}, 2000); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// this.$tab.closeAllPage(); |
|
|
|
|
// const ss = { path: "/eventList", name: "事项清单" }; |
|
|
|
|
// this.$tab.refreshPage(ss); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|