科室设备明细代码提交

20231126-yw
郑明梁 2 years ago
parent be65268e44
commit edf64b5926

@ -26,7 +26,7 @@ export function deleteDeptDevice(data) {
export function verifyTemplateFile(data) { export function verifyTemplateFile(data) {
return axios({ return axios({
url: "/device/receive/order/verifyTemplateFile", url: "/udiwms/inv/deptDevice/verifyTemplateFile",
method: "post", method: "post",
data: data data: data
}); });
@ -34,7 +34,7 @@ export function verifyTemplateFile(data) {
export function printOrder(data) { export function printOrder(data) {
return axios({ return axios({
url: "/device/receive/order/printOrder", url: "/udiwms/inv/deptDevice/printOrder",
method: "post", method: "post",
data: data, data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},

@ -112,5 +112,23 @@ export function selectProduct(data) {
}); });
} }
export function verifyTemplateFile(data) {
return axios({
url: "/device/receive/order/verifyTemplateFile",
method: "post",
data: data
});
}
export function printOrder(data) {
return axios({
url: "/device/receive/order/printOrder",
method: "post",
data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}

@ -165,6 +165,10 @@
<el-tabs type="border-card" style="margin: 15px"> <el-tabs type="border-card" style="margin: 15px">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<DeviceModelDetail
:rowData="selectedRowData"
v-if="isInformation"
></DeviceModelDetail>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设备资质"> <el-tab-pane label="设备资质">
<checkResultPanel <checkResultPanel
@ -223,6 +227,7 @@ import {getInvListByUser} from "@/api/system/invWarehouse";
import {getDeptListByUser} from "@/api/auth/authDept"; import {getDeptListByUser} from "@/api/auth/authDept";
import {getDeptDeviceList, deleteDeptDevice, printOrder, verifyTemplateFile} from "@/api/inventory/deptDevice"; import {getDeptDeviceList, deleteDeptDevice, printOrder, verifyTemplateFile} from "@/api/inventory/deptDevice";
import deptDeviceModifyDialog from "@/views/inventory/deptDeviceModifyDialog.vue"; import deptDeviceModifyDialog from "@/views/inventory/deptDeviceModifyDialog.vue";
import DeviceModelDetail from "@/views/inventory/DeviceModelDetail.vue";
import inspectSetModifyDialog from "@/views/inventory/InspectSetModifyDialog.vue"; import inspectSetModifyDialog from "@/views/inventory/InspectSetModifyDialog.vue";
import checkResultPanel from "@/views/inventory/invDeviceEditDialog.vue"; import checkResultPanel from "@/views/inventory/invDeviceEditDialog.vue";
import technical from "@/views/inventory/invTechniclDialog.vue"; import technical from "@/views/inventory/invTechniclDialog.vue";
@ -248,6 +253,7 @@ export default {
total: 0, total: 0,
deptList: [], deptList: [],
invList: [], invList: [],
isInformation:false,
loading: false, loading: false,
fromOptions: [], fromOptions: [],
formData: { formData: {
@ -322,15 +328,13 @@ export default {
}, },
methods: { methods: {
listClick(row) { listClick(row) {
// this.selectedRowData = null
// // nexgtTickselectedRow
// this.$nextTick(res=>{
this.selectedRowData = row // selectedRow this.selectedRowData = row // selectedRow
// this.selectedRowData.editType=1; this.isInformation = false
console.log("1111") this.$nextTick(() => {
console.log(this.selectedRowData) //
// this.isInformation = true
// }) });
}, },
keyup_submit(event) { keyup_submit(event) {
this.filterQuery.page = 1; this.filterQuery.page = 1;
@ -527,7 +531,8 @@ export default {
checkResultPanel, checkResultPanel,
technical, technical,
deptDeviceModifyDialog, deptDeviceModifyDialog,
inspectSetModifyDialog inspectSetModifyDialog,
DeviceModelDetail
}, },
created() { created() {
this.getDeptList(); this.getDeptList();

@ -0,0 +1,146 @@
<template>
<div>
<el-card>
<el-form :model="formData" class="query-form" label-width="100px">
<el-button-group style="display: flex;margin: 0px 0 10px 90%; height: 35px">
<el-button type="primary" @click.native="submit()">保存</el-button>
</el-button-group>
<el-row>
<el-col :span="18">
<el-form-item class="query-form-item" prop="originCode" label="UDI码:">
<el-input v-model="formData.originCode" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" prop="deviceName" label="产品通用名称:">
<el-input v-model="formData.deviceName" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="code" label="资产编码:">
<el-input v-model="formData.code" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="nameCode" label="DI/物资编码:">
<el-input v-model="formData.nameCode" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" prop="cplb" label="设备类别:">
<el-input v-model="formData.cplb" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="deptName" label="所属部门:">
<el-input v-model="formData.deptName" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="manager" label="负责人:">
<el-input v-model="formData.manager" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" prop="ggxh" label="规格型号:">
<el-input v-model="formData.ggxh" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="batchNo" label="批次号:">
<el-input v-model="formData.batchNo" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="productionDate" label="生产日期:">
<el-input v-model="formData.productionDate" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" prop="expireDate" label="失效日期:">
<el-input v-model="formData.expireDate" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="serialNo" label="序列号:">
<el-input v-model="formData.serialNo" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="manufactory" label="生产企业:">
<el-input v-model="formData.manufactory" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" prop="supName" label="供应商:">
<el-input v-model="formData.supName" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="curUser" label="使用人:">
<el-input v-model="formData.curUser" disabled style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="location" label="设备位置:">
<el-input v-model="formData.location" style="width: 90%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item class="query-form-item" prop="detailLocation" label="设备详情位置:">
<el-input v-model="formData.detailLocation" style="width: 97%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item class="query-form-item" prop="remark" label="设备备注:">
<el-input v-model="formData.remark" style="width: 97%" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
</div>
</template>
<script>
export default {
name: "deptDeviceModelDetail",
props:{
rowData: {
type: Object,
required: true
},
},
data() {
return {
formData:{
}
};
},
methods: {
},
created() {
this.formData = this.rowData;
}
}
</script>
<style scoped>
</style>

@ -78,20 +78,9 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" @click.native.stop="editOrder(scope.row)">编辑</el-button>
type="text" <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
size="small" <el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">打印</el-button>
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -128,18 +117,18 @@
<el-table-column label="失效日期" prop="expireDate" width="150"></el-table-column> <el-table-column label="失效日期" prop="expireDate" width="150"></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" width="300" show-overflow-tooltip></el-table-column> <el-table-column label="生产企业" prop="ylqxzcrbarmc" width="300" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="300" show-overflow-tooltip></el-table-column> <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="300" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="supName"width="300" show-overflow-tooltip></el-table-column> <el-table-column label="供应商" prop="supName" width="300" show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="操作" width="100">--> <!-- <el-table-column label="操作" width="100">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="text"--> <!-- type="text"-->
<!-- size="small"--> <!-- size="small"-->
<!-- @click.native.stop="datailSelect(scope.row)"--> <!-- @click.native.stop="datailSelect(scope.row)"-->
<!-- >详情--> <!-- >详情-->
<!-- </el-button--> <!-- </el-button-->
<!-- >--> <!-- >-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="detailTotal>0" v-show="detailTotal>0"
@ -162,11 +151,12 @@ import {
submitAudit, submitAudit,
deleteDeviceReceiveOrder, deleteDeviceReceiveOrder,
getDeviceReceiveOrderList, getDeviceReceiveOrderList,
getConfig, getDeviceReceiveOrderDetailList getConfig, getDeviceReceiveOrderDetailList, printOrder, verifyTemplateFile
} from "@/api/inventory/deviceReceiveOrder"; } from "@/api/inventory/deviceReceiveOrder";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {filterByorderIdFk} from "@/api/inventory/deviceRepairOrderDetail"; import {filterByorderIdFk} from "@/api/inventory/deviceRepairOrderDetail";
export default { export default {
name: "DeviceReceiveOrderNew", name: "DeviceReceiveOrderNew",
data() { data() {
@ -177,7 +167,7 @@ export default {
fromInvCode: null, fromInvCode: null,
receiveUserName: null, receiveUserName: null,
fromInvSpaceCode: null, fromInvSpaceCode: null,
status: 0, statusList: [0, 1, 3],
page: 1, page: 1,
limit: 20, limit: 20,
}, },
@ -256,7 +246,7 @@ export default {
fromDeptCode: this.$store.getters.locDeptCode, fromDeptCode: this.$store.getters.locDeptCode,
fromInvCode: null, fromInvCode: null,
fromInvSpaceCode: null, fromInvSpaceCode: null,
status: 0, statusList: [0, 1, 3],
page: 1, page: 1,
limit: 20, limit: 20,
}; };
@ -327,6 +317,35 @@ export default {
this.getList(); this.getList();
}) })
}, },
printOrder(row) {
let query = {id: 5};
this.loading = true;
verifyTemplateFile(query).then((res) => {
if (res.code === 20000) {
let printParams = {
templateId: res.data,
id: row.id
};
printOrder(printParams).then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
})
} else {
this.loading = false;
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
})
},
addReceiveOrder() { addReceiveOrder() {
this.formVisible = true; this.formVisible = true;
this.formName = 'add'; this.formName = 'add';
@ -399,17 +418,22 @@ export default {
this.detailTotal = 0; this.detailTotal = 0;
}); });
}, },
}, }
components: { ,
components: {
deviceReceiveOrderModify deviceReceiveOrderModify
}, }
mounted() { ,
mounted()
{
document.body.ondrop = function (event) { document.body.ondrop = function (event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
}; };
}, }
created() { ,
created()
{
// //
getConfig().then((res) => { getConfig().then((res) => {
if (res.code == 20000 && !isBlank(res.data.paramValue)) { if (res.code == 20000 && !isBlank(res.data.paramValue)) {
@ -417,8 +441,10 @@ export default {
} }
}) })
this.getDeptList(); this.getDeptList();
}, }
}; ,
}
;
</script> </script>
<style type="text/scss" lang="scss"> <style type="text/scss" lang="scss">

Loading…
Cancel
Save