From db42d47f5692ef64e5436c5a6d29dcb537b44596 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 26 一月 2026 16:36:13 +0800
Subject: [PATCH] 浪潮对接单点登录:mis调整

---
 src/views/procurementManagement/arrivalManagement/index.vue |  237 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 237 insertions(+), 0 deletions(-)

diff --git a/src/views/procurementManagement/arrivalManagement/index.vue b/src/views/procurementManagement/arrivalManagement/index.vue
new file mode 100644
index 0000000..a1b5eed
--- /dev/null
+++ b/src/views/procurementManagement/arrivalManagement/index.vue
@@ -0,0 +1,237 @@
+<template>
+  <div class="app-container">
+    <el-card class="search-card" shadow="never">
+      <el-form :model="searchForm" :inline="true">
+        <el-form-item label="閲囪喘璁㈠崟鍙凤細">
+          <el-input v-model="searchForm.orderNo" placeholder="璇疯緭鍏ヨ鍗曞彿" clearable />
+        </el-form-item>
+        <el-form-item label="渚涘簲鍟嗗悕绉帮細">
+          <el-input v-model="searchForm.supplierName" placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" clearable />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="handleSearch">鎼滅储</el-button>
+          <el-button @click="resetSearch">閲嶇疆</el-button>
+        </el-form-item>
+      </el-form>
+    </el-card>
+
+    <el-card class="table-card" shadow="never">
+      <div class="table-header">
+        <el-button type="primary" @click="openDialog('add')">鏂板鍒拌揣</el-button>
+        <el-button type="danger" @click="handleBatchDelete">鎵归噺鍒犻櫎</el-button>
+      </div>
+
+      <el-table :data="tableData" border v-loading="loading" @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="鍒拌揣鍗曞彿" prop="arrivalNo" width="180" />
+        <el-table-column label="閲囪喘璁㈠崟鍙�" prop="orderNo" width="180" />
+        <el-table-column label="渚涘簲鍟嗗悕绉�" prop="supplierName" />
+        <el-table-column label="鍒拌揣鐘舵��" prop="status" width="100">
+          <template #default="{ row }">
+            <el-tag :type="getStatusType(row.status)">{{ getStatusText(row.status) }}</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="鍒拌揣鏁伴噺" prop="arrivalQuantity" width="100" />
+        <el-table-column label="鍒拌揣鏃堕棿" prop="arrivalTime" width="180" />
+        <el-table-column label="鎿嶄綔" width="200" align="center">
+          <template #default="{ row }">
+            <el-button type="primary" link @click="openDialog('edit', row)">缂栬緫</el-button>
+            <el-button type="success" v-if="row.status === 'pending'" link @click="handleReceive(row)">鏀惰揣</el-button>
+            <el-button type="danger" link @click="handleDelete(row)">鍒犻櫎</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 鍒嗛〉 -->
+      <pagination
+          :total="total"
+          layout="total, sizes, prev, pager, next, jumper"
+          :page="pagination.current"
+          :limit="pagination.size"
+          @pagination="handleCurrentChange"
+      />
+    </el-card>
+
+    <FormDialog v-model="dialogVisible" :title="dialogType === 'add' ? '鏂板鍒拌揣' : '缂栬緫鍒拌揣'" :width="'600px'" :operation-type="dialogType" @close="dialogVisible = false" @confirm="handleSubmit" @cancel="dialogVisible = false">
+      <el-form :model="formData" label-width="120px">
+        <el-form-item label="鍒拌揣鍗曞彿">
+          <el-input v-model="formData.arrivalNo" placeholder="鍒拌揣鍗曞彿" />
+        </el-form-item>
+        <el-form-item label="閲囪喘璁㈠崟鍙�">
+          <el-input v-model="formData.orderNo" placeholder="閲囪喘璁㈠崟鍙�" />
+        </el-form-item>
+        <el-form-item label="渚涘簲鍟嗗悕绉�">
+          <el-input v-model="formData.supplierName" placeholder="渚涘簲鍟嗗悕绉�" />
+        </el-form-item>
+        <el-form-item label="鍒拌揣鏁伴噺">
+          <el-input-number  :min="0" v-model="formData.arrivalQuantity" placeholder="鍒拌揣鏁伴噺" />
+        </el-form-item>
+        <el-form-item label="澶囨敞">
+          <el-input v-model="formData.remark" type="textarea" :rows="3" placeholder="璇疯緭鍏ュ娉ㄤ俊鎭�" />
+        </el-form-item>
+      </el-form>
+    </FormDialog>
+  </div>
+</template>
+
+<script setup>
+import FormDialog from '@/components/Dialog/FormDialog.vue';
+import { ref, reactive,onMounted } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import {listPage,add,update,del} from "@/api/procurementManagement/arrivalManagement.js"
+import Pagination from '@/components/PIMTable/Pagination.vue'
+
+onMounted(() => {
+    getList()
+})
+
+const tableData = ref([])
+
+const getList = () => {
+  loading.value = true
+  listPage({...searchForm,...pagination}).then(res =>{
+    if(res.code === 200){
+      tableData.value = res.data.records
+      total.value = res.data.total
+      loading.value = false
+    }
+  })
+}
+
+const pagination = reactive({
+  current: 1,
+  size: 10
+})
+
+const total = ref(0)
+
+const handleCurrentChange = (val) => {
+  pagination.current = val.page
+  pagination.size = val.limit
+  getList()
+}
+
+const loading = ref(false)
+const dialogVisible = ref(false)
+const dialogType = ref('add')
+const selectedRows = ref([])
+
+const searchForm = reactive({
+  orderNo: '',
+  supplierName: ''
+})
+
+const formData = reactive({
+  arrivalNo: '',
+  arrivalQuantity: 0,
+  orderNo: '',
+  supplierName: '',
+  remark: '',
+  status: 'pending'
+})
+
+const getStatusType = (status) => {
+  const statusMap = { pending: 'warning', received: 'success', stored: 'info' }
+  return statusMap[status] || 'info'
+}
+
+const getStatusText = (status) => {
+  const statusMap = { pending: '寰呮敹璐�', received: '宸叉敹璐�', stored: '宸插叆搴�' }
+  return statusMap[status] || '鏈煡'
+}
+
+const handleSearch = () => {
+  loading.value = true
+  getList()
+}
+
+const resetSearch = () => {
+  Object.assign(searchForm, { orderNo: '', supplierName: '' })
+}
+
+const openDialog = (type, row = {}) => {
+  dialogType.value = type
+  if (type === 'edit' && row.id) {
+    obj.id = row.id
+    Object.assign(formData, { orderNo: row.orderNo, supplierName: row.supplierName, remark: row.remark, arrivalQuantity: row.arrivalQuantity,arrivalNo: row.arrivalNo })
+  } else {
+    Object.assign(formData, { orderNo: '', supplierName: '', remark: '',arrivalQuantity: 0,arrivalNo: '' })
+  }
+  dialogVisible.value = true
+}
+
+const obj = reactive({
+  id:''
+})
+
+const handleSubmit = () => {
+  if (dialogType.value === 'add') {
+    add(formData).then(res => {
+      if(res.code === 200){
+        ElMessage.success('鏂板鎴愬姛')
+        getList()
+      }
+    })
+  }else{
+    update({...formData, ...obj}).then(res => {
+      if(res.code === 200){
+        ElMessage.success('缂栬緫鎴愬姛')
+        getList()
+      }
+    })
+  }
+  dialogVisible.value = false
+}
+
+const handleReceive = (row) => {
+  row.status = 'received'
+  update(row).then(res => {
+    if(res.code === 200){
+      ElMessage.success('鏀惰揣鎴愬姛')
+      getList()
+    }
+  })
+}
+
+const handleDelete = (row) => {
+  ElMessageBox.confirm('纭畾瑕佸垹闄よ繖鏉¤褰曞悧锛�', '鎻愮ず', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning'
+  }).then(() => {
+    let ids = [row.id]
+    del(ids).then(res => {
+      if(res.code === 200){
+        ElMessage.success('鍒犻櫎鎴愬姛')
+        getList()
+      }
+    })
+  })
+}
+
+const handleBatchDelete = () => {
+  ElMessageBox.confirm('纭畾瑕佸垹闄ら�変腑鐨勮褰曞悧锛�', '鎻愮ず', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning'
+  }).then(() => {
+    let ids = selectedRows.value.map(item => item.id)
+    del(ids).then(res => {
+      if(res.code === 200){
+        ElMessage.success('鍒犻櫎鎴愬姛')
+        getList()
+      }
+    })
+  })
+}
+
+const handleSelectionChange = (rows) => {
+  selectedRows.value = rows
+}
+</script>
+
+<style scoped>
+.app-container { padding: 20px; }
+.search-card { margin-bottom: 20px; }
+.table-card { margin-bottom: 20px; }
+.table-header { margin-bottom: 20px; }
+</style>

--
Gitblit v1.9.3