Explorar o código

入库单管理

yangyuxuan hai 6 meses
pai
achega
ce4bf7c39b

+ 24 - 0
src/api/comprehensiveGuarantee/materialReserveManagement/InboundManagement.ts

@@ -0,0 +1,24 @@
+import request from '@/utils/request';
+// 查询
+export function getWarehousingEntry(params?: any) {
+  return request({
+    url: '/api/resource_provison/material/warehouse_inbound/list',
+    method: 'get',
+    params: params
+  });
+}
+//新增入库
+export function createWarehousingEntry(data) {
+  return request({
+    url: '/api/resource_provison/material/warehouse_inbound/create',
+    method: 'post',
+    data: data
+  });
+}
+//数据详情
+export function getWarehouseDetails(id) {
+  return request({
+    url: '/api/resource_provison/material/warehouse_inbound/info/' + id,
+    method: 'get'
+  });
+}

+ 9 - 0
src/api/comprehensiveGuarantee/materialReserveManagement/OutboundManagement.ts

@@ -0,0 +1,9 @@
+import request from '@/utils/request';
+// 查询
+export function getOutboundOrder(params?: any) {
+  return request({
+    url: '/api/resource_provison/material/warehouse_outbound/list',
+    method: 'get',
+    params: params
+  });
+}

+ 7 - 0
src/api/comprehensiveGuarantee/materialReserveManagement/warehouseManagement.ts

@@ -37,3 +37,10 @@ export function deleteMaterialRoot(id: string) {
     method: 'delete'
   });
 }
+//库房名称
+export function getWarehouseTree() {
+  return request({
+    url: '/api/resource_provison/material/warehouse_room/treeselect',
+    method: 'get'
+  });
+}

+ 11 - 0
src/types/components.d.ts

