|
@@ -7,6 +7,9 @@
|
|
|
:data="data"
|
|
|
:option="option"
|
|
|
v-model:page="page"
|
|
|
+ @row-save="createRow"
|
|
|
+ @row-update="updateRow"
|
|
|
+ @row-del="deleteRow"
|
|
|
@search-change="searchChange"
|
|
|
@search-reset="resetChange"
|
|
|
@size-change="dataList"
|
|
@@ -15,6 +18,20 @@
|
|
|
>
|
|
|
<template #menu-left="{}">
|
|
|
<el-button
|
|
|
+ v-if ="info.workOrderState === '1' || info.workOrderState === '2' || info.workOrderState === '0'"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="addObj"
|
|
|
+ >新增</el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ v-if ="info.workOrderState === '1' || info.workOrderState === '2' || info.workOrderState === '0'"
|
|
|
+ :disabled="toDeleteIds.length < 1"
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="multipleDelete"
|
|
|
+ >删除</el-button>
|
|
|
+ <el-button
|
|
|
:disabled="toDeleteIds.length < 1"
|
|
|
class="ml-3"
|
|
|
@click="printCode">打印
|
|
@@ -52,7 +69,7 @@
|
|
|
@close="dialog.visible = false"
|
|
|
>
|
|
|
<div style="display: flex;flex-wrap: wrap;" ref="toPrintRef">
|
|
|
- <div v-for="item of toDeleteIds" style="width: 238px;height:325px;font-size:10px;">
|
|
|
+ <div v-for="item of clickObjs" style="width: 238px;height:325px;font-size:10px;">
|
|
|
<vue-qrcode :value="item.seqNo" size="45" error-level="H"></vue-qrcode>
|
|
|
<div>
|
|
|
<el-text>{{item.seqNo}}</el-text>
|
|
@@ -110,12 +127,23 @@ const dialog = reactive({
|
|
|
title: "二维码打印",
|
|
|
visible: false,
|
|
|
});
|
|
|
+const clickObjs = ref([])
|
|
|
const selectionChange1 =(row)=>{
|
|
|
- toDeleteIds.value = row
|
|
|
+ toDeleteIds.value = [];
|
|
|
+ row?.forEach((element) => {
|
|
|
+ toDeleteIds.value.push(element.id);
|
|
|
+ });
|
|
|
+ clickObjs.value = row
|
|
|
+}
|
|
|
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
+const addObj =()=>{
|
|
|
+ form.value.workOrderCode = props.workOrderInfo.workOrderCode
|
|
|
+ crudRef.value && crudRef.value.rowAdd();
|
|
|
}
|
|
|
watch(
|
|
|
() => props.workOrderInfo,
|
|
|
() => {
|
|
|
+ form.value.workOrderCode = props.workOrderInfo.workOrderCode
|
|
|
info.value = props.workOrderInfo
|
|
|
search.value.workOrderCode = props.workOrderInfo.workOrderCode
|
|
|
dataList();
|
|
@@ -129,7 +157,6 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
|
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
|
-const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
|
|
|
const printCode = () =>{
|
|
|
dialog.visible = true
|
|
@@ -154,13 +181,21 @@ option.value = Object.assign(option.value, {
|
|
|
width: 220,
|
|
|
search: true,
|
|
|
overHidden: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "流转卡号不能为空",
|
|
|
+ trigger: "trigger",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "workOrderCode",
|
|
|
+ prop: "workOrderCode",
|
|
|
+ hide: true,
|
|
|
+ addDisplay: false,
|
|
|
+ editDisplay: false,
|
|
|
},
|
|
|
- /* {
|
|
|
- label: "配套编码",
|
|
|
- prop: "supportingCode",
|
|
|
- search: true,
|
|
|
- overHidden: true,
|
|
|
- },*/
|
|
|
{
|
|
|
label: "铭牌号",
|
|
|
prop: "nameplateNo",
|
|
@@ -171,6 +206,7 @@ option.value = Object.assign(option.value, {
|
|
|
label: "状态",
|
|
|
prop: "state",
|
|
|
minWidth: 60,
|
|
|
+ display: false,
|
|
|
type: "select",
|
|
|
dicUrl:
|
|
|
dictDataUtil.request_url +
|
|
@@ -185,6 +221,7 @@ option.value = Object.assign(option.value, {
|
|
|
|
|
|
onMounted(() => {
|
|
|
info.value = props.workOrderInfo
|
|
|
+ form.value.workOrderCode = props.workOrderInfo.workOrderCode
|
|
|
search.value.workOrderCode = props.workOrderInfo.workOrderCode
|
|
|
dataList();
|
|
|
});
|