修改样式
This commit is contained in:
parent
8e7ce5f40b
commit
8d7627a924
|
|
@ -1,87 +1,93 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="customerName">
|
||||
<template #label><span title="姓名">姓名</span></template>
|
||||
<j-input placeholder="请输入姓名" v-model:value="queryParam.customerName" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="contactNumber">
|
||||
<template #label><span title="联系电话">联系电话</span></template>
|
||||
<j-input placeholder="请输入联系电话" v-model:value="queryParam.contactNumber" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<a-row>
|
||||
<a-col :span="6" v-for="(item,index) in dataList" :key="index" style="padding: 5px 10px 0 0;height: 240px;">
|
||||
<a-row style="padding: 5px;background-color: white;border-radius: 8px;height: 220px;">
|
||||
<a-col :span="4">
|
||||
<div class="bjclass">
|
||||
<img :src="handleHeadPath(item.headPath)" style="width: 40px;height:40px;margin-top: 10px;" />
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="20" style="padding-left: 15px;">
|
||||
<div>
|
||||
<span class="titleOne">
|
||||
{{item.customerName}} /
|
||||
{{item.customerSex_dictText?item.customerSex_dictText:'无'}} /
|
||||
<span v-if="item.currentState=='0'" style="color: #1890ff">{{item.currentState_dictText}}</span>
|
||||
<span v-if="item.currentState=='1'" style="color: green">{{item.currentState_dictText}}</span>
|
||||
<span v-if="item.currentState=='2'" style="color: #ff6c00">{{item.currentState_dictText}}</span>
|
||||
<span v-if="item.currentState=='3'" style="color: red">{{item.currentState_dictText}}</span>
|
||||
<div v-show="showIndex == '0'">
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="customerName">
|
||||
<template #label><span title="姓名">姓名</span></template>
|
||||
<j-input placeholder="请输入姓名" v-model:value="queryParam.customerName" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="contactNumber">
|
||||
<template #label><span title="联系电话">联系电话</span></template>
|
||||
<j-input placeholder="请输入联系电话" v-model:value="queryParam.contactNumber" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</div>
|
||||
<div style="height: 130px">
|
||||
<div class="center-lines">区域:{{item.nuId_dictText }}</div>
|
||||
<div class="center-lines">报销类型:{{item.reimbType_dictText }}</div>
|
||||
<div class="center-lines">医保类型:{{item.medicalType_dictText }}</div>
|
||||
<div class="center-lines">联系电话:{{item.contactNumber }}</div>
|
||||
</div>
|
||||
<div style="color: #857f7f;">
|
||||
<span style="float:left;"><Icon icon="ant-design:user-add-outlined" :size="18" /><span style="margin-left:5px;">{{ item.createBy_dictText }}</span></span>
|
||||
<span style="margin-left: 15px;float:left;"><Icon icon="ant-design:field-time-outlined" :size="20" /><span style="margin-left:5px;font-size:16px;">{{ item.createTime.substring(0,10) }}</span></span>
|
||||
<span style="margin-right: 15px;float:right;">
|
||||
<a-dropdown :trigger="['hover']" placement="topRight">
|
||||
<a-button type="link"><Icon icon="ant-design:more-outlined" :size="20" /></a-button>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item @click="handleEdit(item)">编辑</a-menu-item>
|
||||
<a-menu-item @click="handleCheckNu(item)" v-if="item.currentState!='3'">更换区域</a-menu-item>
|
||||
<a-menu-item @click="handleWaichu(item)" v-if="item.currentState=='1'">外出</a-menu-item>
|
||||
<a-menu-item @click="handleFanhui(item)" v-if="item.currentState=='2'">返回</a-menu-item>
|
||||
<a-menu-item @click="handleTuizhu(item)" v-if="item.currentState=='1' || item.currentState=='2'">退住</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-row>
|
||||
<a-col :span="6" v-for="(item,index) in dataList" :key="index" style="padding: 5px 10px 0 0;height: 240px;">
|
||||
<a-row style="padding: 5px;background-color: white;border-radius: 8px;height: 220px;">
|
||||
<a-col :span="4">
|
||||
<div class="bjclass">
|
||||
<img :src="handleHeadPath(item.headPath)" style="width: 40px;height:40px;margin-top: 10px;" />
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="20" style="padding-left: 15px;">
|
||||
<div>
|
||||
<span class="titleOne">
|
||||
{{item.customerName}} /
|
||||
{{item.customerSex_dictText?item.customerSex_dictText:'未填写'}} /
|
||||
<span v-if="item.currentState=='0'" style="color: #1890ff">{{item.currentState_dictText}}</span>
|
||||
<span v-if="item.currentState=='1'" style="color: green">{{item.currentState_dictText}}</span>
|
||||
<span v-if="item.currentState=='2'" style="color: #ff6c00">{{item.currentState_dictText}}</span>
|
||||
<span v-if="item.currentState=='3'" style="color: red">{{item.currentState_dictText}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
|
||||
<div style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
|
||||
<span style="margin-right: 10px;">共 {{ total }} 条数据</span>
|
||||
<Pagination showLessItems v-model:current="current" :pageSize="pageSize" size="small"
|
||||
show-quick-jumper :total="total" @change="onPageChange" />
|
||||
</div>
|
||||
<div style="height: 130px">
|
||||
<div class="center-lines">区域:{{item.nuId_dictText }}</div>
|
||||
<div class="center-lines">报销类型:{{item.reimbType_dictText }}</div>
|
||||
<div class="center-lines">医保类型:{{item.medicalType_dictText }}</div>
|
||||
<div class="center-lines">联系电话:{{item.contactNumber }}</div>
|
||||
</div>
|
||||
<div style="color: #857f7f;">
|
||||
<!-- <span style="float:left;"><Icon icon="ant-design:user-add-outlined" :size="18" /><span style="margin-left:5px;">{{ item.createBy_dictText }}</span></span> -->
|
||||
<span style="margin-left: 15px;float:left;"><Icon icon="ant-design:field-time-outlined" :size="20" /><span style="margin-left:5px;font-size:16px;">{{ item.createTime.substring(0,10) }}</span></span>
|
||||
<span style="margin-right: 15px;float:right;">
|
||||
<a-dropdown :trigger="['hover']" placement="topRight">
|
||||
<a-button type="link"><Icon icon="ant-design:more-outlined" :size="20" /></a-button>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item @click="handleEdit(item)">编辑</a-menu-item>
|
||||
<a-menu-item @click="handleHllc(item)">护理流程</a-menu-item>
|
||||
<!-- <a-menu-item @click="handleCheckNu(item)" v-if="item.currentState!='3'">更换区域</a-menu-item> -->
|
||||
<a-menu-item @click="handleWaichu(item)" v-if="item.currentState=='1'">外出</a-menu-item>
|
||||
<a-menu-item @click="handleFanhui(item)" v-if="item.currentState=='2'">返回</a-menu-item>
|
||||
<a-menu-item @click="handleTuizhu(item)" v-if="item.currentState=='1' || item.currentState=='2'">退住</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div style="float:right;bottom: 20px;z-index: 999;padding: 8px 16px;border-radius: 4px;display: flex;align-items: center;">
|
||||
<span style="margin-right: 10px;">共 {{ total }} 条数据</span>
|
||||
<Pagination showLessItems v-model:current="current" :pageSize="pageSize" size="small"
|
||||
show-quick-jumper :total="total" @change="onPageChange" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-show="showIndex == '1'">
|
||||
<!-- 护理流程 -->
|
||||
<CustomerHllc ref="customerHllc" @success="handleSuccess"></CustomerHllc>
|
||||
</div>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<NuBizCustomerInfoModal ref="registerModal" @success="handleSuccess"></NuBizCustomerInfoModal>
|
||||
<CheckNuListModal ref="checkNuListModal" @success="handleSuccess"></CheckNuListModal>
|
||||
|
|
@ -94,6 +100,7 @@
|
|||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuBizCustomerInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import NuBizCustomerInfoModal from './components/NuBizCustomerInfoModal.vue'
|
||||
import CustomerHllc from './components/CustomerHllc.vue'
|
||||
import CheckNuListModal from './components/CheckNuListModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
|
|
@ -107,8 +114,10 @@ import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
|||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const checkNuListModal = ref();
|
||||
const customerHllc = ref();
|
||||
const userStore = useUserStore();
|
||||
const dataList = ref<any[]>([]);
|
||||
const showIndex = ref<string>('1');
|
||||
const current = ref(1);
|
||||
const pageSize = ref(12);
|
||||
const total = ref(0);
|
||||
|
|
@ -123,6 +132,11 @@ import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
|||
sm: 20,
|
||||
});
|
||||
|
||||
//护理流程
|
||||
function handleHllc(record){
|
||||
customerHllc.value.init(record);
|
||||
showIndex.value = '1';
|
||||
}
|
||||
|
||||
//选择入住单元
|
||||
function handleCheckNu(record){
|
||||
|
|
@ -137,13 +151,13 @@ import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
|||
}
|
||||
//外出
|
||||
function handleWaichu(record){
|
||||
defHttp.post({ url: "/nuBizCustomerInfo/nuBizCustomerInfo/edit", params: { id: record.id,currentStatus:'2' } }).then((data) => {
|
||||
defHttp.post({ url: "/nuBizCustomerInfo/nuBizCustomerInfo/edit", params: { id: record.id,currentState:'2' } }).then((data) => {
|
||||
reload();
|
||||
});
|
||||
}
|
||||
//返回
|
||||
function handleFanhui(record){
|
||||
defHttp.post({ url: "/nuBizCustomerInfo/nuBizCustomerInfo/edit", params: { id: record.id,currentStatus:'1' } }).then((data) => {
|
||||
defHttp.post({ url: "/nuBizCustomerInfo/nuBizCustomerInfo/edit", params: { id: record.id,currentState:'1' } }).then((data) => {
|
||||
reload();
|
||||
});
|
||||
}
|
||||
|
|
@ -202,6 +216,7 @@ import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
|||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
showIndex.value = '0';
|
||||
reload();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,132 @@
|
|||
<template>
|
||||
<div class="hllcClass">
|
||||
<a-row>
|
||||
<a-col :span="24" style="text-align: right;">
|
||||
<a-button type="primary" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:14px;">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
bordered
|
||||
size="small"
|
||||
:pagination="false"
|
||||
:rowClassName="`setRowClassName`"
|
||||
/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import axios from 'axios';
|
||||
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
// 生成列(24小时)
|
||||
const columns = [
|
||||
{
|
||||
title: '分钟/小时',
|
||||
dataIndex: 'minute',
|
||||
key: 'minute',
|
||||
width: 80,
|
||||
fixed: 'left',
|
||||
align: 'center',
|
||||
}
|
||||
];
|
||||
|
||||
// 添加小时列
|
||||
for (let hour = 0; hour < 24; hour++) {
|
||||
columns.push({
|
||||
title: `${hour.toString().padStart(2, '0')}`,
|
||||
dataIndex: `hour_${hour}`,
|
||||
key: `hour_${hour}`,
|
||||
width: 60,
|
||||
align: 'center',
|
||||
fixed: ''
|
||||
});
|
||||
}
|
||||
|
||||
// 生成数据(每5分钟一行)
|
||||
interface DataRow {
|
||||
key: number;
|
||||
minute: string;
|
||||
[key: `hour_${number}`]: string;
|
||||
}
|
||||
// 为奇数行添加斑马纹
|
||||
function setRowClassName(record, index) {
|
||||
console.log("🚀 ~ setRowClassName ~ record, index:", record, index)
|
||||
return index % 2 === 0 ? 'even-row' : 'odd-row';
|
||||
}
|
||||
|
||||
const dataSource: DataRow[] = [];
|
||||
for (let minute = 0; minute < 60; minute += 5) {
|
||||
let row = {
|
||||
key: minute,
|
||||
minute: `${minute.toString().padStart(2, '0')}分`
|
||||
};
|
||||
|
||||
// 为每个小时添加单元格
|
||||
for (let hour = 0; hour < 24; hour++) {
|
||||
row[`hour_${hour}`] = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
dataSource.push(row);
|
||||
}
|
||||
function handleFanhui() {
|
||||
emit('success');
|
||||
}
|
||||
function init(record) {
|
||||
console.log("🚀 ~ init ~ record:", record)
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
init
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.hllcClass {
|
||||
background: white;width:100%;height:100vh;padding: 14px;border-radius: 8px;
|
||||
}
|
||||
|
||||
/* 基础样式 */
|
||||
.ant-table-small .ant-table-thead > tr > th {
|
||||
padding: 8px;
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ant-table-small .ant-table-tbody > tr > td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
/* 斑马纹行样式 */
|
||||
.ant-table-tbody > tr.even-row > td {
|
||||
background-color: #222121;
|
||||
}
|
||||
.ant-table-tbody > tr.odd-row > td {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
/* 斑马纹列样式 */
|
||||
.ant-table-tbody > tr > td.even-column {
|
||||
background-color: rgba(230, 247, 255, 0.5);
|
||||
}
|
||||
.ant-table-tbody > tr > td.odd-column {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
/* 表头单元格样式 */
|
||||
.ant-table-tbody > tr > td.header-cell {
|
||||
background-color: #f0f0f0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* 确保斑马纹效果叠加时保持可见 */
|
||||
.ant-table-tbody > tr.even-row > td.even-column {
|
||||
background-color: rgba(20, 65, 102, 0.7);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -4,7 +4,7 @@ import { useMessage } from "/@/hooks/web/useMessage";
|
|||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/invoicing/configMaterialInfo/list',
|
||||
list = '/invoicing/blWarehouseMaterialInfo/list',
|
||||
save='/invoicing/configMaterialInfo/add',
|
||||
edit='/invoicing/qgdInfo/edit',
|
||||
deleteOne = '/invoicing/qgdInfo/delete',
|
||||
|
|
|
|||
|
|
@ -5,10 +5,17 @@ import { render } from '/@/utils/common/renderUtils';
|
|||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '库房',
|
||||
align: "center",
|
||||
dataIndex: 'nuId_dictText',
|
||||
width:'140px'
|
||||
},
|
||||
{
|
||||
title: '货品名称',
|
||||
align: "center",
|
||||
dataIndex: 'materialName'
|
||||
dataIndex: 'materialName',
|
||||
width:'180px'
|
||||
},
|
||||
{
|
||||
title: '货品编码',
|
||||
|
|
@ -19,24 +26,25 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '规格型号',
|
||||
align: "center",
|
||||
dataIndex: 'specificationModel'
|
||||
},
|
||||
{
|
||||
title: '销售单价',
|
||||
align: "center",
|
||||
dataIndex: 'salesUnitPrice',
|
||||
dataIndex: 'specificationModel',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '参考单价',
|
||||
title: '库存',
|
||||
align: "center",
|
||||
dataIndex: 'referenceUnitPrice',
|
||||
dataIndex: 'kcsl',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '货品单位',
|
||||
title: '物料上限',
|
||||
align: "center",
|
||||
dataIndex: 'materialUnits',
|
||||
dataIndex: 'upperLimit',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '物料下限',
|
||||
align: "center",
|
||||
dataIndex: 'lowerLimit',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
|
|
@ -64,23 +72,11 @@ export const columns: BasicColumn[] = [
|
|||
width:'100px'
|
||||
},
|
||||
// {
|
||||
// title: '物料图片',
|
||||
// title: '是否启用',
|
||||
// align: "center",
|
||||
// dataIndex: 'materialImg',
|
||||
// customRender: render.renderImage,
|
||||
// dataIndex: 'izEnabled_dictText',
|
||||
// width:'100px'
|
||||
// },
|
||||
// {
|
||||
// title: '物料标识',
|
||||
// align: "center",
|
||||
// dataIndex: 'materialIdent',
|
||||
// customRender: render.renderImage,
|
||||
// },
|
||||
{
|
||||
title: '是否启用',
|
||||
align: "center",
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
width:'100px'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@
|
|||
|
||||
<a-drawer title="请购车" width="60vw" :open="qgcOpen" @close="onQgcClose">
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="onQgcCaigou" style="float: right;margin-left:10px;">提交采购</a-button>
|
||||
<a-button type="primary" @click="onQgcClose" style="float: right;">关闭</a-button>
|
||||
<a-button type="primary" @click="onQgcCaigou" style="float: right;margin-right:10px;">提交采购</a-button>
|
||||
</template>
|
||||
<QgcList v-if="qgcOpen"></QgcList>
|
||||
</a-drawer>
|
||||
|
|
@ -136,10 +136,11 @@ import type { CollapseProps } from 'ant-design-vue';
|
|||
qgcOpen.value = true
|
||||
handleSuccess()
|
||||
}
|
||||
|
||||
``
|
||||
//服务类别抽屉关闭
|
||||
function onQgcClose() {
|
||||
qgcOpen.value = false
|
||||
getQgcSize();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@ import { defHttp } from '/@/utils/http/axios';
|
|||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:6,
|
||||
xl:6,
|
||||
xxl:6
|
||||
sm:8,
|
||||
xl:8,
|
||||
xxl:8
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
sm: 16,
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
<a-col :span="12" class="detailClass">采购单位:{{getCgdw()}}</a-col>
|
||||
<a-col :span="12" class="detailClass">库存上限:{{formData.upperLimit}}</a-col>
|
||||
<a-col :span="12" class="detailClass">库存下限:{{formData.lowerLimit}}</a-col>
|
||||
<a-col :span="12" class="detailClass">库房:{{formData.nuId_dictText}}</a-col>
|
||||
<a-col :span="12" class="detailClass">库存数量:{{formData.kcsl?formData.kcsl:0}}</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
|
@ -107,6 +108,9 @@
|
|||
lowerLimit: undefined,
|
||||
suppliers_dictText: '',
|
||||
kcsl:'',
|
||||
nuId_dictText:'',
|
||||
nuId:'',
|
||||
wlId:'',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });
|
||||
|
|
@ -202,8 +206,7 @@
|
|||
//获取采购单位
|
||||
function getCgdw(){
|
||||
//多单位开关 0关 1开
|
||||
if(formData.multiUnitSwitch=='1'){
|
||||
if(formData.multiUnitType=='0'){
|
||||
if(formData.multiUnitType=='3'){
|
||||
return formData.materialUnits;
|
||||
}else if(formData.multiUnitType=='1'){
|
||||
return formData.oneUnit;
|
||||
|
|
@ -212,9 +215,6 @@
|
|||
}else{//没配置就给默认的子集
|
||||
return formData.materialUnits;
|
||||
}
|
||||
}else{
|
||||
return formData.materialUnits;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -243,7 +243,8 @@
|
|||
suppliersId: suppliersIdArr[i],
|
||||
suppliersName: suppliersNameArr[i],
|
||||
purchaseQuantity: 0,
|
||||
wlId: formData.id,
|
||||
wlId: formData.wlId,
|
||||
nuId: formData.nuId,
|
||||
})
|
||||
if(i==0){
|
||||
var kcsx = formData.upperLimit?formData.upperLimit:0;
|
||||
|
|
@ -260,6 +261,7 @@
|
|||
*/
|
||||
async function submitForm() {
|
||||
let params = dataList.value;
|
||||
console.log("🚀 ~ submitForm ~ params:", params)
|
||||
await addList(params)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
|
@ -285,7 +287,6 @@
|
|||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
background-image: url('../resource/img/bj.png');
|
||||
}
|
||||
.cardClass{
|
||||
margin: 20px;border: 1px solid #e8e8e8;border-radius: 8px;padding: 20px;box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);transition: all 0.3s ease;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/invoicing/blWarehouseMaterialInfo/list',
|
||||
save='/invoicing/blWarehouseMaterialInfo/add',
|
||||
edit='/invoicing/blWarehouseMaterialInfo/edit',
|
||||
deleteOne = '/invoicing/blWarehouseMaterialInfo/delete',
|
||||
deleteBatch = '/invoicing/blWarehouseMaterialInfo/deleteBatch',
|
||||
importExcel = '/invoicing/blWarehouseMaterialInfo/importExcel',
|
||||
exportXls = '/invoicing/blWarehouseMaterialInfo/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '库房',
|
||||
align: "center",
|
||||
dataIndex: 'nuId_dictText'
|
||||
},
|
||||
{
|
||||
title: '物料',
|
||||
align: "center",
|
||||
dataIndex: 'wlId_dictText'
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
align: "center",
|
||||
dataIndex: 'materialNo'
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
align: "center",
|
||||
dataIndex: 'specificationModel'
|
||||
},
|
||||
{
|
||||
title: '物料上限',
|
||||
align: "center",
|
||||
dataIndex: 'upperLimit',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '物料下限',
|
||||
align: "center",
|
||||
dataIndex: 'lowerLimit',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '库存数量',
|
||||
align: "center",
|
||||
dataIndex: 'kcsl',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: "center",
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
width: 100
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
nuId: {title: '库房',order: 0,view: 'list', type: 'string',dictTable: "nu_base_info", dictCode: 'nu_id', dictText: 'nu_name',},
|
||||
wlId: {title: '物料',order: 1,view: 'list_multi', type: 'string',dictTable: "nu_config_material_info", dictCode: 'id', dictText: 'material_name',},
|
||||
upperLimit: {title: '物料上限',order: 2,view: 'text', type: 'string',},
|
||||
lowerLimit: {title: '物料下限',order: 3,view: 'text', type: 'string',},
|
||||
kcsl: {title: '库存数量',order: 4,view: 'text', type: 'string',},
|
||||
};
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="nuId">
|
||||
<template #label><span title="库房">库房</span></template>
|
||||
<j-dict-select-tag type='list' placeholder="请选择是否启用" v-model:value="queryParam.nuId" dictCode="nu_base_info,nu_name,nu_id,area_flag = '3'" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="wlId">
|
||||
<template #label><span title="物料">物料</span></template>
|
||||
<j-input placeholder="请填写物料" v-model:value="queryParam.wlName" allow-clear></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'warehouseMaterialInfo:bl_warehouse_material_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<BlWarehouseMaterialInfoModal ref="registerModal" @success="handleSuccess"></BlWarehouseMaterialInfoModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="warehouseMaterialInfo-blWarehouseMaterialInfo" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './BlWarehouseMaterialInfo.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BlWarehouseMaterialInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import BlWarehouseMaterialInfoModal from './components/BlWarehouseMaterialInfoModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { JInput } from '/@/components/Form';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '库房物料配置信息',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "库房物料配置信息",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'warehouseMaterialInfo:bl_warehouse_material_info:edit'
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '启用',
|
||||
onClick: handleQyty.bind(null, record,'0'),
|
||||
auth: 'warehouseMaterialInfo:bl_warehouse_material_info:edit',
|
||||
ifShow: record.izEnabled == '1'
|
||||
},
|
||||
{
|
||||
label: '停用',
|
||||
onClick: handleQyty.bind(null, record,'1'),
|
||||
auth: 'warehouseMaterialInfo:bl_warehouse_material_info:edit',
|
||||
ifShow: record.izEnabled == '0'
|
||||
},
|
||||
];
|
||||
}
|
||||
function handleQyty(record,izEnabled) {
|
||||
defHttp.put({ url: '/invoicing/blWarehouseMaterialInfo/edit', params: { id: record.id,izEnabled:izEnabled} }).then(res => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="BlWarehouseMaterialInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="库房" v-bind="validateInfos.nuId" id="BlWarehouseMaterialInfoForm-nuId" name="nuId" >
|
||||
<j-dict-select-tag v-model:value="formData.nuId" dictCode="nu_base_info,nu_name,nu_id,area_flag = '3' and status != '5'" placeholder="请选择库房" :disabled="formData.id != ''" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="物料" v-bind="validateInfos.wlId" id="BlWarehouseMaterialInfoForm-wlId" name="wlId" >
|
||||
<j-select-multiple type="list_multi" v-model:value="formData.wlId" dictCode="nu_config_material_info,material_name,id,iz_enabled = '0' and del_flag = '0'" placeholder="请选择物料" :disabled="formData.id != ''" :triggerChange="false"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="物料上限" v-bind="validateInfos.upperLimit" id="BlWarehouseMaterialInfoForm-upperLimit" name="upperLimit">
|
||||
<a-input v-model:value="formData.upperLimit" placeholder="请输入物料上限" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="物料下限" v-bind="validateInfos.lowerLimit" id="BlWarehouseMaterialInfoForm-lowerLimit" name="lowerLimit">
|
||||
<a-input v-model:value="formData.lowerLimit" placeholder="请输入物料下限" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../BlWarehouseMaterialInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
nuId: '',
|
||||
wlId: '',
|
||||
upperLimit: '',
|
||||
lowerLimit: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
nuId: [{ required: true, message: '请选择库房!' },],
|
||||
wlId: [{ required: true, message: '请选择物料!' },],
|
||||
upperLimit: [{ required: true, message: '请输入物料上限!' },],
|
||||
lowerLimit: [{ required: true, message: '请输入物料下限!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<BlWarehouseMaterialInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></BlWarehouseMaterialInfoForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import BlWarehouseMaterialInfoForm from './BlWarehouseMaterialInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -25,8 +25,33 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<a-row style="margin-top: -5px;">
|
||||
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="4" style="padding: 5px 14px 0 0;height: 200px;">
|
||||
<a-row class="cardDivClass">
|
||||
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 5px 14px 0 0;height: 200px;">
|
||||
<a-card
|
||||
:class="['card-3d']"
|
||||
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
|
||||
@mouseenter="directive.id"
|
||||
@mouseleave="directive.id" >
|
||||
<template #title>
|
||||
<a-row>
|
||||
<a-col>
|
||||
{{directive.packageName}}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
<div style="margin-top: -30px;">
|
||||
<a-divider style="margin: 0 0 10px 0 " />
|
||||
<p>服务时长:{{directive.totalDuration}} 分钟</p>
|
||||
<p style="margin-top: -10px;">创建时间:{{directive.createTime.substring(0,10)}}</p>
|
||||
<p style="margin-top: -10px;" class="text-ellipsis" :title="directive.description">说明:{{directive.description}}</p>
|
||||
<div style="float:left;margin-top: 20px;">
|
||||
<a-button type="dashed" size="small" @click="packageEdit(directive)">编辑</a-button>
|
||||
</div>
|
||||
<div style="float:right;margin-top: 20px;">
|
||||
<a-switch style="margin-left:10px" :checked="directive.izEnabled == '0'" @change="handleChangeIzEnabled(directive)" checked-children="启" un-checked-children="停" />
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
<!-- <a-row class="cardDivClass">
|
||||
<a-col :span="24">
|
||||
<a-row style="padding: 10px">
|
||||
<a-col :span="12">
|
||||
|
|
@ -42,13 +67,6 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<span class="titleOne ellipsis-two-lines" style="font-size: 20px;">
|
||||
{{ getHHMM(directive.startTimeStr) }}
|
||||
~
|
||||
{{ getHHMM(directive.endTimeStr) }}
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="24" >
|
||||
<a-popover :title="directive.packageName">
|
||||
<template #content>
|
||||
|
|
@ -60,6 +78,11 @@
|
|||
<span class="titleOne ellipsis-two-lines">{{ directive.packageName }}</span>
|
||||
</a-popover>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<span class="titleOne ellipsis-two-lines" style="font-size: 14px;">
|
||||
服务时长:{{directive.totalDuration}} 分钟
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-divider style="margin: 10px 0 5px 0;"/>
|
||||
</a-col>
|
||||
|
|
@ -69,7 +92,7 @@
|
|||
<a-col :span="12" style="text-align: right;padding: 0px 10px;">
|
||||
{{ directive.createTime.substring(0,10) }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-row> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div
|
||||
|
|
@ -104,7 +127,7 @@ const labelCol = reactive({
|
|||
xs: 24,
|
||||
sm: 24,
|
||||
});
|
||||
const pageParams = ref({ pageNo: 1, pageSize: 18 })
|
||||
const pageParams = ref({ pageNo: 1, pageSize: 12 })
|
||||
|
||||
//启用停用
|
||||
function handleChangeIzEnabled(record){
|
||||
|
|
@ -255,4 +278,24 @@ onMounted(() => {
|
|||
.iconEditClass{
|
||||
position:absolute;top:0;right:54px;background: #dfdfdf;border-radius:50%;width: 25px;height: 25px;display:flex;justify-content: center;align-items: center;align-items: center;
|
||||
}
|
||||
|
||||
/* 基础卡片样式 */
|
||||
.card-3d {
|
||||
border-radius: 8px;
|
||||
border: 1px solid #f0f0f0; /* 边框增强立体感 */
|
||||
background: white;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 鼠标悬停:阴影加深 + 轻微上浮 */
|
||||
.card-3d:hover {
|
||||
border: 1px solid #1890ff;
|
||||
}
|
||||
.text-ellipsis {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1; /* 限制显示的行数 */
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<BasicTable @register="registerTable" :scroll="{ x: '100%', y: '58vh' }">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
|
|
@ -69,8 +69,8 @@
|
|||
<!-- 右侧:已选择指令 -->
|
||||
<a-col :span="12">
|
||||
<div style="margin-left: 14px; padding: 8px 14px; background-color: white; border-radius: 10px;">
|
||||
<a-tag color="green" style="margin-bottom: 10px;">已选择 {{ directiveList.length }} 条</a-tag>
|
||||
<a-table :columns="selectedColumns" :data-source="directiveList" :scroll="{ x: '100%', y: '67vh' }"
|
||||
<a-tag color="green" style="margin-bottom: 10px;">已选择 {{ checkListData.length }} 条</a-tag>
|
||||
<a-table :columns="selectedColumns" :data-source="checkListData" :scroll="{ x: '100%', y: '67vh' }"
|
||||
:pagination="false" size="small" bordered>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<span v-if="column.dataIndex === 'index'">
|
||||
|
|
@ -121,12 +121,13 @@ import { cloneDeep } from 'lodash-es';
|
|||
import ConfigServiceDirectiveModal from './ConfigServiceDirectiveModal.vue';
|
||||
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil';
|
||||
|
||||
const emit = defineEmits(['deleteDirective', 'addDirective']);
|
||||
const emit = defineEmits(['checkDirective']);
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const registerModal = ref();
|
||||
const directiveInfo = ref<any>({});
|
||||
const checkListData = ref<any>([]);
|
||||
|
||||
// 接收已选择的指令列表
|
||||
const props = defineProps({
|
||||
|
|
@ -138,7 +139,7 @@ const props = defineProps({
|
|||
|
||||
// 判断是否已被选中(用于高亮)
|
||||
const isDirectiveSelected = (id) => {
|
||||
return props.directiveList.some(item => item.id === id);
|
||||
return checkListData.value.some(item => item.id === id);
|
||||
};
|
||||
|
||||
// 表单布局
|
||||
|
|
@ -187,8 +188,18 @@ function handleSuccess() {
|
|||
/**
|
||||
* 选择指令
|
||||
*/
|
||||
function handleSelect(record) {
|
||||
emit('addDirective', record);
|
||||
function handleCheck(record) {
|
||||
console.log("🚀 ~ handleSelect ~ record:", record)
|
||||
checkListData.value.push(record);
|
||||
emit('checkDirective', checkListData.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除已选指令
|
||||
*/
|
||||
function removeDirective(directiveId) {
|
||||
checkListData.value = checkListData.value.filter(item => item.id !== directiveId);
|
||||
emit('checkDirective', checkListData.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -198,15 +209,17 @@ function getTableAction(record) {
|
|||
return [
|
||||
{
|
||||
label: '选择',
|
||||
onClick: handleSelect.bind(null, record),
|
||||
onClick: handleCheck.bind(null, record),
|
||||
ifShow: !isDirectiveSelected(record.id),
|
||||
},
|
||||
{
|
||||
label: '移除',
|
||||
onClick: removeDirective.bind(null, record.id),
|
||||
ifShow: isDirectiveSelected(record.id),
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
function getDropDownAction(record) {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询 / 重置
|
||||
*/
|
||||
|
|
@ -260,13 +273,6 @@ async function setRangeQuery() {
|
|||
return queryParamClone;
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除已选指令
|
||||
*/
|
||||
function removeDirective(directiveId) {
|
||||
emit('deleteDirective', directiveId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签处理
|
||||
*/
|
||||
|
|
@ -283,7 +289,8 @@ function handleTags(prefix, tagList, suffix) {
|
|||
* 编辑方法(供父组件调用)
|
||||
*/
|
||||
function edit(record) {
|
||||
directiveInfo.value = record;
|
||||
checkListData.value = props.directiveList;
|
||||
// directiveInfo.value = record;
|
||||
queryParam.instructionTagId = record.instructionTagId;
|
||||
}
|
||||
defineExpose({ edit });
|
||||
|
|
|
|||
|
|
@ -25,123 +25,43 @@
|
|||
</a-col>
|
||||
<a-col :span="6" v-for="directive of seletedRecord.directives" :key="directive.id" style="padding: 8px;"
|
||||
@click="directiveInfo(directive)">
|
||||
<div class="directiveClass" :class="{ 'selected': selectedDirective === directive.id }">
|
||||
<div class="fenleiClass">
|
||||
<div :class="{ 'selected': selectedDirective === directive.id }">
|
||||
<a-card
|
||||
:class="['card-3d']"
|
||||
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
|
||||
@mouseenter="directive.id"
|
||||
@mouseleave="directive.id" >
|
||||
<template #title>
|
||||
<a-row>
|
||||
<a-col :span="12" class="ellipsis-two-lines">
|
||||
{{ directive.instructionTagName || directive.instructionTagId_dictText }}
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right;padding-right: 10px;"
|
||||
v-show="selectedDirective === directive.id">
|
||||
<span
|
||||
style="background-color: #67b4eb;border-radius: 50%;padding: 3px;color: white;width:27px;cursor: pointer;">
|
||||
<a-popconfirm title="是否确认移除?" ok-text="确认" cancel-text="取消"
|
||||
@confirm="deleteDirective(directive.id)">
|
||||
<Icon icon="ant-design:delete-outlined" size="18" />
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
<a-col>
|
||||
{{directive.directiveName}}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!-- <div class="fwsjClass">10:00 - 10:10</div> -->
|
||||
<div class="imgClass" style="margin-top: 10px;">
|
||||
<img :src="getImgPath(directive.previewFile)" style="width: 100px;height:100px" />
|
||||
</div>
|
||||
<a-row style="margin-top: 10px;">
|
||||
<a-col :span="14">
|
||||
<span class="ellipsis-two-lines" style="margin-left:10px;font-size:20px;">{{ directive.directiveName
|
||||
}}</span>
|
||||
</a-col>
|
||||
<a-col :span="10" style="text-align: right;">
|
||||
<span class="yuanClass">
|
||||
<a-popover title="服务说明">
|
||||
<template #content>
|
||||
<p v-if="directive.serviceContent">{{ directive.serviceContent }}</p>
|
||||
<p v-else>暂无</p>
|
||||
</template>
|
||||
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/edit.png"></img>
|
||||
</a-popover>
|
||||
</template>
|
||||
<template #extra>
|
||||
<span v-show="selectedDirective === directive.id"
|
||||
style="background-color: #67b4eb;border-radius: 50%;padding: 3px;color: white;width:27px;cursor: pointer;">
|
||||
<a-popconfirm title="是否确认移除?" ok-text="确认" cancel-text="取消"
|
||||
@confirm="deleteDirective(directive.id)">
|
||||
<Icon icon="ant-design:delete-outlined" size="18" />
|
||||
</a-popconfirm>
|
||||
</span>
|
||||
<span class="yuanClass">
|
||||
<a-popover title="音频介绍">
|
||||
<template #content>
|
||||
<audio controls disabled="false" v-if="directive.mp3File">
|
||||
<source :src="getFileAccessHttpUrl(directive.mp3File)">
|
||||
</audio>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp3.png"></img>
|
||||
</a-popover>
|
||||
</span>
|
||||
<span class="yuanClass">
|
||||
<a-popover title="视频介绍">
|
||||
<template #content>
|
||||
<video controls v-if="directive.mp4File">
|
||||
<source :src="getFileAccessHttpUrl(directive.mp4File)">
|
||||
</video>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp4.png"></img>
|
||||
</a-popover>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div style="margin-top: 10px;">
|
||||
<div style="display: flex; width:100% ;height: 50rpx;">
|
||||
<view
|
||||
style="background-color: rgb(240,240,240);width: 100px;height: 25px;border-radius: 5px;position: relative;margin-left: 10px;">
|
||||
<view style="position: absolute;top: 0;left: 0;width: 50%;height: 100%;">
|
||||
<img style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;"
|
||||
src="/src/assets/wlb/wlb-type1.png"></img>
|
||||
<div
|
||||
style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;">
|
||||
医保
|
||||
</div>
|
||||
</view>
|
||||
<view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;">
|
||||
<div
|
||||
style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;margin-left: -2px;">
|
||||
{{ directive.izReimbursement == '1' ? '报销' : '不报销' }}
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="background-color: rgb(240,240,240);width: 100px;height: 25px;border-radius: 5px;position: relative;margin-left: 10px;">
|
||||
<view style="position: absolute;top: 0;left: 0;width: 50%;height: 100%;">
|
||||
<img style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;"
|
||||
src="/src/assets/wlb/wlb-type2.png"></img>
|
||||
<div
|
||||
style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;">
|
||||
优惠
|
||||
</div>
|
||||
</view>
|
||||
<view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;">
|
||||
<div
|
||||
style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;margin-left: -2px;">
|
||||
{{ directive.izPreferential == '1' ? '参与' : '不参与' }}
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<div style="margin-top: -30px;">
|
||||
<a-divider style="margin: 0 0 10px 0 " />
|
||||
<p>分类标签:{{directive.instructionTagName?directive.instructionTagName:directive.instructionTagId_dictText}}</p>
|
||||
<p style="margin-top: -10px;">服务类别:{{directive.categoryName?directive.categoryName:directive.categoryId_dictText}}</p>
|
||||
<p style="margin-top: -10px;">服务类型:{{directive.typeName?directive.typeName:directive.typeId_dictText}}</p>
|
||||
<p style="margin-top: -10px;">服务时长:{{directive.serviceDuration}}分钟</p>
|
||||
<div style="float:left;margin-top: 20px;">
|
||||
</div>
|
||||
<div style="float:right;margin-top: 20px;" >
|
||||
<span class="rchlClass" v-if="directive.cycleType == '1'">日常护理</span>
|
||||
<span class="zqhlClass" v-if="directive.cycleType == '2'">周期护理</span>
|
||||
<span class="jshlClass" v-if="directive.cycleType == '3'">即时护理</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider />
|
||||
<a-row>
|
||||
<a-col :span="16" style="padding-left: 5px;">
|
||||
<span class="typeClass" v-if="directive.typeName">{{ directive.typeName }}</span>
|
||||
<span class="typeClass" v-if="handleBodyTags('', directive, '')">{{ handleBodyTags('', directive, '')
|
||||
}}</span>
|
||||
<span class="typeClass" v-if="handleEmotionTags('', directive, '')">{{ handleEmotionTags('', directive,
|
||||
'')
|
||||
}}</span>
|
||||
</a-col>
|
||||
<a-col :span="8" style="text-align: right;padding-right: 5px;">
|
||||
<span class="rchlClass" v-if="directive.cycleType == '1'">日常护理</span>
|
||||
<span class="zqhlClass" v-if="directive.cycleType == '2'">周期护理</span>
|
||||
<span class="jshlClass" v-if="directive.cycleType == '3'">即时护理</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-card>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
@ -151,7 +71,7 @@
|
|||
<a-drawer v-model:open="directiveEditDrawer" title="选择服务指令" width="100vw" :closable="false"
|
||||
:footer-style="{ textAlign: 'right' }" :body-style="{ padding: 0 }">
|
||||
<ConfigServiceDirectiveList ref="configServiceDirectiveListRef" :directiveList="seletedRecord.directives"
|
||||
@deleteDirective="deleteDirective" @addDirective="addDirective">
|
||||
@checkDirective="checkDirective">
|
||||
</ConfigServiceDirectiveList>
|
||||
<template #footer>
|
||||
<a-button style="margin-right: 8px" @click="handleDirectiveCancel">关闭</a-button>
|
||||
|
|
@ -161,7 +81,7 @@
|
|||
|
||||
<!-- 引用 -->
|
||||
<a-drawer v-model:open="directiveQuoteDrawer" title="引用服务指令包" width="80vw" :closable="false"
|
||||
:footer-style="{ textAlign: 'right' }" :body-style="{ background: '#dfdfdf' }">
|
||||
:footer-style="{ textAlign: 'right' }" :body-style="{ }">
|
||||
<PackageList ref="directivePackageListRef"></PackageList>
|
||||
<template #footer>
|
||||
<a-button style="margin-right: 8px" @click="handleQuoteDrawCancel">关闭</a-button>
|
||||
|
|
@ -197,6 +117,7 @@ const selectedDirective = ref()
|
|||
const directiveQuoteDrawer = ref(false)
|
||||
const directivePackageListRef = ref()
|
||||
const seletedRecord = ref({ directives: [] })//里面记录了已选择的服务指令,其他页面都需要操作这个对象
|
||||
const checkListData = ref<any>([])
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
/**
|
||||
|
|
@ -300,6 +221,7 @@ const handleAddDirectives = () => {
|
|||
*/
|
||||
function handleDirectiveCancel() {
|
||||
directiveEditDrawer.value = false;
|
||||
console.log("🚀 ~ handleDirectiveCancel ~ seletedRecord.value.directives:", seletedRecord.value.directives)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -307,6 +229,7 @@ function handleDirectiveCancel() {
|
|||
*/
|
||||
function handleDirectiveOk() {
|
||||
directiveEditDrawer.value = false;
|
||||
seletedRecord.value.directives = checkListData.value
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -344,6 +267,18 @@ function addDirective(directive_) {
|
|||
}
|
||||
console.log('seletedRecord.value--->', seletedRecord.value);
|
||||
}
|
||||
function checkDirective(directive_) {
|
||||
checkListData.value = directive_;
|
||||
console.log("🚀 ~ checkDirective ~ checkListData.value:", checkListData.value)
|
||||
// let res_ = seletedRecord.value.directives.filter(item => item.id == directive_.id)
|
||||
// if (res_.length > 0) {
|
||||
// createMessage.warning('服务指令已选择');
|
||||
// } else {
|
||||
// createMessage.success('选择成功');
|
||||
// seletedRecord.value.directives.push(directive_)
|
||||
// }
|
||||
// console.log('seletedRecord.value--->', seletedRecord.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 引用
|
||||
|
|
@ -415,7 +350,6 @@ defineExpose({
|
|||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
border-radius: 8px;
|
||||
height: 320px;
|
||||
background: linear-gradient(to bottom, #e1f3ff, #ffffff);
|
||||
width: 100%;
|
||||
box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
|
||||
|
|
@ -424,7 +358,6 @@ defineExpose({
|
|||
.directiveClass:hover {
|
||||
background: linear-gradient(to bottom, #e1f3ff, #ffffff);
|
||||
border-radius: 8px;
|
||||
height: 320px;
|
||||
box-shadow:
|
||||
0 0 0 1px #59bffe,
|
||||
/* 描边 */
|
||||
|
|
@ -536,4 +469,18 @@ defineExpose({
|
|||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
|
||||
/* 基础卡片样式 */
|
||||
.card-3d {
|
||||
border-radius: 8px;
|
||||
border: 1px solid #f0f0f0; /* 边框增强立体感 */
|
||||
background: white;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 鼠标悬停:阴影加深 + 轻微上浮 */
|
||||
.card-3d:hover {
|
||||
border: 1px solid #1890ff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="p-2" style="background: #dfdfdf;">
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" :model="searchForm" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
|
|
@ -22,119 +22,57 @@
|
|||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-row style="padding: 5px;">
|
||||
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="4" style="padding: 5px 10px 0 0;height: 200px;">
|
||||
<a-row class="cardDivClass" @click="handlePackageClick(directive)" :class="{ 'selected': selectedDirective.id === directive.id }">
|
||||
<a-col :span="24">
|
||||
<a-row style="padding: 10px">
|
||||
<a-col :span="12">
|
||||
<img src="/src/assets/images/logo.png" style="width: 25px;height:25px;" />
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right;position:relative;">
|
||||
<span>
|
||||
<a-switch :checked="directive.izEnabled == '0'" @change="handleChangeIzEnabled(directive)" checked-children="启" un-checked-children="停" disabled />
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center;">
|
||||
<span class="titleOne ellipsis-two-lines">
|
||||
{{ getHHMM(directive.startTimeStr) }}
|
||||
~
|
||||
{{ getHHMM(directive.endTimeStr) }}
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center;">
|
||||
<a-popover :title="directive.packageName">
|
||||
<template #content>
|
||||
<div style="min-width: 240px;">
|
||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div>
|
||||
|
||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;color:red;" v-if="directive.directives.length==0">未配置</div>
|
||||
</div>
|
||||
</template>
|
||||
<span class="titleOne ellipsis-two-lines">{{ directive.packageName }}</span>
|
||||
</a-popover>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-divider style="margin: 10px 0 5px 0;"/>
|
||||
</a-col>
|
||||
<a-col :span="12" style="padding: 0px 10px">
|
||||
{{ directive.createBy_dictText }}
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right;padding: 0px 10px;">
|
||||
{{ directive.createTime.substring(0,10) }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
|
||||
<!-- <a-col :span="11" :push="1" v-for="(directive, index) of tableData.records" :key="index">
|
||||
<a-card :bordered="false" size="small" class="smart-card"
|
||||
style="margin: 10px;box-shadow: 1px 1px 5px #b0b0b0;" @click="handlePackageClick(directive)"
|
||||
:class="{ 'selected': selectedDirective.id === directive.id }">
|
||||
<div class="selected-indicator" v-if="selectedDirective.id === directive.id"></div>
|
||||
<div>{{ directive.packageName }}</div>
|
||||
<div> {{ directive.createBy }}</div>
|
||||
<div>{{ directive.createTime }}</div>
|
||||
</a-card>
|
||||
</a-col> -->
|
||||
<!-- </a-row>
|
||||
</div> -->
|
||||
<!-- <a-col :span="8">
|
||||
<a-card title="服务指令" style="width: 100%">
|
||||
<div class="scrollable-content">
|
||||
<a-row>
|
||||
<a-col :span="22" :push="1" v-for="directive of selectedDirective.directives" :key="directive.id"
|
||||
style="margin-top: 15px;" @click="directiveInfo(directive)">
|
||||
<a-badge-ribbon :text="filterDictTextByCache('period_type', directive.cycleType)"
|
||||
:style="{ top: '-10px' }">
|
||||
<a-card size="small">
|
||||
<div :class="{ 'selected-dire': directiveId === directive.id }">
|
||||
<div>
|
||||
{{ directive.directiveName }}
|
||||
</div>
|
||||
<div>
|
||||
体型标签:{{ handleBodyTags('', directive, '') }}
|
||||
</div>
|
||||
<div>
|
||||
情绪标签:{{ handleEmotionTags('', directive, '') }}
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-badge-ribbon>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="6" style="margin-left: 1vw;">
|
||||
<div>
|
||||
<a-card title="服务指令详情" style="width: 100%">
|
||||
<div class="">分类标签:{{ filterDictTextByCache('instruction_tag', derectiveInfo.instructionTagId) }}</div>
|
||||
<div class="directiveInfoClass">服务类别:{{ derectiveInfo.categoryName }}</div>
|
||||
<div class="directiveInfoClass">服务类型:{{ derectiveInfo.typeName }}</div>
|
||||
<div class="directiveInfoClass">服务指令名称:{{ derectiveInfo.directiveName }}</div>
|
||||
<div class="directiveInfoClass">周期类型:{{ filterDictTextByCache('period_type', derectiveInfo.cycleType) }}
|
||||
</div>
|
||||
<div class="directiveInfoClass">服务时长(分钟):{{ derectiveInfo.serviceDuration }}</div>
|
||||
<div class="directiveInfoClass">服务说明:{{ derectiveInfo.serviceContent }}</div>
|
||||
<div class="directiveInfoClass">体型标签:{{ handleBodyTags('', derectiveInfo, '') }}</div>
|
||||
<div class="directiveInfoClass">情绪标签:{{ handleEmotionTags('', derectiveInfo, '') }}</div>
|
||||
<div class="directiveInfoClass">语音文件:
|
||||
<span v-if="!derectiveInfo.mp3File">暂无文件</span>
|
||||
<audio controls disabled="false" v-else>
|
||||
<source :src="getFileAccessHttpUrl(derectiveInfo.mp3File)">
|
||||
</audio>
|
||||
</div>
|
||||
<div class="directiveInfoClass">视频文件:
|
||||
<span v-if="!derectiveInfo.mp4File">暂无文件</span>
|
||||
<video controls v-else>
|
||||
<source :src="getFileAccessHttpUrl(derectiveInfo.mp4File)">
|
||||
</video>
|
||||
<a-row >
|
||||
<a-col v-for="directive of tableData.records" :key="directive.id" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 5px 14px 0 0;height: 200px;">
|
||||
<div @click="handlePackageClick(directive)" :class="{ 'selected': selectedDirective.id === directive.id }">
|
||||
<a-card
|
||||
:class="['card-3d']"
|
||||
:headStyle="{ height: '60px', padding: '0 24px',border:'0px' }"
|
||||
@mouseenter="directive.id"
|
||||
@mouseleave="directive.id" >
|
||||
<template #title>
|
||||
<a-row>
|
||||
<a-col>
|
||||
{{ directive.packageName }}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
<div style="margin-top: -30px;">
|
||||
<a-divider style="margin: 0 0 10px 0 " />
|
||||
<a-popover :title="directive.packageName">
|
||||
<template #content>
|
||||
<div style="min-width: 240px;">
|
||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div>
|
||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;color:red;" v-if="directive.directives.length==0">未配置</div>
|
||||
</div>
|
||||
</template>
|
||||
<p>服务时长:{{directive.totalDuration}} 分钟</p>
|
||||
<p style="margin-top: -10px;">创建时间:{{directive.createTime.substring(0,10)}}</p>
|
||||
<p style="margin-top: -10px;" class="text-ellipsis" :title="directive.description">说明:{{directive.description}}</p>
|
||||
</a-popover>
|
||||
<div style="float:left;margin-top: 20px;">
|
||||
|
||||
|
||||
<a-popover :title="directive.packageName">
|
||||
<template #content>
|
||||
<div style="min-width: 240px;">
|
||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div>
|
||||
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;color:red;" v-if="directive.directives.length==0">未配置</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<a-button type="dashed" size="small">指令详情</a-button>
|
||||
</a-popover>
|
||||
</div>
|
||||
<div style="float:right;margin-top: 20px;">
|
||||
<a-switch style="margin-left:10px" :checked="directive.izEnabled == '0'" disabled checked-children="启" un-checked-children="停" />
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</a-col> -->
|
||||
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -332,6 +270,7 @@ defineExpose({
|
|||
// transition: none !important;
|
||||
background: #edf8ff !important;
|
||||
border: 1px solid #7cc3f0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.selected-dire {
|
||||
|
|
@ -410,4 +349,25 @@ defineExpose({
|
|||
.iconEditClass{
|
||||
position:absolute;top:0;right:54px;background: #dfdfdf;border-radius:50%;width: 25px;height: 25px;display:flex;justify-content: center;align-items: center;align-items: center;
|
||||
}
|
||||
|
||||
|
||||
/* 基础卡片样式 */
|
||||
.card-3d {
|
||||
border-radius: 8px;
|
||||
border: 1px solid #f0f0f0; /* 边框增强立体感 */
|
||||
background: white;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 鼠标悬停:阴影加深 + 轻微上浮 */
|
||||
.card-3d:hover {
|
||||
border: 1px solid #1890ff;
|
||||
}
|
||||
.text-ellipsis {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1; /* 限制显示的行数 */
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue