|
@@ -1,235 +1,366 @@
|
|
|
-<!--库存明细-->
|
|
|
-<!--企业画像-->
|
|
|
-<template>
|
|
|
- <div>
|
|
|
- <div v-show="!BussinessAddState.show && !BussinessEditState.show" class="app-container">
|
|
|
- <div>
|
|
|
- <transition name="fade">
|
|
|
- <div v-show="showSearch" class="mb-[10px]">
|
|
|
- <el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
|
- <el-form-item :span="5" label="商品信息:" prop="area_code" label-width="auto">
|
|
|
- <el-input v-model="queryParams.keyword1" placeholder="请输入物资ID" clearable @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :span="5" label="出入库单号:" prop="keyword" label-width="auto">
|
|
|
- <el-input v-model="queryParams.keyword2" placeholder="请输入出入库单号" clearable @keyup.enter="handleQuery" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :span="5" prop="keyword" label-width="auto">
|
|
|
- <el-select v-model="queryParams.type" placeholder="全部" clearable>
|
|
|
- <el-option v-for="item in type" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <!-- <el-row :gutter="10" class="mb8">-->
|
|
|
- <!-- <el-col :span="1.5">-->
|
|
|
- <!-- <el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- <el-col :span="1.5">-->
|
|
|
- <!-- <el-button type="danger" plain :disabled="multiple" icon="Delete" @click="handleDelete(selectedRow)"> 删除 </el-button>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- </el-row>-->
|
|
|
- </div>
|
|
|
- </transition>
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- v-loading="loading"
|
|
|
- :data="tableData"
|
|
|
- border
|
|
|
- :max-height="maxHeight"
|
|
|
- style="width: 96%"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="55" align="center" fixed />
|
|
|
- <el-table-column label="商品信息" align="center" prop="goods_information" fixed show-overflow-tooltip />
|
|
|
- <el-table-column label="出入库单号" align="center" prop="odd_numbers" show-overflow-tooltip />
|
|
|
- <el-table-column label="入库/出库" align="center" prop="type" show-overflow-tooltip />
|
|
|
- <el-table-column label="变动库存" align="center" prop="change_inventory" show-overflow-tooltip />
|
|
|
- <el-table-column label="剩余库存" align="center" prop="remaining_inventory" show-overflow-tooltip />
|
|
|
- <el-table-column label="创建时间" align="center" prop="created_time" show-overflow-tooltip />
|
|
|
- <!-- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">-->
|
|
|
- <!-- <template #default="scope">-->
|
|
|
- <!-- <el-button type="text" class="common-btn-text-primary" @click="handleedit(scope.row)">编辑</el-button>-->
|
|
|
- <!-- <el-button type="text" class="common-btn-text-primary" @click="handleDelete(scope.row)">移除</el-button>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </el-table-column>-->
|
|
|
- </el-table>
|
|
|
- <pagination v-show="total > 0" v-model:page="queryParams.page" v-model:limit="queryParams.pageSize" :total="total" @pagination="tableData" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <BussinessAdd v-if="BussinessAddState.show" @close="handleCancel" />
|
|
|
- <BussinessEdit v-if="BussinessEditState.show" :event-id="BussinessEditState.eventId" @close="handleCancel" />
|
|
|
- </div>
|
|
|
-</template>
|
|
|
+<!--<!–库存明细–>-->
|
|
|
+<!--<!–企业画像–>-->
|
|
|
+<!--<template>-->
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <div v-show="!BussinessAddState.show && !BussinessEditState.show" class="app-container">-->
|
|
|
+<!-- <div>-->
|
|
|
+<!-- <transition name="fade">-->
|
|
|
+<!-- <div v-show="showSearch" class="mb-[10px]">-->
|
|
|
+<!-- <el-form ref="queryFormRef" :model="queryParams" :inline="true">-->
|
|
|
+<!-- <el-form-item :span="5" label="商品信息:" prop="area_code" label-width="auto">-->
|
|
|
+<!-- <el-input v-model="queryParams.keyword1" placeholder="请输入物资ID" clearable @keyup.enter="handleQuery" />-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item :span="5" label="出入库单号:" prop="keyword" label-width="auto">-->
|
|
|
+<!-- <el-input v-model="queryParams.keyword2" placeholder="请输入出入库单号" clearable @keyup.enter="handleQuery" />-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item :span="5" prop="keyword" label-width="auto">-->
|
|
|
+<!-- <el-select v-model="queryParams.type" placeholder="全部" clearable>-->
|
|
|
+<!-- <el-option v-for="item in type" :key="item.value" :label="item.label" :value="item.value"></el-option>-->
|
|
|
+<!-- </el-select>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item>-->
|
|
|
+<!-- <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- <el-form-item>-->
|
|
|
+<!-- <el-button icon="Refresh" @click="resetQuery">重置</el-button>-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+<!-- </el-form>-->
|
|
|
+<!-- <!– <el-row :gutter="10" class="mb8">–>-->
|
|
|
+<!-- <!– <el-col :span="1.5">–>-->
|
|
|
+<!-- <!– <el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>–>-->
|
|
|
+<!-- <!– </el-col>–>-->
|
|
|
+<!-- <!– <el-col :span="1.5">–>-->
|
|
|
+<!-- <!– <el-button type="danger" plain :disabled="multiple" icon="Delete" @click="handleDelete(selectedRow)"> 删除 </el-button>–>-->
|
|
|
+<!-- <!– </el-col>–>-->
|
|
|
+<!-- <!– </el-row>–>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </transition>-->
|
|
|
+<!-- <el-table-->
|
|
|
+<!-- ref="multipleTable"-->
|
|
|
+<!-- v-loading="loading"-->
|
|
|
+<!-- :data="tableData"-->
|
|
|
+<!-- border-->
|
|
|
+<!-- :max-height="maxHeight"-->
|
|
|
+<!-- style="width: 96%"-->
|
|
|
+<!-- @selection-change="handleSelectionChange"-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <el-table-column type="selection" width="55" align="center" fixed />-->
|
|
|
+<!-- <el-table-column label="商品信息" align="center" prop="goods_information" fixed show-overflow-tooltip />-->
|
|
|
+<!-- <el-table-column label="出入库单号" align="center" prop="odd_numbers" show-overflow-tooltip />-->
|
|
|
+<!-- <el-table-column label="入库/出库" align="center" prop="type" show-overflow-tooltip />-->
|
|
|
+<!-- <el-table-column label="变动库存" align="center" prop="change_inventory" show-overflow-tooltip />-->
|
|
|
+<!-- <el-table-column label="剩余库存" align="center" prop="remaining_inventory" show-overflow-tooltip />-->
|
|
|
+<!-- <el-table-column label="创建时间" align="center" prop="created_time" show-overflow-tooltip />-->
|
|
|
+<!-- <!– <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">–>-->
|
|
|
+<!-- <!– <template #default="scope">–>-->
|
|
|
+<!-- <!– <el-button type="text" class="common-btn-text-primary" @click="handleedit(scope.row)">编辑</el-button>–>-->
|
|
|
+<!-- <!– <el-button type="text" class="common-btn-text-primary" @click="handleDelete(scope.row)">移除</el-button>–>-->
|
|
|
+<!-- <!– </template>–>-->
|
|
|
+<!-- <!– </el-table-column>–>-->
|
|
|
+<!-- </el-table>-->
|
|
|
+<!-- <pagination v-show="total > 0" v-model:page="queryParams.page" v-model:limit="queryParams.pageSize" :total="total" @pagination="tableData" />-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <BussinessAdd v-if="BussinessAddState.show" @close="handleCancel" />-->
|
|
|
+<!-- <BussinessEdit v-if="BussinessEditState.show" :event-id="BussinessEditState.eventId" @close="handleCancel" />-->
|
|
|
+<!-- </div>-->
|
|
|
+<!--</template>-->
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
-import { ref, reactive, onMounted, onBeforeUnmount } from 'vue';
|
|
|
-import { companyDelete, getCompanyList } from '@/api/riskPrevention/BusinessPortraits';
|
|
|
-import BussinessAdd from '@/views/riskPrevention/SafetyProductionManagement/BussinessAdd.vue';
|
|
|
-// import BussinessEdit from "./BussinessEdit.vue";
|
|
|
-import { to } from 'await-to-js';
|
|
|
+<!--<script setup lang="ts">-->
|
|
|
+<!--import { ref, reactive, onMounted, onBeforeUnmount } from 'vue';-->
|
|
|
+<!--import { companyDelete, getCompanyList } from '@/api/riskPrevention/BusinessPortraits';-->
|
|
|
+<!--import BussinessAdd from '@/views/riskPrevention/SafetyProductionManagement/BussinessAdd.vue';-->
|
|
|
+<!--// import BussinessEdit from "./BussinessEdit.vue";-->
|
|
|
+<!--import { to } from 'await-to-js';-->
|
|
|
|
|
|
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const showSearch = ref(true);
|
|
|
-// const tableData = ref();
|
|
|
-const multiple = ref(true);
|
|
|
-const ids = ref<Array<number | string>>([]);
|
|
|
-const single = ref(true);
|
|
|
-// 定义响应式变量
|
|
|
-const loading = ref(false);
|
|
|
-const maxHeight = ref(window.innerHeight * 0.8);
|
|
|
-const total = ref();
|
|
|
-// 处理窗口大小变化
|
|
|
-const handleResize = () => {
|
|
|
- maxHeight.value = window.innerHeight * 0.8;
|
|
|
-};
|
|
|
-const initFormData = reactive({
|
|
|
- goods_information: '',
|
|
|
- odd_numbers: '',
|
|
|
- type: '',
|
|
|
- change_inventory: '',
|
|
|
- remaining_inventory: '',
|
|
|
- created_time: ''
|
|
|
-});
|
|
|
-const data = reactive({
|
|
|
- form: { ...initFormData },
|
|
|
- queryParams: {
|
|
|
- page: '1',
|
|
|
- pageSize: '10',
|
|
|
- type: '',
|
|
|
- keycode1: '',
|
|
|
- keyword2: ''
|
|
|
- },
|
|
|
- selectedRow: null,
|
|
|
- selectedRowKeys: []
|
|
|
-});
|
|
|
-const tableData = ref([
|
|
|
- {
|
|
|
- 'goods_information': '苹果 iPhone 13 Pro Max 256GB 石墨色',
|
|
|
- 'odd_numbers': 'WH20230401001',
|
|
|
- 'type': '入库',
|
|
|
- 'change_inventory': 50,
|
|
|
- 'remaining_inventory': 200,
|
|
|
- 'created_time': '2023-04-01T10:30:00Z'
|
|
|
- },
|
|
|
- {
|
|
|
- 'goods_information': '华为 MateBook X Pro 笔记本电脑',
|
|
|
- 'odd_numbers': 'WH20230401002',
|
|
|
- 'type': '出库',
|
|
|
- 'change_inventory': -10,
|
|
|
- 'remaining_inventory': 190,
|
|
|
- 'created_time': '2023-04-01T11:15:00Z'
|
|
|
- },
|
|
|
- {
|
|
|
- 'goods_information': '小米 Redmi Note 11 Pro+ 5G 手机',
|
|
|
- 'odd_numbers': 'WH20230401003',
|
|
|
- 'type': '入库',
|
|
|
- 'change_inventory': 30,
|
|
|
- 'remaining_inventory': 150,
|
|
|
- 'created_time': '2023-04-01T13:45:00Z'
|
|
|
- },
|
|
|
- {
|
|
|
- 'goods_information': '三星 Galaxy S22 Ultra 5G 手机',
|
|
|
- 'odd_numbers': 'WH20230401004',
|
|
|
- 'type': '出库',
|
|
|
- 'change_inventory': -5,
|
|
|
- 'remaining_inventory': 55,
|
|
|
- 'created_time': '2023-04-01T15:00:00Z'
|
|
|
- },
|
|
|
- {
|
|
|
- 'goods_information': '戴尔 XPS 13 9310 笔记本电脑',
|
|
|
- 'odd_numbers': 'WH20230402001',
|
|
|
- 'type': '入库',
|
|
|
- 'change_inventory': 15,
|
|
|
- 'remaining_inventory': 30,
|
|
|
- 'created_time': '2023-04-02T09:00:00Z'
|
|
|
- }
|
|
|
-]);
|
|
|
+<!--const { proxy } = getCurrentInstance() as ComponentInternalInstance;-->
|
|
|
+<!--const showSearch = ref(true);-->
|
|
|
+<!--// const tableData = ref();-->
|
|
|
+<!--const multiple = ref(true);-->
|
|
|
+<!--const ids = ref<Array<number | string>>([]);-->
|
|
|
+<!--const single = ref(true);-->
|
|
|
+<!--// 定义响应式变量-->
|
|
|
+<!--const loading = ref(false);-->
|
|
|
+<!--const maxHeight = ref(window.innerHeight * 0.8);-->
|
|
|
+<!--const total = ref();-->
|
|
|
+<!--// 处理窗口大小变化-->
|
|
|
+<!--const handleResize = () => {-->
|
|
|
+<!-- maxHeight.value = window.innerHeight * 0.8;-->
|
|
|
+<!--};-->
|
|
|
+<!--const initFormData = reactive({-->
|
|
|
+<!-- goods_information: '',-->
|
|
|
+<!-- odd_numbers: '',-->
|
|
|
+<!-- type: '',-->
|
|
|
+<!-- change_inventory: '',-->
|
|
|
+<!-- remaining_inventory: '',-->
|
|
|
+<!-- created_time: ''-->
|
|
|
+<!--});-->
|
|
|
+<!--const data = reactive({-->
|
|
|
+<!-- form: { ...initFormData },-->
|
|
|
+<!-- queryParams: {-->
|
|
|
+<!-- page: '1',-->
|
|
|
+<!-- pageSize: '10',-->
|
|
|
+<!-- type: '',-->
|
|
|
+<!-- keycode1: '',-->
|
|
|
+<!-- keyword2: ''-->
|
|
|
+<!-- },-->
|
|
|
+<!-- selectedRow: null,-->
|
|
|
+<!-- selectedRowKeys: []-->
|
|
|
+<!--});-->
|
|
|
+<!--const tableData = ref([-->
|
|
|
+<!-- {-->
|
|
|
+<!-- 'goods_information': '苹果 iPhone 13 Pro Max 256GB 石墨色',-->
|
|
|
+<!-- 'odd_numbers': 'WH20230401001',-->
|
|
|
+<!-- 'type': '入库',-->
|
|
|
+<!-- 'change_inventory': 50,-->
|
|
|
+<!-- 'remaining_inventory': 200,-->
|
|
|
+<!-- 'created_time': '2023-04-01T10:30:00Z'-->
|
|
|
+<!-- },-->
|
|
|
+<!-- {-->
|
|
|
+<!-- 'goods_information': '华为 MateBook X Pro 笔记本电脑',-->
|
|
|
+<!-- 'odd_numbers': 'WH20230401002',-->
|
|
|
+<!-- 'type': '出库',-->
|
|
|
+<!-- 'change_inventory': -10,-->
|
|
|
+<!-- 'remaining_inventory': 190,-->
|
|
|
+<!-- 'created_time': '2023-04-01T11:15:00Z'-->
|
|
|
+<!-- },-->
|
|
|
+<!-- {-->
|
|
|
+<!-- 'goods_information': '小米 Redmi Note 11 Pro+ 5G 手机',-->
|
|
|
+<!-- 'odd_numbers': 'WH20230401003',-->
|
|
|
+<!-- 'type': '入库',-->
|
|
|
+<!-- 'change_inventory': 30,-->
|
|
|
+<!-- 'remaining_inventory': 150,-->
|
|
|
+<!-- 'created_time': '2023-04-01T13:45:00Z'-->
|
|
|
+<!-- },-->
|
|
|
+<!-- {-->
|
|
|
+<!-- 'goods_information': '三星 Galaxy S22 Ultra 5G 手机',-->
|
|
|
+<!-- 'odd_numbers': 'WH20230401004',-->
|
|
|
+<!-- 'type': '出库',-->
|
|
|
+<!-- 'change_inventory': -5,-->
|
|
|
+<!-- 'remaining_inventory': 55,-->
|
|
|
+<!-- 'created_time': '2023-04-01T15:00:00Z'-->
|
|
|
+<!-- },-->
|
|
|
+<!-- {-->
|
|
|
+<!-- 'goods_information': '戴尔 XPS 13 9310 笔记本电脑',-->
|
|
|
+<!-- 'odd_numbers': 'WH20230402001',-->
|
|
|
+<!-- 'type': '入库',-->
|
|
|
+<!-- 'change_inventory': 15,-->
|
|
|
+<!-- 'remaining_inventory': 30,-->
|
|
|
+<!-- 'created_time': '2023-04-02T09:00:00Z'-->
|
|
|
+<!-- }-->
|
|
|
+<!--]);-->
|
|
|
|
|
|
-const { queryParams, form } = toRefs(data);
|
|
|
+<!--const { queryParams, form } = toRefs(data);-->
|
|
|
|
|
|
-const type = [
|
|
|
- { value: '', label: '全部' },
|
|
|
- { value: '0', label: '出库' },
|
|
|
- { value: '1', label: '入库' }
|
|
|
-];
|
|
|
+<!--const type = [-->
|
|
|
+<!-- { value: '', label: '全部' },-->
|
|
|
+<!-- { value: '0', label: '出库' },-->
|
|
|
+<!-- { value: '1', label: '入库' }-->
|
|
|
+<!--];-->
|
|
|
|
|
|
-const handleQuery = () => {
|
|
|
- queryParams.value.page = 1;
|
|
|
- // fetchWorkrData();
|
|
|
-};
|
|
|
-const resetQuery = () => {
|
|
|
- queryParams.value = { page: 1, pageSize: 10, area_code: '', keycode: '' };
|
|
|
- handleQuery();
|
|
|
-};
|
|
|
-const BussinessAddState = reactive({
|
|
|
- show: false // 初始化show为false
|
|
|
-});
|
|
|
+<!--const handleQuery = () => {-->
|
|
|
+<!-- queryParams.value.page = 1;-->
|
|
|
+<!-- // fetchWorkrData();-->
|
|
|
+<!--};-->
|
|
|
+<!--const resetQuery = () => {-->
|
|
|
+<!-- queryParams.value = { page: 1, pageSize: 10, area_code: '', keycode: '' };-->
|
|
|
+<!-- handleQuery();-->
|
|
|
+<!--};-->
|
|
|
+<!--const BussinessAddState = reactive({-->
|
|
|
+<!-- show: false // 初始化show为false-->
|
|
|
+<!--});-->
|
|
|
|
|
|
-const BussinessEditState = reactive({
|
|
|
- show: false
|
|
|
-});
|
|
|
+<!--const BussinessEditState = reactive({-->
|
|
|
+<!-- show: false-->
|
|
|
+<!--});-->
|
|
|
|
|
|
-const handleAdd = () => {
|
|
|
- BussinessAddState.show = true;
|
|
|
-};
|
|
|
+<!--const handleAdd = () => {-->
|
|
|
+<!-- BussinessAddState.show = true;-->
|
|
|
+<!--};-->
|
|
|
|
|
|
-const handleDelete = async (row) => {
|
|
|
- let id = [];
|
|
|
- if (row) {
|
|
|
- id = [row.id];
|
|
|
- } else {
|
|
|
- id = ids.value;
|
|
|
- }
|
|
|
- const [err] = await to(proxy?.$modal.confirm('是否确认删除选择的数据项?') as any);
|
|
|
- if (!err) {
|
|
|
- await companyDelete(id);
|
|
|
- proxy.$modal.msgSuccess('删除成功');
|
|
|
- fetchWorkrData();
|
|
|
- }
|
|
|
-};
|
|
|
-const handleedit = (row) => {
|
|
|
- BussinessEditState.eventId = row.id + '';
|
|
|
- BussinessEditState.show = true;
|
|
|
-};
|
|
|
+<!--const handleDelete = async (row) => {-->
|
|
|
+<!-- let id = [];-->
|
|
|
+<!-- if (row) {-->
|
|
|
+<!-- id = [row.id];-->
|
|
|
+<!-- } else {-->
|
|
|
+<!-- id = ids.value;-->
|
|
|
+<!-- }-->
|
|
|
+<!-- const [err] = await to(proxy?.$modal.confirm('是否确认删除选择的数据项?') as any);-->
|
|
|
+<!-- if (!err) {-->
|
|
|
+<!-- await companyDelete(id);-->
|
|
|
+<!-- proxy.$modal.msgSuccess('删除成功');-->
|
|
|
+<!-- fetchWorkrData();-->
|
|
|
+<!-- }-->
|
|
|
+<!--};-->
|
|
|
+<!--const handleedit = (row) => {-->
|
|
|
+<!-- BussinessEditState.eventId = row.id + '';-->
|
|
|
+<!-- BussinessEditState.show = true;-->
|
|
|
+<!--};-->
|
|
|
|
|
|
-const handleCancel = () => {
|
|
|
- BussinessAddState.show = false;
|
|
|
- BussinessEditState.show = false;
|
|
|
-};
|
|
|
+<!--const handleCancel = () => {-->
|
|
|
+<!-- BussinessAddState.show = false;-->
|
|
|
+<!-- BussinessEditState.show = false;-->
|
|
|
+<!--};-->
|
|
|
|
|
|
-const fetchWorkrData = () => {
|
|
|
- // loading.value = true;
|
|
|
- // getCompanyList(queryParams.value)
|
|
|
- // .then((res) => {
|
|
|
- // tableData.value = res.data;
|
|
|
- // total.value = res.total;
|
|
|
- // })
|
|
|
- // .finally(() => {
|
|
|
- // loading.value = false;
|
|
|
- // });
|
|
|
-};
|
|
|
+<!--const fetchWorkrData = () => {-->
|
|
|
+<!-- // loading.value = true;-->
|
|
|
+<!-- // getCompanyList(queryParams.value)-->
|
|
|
+<!-- // .then((res) => {-->
|
|
|
+<!-- // tableData.value = res.data;-->
|
|
|
+<!-- // total.value = res.total;-->
|
|
|
+<!-- // })-->
|
|
|
+<!-- // .finally(() => {-->
|
|
|
+<!-- // loading.value = false;-->
|
|
|
+<!-- // });-->
|
|
|
+<!--};-->
|
|
|
+
|
|
|
+<!--const handleSelectionChange = (selection) => {-->
|
|
|
+<!-- ids.value = selection.map((item) => item.id);-->
|
|
|
+<!-- selectedRow.value = selection.length === 1 ? selection[0] : null;-->
|
|
|
+<!-- single.value = selection.length != 1;-->
|
|
|
+<!-- multiple.value = !selection.length;-->
|
|
|
+<!--};-->
|
|
|
+
|
|
|
+<!--onMounted(() => {-->
|
|
|
+<!-- window.addEventListener('resize', handleResize);-->
|
|
|
+<!-- fetchWorkrData();-->
|
|
|
+<!--});-->
|
|
|
+
|
|
|
+<!--// 在组件卸载前移除窗口大小变化监听器-->
|
|
|
+<!--onBeforeUnmount(() => {-->
|
|
|
+<!-- window.removeEventListener('resize', handleResize);-->
|
|
|
+<!--});-->
|
|
|
+<!--</script>-->
|
|
|
|
|
|
-const handleSelectionChange = (selection) => {
|
|
|
- ids.value = selection.map((item) => item.id);
|
|
|
- selectedRow.value = selection.length === 1 ? selection[0] : null;
|
|
|
- single.value = selection.length != 1;
|
|
|
- multiple.value = !selection.length;
|
|
|
+<!--<style lang="scss" scoped></style>-->
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="common-dialog">
|
|
|
+ <div class="common-dialog-content">
|
|
|
+ <div class="common-dialog-title-box">
|
|
|
+ <h3 class="common-dialog-title">查看详情</h3>
|
|
|
+ </div>
|
|
|
+ <div class="common-dialog-box">
|
|
|
+ <el-form ref="formRef" :model="form" label-width="160px">
|
|
|
+ <el-form-item label="采购单号:">
|
|
|
+ <el-input v-model="form.purchase_order_number" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否捐赠:" prop="area_name" class="custom-disabled">
|
|
|
+ <el-select v-model="form.is_donation" disabled placeholder="请选择是否捐赠">
|
|
|
+ <el-option v-for="item in sys_yes_no" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="运单号:">
|
|
|
+ <el-input v-model="form.transport_order_number" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="捐赠人联系电话:">
|
|
|
+ <el-input v-model="form.donator_phone" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="捐赠人姓名:">
|
|
|
+ <el-input v-model="form.donator_name" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审核人:">
|
|
|
+ <el-input v-model="form.reviewer" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="企业名称:">
|
|
|
+ <el-input v-model="form.enterprise_name" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="企业编号:">
|
|
|
+ <el-input v-model="form.enterprise_code" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="分级信息:">
|
|
|
+ <el-input v-model="form.grading_info" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="类型:">
|
|
|
+ <el-select v-model="form.type" disabled placeholder="请选择类型" class="custom-disabled">
|
|
|
+ <el-option v-for="item in sys_store_type" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="供应商名称:">
|
|
|
+ <el-input v-model="form.supplier_name" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注:">
|
|
|
+ <el-input v-model="form.remark" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="供应商编号:">
|
|
|
+ <el-input v-model="form.supplier_code" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="完成时间:">
|
|
|
+ <el-input v-model="form.completion_time" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="计划完成时间:">
|
|
|
+ <el-input v-model="form.planned_completion_time" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="库房名称:">
|
|
|
+ <el-input v-model="form.room_name" disabled class="custom-disabled" style="width: 468px" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="common-dialog-footer">
|
|
|
+ <el-button type="primary" @click="closeDialog()">返回</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { toRefs } from 'vue';
|
|
|
+import { getWarehouseDetails } from '@/api/comprehensiveGuarantee/materialReserveManagement/InboundManagement';
|
|
|
+import { parseTime } from '@/utils/ruoyi';
|
|
|
+const emits = defineEmits(['close']);
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const { sys_store_type, sys_yes_no } = toRefs<any>(proxy?.useDict('sys_store_type', 'sys_yes_no'));
|
|
|
+
|
|
|
+const closeDialog = () => {
|
|
|
+ emits('close');
|
|
|
};
|
|
|
+const props = defineProps({
|
|
|
+ id: String
|
|
|
+});
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- window.addEventListener('resize', handleResize);
|
|
|
- fetchWorkrData();
|
|
|
+// 数据
|
|
|
+const form = ref({
|
|
|
+ warehouse_id: '', // 仓库编号
|
|
|
+ purchase_order_number: '', // 采购单号
|
|
|
+ is_donation: '', // 是否捐赠(是、否)
|
|
|
+ transport_order_number: '', // 运单号
|
|
|
+ donator_phone: '', // 捐赠人联系电话
|
|
|
+ donator_name: '', // 捐赠人姓名
|
|
|
+ reviewer: '', // 审核人
|
|
|
+ enterprise_name: '', // 企业名称
|
|
|
+ enterprise_code: '', // 企业编号
|
|
|
+ grading_info: '', // 分级信息
|
|
|
+ type: '', // 类型(1_调拨入库、2_归还入库、3_回收入库)
|
|
|
+ supplier_name: '', // 供应商名称
|
|
|
+ remark: '', // 备注
|
|
|
+ supplier_code: '', // 供应商编号
|
|
|
+ completion_time: '', // 完成时间
|
|
|
+ planned_completion_time: '', // 计划完成时间
|
|
|
+ room_id:'', //库房id
|
|
|
+ room_name:'', //库房名称
|
|
|
+ filename: [], //附件
|
|
|
});
|
|
|
|
|
|
-// 在组件卸载前移除窗口大小变化监听器
|
|
|
-onBeforeUnmount(() => {
|
|
|
- window.removeEventListener('resize', handleResize);
|
|
|
+getWarehouseDetails(props.id).then((res) => {
|
|
|
+ res.data.completion_time = parseTime(res.data.completion_time);
|
|
|
+ res.data.planned_completion_time = parseTime(res.data.planned_completion_time);
|
|
|
+ res.data.type = res.data.type ? res.data.type.toString() : res.data.type;
|
|
|
+ form.value = res.data;
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.custom-disabled {
|
|
|
+ :deep(.el-select__wrapper.is-disabled),
|
|
|
+ :deep(.el-input__wrapper),
|
|
|
+ :deep(.el-textarea__inner) {
|
|
|
+ background-color: #ffffff !important;
|
|
|
+ }
|
|
|
+ :deep(.el-select__wrapper.is-disabled .el-select__selected-item),
|
|
|
+ :deep(.el-input__inner),
|
|
|
+ :deep(.el-textarea__inner) {
|
|
|
+ color: rgba(0, 0, 0, 0.85) !important;
|
|
|
+ -webkit-text-fill-color: rgba(0, 0, 0, 0.85) !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|