科室设备明细代码提交

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

@ -26,7 +26,7 @@ export function deleteDeptDevice(data) {
export function verifyTemplateFile(data) {
return axios({
url: "/device/receive/order/verifyTemplateFile",
url: "/udiwms/inv/deptDevice/verifyTemplateFile",
method: "post",
data: data
});
@ -34,7 +34,7 @@ export function verifyTemplateFile(data) {
export function printOrder(data) {
return axios({
url: "/device/receive/order/printOrder",
url: "/udiwms/inv/deptDevice/printOrder",
method: "post",
data: data,
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-tab-pane label="基本信息">
<DeviceModelDetail
:rowData="selectedRowData"
v-if="isInformation"
></DeviceModelDetail>
</el-tab-pane>
<el-tab-pane label="设备资质">
<checkResultPanel
@ -223,6 +227,7 @@ import {getInvListByUser} from "@/api/system/invWarehouse";
import {getDeptListByUser} from "@/api/auth/authDept";
import {getDeptDeviceList, deleteDeptDevice, printOrder, verifyTemplateFile} from "@/api/inventory/deptDevice";
import deptDeviceModifyDialog from "@/views/inventory/deptDeviceModifyDialog.vue";
import DeviceModelDetail from "@/views/inventory/DeviceModelDetail.vue";
import inspectSetModifyDialog from "@/views/inventory/InspectSetModifyDialog.vue";
import checkResultPanel from "@/views/inventory/invDeviceEditDialog.vue";
import technical from "@/views/inventory/invTechniclDialog.vue";
@ -248,6 +253,7 @@ export default {
total: 0,
deptList: [],
invList: [],
isInformation:false,
loading: false,
fromOptions: [],
formData: {
@ -322,15 +328,13 @@ export default {
},
methods: {
listClick(row) {
// this.selectedRowData = null
// // nexgtTickselectedRow
// this.$nextTick(res=>{
this.selectedRowData = row // selectedRow
// this.selectedRowData.editType=1;
console.log("1111")
console.log(this.selectedRowData)
//
// })
this.isInformation = false
this.$nextTick(() => {
//
this.isInformation = true
});
},
keyup_submit(event) {
this.filterQuery.page = 1;
@ -527,7 +531,8 @@ export default {
checkResultPanel,
technical,
deptDeviceModifyDialog,
inspectSetModifyDialog
inspectSetModifyDialog,
DeviceModelDetail
},
created() {
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 label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
<el-button type="text" size="small" @click.native.stop="editOrder(scope.row)">编辑</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
<el-button type="text" size="small" @click.native.stop="printOrder(scope.row)">打印</el-button>
</template>
</el-table-column>
</el-table>
@ -162,11 +151,12 @@ import {
submitAudit,
deleteDeviceReceiveOrder,
getDeviceReceiveOrderList,
getConfig, getDeviceReceiveOrderDetailList
getConfig, getDeviceReceiveOrderDetailList, printOrder, verifyTemplateFile
} from "@/api/inventory/deviceReceiveOrder";
import {isBlank} from "@/utils/strUtil";
import {filterByorderIdFk} from "@/api/inventory/deviceRepairOrderDetail";
export default {
name: "DeviceReceiveOrderNew",
data() {
@ -177,7 +167,7 @@ export default {
fromInvCode: null,
receiveUserName: null,
fromInvSpaceCode: null,
status: 0,
statusList: [0, 1, 3],
page: 1,
limit: 20,
},
@ -256,7 +246,7 @@ export default {
fromDeptCode: this.$store.getters.locDeptCode,
fromInvCode: null,
fromInvSpaceCode: null,
status: 0,
statusList: [0, 1, 3],
page: 1,
limit: 20,
};
@ -327,6 +317,35 @@ export default {
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() {
this.formVisible = true;
this.formName = 'add';
@ -399,17 +418,22 @@ export default {
this.detailTotal = 0;
});
},
},
}
,
components: {
deviceReceiveOrderModify
},
mounted() {
}
,
mounted()
{
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
}
,
created()
{
//
getConfig().then((res) => {
if (res.code == 20000 && !isBlank(res.data.paramValue)) {
@ -417,8 +441,10 @@ export default {
}
})
this.getDeptList();
},
};
}
,
}
;
</script>
<style type="text/scss" lang="scss">

Loading…
Cancel
Save