@@ -24,10 +24,15 @@ declare module 'vue' {
     DistributionMap: typeof import('./../components/Map/YztMap/DistributionMap.vue')['default']
     DrawMap: typeof import('./../components/Map/YztMap/DrawMap.vue')['default']
     Editor: typeof import('./../components/Editor/index.vue')['default']
+    ElAnchor: typeof import('element-plus/es')['ElAnchor']
+    ElAnchorLink: typeof import('element-plus/es')['ElAnchorLink']
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCheckboxButton: typeof import('element-plus/es')['ElCheckboxButton']
+    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
@@ -45,6 +50,7 @@ declare module 'vue' {
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
     ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
+    ElLink: typeof import('element-plus/es')['ElLink']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
@@ -54,12 +60,17 @@ declare module 'vue' {
     ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
+    ElSegmented: typeof import('element-plus/es')['ElSegmented']
     ElSelect: typeof import('element-plus/es')['ElSelect']
     ElSlider: typeof import('element-plus/es')['ElSlider']
+    ElStep: typeof import('element-plus/es')['ElStep']
+    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    ElTabPane: typeof import('element-plus/es')['ElTabPane']
+    ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']

+ 348 - 217
src/views/comprehensiveGuarantee/MaterialReserveManagement/InboundDetails.vue

@@ -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>
+<!--&lt;!&ndash;库存明细&ndash;&gt;-->
+<!--&lt;!&ndash;企业画像&ndash;&gt;-->
+<!--<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>-->
+<!--            &lt;!&ndash;            <el-row :gutter="10" class="mb8">&ndash;&gt;-->
+<!--            &lt;!&ndash;              <el-col :span="1.5">&ndash;&gt;-->
+<!--            &lt;!&ndash;                <el-button type="primary" icon="Plus" @click="handleAdd">新建</el-button>&ndash;&gt;-->
+<!--            &lt;!&ndash;              </el-col>&ndash;&gt;-->
+<!--            &lt;!&ndash;              <el-col :span="1.5">&ndash;&gt;-->
+<!--            &lt;!&ndash;                <el-button type="danger" plain :disabled="multiple" icon="Delete" @click="handleDelete(selectedRow)"> 删除 </el-button>&ndash;&gt;-->
+<!--            &lt;!&ndash;              </el-col>&ndash;&gt;-->
+<!--            &lt;!&ndash;            </el-row>&ndash;&gt;-->
+<!--          </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 />-->
+<!--          &lt;!&ndash;          <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">&ndash;&gt;-->
+<!--          &lt;!&ndash;            <template #default="scope">&ndash;&gt;-->
+<!--          &lt;!&ndash;              <el-button type="text" class="common-btn-text-primary" @click="handleedit(scope.row)">编辑</el-button>&ndash;&gt;-->
+<!--          &lt;!&ndash;              <el-button type="text" class="common-btn-text-primary" @click="handleDelete(scope.row)">移除</el-button>&ndash;&gt;-->
+<!--          &lt;!&ndash;            </template>&ndash;&gt;-->
+<!--          &lt;!&ndash;          </el-table-column>&ndash;&gt;-->
+<!--        </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>

+ 66 - 84
src/views/comprehensiveGuarantee/MaterialReserveManagement/InboundManagement.vue

@@ -11,31 +11,41 @@
           </el-row>
         </transition>
         <el-table ref="multipleTable" v-loading="loading" :data="tableData" border :max-height="maxHeight" style="width: 96%">
-          <el-table-column label="仓库编号" align="center" prop="table_id" width="150" fixed show-overflow-tooltip/>
-          <el-table-column label="采购单号" align="center" prop="purchase_order_id" width="80" show-overflow-tooltip/>
-          <el-table-column label="是否捐赠(是、否)" align="center" prop="is_donation" width="80" show-overflow-tooltip/>
-          <el-table-column label="运单号" align="center" prop="tracking_number" width="80" show-overflow-tooltip/>
-          <el-table-column label="捐赠人联系电话" align="center" prop="donor_phone" width="120" show-overflow-tooltip/>
-          <el-table-column label="捐赠人姓名" align="center" prop="donor_name" width="120" show-overflow-tooltip/>
-          <el-table-column label="审核人" align="center" prop="auditor" width="120" show-overflow-tooltip/>
-          <el-table-column label="企业名称" align="center" prop="company_name" width="120" show-overflow-tooltip/>
-          <el-table-column label="企业编号" align="center" prop="company_id" width="120" show-overflow-tooltip/>
-          <el-table-column label="分级信息" align="center" prop="grade_info" width="120" show-overflow-tooltip/>
-          <el-table-column label="类型(1_调拨入库、2_归还入库、3_回收入库)" align="center" prop="type" width="150" show-overflow-tooltip/>
-          <el-table-column label="供应商名称" align="center" prop="supplier_name" width="120" show-overflow-tooltip/>
-          <el-table-column label="创建时间" align="center" prop="create_time" width="120" show-overflow-tooltip/>
-          <el-table-column label="备注" align="center" prop="remarks" width="120" show-overflow-tooltip/>
-          <el-table-column label="供应商编号" align="center" prop="supplier_id" width="120" show-overflow-tooltip/>
-          <el-table-column label="完成时间" align="center" prop="completion_time" width="120" show-overflow-tooltip/>
-          <el-table-column label="计划完成时间" align="center" prop="planned_completion_time" width="120" show-overflow-tooltip/>
-          <el-table-column label="仓库名称" align="center" prop="warehouse_name" width="120" show-overflow-tooltip/>
-          <el-table-column label="库房名称" align="center" prop="storage_room_name" width="120" show-overflow-tooltip/>
-          <el-table-column label="入库单号" align="center" prop="inbound_order_id" width="120" show-overflow-tooltip/>
-          <el-table-column label="新增时间" align="center" prop="add_time" width="120" show-overflow-tooltip/>
-          <el-table-column label="入库单" align="center" fixed="right" width="88" class-name="small-padding fixed-width"/>
+          <el-table-column label="入库单号" align="center" prop="inbound_order_number" width="120" fixed />
+          <el-table-column label="仓库名称" align="center" prop="warehouse_name" width="150" />
+          <el-table-column label="库房名称" align="center" prop="room_name" width="120" />
+          <el-table-column label="类型" align="center" prop="type" width="150">
+            <template #default="scope">
+              <dict-tag :options="sys_store_type" :value="scope.row.type" />
+            </template>
+          </el-table-column>
+          <el-table-column label="供应商名称" align="center" prop="supplier_name" width="120" />
+          <el-table-column label="是否捐赠" align="center" prop="is_donation" width="80" >
+            <template #default="scope">
+              <dict-tag :options="sys_yes_no" :value="scope.row.is_donation" />
+            </template>
+          </el-table-column>
+          <el-table-column label="采购单号" align="center" prop="purchase_order_number" width="150" />
+          <el-table-column label="运单号" align="center" prop="transport_order_number" width="120" />
+          <el-table-column label="捐赠人联系电话" align="center" prop="donator_phone" width="120" />
+          <el-table-column label="捐赠人姓名" align="center" prop="donator_name" width="120" />
+          <el-table-column label="审核人" align="center" prop="reviewer" width="120" />
+          <el-table-column label="企业名称" align="center" prop="enterprise_name" width="120" />
+          <el-table-column label="企业编号" align="center" prop="enterprise_code" width="120" />
+          <el-table-column label="分级信息" align="center" prop="grading_info" width="120" />
+          <el-table-column label="创建时间" align="center" prop="creation_time" width="120" />
+          <el-table-column label="备注" align="center" prop="remark" width="120" />
+          <el-table-column label="供应商编号" align="center" prop="supplier_code" width="120" />
+          <el-table-column label="完成时间" align="center" prop="completion_time" width="120">
+
+          </el-table-column>
+          <el-table-column label="计划完成时间" align="center" prop="planned_completion_time" width="120" />
+<!--          <el-table-column label="仓库名称" align="center" prop="warehouse_name" width="120" />-->
+          <el-table-column label="新增时间" align="center" prop="new_time" width="120" />
+<!--          <el-table-column label="入库单" align="center" fixed="right" width="88" class-name="small-padding fixed-width"/>-->
           <el-table-column label="操作" align="center" fixed="right" width="88" class-name="small-padding fixed-width">
               <template #default="scope">
-                <el-button type="text" class="common-btn-text-primary" @click="handleWrite">查看</el-button>
+                <el-button type="text" class="common-btn-text-primary" @click="handleWrite(scope.row)">查看</el-button>
                 <el-button type="text" class="common-btn-text-primary" @click="handleView">明细</el-button>
               </template>
           </el-table-column>
@@ -45,18 +55,23 @@
           v-model:page="queryParams.page"
           v-model:limit="queryParams.pageSize"
           :total="total"
-          @change-page="handlePaginationChange"
+          @pagination="getListData"
         />
       </div>
     </div>
-    <addInbound v-if="addInboundState.show" @close="handleCancel" />
-    <InboundDetails v-if="inboundDetailsState.show" @close="handleCancel" />
+    <addInbound v-if="addInboundState.show" @close="handleCancel" @confirm="submitRefresh" />
+    <InboundDetails v-if="inboundDetailsState.show" :id="detailId" @close="handleCancel" />
   </div>
 </template>
 <script setup lang="ts">
 import addInbound from "./addInbound.vue";
 import InboundDetails from "./InboundDetails.vue";
-import { ref,reactive, onMounted, onBeforeUnmount } from "vue";
+import { ref, reactive, onMounted, onBeforeUnmount, toRefs } from 'vue';
+import { getWarehousingEntry } from '@/api/comprehensiveGuarantee/materialReserveManagement/InboundManagement';
+import { parseTime } from '@/utils/ruoyi';
+
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { sys_store_type, sys_yes_no } = toRefs<any>(proxy?.useDict('sys_store_type','sys_yes_no'));
 // 定义响应式变量
 const loading = ref(false);
 const maxHeight = ref(window.innerHeight * 0.8);
@@ -66,59 +81,29 @@ const handleResize = () => {
   maxHeight.value = window.innerHeight * 0.8;
 };
 const queryParams = reactive({
-  page: '1',
-  pageSize: '10',
+  page: 1,
+  pageSize: 10,
 });
+let detailId = ref('');
+const tableData = ref([]);
+const getListData = () => {
+  getWarehousingEntry(queryParams).then((res) => {
+    res.data.forEach((item) => {
+      item.completion_time = parseTime(item.completion_time);
+      item.creation_time = parseTime(item.creation_time);
+      item.new_time = parseTime(item.new_time);
+      item.planned_completion_time = parseTime(item.planned_completion_time);
+    })
+    tableData.value = res.data;
+    total.value = res.total;
+  })
+}
 
-const tableData = [
-  {
-    table_id: 'WH001',
-    purchase_order_id: 'PO001',
-    is_donation: '是',
-    tracking_number: 'TN001',
-    donor_phone: '13800138000',
-    donor_name: '张三',
-    auditor: '李四',
-    company_name: '某企业有限公司',
-    company_id: 'CMP001',
-    grade_info: 'A级',
-    type: '1_调拨入库',
-    supplier_name: '供应商甲',
-    create_time: '2023-10-01 10:00:00',
-    remarks: '无备注',
-    supplier_id: 'SPL001',
-    completion_time: '2023-10-02 14:00:00',
-    planned_completion_time: '2023-10-02 12:00:00',
-    warehouse_name: '一号仓库',
-    storage_room_name: '一号库房',
-    inbound_order_id: 'IO001',
-    add_time: '2023-10-01 09:00:00'
-  },
-  {
-    table_id: 'WH002',
-    purchase_order_id: 'PO002',
-    is_donation: '否',
-    tracking_number: 'TN002',
-    donor_phone: '13900139000',
-    donor_name: '李五',
-    auditor: '王六',
-    company_name: '另一家企业有限公司',
-    company_id: 'CMP002',
-    grade_info: 'B级',
-    type: '2_归还入库',
-    supplier_name: '供应商乙',
-    create_time: '2023-10-02 11:00:00',
-    remarks: '紧急入库',
-    supplier_id: 'SPL002',
-    completion_time: '2023-10-03 10:00:00',
-    planned_completion_time: '2023-10-03 09:00:00',
-    warehouse_name: '二号仓库',
-    storage_room_name: '二号库房',
-    inbound_order_id: 'IO002',
-    add_time: '2023-10-02 10:00:00'
-  },
-  // 可以根据需要添加更多数据
-];
+const submitRefresh = () => {
+  handleCancel();
+  queryParams.page = 1;
+  getListData();
+}
 
 const addInboundState = reactive({
   show: false, // 初始化show为false
@@ -141,21 +126,18 @@ const handleCancel = () => {
   inboundDetailsState.show = false;
 };
 
-const handleWrite = () => {
+const handleWrite = (item) => {
   inboundDetailsState.show=true;
+  detailId = item.id;
 };
 
 const handleView = () => {
   inboundDetailsState.show=true;
 };
 
-const handlePaginationChange = (page: number) => {
-  queryParams.page = page;
-  // fetchTableData(); //
-};
-
 onMounted(() => {
   window.addEventListener('resize', handleResize);
+  getListData();
 });
 
 // 在组件卸载前移除窗口大小变化监听器

+ 50 - 41
src/views/comprehensiveGuarantee/MaterialReserveManagement/OutboundManagement.vue

@@ -162,6 +162,7 @@
 import addOutbound from "./addOutbound.vue";
 import outboundDetails from "./outboundDetails.vue";
 import { ref,reactive, onMounted, onBeforeUnmount } from "vue";
+import { getOutboundOrder } from '@/api/comprehensiveGuarantee/materialReserveManagement/OutboundManagement';
 // 定义响应式变量
 const loading = ref(false);
 const maxHeight = ref(window.innerHeight * 0.8);
@@ -175,47 +176,54 @@ const queryParams = reactive({
   pageSize: '10',
 });
 
-const tableData = [
-  {
-    outboundOrderId: 'ORD001',
-    warehouseName: '仓库A',
-    totalVolume: '12345',
-    totalWeight: '50.0',
-    shippedTotalVolume: '11000',
-    shippedTotalWeight: '48.5',
-    totalQuantity: '100',
-    shippedTime: '2023-10-01 10:00:00',
-    disasterType: '洪水',
-    transportationOrgName: '物流公司X',
-    shipperName: '张三',
-    shipperPhone: '13800000001',
-    shipperAddress: '北京市海淀区某街道123号',
-    shipperRemarks: '请小心搬运',
-    recipientName: '李四',
-    recipientPhone: '13800000002',
-    recipientAddress: '上海市黄浦区某小区456号'
-  },
-  {
-    outboundOrderId: 'ORD002',
-    warehouseName: '仓库B',
-    totalVolume: '23456',
-    totalWeight: '75.0',
-    shippedTotalVolume: '22000',
-    shippedTotalWeight: '73.0',
-    totalQuantity: '150',
-    shippedTime: '2023-10-02 14:30:00',
-    disasterType: '地震',
-    transportationOrgName: '物流公司Y',
-    shipperName: '王五',
-    shipperPhone: '13800000003',
-    shipperAddress: '广州市天河区某路789号',
-    shipperRemarks: '无特殊要求',
-    recipientName: '赵六',
-    recipientPhone: '13800000004',
-    recipientAddress: '成都市武侯区某小区101号'
-  },
-  // 可以根据需要添加更多数据
-];
+// const tableData = [
+//   {
+//     outboundOrderId: 'ORD001',
+//     warehouseName: '仓库A',
+//     totalVolume: '12345',
+//     totalWeight: '50.0',
+//     shippedTotalVolume: '11000',
+//     shippedTotalWeight: '48.5',
+//     totalQuantity: '100',
+//     shippedTime: '2023-10-01 10:00:00',
+//     disasterType: '洪水',
+//     transportationOrgName: '物流公司X',
+//     shipperName: '张三',
+//     shipperPhone: '13800000001',
+//     shipperAddress: '北京市海淀区某街道123号',
+//     shipperRemarks: '请小心搬运',
+//     recipientName: '李四',
+//     recipientPhone: '13800000002',
+//     recipientAddress: '上海市黄浦区某小区456号'
+//   },
+//   {
+//     outboundOrderId: 'ORD002',
+//     warehouseName: '仓库B',
+//     totalVolume: '23456',
+//     totalWeight: '75.0',
+//     shippedTotalVolume: '22000',
+//     shippedTotalWeight: '73.0',
+//     totalQuantity: '150',
+//     shippedTime: '2023-10-02 14:30:00',
+//     disasterType: '地震',
+//     transportationOrgName: '物流公司Y',
+//     shipperName: '王五',
+//     shipperPhone: '13800000003',
+//     shipperAddress: '广州市天河区某路789号',
+//     shipperRemarks: '无特殊要求',
+//     recipientName: '赵六',
+//     recipientPhone: '13800000004',
+//     recipientAddress: '成都市武侯区某小区101号'
+//   },
+//   // 可以根据需要添加更多数据
+// ];
+
+const tableData = ref([]);
+const getDataList = () => {
+  getOutboundOrder().then((res) => {
+    tableData.value = res.data;
+  })
+}
 
 let addOutboundState = reactive({
   show: false, // 初始化show为false
@@ -256,6 +264,7 @@ const handlePaginationChange = (page: number) => {
 
 onMounted(() => {
   window.addEventListener('resize', handleResize);
+  getDataList();
 });
 
 // 在组件卸载前移除窗口大小变化监听器

+ 113 - 81
src/views/comprehensiveGuarantee/MaterialReserveManagement/addInbound.vue

@@ -7,54 +7,51 @@
       </div>
       <div class="common-dialog-box">
         <el-form ref="eventFormRef" :model="form" :rules="rules" label-width="120px">
-          <el-form-item label="仓库编号:" prop="warehouse_number">
-            <el-input v-model="form.warehouse_number" placeholder="请输入仓库编号" style="width: 468px" />
-          </el-form-item>
+<!--          <el-form-item label="仓库编号:" prop="warehouse_number">-->
+<!--            <el-input v-model="form.warehouse_number" placeholder="请输入仓库编号" style="width: 468px" />-->
+<!--          </el-form-item>-->
 
-          <el-form-item label="采购单号:" prop="purchase_order_id">
-            <el-input v-model="form.purchase_order_id" placeholder="请输入采购单号" style="width: 468px" />
+          <el-form-item label="采购单号:" prop="purchase_order_number">
+            <el-input v-model="form.purchase_order_number" placeholder="请输入采购单号" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="是否捐赠(是、否):" prop="is_donation">
+          <el-form-item label="是否捐赠:" prop="is_donation">
             <el-select v-model="form.is_donation" placeholder="请选择是否捐赠">
-              <el-option label="是" value="是"></el-option>
-              <el-option label="否" value="否"></el-option>
+              <el-option v-for="item in sys_yes_no" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
 
-          <el-form-item label="运单号:" prop="tracking_number">
-            <el-input v-model="form.tracking_number" placeholder="请输入运单号" style="width: 468px" />
+          <el-form-item label="运单号:" prop="transport_order_number">
+            <el-input v-model="form.transport_order_number" placeholder="请输入运单号" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="捐赠人联系电话:" prop="donor_phone">
-            <el-input v-model="form.donor_phone" placeholder="请输入捐赠人联系电话" style="width: 468px" />
+          <el-form-item label="捐赠人联系电话:" prop="donator_phone">
+            <el-input v-model="form.donator_phone" placeholder="请输入捐赠人联系电话" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="捐赠人姓名:" prop="donor_name">
-            <el-input v-model="form.donor_name" placeholder="请输入捐赠人姓名" style="width: 468px" />
+          <el-form-item label="捐赠人姓名:" prop="donator_name">
+            <el-input v-model="form.donator_name" placeholder="请输入捐赠人姓名" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="审核人:" prop="auditor">
-            <el-input v-model="form.auditor" placeholder="请输入审核人" style="width: 468px" />
+          <el-form-item label="审核人:" prop="reviewer">
+            <el-input v-model="form.reviewer" placeholder="请输入审核人" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="企业名称:" prop="company_name">
-            <el-input v-model="form.company_name" placeholder="请输入企业名称" style="width: 468px" />
+          <el-form-item label="企业名称:" prop="enterprise_name">
+            <el-input v-model="form.enterprise_name" placeholder="请输入企业名称" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="企业编号:" prop="company_id">
-            <el-input v-model="form.company_id" placeholder="请输入企业编号" style="width: 468px" />
+          <el-form-item label="企业编号:" prop="enterprise_code">
+            <el-input v-model="form.enterprise_code" placeholder="请输入企业编号" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="分级信息:" prop="grade_info">
-            <el-input v-model="form.grade_info" placeholder="请输入分级信息" style="width: 468px" />
+          <el-form-item label="分级信息:" prop="grading_info">
+            <el-input v-model="form.grading_info" placeholder="请输入分级信息" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="类型(1_调拨入库、2_归还入库、3_回收入库):" prop="type">
+          <el-form-item label="类型:" prop="type">
             <el-select v-model="form.type" placeholder="请选择类型">
-              <el-option label="调拨入库" value="1"></el-option>
-              <el-option label="归还入库" value="2"></el-option>
-              <el-option label="回收入库" value="3"></el-option>
+              <el-option v-for="item in sys_store_type" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
 
@@ -62,20 +59,20 @@
             <el-input v-model="form.supplier_name" placeholder="请输入供应商名称" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="创建时间:" prop="create_time">
-            <el-date-picker v-model="form.create_time" type="datetime" placeholder="请选择创建时间" style="width: 468px"></el-date-picker>
-          </el-form-item>
+<!--          <el-form-item label="创建时间:" prop="create_time">-->
+<!--            <el-date-picker v-model="form.create_time" type="datetime" placeholder="请选择创建时间" style="width: 468px"></el-date-picker>-->
+<!--          </el-form-item>-->
 
-          <el-form-item label="备注:" prop="remarks">
-            <el-input v-model="form.remarks" placeholder="请输入备注" style="width: 468px" />
+          <el-form-item label="备注:" prop="remark">
+            <el-input v-model="form.remark" placeholder="请输入备注" style="width: 468px" />
           </el-form-item>
 
-          <el-form-item label="供应商编号:" prop="supplier_id">
-            <el-input v-model="form.supplier_id" placeholder="请输入供应商编号" style="width: 468px" />
+          <el-form-item label="供应商编号:" prop="supplier_code">
+            <el-input v-model="form.supplier_code" placeholder="请输入供应商编号" style="width: 468px" />
           </el-form-item>
 
           <el-form-item label="完成时间:" prop="completion_time">
-            <el-date-picker v-model="form.completion_time" type="datetime" placeholder="请选择完成时间" style="width: 468px"></el-date-picker>
+            <el-date-picker v-model="form.completion_time" type="datetime" placeholder="请选择完成时间" value-format="YYYY-MM-DD" style="width: 468px"></el-date-picker>
           </el-form-item>
 
           <el-form-item label="计划完成时间:" prop="planned_completion_time">
@@ -83,91 +80,110 @@
               v-model="form.planned_completion_time"
               type="datetime"
               placeholder="请选择计划完成时间"
+              value-format="YYYY-MM-DD"
               style="width: 468px"
             ></el-date-picker>
           </el-form-item>
 
-          <el-form-item label="仓库名称:" prop="warehouse_name">
-            <el-input v-model="form.warehouse_name" placeholder="请输入仓库名称" style="width: 468px" />
-          </el-form-item>
+<!--          <el-form-item label="仓库名称:" prop="warehouse_name">-->
+<!--            <el-input v-model="form.warehouse_name" placeholder="请输入仓库名称" style="width: 468px" />-->
+<!--          </el-form-item>-->
 
-          <el-form-item label="库房名称:" prop="storage_room_name">
-            <el-input v-model="form.storage_room_name" placeholder="请输入库房名称" style="width: 468px" />
-          </el-form-item>
 
-          <el-form-item label="入库单号:" prop="inbound_order_id">
-            <el-input v-model="form.inbound_order_id" placeholder="请输入入库单号" style="width: 468px" />
+          <el-form-item label="库房名称:" prop="room_id">
+            <el-tree-select
+              v-model="form.room_id"
+              :data="warehouseName"
+              node-key="id"
+              placeholder="请选择库房名称"
+              :render-after-expand="false"
+            />
           </el-form-item>
 
-          <el-form-item label="新增时间:" prop="add_time">
-            <el-date-picker v-model="form.add_time" type="datetime" placeholder="请选择新增时间" style="width: 468px"></el-date-picker>
+          <el-form-item label="报告附件:" prop="filename">
+            <file-upload v-model="form.filename" :limit="1" :file-type="['xlsx','xls']" />
           </el-form-item>
+
+<!--          <el-form-item label="入库单号:" prop="inbound_order_id">-->
+<!--            <el-input v-model="form.inbound_order_id" placeholder="请输入入库单号" style="width: 468px" />-->
+<!--          </el-form-item>-->
+
+<!--          <el-form-item label="新增时间:" prop="add_time">-->
+<!--            <el-date-picker v-model="form.add_time" type="datetime" placeholder="请选择新增时间" style="width: 468px"></el-date-picker>-->
+<!--          </el-form-item>-->
         </el-form>
         <div class="common-dialog-footer">
           <el-button @click="closeDialog">取消</el-button>
-          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button>
+          <el-button :loading="buttonLoading" type="primary" @click="submitForm(eventFormRef)">确定</el-button>
         </div>
       </div>
     </div>
   </div>
 </template>
 <script setup lang="ts">
-import { ref, reactive, toRefs } from 'vue';
 import {
   createMaterial,
   updateMaterial
 } from "@/api/comprehensiveGuarantee/materialReserveManagement/materialInformation";
-const emits = defineEmits(['close']);
+import { reactive, ref, toRefs } from 'vue';
+import { getWarehouseTree } from '@/api/comprehensiveGuarantee/materialReserveManagement/warehouseManagement';
+import {
+  createWarehousingEntry,
+  getWarehousingEntry
+} from '@/api/comprehensiveGuarantee/materialReserveManagement/InboundManagement';
+import { deepClone } from '@/utils';
+const emits = defineEmits(['close','confirm']);
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { sys_store_type, sys_yes_no } = toRefs<any>(proxy?.useDict('sys_store_type','sys_yes_no'));
 const buttonLoading = ref(false);
+const eventFormRef = ref('');
 // 表单初始数据
 const initFormData = {
-  warehouse_number: 'WH001', // 仓库编号
-  purchase_order_id: 'PO123456', // 采购单号
-  is_donation: '否', // 是否捐赠(是、否)
-  tracking_number: 'TN789012', // 运单号
-  donor_phone: '13800138000', // 捐赠人联系电话
-  donor_name: '张三', // 捐赠人姓名
-  auditor: '李四', // 审核人
-  company_name: '某某企业有限公司', // 企业名称
-  company_id: 'ENT001', // 企业编号
-  grade_info: 'A级', // 分级信息
+  warehouse_id: 'WH001', // 仓库编号
+  purchase_order_number: '111', // 采购单号
+  is_donation: '', // 是否捐赠(是、否)
+  transport_order_number: 'TN789012', // 运单号
+  donator_phone: '13800138000', // 捐赠人联系电话
+  donator_name: '张三', // 捐赠人姓名
+  reviewer: '李四', // 审核人
+  enterprise_name: '某某企业有限公司', // 企业名称
+  enterprise_code: 'ENT001', // 企业编号
+  grading_info: 'A级', // 分级信息
   type: '1', // 类型(1_调拨入库、2_归还入库、3_回收入库)
   supplier_name: '供应商甲', // 供应商名称
-  create_time: '2023-10-01T08:00:00Z', // 创建时间(ISO 8601格式)
-  remarks: '这是备注信息', // 备注
-  supplier_id: 'SPL001', // 供应商编号
-  completion_time: '2023-10-05T16:00:00Z', // 完成时间
-  planned_completion_time: '2023-10-04T16:00:00Z', // 计划完成时间
-  warehouse_name: '一号仓库', // 仓库名称
-  storage_room_name: 'A区库房', // 库房名称
-  inbound_order_id: 'IO765432', // 入库单号
-  add_time: '2023-09-30T10:00:00Z' // 新增时间
+  remark: '这是备注信息', // 备注
+  supplier_code: 'SPL001', // 供应商编号
+  completion_time: '', // 完成时间
+  planned_completion_time: '', // 计划完成时间
+  room_id:'', //库房id
+  filename: [],  //附件
 };
 
 // 表单数据
 const data = reactive({
   form: { ...initFormData },
   rules: {
-    warehouse_number: [{ required: true, message: '仓库编号不能为空', trigger: 'blur' }],
-    purchase_order_id: [{ required: true, message: '采购单号不能为空', trigger: 'blur' }],
+    warehouse_id: [{ required: true, message: '仓库编号不能为空', trigger: 'blur' }],
+    purchase_order_number: [{ required: true, message: '采购单号不能为空', trigger: 'blur' }],
     is_donation: [{ required: true, message: '请选择是否捐赠', trigger: 'change' }],
-    tracking_number: [{ required: true, message: '运单号不能为空', trigger: 'blur' }],
-    donor_phone: [{ required: true, message: '捐赠人联系电话不能为空', trigger: 'blur' }],
-    donor_name: [{ required: true, message: '捐赠人姓名不能为空', trigger: 'blur' }],
-    auditor: [{ required: true, message: '审核人不能为空', trigger: 'blur' }],
-    company_name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
-    company_id: [{ required: true, message: '企业编号不能为空', trigger: 'blur' }],
-    grade_info: [{ required: true, message: '分级信息不能为空', trigger: 'blur' }],
+    transport_order_number: [{ required: true, message: '运单号不能为空', trigger: 'blur' }],
+    donator_phone: [{ required: true, message: '捐赠人联系电话不能为空', trigger: 'blur' }],
+    donator_name: [{ required: true, message: '捐赠人姓名不能为空', trigger: 'blur' }],
+    reviewer: [{ required: true, message: '审核人不能为空', trigger: 'blur' }],
+    enterprise_name: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
+    enterprise_code: [{ required: true, message: '企业编号不能为空', trigger: 'blur' }],
+    grading_info: [{ required: true, message: '分级信息不能为空', trigger: 'blur' }],
     type: [{ required: true, message: '请选择类型', trigger: 'change' }],
     supplier_name: [{ required: true, message: '供应商名称不能为空', trigger: 'blur' }],
-    create_time: [{ required: true, message: '请选择创建时间', trigger: 'change' }],
-    supplier_id: [{ required: true, message: '供应商编号不能为空', trigger: 'blur' }],
+    // create_time: [{ required: true, message: '请选择创建时间', trigger: 'change' }],
+    supplier_code: [{ required: true, message: '供应商编号不能为空', trigger: 'blur' }],
     completion_time: [{ required: true, message: '请选择完成时间', trigger: 'change' }],
     planned_completion_time: [{ required: true, message: '请选择计划完成时间', trigger: 'change' }],
-    warehouse_name: [{ required: true, message: '仓库名称不能为空', trigger: 'blur' }],
-    storage_room_name: [{ required: true, message: '库房名称不能为空', trigger: 'blur' }],
-    inbound_order_id: [{ required: true, message: '入库单号不能为空', trigger: 'blur' }],
-    add_time: [{ required: true, message: '请选择新增时间', trigger: 'change' }]
+    room_id: [{ required: true, message: '仓库名称不能为空', trigger: 'blur' }],
+    filename: [{ required: true, message: '附件不能为空', trigger: 'blur' }],
+    // storage_room_name: [{ required: true, message: '库房名称不能为空', trigger: 'blur' }],
+    // inbound_order_id: [{ required: true, message: '入库单号不能为空', trigger: 'blur' }],
+    // add_time: [{ required: true, message: '请选择新增时间', trigger: 'change' }]
   }
 });
 
@@ -176,10 +192,17 @@ const { form, rules } = toRefs(data);
 const closeDialog = () => {
   emits('close');
 };
+
 const submitForm = async (formEl) => {
   if (!formEl) return;
   await formEl.validate((valid, fields) => {
     if (valid) {
+      const temp = deepClone(form.value);
+      temp.filename = form.value.filename[0].url;
+      createWarehousingEntry(temp).then(() => {
+        proxy.$modal.msgSuccess('新增成功');
+        emits('confirm');
+      })
     } else {
       nextTick(() => {
         let isError = document.getElementsByClassName('is-error');
@@ -196,6 +219,15 @@ const submitForm = async (formEl) => {
     }
   });
 };
+const warehouseName = ref();
+const getWarehouseName = () => {
+  getWarehouseTree().then((res) => {
+    warehouseName.value = res.data;
+  })
+}
+onMounted(() => {
+  getWarehouseName();
+});
 </script>
 
 <style lang="scss" scoped>

+ 7 - 3
src/views/routineCommandMap/RightSection/index.vue

@@ -26,7 +26,7 @@
               <div class="gradient-text3 text1">{{ statisticalData.jd_value }}</div>
               <div class="text2">件</div>
             </div>
-            <div class="text3">{{ statisticalData.jd }}</div>
+            <div class="text3">{{ getChineseQuarter(statisticalData.jd) }}季度</div>
           </div>
         </div>
         <div class="box-item">
@@ -36,7 +36,7 @@
               <div class="text4">{{ statisticalData.yf_value }}</div>
               <div class="text2">件</div>
             </div>
-            <div class="text3">{{ statisticalData.yf }}</div>
+            <div class="text3">{{ statisticalData.yf }}月份</div>
           </div>
         </div>
       </div>
@@ -84,7 +84,7 @@ const { mm_event_type } = toRefs<any>(
   proxy?.useDict('mm_event_type')
 );
 const queryParams = reactive({
-  year: ['2024','2025']
+  year:'2025'
 });
 const yearOptions = reactive([{ name: '2024', value: '2024' },
   { name: '2025', value: '2025' }]);
@@ -160,6 +160,10 @@ const initData = () => {
     chartOption1.value.series[1].data = chartData2;
   });
 };
+const getChineseQuarter = (quarter: number): string => {
+  const chineseQuarters = ['一', '二', '三', '四'];
+  return chineseQuarters[quarter - 1] || '';
+};
 onMounted(() => {
   initData();
 });