Commit 19bafb73302b861194a56cf5f2c9fc365a27b490

Authored by wuxw
1 parent 1b089a33

v1.9 优化采购相关bug

src/api/resource/purchaseApplyDetailApi.js
@@ -36,6 +36,21 @@ export function auditApplyOrder(data) { @@ -36,6 +36,21 @@ export function auditApplyOrder(data) {
36 }) 36 })
37 } 37 }
38 38
  39 +export function auditAllocationStoreOrder(data) {
  40 + return new Promise((resolve, reject) => {
  41 + request({
  42 + url: '/resourceStore.auditAllocationStoreOrder',
  43 + method: 'post',
  44 + data
  45 + }).then(response => {
  46 + const res = response.data
  47 + resolve(res)
  48 + }).catch(error => {
  49 + reject(error)
  50 + })
  51 + })
  52 +}
  53 +
39 // 获取工作流审核信息 54 // 获取工作流审核信息
40 export function listWorkflowAuditInfo(params) { 55 export function listWorkflowAuditInfo(params) {
41 return new Promise((resolve, reject) => { 56 return new Promise((resolve, reject) => {
src/components/inspection/maintainanceTaskTransfer.vue
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
26 import { updateMaintainanceTask } from '@/api/inspection/maintainanceTaskManageApi' 26 import { updateMaintainanceTask } from '@/api/inspection/maintainanceTaskManageApi'
27 import { getCommunityId } from '@/api/community/communityApi' 27 import { getCommunityId } from '@/api/community/communityApi'
28 import { queryStaffInfos } from '@/api/staff/staffApi.js' 28 import { queryStaffInfos } from '@/api/staff/staffApi.js'
  29 +import { getUserId } from '@/api/user/userApi'
29 30
30 31
31 export default { 32 export default {
@@ -78,7 +79,7 @@ export default { @@ -78,7 +79,7 @@ export default {
78 this.form = { 79 this.form = {
79 ...this.form, 80 ...this.form,
80 ...data, 81 ...data,
81 - currentUserId: this.$store.getters.userId, 82 + currentUserId: getUserId(),
82 communityId: getCommunityId() 83 communityId: getCommunityId()
83 } 84 }
84 this.loadStaffs() 85 this.loadStaffs()
src/components/resource/AddResourceAuditFlow.vue
1 <template> 1 <template>
2 - <el-dialog  
3 - :title="$t('resourceAuditFlow.addTitle')"  
4 - :visible.sync="dialogVisible"  
5 - width="600px"  
6 - @close="handleClose"  
7 - > 2 + <el-dialog :title="$t('resourceAuditFlow.addTitle')" :visible.sync="dialogVisible" width="600px" @close="handleClose">
8 <el-form ref="form" :model="form" :rules="rules" label-width="120px"> 3 <el-form ref="form" :model="form" :rules="rules" label-width="120px">
9 - <el-form-item  
10 - :label="$t('resourceAuditFlow.flowName')"  
11 - prop="flowName"  
12 - :label-width="formLabelWidth"  
13 - >  
14 - <el-input  
15 - v-model="form.flowName"  
16 - :placeholder="$t('resourceAuditFlow.flowNamePlaceholder')"  
17 - /> 4 + <el-form-item :label="$t('resourceAuditFlow.flowName')" prop="flowName" :label-width="formLabelWidth">
  5 + <el-input v-model="form.flowName" :placeholder="$t('resourceAuditFlow.flowNamePlaceholder')" />
18 </el-form-item> 6 </el-form-item>
19 -  
20 - <el-form-item  
21 - :label="$t('resourceAuditFlow.flowType')"  
22 - prop="auditType"  
23 - :label-width="formLabelWidth"  
24 - >  
25 - <el-select  
26 - v-model="form.auditType"  
27 - :placeholder="$t('resourceAuditFlow.flowTypePlaceholder')"  
28 - style="width:100%"  
29 - >  
30 - <el-option  
31 - :label="$t('resourceAuditFlow.purchaseFlow')"  
32 - value="10001"  
33 - />  
34 - <el-option  
35 - :label="$t('resourceAuditFlow.receiveFlow')"  
36 - value="10002"  
37 - />  
38 - <el-option  
39 - :label="$t('resourceAuditFlow.transferFlow')"  
40 - value="10003"  
41 - /> 7 +
  8 + <el-form-item :label="$t('resourceAuditFlow.flowType')" prop="auditType" :label-width="formLabelWidth">
  9 + <el-select v-model="form.auditType" :placeholder="$t('resourceAuditFlow.flowTypePlaceholder')"
  10 + style="width:100%">
  11 + <el-option :label="$t('resourceAuditFlow.purchaseFlow')" value="10001" />
  12 + <el-option :label="$t('resourceAuditFlow.receiveFlow')" value="10002" />
  13 + <el-option :label="$t('resourceAuditFlow.transferFlow')" value="10003" />
42 </el-select> 14 </el-select>
43 </el-form-item> 15 </el-form-item>
44 -  
45 - <el-form-item  
46 - :label="$t('resourceAuditFlow.remark')"  
47 - prop="remark"  
48 - :label-width="formLabelWidth"  
49 - >  
50 - <el-input  
51 - v-model="form.remark"  
52 - type="textarea"  
53 - :rows="3"  
54 - :placeholder="$t('resourceAuditFlow.remarkPlaceholder')"  
55 - /> 16 +
  17 + <el-form-item :label="$t('resourceAuditFlow.remark')" prop="remark" :label-width="formLabelWidth">
  18 + <el-input v-model="form.remark" type="textarea" :rows="3"
  19 + :placeholder="$t('resourceAuditFlow.remarkPlaceholder')" />
56 </el-form-item> 20 </el-form-item>
57 </el-form> 21 </el-form>
58 - 22 +
59 <div slot="footer" class="dialog-footer"> 23 <div slot="footer" class="dialog-footer">
60 <el-button @click="dialogVisible = false"> 24 <el-button @click="dialogVisible = false">
61 {{ $t('resourceAuditFlow.cancel') }} 25 {{ $t('resourceAuditFlow.cancel') }}
@@ -112,16 +76,16 @@ export default { @@ -112,16 +76,16 @@ export default {
112 if (valid) { 76 if (valid) {
113 try { 77 try {
114 const res = await saveResourceAuditFlow(this.form) 78 const res = await saveResourceAuditFlow(this.form)
115 - if (res.code === 0) {  
116 - this.$message.success(this.$t('common.addSuccess')) 79 + if (res.code == 0) {
  80 + this.$message.success(this.$t('common.submitSuccess'))
117 this.dialogVisible = false 81 this.dialogVisible = false
118 this.$emit('success') 82 this.$emit('success')
119 } else { 83 } else {
120 - this.$message.error(res.msg || this.$t('common.addFailed')) 84 + this.$message.error(res.msg || this.$t('common.submitFailed'))
121 } 85 }
122 } catch (error) { 86 } catch (error) {
123 console.error('添加审批流程失败:', error) 87 console.error('添加审批流程失败:', error)
124 - this.$message.error(this.$t('common.addFailed')) 88 + this.$message.error(this.$t('common.submitFailed'))
125 } 89 }
126 } 90 }
127 }) 91 })
src/components/resource/AddStorehouse.vue
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <el-form-item prop="purchaseRafId"> 40 <el-form-item prop="purchaseRafId">
41 <el-select v-model="form.purchaseRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')" 41 <el-select v-model="form.purchaseRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
42 style="width:100%"> 42 style="width:100%">
43 - <el-option v-for="item in flows.filter(f => f.auditType === '10001')" :key="item.rafId" 43 + <el-option v-for="item in flows.filter(f => f.flowType === '5005')" :key="item.rafId"
44 :label="item.flowName" :value="item.rafId" /> 44 :label="item.flowName" :value="item.rafId" />
45 </el-select> 45 </el-select>
46 </el-form-item> 46 </el-form-item>
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 <el-form-item prop="useRafId"> 57 <el-form-item prop="useRafId">
58 <el-select v-model="form.useRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')" 58 <el-select v-model="form.useRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
59 style="width:100%"> 59 style="width:100%">
60 - <el-option v-for="item in flows.filter(f => f.auditType === '10001')" :key="item.rafId" 60 + <el-option v-for="item in flows.filter(f => f.flowType === '6006')" :key="item.rafId"
61 :label="item.flowName" :value="item.rafId" /> 61 :label="item.flowName" :value="item.rafId" />
62 </el-select> 62 </el-select>
63 </el-form-item> 63 </el-form-item>
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 <el-form-item prop="allocationRafId"> 74 <el-form-item prop="allocationRafId">
75 <el-select v-model="form.allocationRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')" 75 <el-select v-model="form.allocationRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
76 style="width:100%"> 76 style="width:100%">
77 - <el-option v-for="item in flows.filter(f => f.auditType === '10001')" :key="item.rafId" 77 + <el-option v-for="item in flows.filter(f => f.flowType === '7007')" :key="item.rafId"
78 :label="item.flowName" :value="item.rafId" /> 78 :label="item.flowName" :value="item.rafId" />
79 </el-select> 79 </el-select>
80 </el-form-item> 80 </el-form-item>
src/components/resource/EditStorehouse.vue
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 <el-form-item prop="purchaseRafId"> 47 <el-form-item prop="purchaseRafId">
48 <el-select v-model="form.purchaseRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')" 48 <el-select v-model="form.purchaseRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
49 style="width:100%"> 49 style="width:100%">
50 - <el-option v-for="item in flows.filter(f => f.auditType === '10001')" :key="item.rafId" 50 + <el-option v-for="item in flows.filter(f => f.flowType === '5005')" :key="item.rafId"
51 :label="item.flowName" :value="item.rafId" /> 51 :label="item.flowName" :value="item.rafId" />
52 </el-select> 52 </el-select>
53 </el-form-item> 53 </el-form-item>
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 <el-form-item prop="useRafId"> 65 <el-form-item prop="useRafId">
66 <el-select v-model="form.useRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')" 66 <el-select v-model="form.useRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
67 style="width:100%"> 67 style="width:100%">
68 - <el-option v-for="item in flows.filter(f => f.auditType === '10001')" :key="item.rafId" 68 + <el-option v-for="item in flows.filter(f => f.flowType === '6006')" :key="item.rafId"
69 :label="item.flowName" :value="item.rafId" /> 69 :label="item.flowName" :value="item.rafId" />
70 </el-select> 70 </el-select>
71 </el-form-item> 71 </el-form-item>
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 <el-form-item prop="allocationRafId"> 82 <el-form-item prop="allocationRafId">
83 <el-select v-model="form.allocationRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')" 83 <el-select v-model="form.allocationRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
84 style="width:100%"> 84 style="width:100%">
85 - <el-option v-for="item in flows.filter(f => f.auditType === '10001')" :key="item.rafId" 85 + <el-option v-for="item in flows.filter(f => f.flowType === '7007')" :key="item.rafId"
86 :label="item.flowName" :value="item.rafId" /> 86 :label="item.flowName" :value="item.rafId" />
87 </el-select> 87 </el-select>
88 </el-form-item> 88 </el-form-item>
@@ -167,7 +167,7 @@ export default { @@ -167,7 +167,7 @@ export default {
167 await updateStorehouse(this.form) 167 await updateStorehouse(this.form)
168 this.$emit('success') 168 this.$emit('success')
169 this.close() 169 this.close()
170 - this.$message.success(this.$t('storehouseManage.messages.updateSuccess')) 170 + this.$message.success(this.$t('common.submitSuccess'))
171 } catch (error) { 171 } catch (error) {
172 if (error.message) { 172 if (error.message) {
173 this.$message.error(error.message) 173 this.$message.error(error.message)
src/components/resource/allocationAuditDiv.vue 0 → 100644
  1 +<template>
  2 + <el-card width="50%" >
  3 + <el-form ref="form" :model="formData" label-width="120px">
  4 + <el-form-item :label="$t('auditDiv.action')" prop="auditCode">
  5 + <el-select v-model="formData.auditCode" :placeholder="$t('auditDiv.pleaseSelect')" style="width: 100%">
  6 + <el-option value="" disabled :label="$t('auditDiv.pleaseSelect')"></el-option>
  7 + <el-option v-if="nextAudit.next || nextAudit.exit" value="1100" :label="$t('auditDiv.agree')"></el-option>
  8 + <el-option v-if="nextAudit.back" value="1200" :label="$t('auditDiv.return')"></el-option>
  9 + <el-option v-if="nextAudit.backIndex" value="1400" :label="$t('auditDiv.returnToSubmitter')"></el-option>
  10 + <el-option value="1300" :label="$t('auditDiv.transfer')"></el-option>
  11 + </el-select>
  12 + </el-form-item>
  13 +
  14 + <el-form-item :label="$t('auditDiv.workOrderDescription')" prop="auditMessage">
  15 + <el-input type="textarea" :placeholder="$t('auditDiv.requiredDescription')" v-model="formData.auditMessage"
  16 + :rows="4"></el-input>
  17 + </el-form-item>
  18 +
  19 + <el-form-item v-if="(formData.auditCode === '1100' && nextAudit.assignee === '-2') || formData.auditCode === '1300'"
  20 + :label="$t('auditDiv.nextHandler')" prop="staffName">
  21 + <el-input v-model="formData.staffName" :placeholder="$t('auditDiv.requiredNextHandler')" disabled
  22 + style="width: calc(100% - 100px); margin-right: 10px;"></el-input>
  23 + <el-button @click="chooseStaff">
  24 + <i class="el-icon-search"></i>
  25 + {{ $t('auditDiv.select') }}
  26 + </el-button>
  27 + </el-form-item>
  28 + </el-form>
  29 +
  30 + <div class="dialog-footer">
  31 + <el-button type="primary" @click="handleSubmit">{{ $t('common.submit') }}</el-button>
  32 + </div>
  33 + <select-staff ref="selectStaff" @selectStaff="handleStaffChange"></select-staff>
  34 + </el-card>
  35 +</template>
  36 +
  37 +<script>
  38 +import { queryNextDealUser,auditAllocationStoreOrder } from '@/api/resource/purchaseApplyDetailApi'
  39 +import SelectStaff from '@/components/staff/SelectStaff'
  40 +
  41 +export default {
  42 + name: 'AllocationAuditDiv',
  43 + components: {
  44 + SelectStaff
  45 + },
  46 + data() {
  47 + return {
  48 + visible: false,
  49 + formData: {
  50 + auditCode: '',
  51 + auditMessage: '',
  52 + staffId: '',
  53 + staffName: '',
  54 + taskId: '',
  55 + flowId: '',
  56 + id: ''
  57 + },
  58 + nextAudit: {},
  59 + createUserId: ''
  60 + }
  61 + },
  62 + methods: {
  63 + open(data) {
  64 + this.formData.taskId = data.taskId
  65 + this.formData.flowId = data.flowId
  66 + this.formData.id = data.id
  67 + this.createUserId = data.createUserId
  68 + this.loadNextAuditPerson()
  69 + },
  70 + async loadNextAuditPerson() {
  71 + try {
  72 + const params = {
  73 + taskId: this.formData.taskId,
  74 + startUserId: this.createUserId
  75 + }
  76 + const res = await queryNextDealUser(params)
  77 + if (res.code == '0') {
  78 + this.nextAudit = res.data[0]
  79 + }
  80 + } catch (error) {
  81 + console.error('获取下一处理人失败:', error)
  82 + }
  83 + },
  84 + chooseStaff() {
  85 + this.$refs.selectStaff.open({
  86 + from: 'purchase',
  87 + call: (staff) => {
  88 + this.formData.staffId = staff.staffId
  89 + this.formData.staffName = staff.staffName
  90 + }
  91 + })
  92 + },
  93 + async handleSubmit() {
  94 + if (!this.formData.auditCode) {
  95 + this.$message.warning(this.$t('auditDiv.pleaseSelectStatus'))
  96 + return
  97 + }
  98 + if (!this.formData.auditMessage) {
  99 + this.$message.warning(this.$t('auditDiv.pleaseFillDescription'))
  100 + return
  101 + }
  102 + if (this.formData.auditCode !== '1200' &&
  103 + this.formData.auditCode !== '1400' &&
  104 + !this.formData.staffId) {
  105 + this.$message.warning(this.$t('auditDiv.pleaseSelectNextHandler'))
  106 + return
  107 + }
  108 +
  109 + if (this.nextAudit.assignee !== '-2') {
  110 + this.formData.staffId = this.nextAudit.assignee
  111 + }
  112 +
  113 + try {
  114 + const res = await auditAllocationStoreOrder(this.formData)
  115 + if (res.code == 0) {
  116 + this.$message.success(this.$t('common.submitSuccess'))
  117 + this.$router.go(-1)
  118 + this.$emit('success')
  119 + } else {
  120 + this.$message.error(res.msg)
  121 + }
  122 + } catch (error) {
  123 + console.error('提交审核失败:', error)
  124 + this.$message.error(this.$t('auditDiv.submitFailed'))
  125 + }
  126 + },
  127 + handleClose() {
  128 + this.$refs.form.resetFields()
  129 + this.formData = {
  130 + auditCode: '',
  131 + auditMessage: '',
  132 + staffId: '',
  133 + staffName: '',
  134 + taskId: '',
  135 + flowId: '',
  136 + id: ''
  137 + }
  138 + this.nextAudit = {}
  139 + },
  140 + handleStaffChange(staff) {
  141 + this.formData.staffId = staff.staffId
  142 + this.formData.staffName = staff.staffName
  143 + }
  144 + }
  145 +}
  146 +</script>
0 \ No newline at end of file 147 \ No newline at end of file
src/components/resource/auditDiv.vue
1 <template> 1 <template>
2 - <el-dialog :title="$t('auditDiv.workOrderProcessing')" :visible.sync="visible" width="50%" @close="handleClose"> 2 + <el-card width="50%" >
3 <el-form ref="form" :model="formData" label-width="120px"> 3 <el-form ref="form" :model="formData" label-width="120px">
4 <el-form-item :label="$t('auditDiv.action')" prop="auditCode"> 4 <el-form-item :label="$t('auditDiv.action')" prop="auditCode">
5 <el-select v-model="formData.auditCode" :placeholder="$t('auditDiv.pleaseSelect')" style="width: 100%"> 5 <el-select v-model="formData.auditCode" :placeholder="$t('auditDiv.pleaseSelect')" style="width: 100%">
@@ -27,21 +27,21 @@ @@ -27,21 +27,21 @@
27 </el-form-item> 27 </el-form-item>
28 </el-form> 28 </el-form>
29 29
30 - <span slot="footer" class="dialog-footer">  
31 - <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button> 30 + <div class="dialog-footer">
32 <el-button type="primary" @click="handleSubmit">{{ $t('common.submit') }}</el-button> 31 <el-button type="primary" @click="handleSubmit">{{ $t('common.submit') }}</el-button>
33 - </span>  
34 - </el-dialog> 32 + </div>
  33 + <select-staff ref="selectStaff" @selectStaff="handleStaffChange"></select-staff>
  34 + </el-card>
35 </template> 35 </template>
36 36
37 <script> 37 <script>
38 import { queryNextDealUser,auditApplyOrder } from '@/api/resource/purchaseApplyDetailApi' 38 import { queryNextDealUser,auditApplyOrder } from '@/api/resource/purchaseApplyDetailApi'
39 -//import SelectStaff from '@/components/resource/selectStaff' 39 +import SelectStaff from '@/components/staff/SelectStaff'
40 40
41 export default { 41 export default {
42 name: 'AuditDiv', 42 name: 'AuditDiv',
43 components: { 43 components: {
44 - // SelectStaff 44 + SelectStaff
45 }, 45 },
46 data() { 46 data() {
47 return { 47 return {
@@ -65,7 +65,6 @@ export default { @@ -65,7 +65,6 @@ export default {
65 this.formData.flowId = data.flowId 65 this.formData.flowId = data.flowId
66 this.formData.id = data.id 66 this.formData.id = data.id
67 this.createUserId = data.createUserId 67 this.createUserId = data.createUserId
68 - this.visible = true  
69 this.loadNextAuditPerson() 68 this.loadNextAuditPerson()
70 }, 69 },
71 async loadNextAuditPerson() { 70 async loadNextAuditPerson() {
@@ -75,7 +74,7 @@ export default { @@ -75,7 +74,7 @@ export default {
75 startUserId: this.createUserId 74 startUserId: this.createUserId
76 } 75 }
77 const res = await queryNextDealUser(params) 76 const res = await queryNextDealUser(params)
78 - if (res.code === '0') { 77 + if (res.code == '0') {
79 this.nextAudit = res.data[0] 78 this.nextAudit = res.data[0]
80 } 79 }
81 } catch (error) { 80 } catch (error) {
@@ -115,7 +114,7 @@ export default { @@ -115,7 +114,7 @@ export default {
115 const res = await auditApplyOrder(this.formData) 114 const res = await auditApplyOrder(this.formData)
116 if (res.code === 0) { 115 if (res.code === 0) {
117 this.$message.success(this.$t('auditDiv.submitSuccess')) 116 this.$message.success(this.$t('auditDiv.submitSuccess'))
118 - this.visible = false 117 + this.$router.go(-1)
119 this.$emit('success') 118 this.$emit('success')
120 } else { 119 } else {
121 this.$message.error(res.msg) 120 this.$message.error(res.msg)
@@ -137,6 +136,10 @@ export default { @@ -137,6 +136,10 @@ export default {
137 id: '' 136 id: ''
138 } 137 }
139 this.nextAudit = {} 138 this.nextAudit = {}
  139 + },
  140 + handleStaffChange(staff) {
  141 + this.formData.staffId = staff.staffId
  142 + this.formData.staffName = staff.staffName
140 } 143 }
141 } 144 }
142 } 145 }
src/components/staff/StaffAttendanceDetail.vue
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 22
23 <script> 23 <script>
24 import { queryAttendanceLog } from '@/api/staff/adminStaffDetailApi' 24 import { queryAttendanceLog } from '@/api/staff/adminStaffDetailApi'
  25 + import { getCommunityId } from '@/api/community/communityApi'
25 26
26 export default { 27 export default {
27 name: 'StaffAttendanceDetail', 28 name: 'StaffAttendanceDetail',
@@ -38,7 +39,7 @@ @@ -38,7 +39,7 @@
38 this.visible = true 39 this.visible = true
39 try { 40 try {
40 const { data } = await queryAttendanceLog({ 41 const { data } = await queryAttendanceLog({
41 - communityId: this.$store.getters.currentCommunityId, 42 + communityId: getCommunityId(),
42 staffId: param.staffId, 43 staffId: param.staffId,
43 date: param.date, 44 date: param.date,
44 page: 1, 45 page: 1,
src/components/work/dispatchRepair.vue
@@ -126,7 +126,7 @@ export default { @@ -126,7 +126,7 @@ export default {
126 context: '', 126 context: '',
127 action: '', 127 action: '',
128 repairTypeUsers: [], 128 repairTypeUsers: [],
129 - currentUserId: this.$store.getters.userId 129 + currentUserId: getUserId()
130 } 130 }
131 } 131 }
132 } 132 }
src/components/work/editOwnerRepair.vue
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 43
44 <script> 44 <script>
45 import { updateOwnerRepair,listRepairSettings } from '@/api/work/ownerRepairManageApi' 45 import { updateOwnerRepair,listRepairSettings } from '@/api/work/ownerRepairManageApi'
46 -import { getCommunityId } from '@/api/community/communityApi' 46 +import { getCommunityId,getCommunityName } from '@/api/community/communityApi'
47 47
48 export default { 48 export default {
49 name: 'EditOwnerRepair', 49 name: 'EditOwnerRepair',
@@ -100,7 +100,7 @@ export default { @@ -100,7 +100,7 @@ export default {
100 try { 100 try {
101 if (this.formData.repairObjType === '001') { 101 if (this.formData.repairObjType === '001') {
102 this.formData.repairObjId = getCommunityId() 102 this.formData.repairObjId = getCommunityId()
103 - this.formData.repairObjName = this.$store.getters.community.name 103 + this.formData.repairObjName = getCommunityName()
104 } 104 }
105 105
106 const data = { 106 const data = {
src/i18n/commonLang.js
@@ -57,6 +57,7 @@ export const messages = { @@ -57,6 +57,7 @@ export const messages = {
57 audit:'Audit', 57 audit:'Audit',
58 choose:'Choose', 58 choose:'Choose',
59 submitSuccess:'Submit successfully', 59 submitSuccess:'Submit successfully',
  60 + submitFailed:'Submit failed',
60 saveSuccess:'successfully', 61 saveSuccess:'successfully',
61 noData:'No Data', 62 noData:'No Data',
62 file:'File', 63 file:'File',
@@ -124,6 +125,7 @@ export const messages = { @@ -124,6 +125,7 @@ export const messages = {
124 audit:'审核', 125 audit:'审核',
125 choose:'选择', 126 choose:'选择',
126 submitSuccess:'提交成功', 127 submitSuccess:'提交成功',
  128 + submitFailed:'提交失败',
127 saveSuccess:'成功', 129 saveSuccess:'成功',
128 noData:'暂无数据', 130 noData:'暂无数据',
129 file:'附件', 131 file:'附件',
src/views/contract/contractApplyAuditOrdersList.vue
@@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
47 import { queryContractTask, needAuditContract,listWorkflowStepStaffs } from '@/api/contract/contractApplyAuditOrdersApi' 47 import { queryContractTask, needAuditContract,listWorkflowStepStaffs } from '@/api/contract/contractApplyAuditOrdersApi'
48 import { getCommunityId } from '@/api/community/communityApi' 48 import { getCommunityId } from '@/api/community/communityApi'
49 import FlowAudit from '@/components/contract/flowAudit' 49 import FlowAudit from '@/components/contract/flowAudit'
  50 +import { getUserId } from '@/api/user/userApi'
50 51
51 export default { 52 export default {
52 name: 'ContractApplyAuditOrdersList', 53 name: 'ContractApplyAuditOrdersList',
@@ -79,7 +80,7 @@ export default { @@ -79,7 +80,7 @@ export default {
79 }, 80 },
80 created() { 81 created() {
81 this.communityId = getCommunityId() 82 this.communityId = getCommunityId()
82 - this.contractApplyAuditOrdersInfo.currentUserId = this.$store.getters.userId 83 + this.contractApplyAuditOrdersInfo.currentUserId = getUserId()
83 this._listAuditOrders(this.page.current, this.page.size) 84 this._listAuditOrders(this.page.current, this.page.size)
84 this._loadStepStaff() 85 this._loadStepStaff()
85 }, 86 },
src/views/contract/contractChangeAuditOrdersList.vue
@@ -49,6 +49,7 @@ @@ -49,6 +49,7 @@
49 <script> 49 <script>
50 import { queryContractChangeTask, needAuditContractPlan } from '@/api/resource/contractChangeAuditOrdersApi' 50 import { queryContractChangeTask, needAuditContractPlan } from '@/api/resource/contractChangeAuditOrdersApi'
51 import FlowAudit from '@/components/contract/flowAudit' 51 import FlowAudit from '@/components/contract/flowAudit'
  52 +import { getUserId } from '@/api/user/userApi'
52 53
53 export default { 54 export default {
54 name: 'ContractChangeAuditOrdersList', 55 name: 'ContractChangeAuditOrdersList',
@@ -81,7 +82,7 @@ export default { @@ -81,7 +82,7 @@ export default {
81 } 82 }
82 }, 83 },
83 created() { 84 created() {
84 - this.currentUserId = this.$store.getters.userId 85 + this.contractChangeAuditOrdersInfo.currentUserId = getUserId()
85 this._listAuditOrders(this.page.current, this.page.size) 86 this._listAuditOrders(this.page.current, this.page.size)
86 }, 87 },
87 methods: { 88 methods: {
src/views/fee/printPayFeeBangTaiList.vue
@@ -109,7 +109,7 @@ @@ -109,7 +109,7 @@
109 109
110 <script> 110 <script>
111 import { queryFeeReceipt, queryFeeReceiptDetail, queryFeePrintSpec } from '@/api/fee/printPayFeeBangTaiApi' 111 import { queryFeeReceipt, queryFeeReceiptDetail, queryFeePrintSpec } from '@/api/fee/printPayFeeBangTaiApi'
112 -import { getCommunityId } from '@/api/community/communityApi' 112 +import { getCommunityId,getCommunityName } from '@/api/community/communityApi'
113 import { getUserId,getUserName } from '@/api/user/userApi' 113 import { getUserId,getUserName } from '@/api/user/userApi'
114 import { dateFormat } from '@/utils/dateUtil' 114 import { dateFormat } from '@/utils/dateUtil'
115 import { changeNumMoneyToChinese } from '@/utils/moneyUtil' 115 import { changeNumMoneyToChinese } from '@/utils/moneyUtil'
@@ -157,7 +157,7 @@ export default { @@ -157,7 +157,7 @@ export default {
157 } 157 }
158 }, 158 },
159 async loadData() { 159 async loadData() {
160 - this.printPayFeeInfo.communityName = this.$store.getters.currentCommunity.name 160 + this.printPayFeeInfo.communityName = getCommunityName()
161 await this.loadReceipt() 161 await this.loadReceipt()
162 await this.loadPrintSpec() 162 await this.loadPrintSpec()
163 }, 163 },
src/views/oa/newOaWorkflowDoingList.vue
@@ -146,7 +146,7 @@ export default { @@ -146,7 +146,7 @@ export default {
146 page: 1, 146 page: 1,
147 row: 10 147 row: 10
148 } 148 }
149 - const data = await getUndoInfo(params) 149 + const {data} = await getUndoInfo(params)
150 Object.assign(this.newOaWorkflowDoingInfo, data) 150 Object.assign(this.newOaWorkflowDoingInfo, data)
151 151
152 // Update counts in pendingItems 152 // Update counts in pendingItems
src/views/resource/addItemOutList.vue
@@ -162,11 +162,11 @@ @@ -162,11 +162,11 @@
162 <div slot="header" class="clearfix"> 162 <div slot="header" class="clearfix">
163 <h5>{{ $t('addItemOut.approver') }}</h5> 163 <h5>{{ $t('addItemOut.approver') }}</h5>
164 </div> 164 </div>
165 - <div class="ibox-content"> 165 + <div class="">
166 <el-form :model="addItemOutInfo" label-position="right" label-width="120px"> 166 <el-form :model="addItemOutInfo" label-position="right" label-width="120px">
167 <el-form-item :label="$t('addItemOut.approver')"> 167 <el-form-item :label="$t('addItemOut.approver')">
168 <el-row :gutter="20"> 168 <el-row :gutter="20">
169 - <el-col :span="18"> 169 + <el-col :span="17">
170 <el-input :placeholder="$t('addItemOut.approverPlaceholder')" 170 <el-input :placeholder="$t('addItemOut.approverPlaceholder')"
171 v-model="addItemOutInfo.audit.staffName" disabled></el-input> 171 v-model="addItemOutInfo.audit.staffName" disabled></el-input>
172 </el-col> 172 </el-col>
@@ -194,15 +194,15 @@ @@ -194,15 +194,15 @@
194 <choose-resource-store2 ref="chooseResourceStore2" 194 <choose-resource-store2 ref="chooseResourceStore2"
195 @setSelectResourceStores="handleSetSelectResourceStores"></choose-resource-store2> 195 @setSelectResourceStores="handleSetSelectResourceStores"></choose-resource-store2>
196 196
197 - <select-staff ref="selectStaff"></select-staff> 197 + <select-staff ref="selectStaff" @selectStaff="handleStaffChange"></select-staff>
198 </div> 198 </div>
199 </template> 199 </template>
200 200
201 <script> 201 <script>
202 import { getCommunityId } from '@/api/community/communityApi' 202 import { getCommunityId } from '@/api/community/communityApi'
203 import ChooseResourceStore2 from '@/components/resource/chooseResourceStore2' 203 import ChooseResourceStore2 from '@/components/resource/chooseResourceStore2'
204 -import SelectStaff from '@/components/resource/selectStaff'  
205 -import { goodsCollection, listStorehouses } from '@/api/resource/addItemOutApi' 204 +import SelectStaff from '@/components/staff/SelectStaff'
  205 +import { goodsCollection, listStorehouses, queryFirstAuditStaff } from '@/api/resource/addItemOutApi'
206 import { getUserName, getUserTel } from '@/api/user/userApi' 206 import { getUserName, getUserTel } from '@/api/user/userApi'
207 207
208 export default { 208 export default {
@@ -434,10 +434,21 @@ export default { @@ -434,10 +434,21 @@ export default {
434 434
435 return stock 435 return stock
436 }, 436 },
437 - _loadStaffOrg(flowId) { 437 + async _loadStaffOrg(flowId) {
438 // 实际调用API的方法 438 // 实际调用API的方法
439 // 这里保留占位,实际实现需要调用API 439 // 这里保留占位,实际实现需要调用API
440 - console.log(flowId) 440 + const res = await queryFirstAuditStaff({
  441 + communityId: this.communityId,
  442 + flowId: flowId
  443 + })
  444 + if (res.code != 0) {
  445 + return;
  446 + }
  447 + let _data = res.data
  448 + Object.assign(this.addItemOutInfo.audit, _data[0])
  449 + if (!_data[0].assignee.startsWith('-')) {
  450 + this.addItemOutInfo.audit.staffId = this.addItemOutInfo.audit.assignee;
  451 + }
441 }, 452 },
442 chooseStaff() { 453 chooseStaff() {
443 this.$refs.selectStaff.open(this.addItemOutInfo.audit) 454 this.$refs.selectStaff.open(this.addItemOutInfo.audit)
@@ -476,6 +487,12 @@ export default { @@ -476,6 +487,12 @@ export default {
476 487
477 const filteredList = newList.filter(item => item['resId']) 488 const filteredList = newList.filter(item => item['resId'])
478 this.addItemOutInfo.resourceStores = [...oldList, ...filteredList] 489 this.addItemOutInfo.resourceStores = [...oldList, ...filteredList]
  490 + },
  491 + handleStaffChange(staff) {
  492 + this.addItemOutInfo.audit.staffId = staff.staffId
  493 + this.addItemOutInfo.audit.staffName = staff.staffName
  494 + this.addItemOutInfo.endUserInfo.staffId = staff.staffId
  495 + this.addItemOutInfo.endUserInfo.staffName = staff.staffName
479 } 496 }
480 } 497 }
481 } 498 }
src/views/resource/addPurchaseApplyList.vue
@@ -146,14 +146,14 @@ @@ -146,14 +146,14 @@
146 <choose-resource-store2 ref="chooseResourceStore2" 146 <choose-resource-store2 ref="chooseResourceStore2"
147 @setSelectResourceStores="handleSetSelectResourceStores"></choose-resource-store2> 147 @setSelectResourceStores="handleSetSelectResourceStores"></choose-resource-store2>
148 148
149 - <select-staff ref="selectStaff" @change="handleStaffChange"></select-staff> 149 + <select-staff ref="selectStaff" @selectStaff="handleStaffChange"></select-staff>
150 </div> 150 </div>
151 </template> 151 </template>
152 152
153 <script> 153 <script>
154 import { getCommunityId } from '@/api/community/communityApi' 154 import { getCommunityId } from '@/api/community/communityApi'
155 import ChooseResourceStore2 from '@/components/resource/chooseResourceStore2' 155 import ChooseResourceStore2 from '@/components/resource/chooseResourceStore2'
156 -import SelectStaff from '@/components/resource/selectStaff' 156 +import SelectStaff from '@/components/staff/SelectStaff'
157 import { getUserName } from '@/api/user/userApi' 157 import { getUserName } from '@/api/user/userApi'
158 import { 158 import {
159 listStorehouses, 159 listStorehouses,
@@ -282,7 +282,7 @@ export default { @@ -282,7 +282,7 @@ export default {
282 const res = await purchaseApply(this.addPurchaseApplyInfo) 282 const res = await purchaseApply(this.addPurchaseApplyInfo)
283 if (res.code === 0) { 283 if (res.code === 0) {
284 this.$router.go(-1) 284 this.$router.go(-1)
285 - this.$message.success(this.$t('common.operationSuccess')) 285 + this.$message.success(this.$t('common.submitSuccess'))
286 } else { 286 } else {
287 this.$message.error(res.msg) 287 this.$message.error(res.msg)
288 } 288 }
@@ -423,8 +423,8 @@ export default { @@ -423,8 +423,8 @@ export default {
423 this.addPurchaseApplyInfo.resourceStores = resourceStores 423 this.addPurchaseApplyInfo.resourceStores = resourceStores
424 }, 424 },
425 handleStaffChange(staff) { 425 handleStaffChange(staff) {
426 - this.addPurchaseApplyInfo.audit.staffId = staff.userId  
427 - this.addPurchaseApplyInfo.audit.staffName = staff.userName 426 + this.addPurchaseApplyInfo.audit.staffId = staff.staffId
  427 + this.addPurchaseApplyInfo.audit.staffName = staff.staffName
428 }, 428 },
429 goBack() { 429 goBack() {
430 this.$router.go(-1) 430 this.$router.go(-1)
src/views/resource/allocationStorehouseApplyList.vue
@@ -136,22 +136,25 @@ @@ -136,22 +136,25 @@
136 </el-card> 136 </el-card>
137 137
138 <el-card class="box-card margin-top" v-if="form.audit.assignee === '-2'"> 138 <el-card class="box-card margin-top" v-if="form.audit.assignee === '-2'">
139 - <div slot="header" class="clearfix"> 139 + <div slot="header" class="flex justify-between">
140 <span>{{ $t('allocationStorehouseApply.approverTitle') }}</span> 140 <span>{{ $t('allocationStorehouseApply.approverTitle') }}</span>
141 </div> 141 </div>
142 142
143 <el-form label-width="120px"> 143 <el-form label-width="120px">
144 <el-row :gutter="20"> 144 <el-row :gutter="20">
145 - <el-col :span="24"> 145 + <el-col :span="18">
146 <el-form-item :label="$t('allocationStorehouseApply.approver')"> 146 <el-form-item :label="$t('allocationStorehouseApply.approver')">
147 <el-input v-model="form.audit.staffName" :placeholder="$t('allocationStorehouseApply.selectApprover')" 147 <el-input v-model="form.audit.staffName" :placeholder="$t('allocationStorehouseApply.selectApprover')"
148 disabled></el-input> 148 disabled></el-input>
149 - <el-button type="primary" class="margin-top" @click="chooseStaff">  
150 - <i class="el-icon-search"></i>  
151 - {{ $t('allocationStorehouseApply.select') }}  
152 - </el-button> 149 +
153 </el-form-item> 150 </el-form-item>
154 </el-col> 151 </el-col>
  152 + <el-col :span="6" class="text-left">
  153 + <el-button type="primary" @click="chooseStaff">
  154 + <i class="el-icon-search"></i>
  155 + {{ $t('allocationStorehouseApply.select') }}
  156 + </el-button>
  157 + </el-col>
155 </el-row> 158 </el-row>
156 </el-form> 159 </el-form>
157 </el-card> 160 </el-card>
@@ -164,14 +167,14 @@ @@ -164,14 +167,14 @@
164 167
165 <choose-resource-store ref="chooseResourceStore" @choose="handleChooseResource" /> 168 <choose-resource-store ref="chooseResourceStore" @choose="handleChooseResource" />
166 169
167 - <select-staff ref="selectStaff" @select="handleSelectStaff" /> 170 + <select-staff ref="selectStaff" @selectStaff="handleSelectStaff" />
168 </div> 171 </div>
169 </template> 172 </template>
170 173
171 <script> 174 <script>
172 import { getCommunityId } from '@/api/community/communityApi' 175 import { getCommunityId } from '@/api/community/communityApi'
173 import ChooseResourceStore from '@/components/resource/chooseResourceStore' 176 import ChooseResourceStore from '@/components/resource/chooseResourceStore'
174 -import SelectStaff from '@/components/resource/selectStaff' 177 +import SelectStaff from '@/components/staff/SelectStaff'
175 import { 178 import {
176 listStorehouses, 179 listStorehouses,
177 saveAllocationStorehouse, 180 saveAllocationStorehouse,
@@ -194,6 +197,7 @@ export default { @@ -194,6 +197,7 @@ export default {
194 communityId: '', 197 communityId: '',
195 shId: '', 198 shId: '',
196 flowId: '', 199 flowId: '',
  200 + apply_type: 10000,
197 audit: { 201 audit: {
198 assignee: '', 202 assignee: '',
199 staffId: '', 203 staffId: '',
@@ -322,8 +326,8 @@ export default { @@ -322,8 +326,8 @@ export default {
322 this.$refs.selectStaff.open(this.form.audit) 326 this.$refs.selectStaff.open(this.form.audit)
323 }, 327 },
324 handleSelectStaff(staff) { 328 handleSelectStaff(staff) {
325 - this.form.audit.staffId = staff.userId  
326 - this.form.audit.staffName = staff.userName 329 + this.form.audit.staffId = staff.staffId
  330 + this.form.audit.staffName = staff.staffName
327 }, 331 },
328 async submitApply() { 332 async submitApply() {
329 // 验证数据 333 // 验证数据
src/views/resource/allocationStorehouseAuditOrdersList.vue
@@ -62,6 +62,7 @@ @@ -62,6 +62,7 @@
62 <script> 62 <script>
63 import { listAllocationStoreAuditOrders, listWorkflowStepStaffs } from '@/api/resource/allocationStorehouseAuditOrdersApi' 63 import { listAllocationStoreAuditOrders, listWorkflowStepStaffs } from '@/api/resource/allocationStorehouseAuditOrdersApi'
64 import { getCommunityId } from '@/api/community/communityApi' 64 import { getCommunityId } from '@/api/community/communityApi'
  65 +import { getUserId } from '@/api/user/userApi'
65 66
66 export default { 67 export default {
67 name: 'AllocationStorehouseAuditOrdersList', 68 name: 'AllocationStorehouseAuditOrdersList',
@@ -91,7 +92,7 @@ export default { @@ -91,7 +92,7 @@ export default {
91 }, 92 },
92 created() { 93 created() {
93 this.communityId = getCommunityId() 94 this.communityId = getCommunityId()
94 - this.allocationStorehouseAuditOrdersInfo.currentUserId = this.$store.getters.userId 95 + this.allocationStorehouseAuditOrdersInfo.currentUserId = getUserId()
95 this.listAuditOrders() 96 this.listAuditOrders()
96 this.loadStepStaff() 97 this.loadStepStaff()
97 }, 98 },
@@ -139,7 +140,8 @@ export default { @@ -139,7 +140,8 @@ export default {
139 query: { 140 query: {
140 applyId: auditOrder.applyId, 141 applyId: auditOrder.applyId,
141 action: 'audit', 142 action: 'audit',
142 - taskId: auditOrder.taskId 143 + taskId: auditOrder.taskId,
  144 + flowId: auditOrder.flowId
143 } 145 }
144 }) 146 })
145 }, 147 },
src/views/resource/allocationStorehouseDetailList.vue
@@ -17,36 +17,36 @@ @@ -17,36 +17,36 @@
17 </div> 17 </div>
18 </div> 18 </div>
19 <el-form :model="allocationStorehouseDetailInfo" label-width="120px" class="text-left"> 19 <el-form :model="allocationStorehouseDetailInfo" label-width="120px" class="text-left">
20 - <el-row :gutter="20">  
21 - <el-col :span="8">  
22 - <el-form-item :label="$t('allocationStorehouseDetail.applicant')">  
23 - <span>{{ allocationStorehouseDetailInfo.startUserName }}</span>  
24 - </el-form-item>  
25 - </el-col>  
26 - <el-col :span="8">  
27 - <el-form-item :label="$t('allocationStorehouseDetail.applyTime')">  
28 - <span>{{ allocationStorehouseDetailInfo.createTime }}</span>  
29 - </el-form-item>  
30 - </el-col>  
31 - <el-col :span="8">  
32 - <el-form-item :label="$t('allocationStorehouseDetail.type')">  
33 - <span>{{ allocationStorehouseDetailInfo.applyTypeName }}</span>  
34 - </el-form-item>  
35 - </el-col>  
36 - </el-row>  
37 - <el-row :gutter="20">  
38 - <el-col :span="8">  
39 - <el-form-item :label="$t('allocationStorehouseDetail.status')">  
40 - <span>{{ allocationStorehouseDetailInfo.stateName }}</span>  
41 - </el-form-item>  
42 - </el-col>  
43 - <el-col :span="16">  
44 - <el-form-item :label="$t('allocationStorehouseDetail.applyRemark')">  
45 - <span>{{ allocationStorehouseDetailInfo.remark }}</span>  
46 - </el-form-item>  
47 - </el-col>  
48 - </el-row>  
49 - </el-form> 20 + <el-row :gutter="20">
  21 + <el-col :span="8">
  22 + <el-form-item :label="$t('allocationStorehouseDetail.applicant')">
  23 + <span>{{ allocationStorehouseDetailInfo.startUserName }}</span>
  24 + </el-form-item>
  25 + </el-col>
  26 + <el-col :span="8">
  27 + <el-form-item :label="$t('allocationStorehouseDetail.applyTime')">
  28 + <span>{{ allocationStorehouseDetailInfo.createTime }}</span>
  29 + </el-form-item>
  30 + </el-col>
  31 + <el-col :span="8">
  32 + <el-form-item :label="$t('allocationStorehouseDetail.type')">
  33 + <span>{{ allocationStorehouseDetailInfo.applyTypeName }}</span>
  34 + </el-form-item>
  35 + </el-col>
  36 + </el-row>
  37 + <el-row :gutter="20">
  38 + <el-col :span="8">
  39 + <el-form-item :label="$t('allocationStorehouseDetail.status')">
  40 + <span>{{ allocationStorehouseDetailInfo.stateName }}</span>
  41 + </el-form-item>
  42 + </el-col>
  43 + <el-col :span="16">
  44 + <el-form-item :label="$t('allocationStorehouseDetail.applyRemark')">
  45 + <span>{{ allocationStorehouseDetailInfo.remark }}</span>
  46 + </el-form-item>
  47 + </el-col>
  48 + </el-row>
  49 + </el-form>
50 </el-card> 50 </el-card>
51 </el-col> 51 </el-col>
52 </el-row> 52 </el-row>
@@ -103,7 +103,7 @@ @@ -103,7 +103,7 @@
103 v-if="allocationStorehouseDetailInfo.applyType === '10000' && allocationStorehouseDetailInfo.auditUsersCount > 0"> 103 v-if="allocationStorehouseDetailInfo.applyType === '10000' && allocationStorehouseDetailInfo.auditUsersCount > 0">
104 <el-col :span="24"> 104 <el-col :span="24">
105 <el-card> 105 <el-card>
106 - <div slot="header" class="clearfix"> 106 + <div slot="header" class="flex justify-between">
107 <span>{{ $t('allocationStorehouseDetail.workflow') }}</span> 107 <span>{{ $t('allocationStorehouseDetail.workflow') }}</span>
108 </div> 108 </div>
109 <el-table :data="allocationStorehouseDetailInfo.auditUsers" border style="width: 100%"> 109 <el-table :data="allocationStorehouseDetailInfo.auditUsers" border style="width: 100%">
@@ -125,8 +125,9 @@ @@ -125,8 +125,9 @@
125 </el-card> 125 </el-card>
126 </el-col> 126 </el-col>
127 </el-row> 127 </el-row>
128 -  
129 - <audit-div v-if="allocationStorehouseDetailInfo.action === 'audit'" ref="auditDiv" /> 128 + <div class="mt-20">
  129 + <allocation-audit-div v-if="allocationStorehouseDetailInfo.action === 'audit'" ref="auditDiv" />
  130 + </div>
130 </div> 131 </div>
131 </template> 132 </template>
132 133
@@ -136,14 +137,14 @@ import { @@ -136,14 +137,14 @@ import {
136 listAllocationStorehouseApplys, 137 listAllocationStorehouseApplys,
137 listAllocationStorehouses, 138 listAllocationStorehouses,
138 listWorkflowAuditInfo 139 listWorkflowAuditInfo
139 - // auditAllocationStoreOrder 140 + // auditAllocationStoreOrder
140 } from '@/api/resource/allocationStorehouseDetailApi' 141 } from '@/api/resource/allocationStorehouseDetailApi'
141 -import AuditDiv from '@/components/resource/auditDiv' 142 +import AllocationAuditDiv from '@/components/resource/allocationAuditDiv'
142 143
143 export default { 144 export default {
144 name: 'AllocationStorehouseDetailList', 145 name: 'AllocationStorehouseDetailList',
145 components: { 146 components: {
146 - AuditDiv 147 + AllocationAuditDiv
147 }, 148 },
148 data() { 149 data() {
149 return { 150 return {
@@ -160,7 +161,8 @@ export default { @@ -160,7 +161,8 @@ export default {
160 applyType: '', 161 applyType: '',
161 applyTypeName: '', 162 applyTypeName: '',
162 action: '', 163 action: '',
163 - taskId: '' 164 + taskId: '',
  165 + flowId: ''
164 } 166 }
165 } 167 }
166 }, 168 },
@@ -171,6 +173,7 @@ export default { @@ -171,6 +173,7 @@ export default {
171 this.allocationStorehouseDetailInfo.applyTypeName = this.$route.query.applyTypeName 173 this.allocationStorehouseDetailInfo.applyTypeName = this.$route.query.applyTypeName
172 this.allocationStorehouseDetailInfo.action = this.$route.query.action 174 this.allocationStorehouseDetailInfo.action = this.$route.query.action
173 this.allocationStorehouseDetailInfo.taskId = this.$route.query.taskId 175 this.allocationStorehouseDetailInfo.taskId = this.$route.query.taskId
  176 + this.allocationStorehouseDetailInfo.flowId = this.$route.query.flowId
174 this.listAllocationStorehouseApply() 177 this.listAllocationStorehouseApply()
175 this.listPurchaseApply(1, 100) 178 this.listPurchaseApply(1, 100)
176 }, 179 },
@@ -208,6 +211,7 @@ export default { @@ -208,6 +211,7 @@ export default {
208 createUserId: purchaseApply.startUserId, 211 createUserId: purchaseApply.startUserId,
209 action: this.allocationStorehouseDetailInfo.action, 212 action: this.allocationStorehouseDetailInfo.action,
210 taskId: this.allocationStorehouseDetailInfo.taskId, 213 taskId: this.allocationStorehouseDetailInfo.taskId,
  214 + flowId: this.allocationStorehouseDetailInfo.flowId,
211 url: '/resourceStore.auditAllocationStoreOrder', 215 url: '/resourceStore.auditAllocationStoreOrder',
212 id: purchaseApply.applyId, 216 id: purchaseApply.applyId,
213 }) 217 })
src/views/resource/allocationStorehouseEnterList.vue
@@ -7,16 +7,9 @@ @@ -7,16 +7,9 @@
7 7
8 <el-row :gutter="20"> 8 <el-row :gutter="20">
9 <el-col :span="24"> 9 <el-col :span="24">
10 - <el-card>  
11 - <div slot="header">  
12 - <h5>  
13 - <span>{{ $t('allocationStorehouseEnter.applyId') }}</span>{{ allocationStorehouseEnterInfo.applyId }}  
14 - </h5>  
15 - </div>  
16 -  
17 <el-table :data="allocationStorehouseEnterInfo.resourceStores" border style="width: 100%" 10 <el-table :data="allocationStorehouseEnterInfo.resourceStores" border style="width: 100%"
18 - v-loading="loading">  
19 - <el-table-column type="selection" width="55" align="center" @selection-change="handleSelectionChange"> 11 + v-loading="loading" @selection-change="handleSelectionChange">
  12 + <el-table-column type="selection" width="55" align="center">
20 </el-table-column> 13 </el-table-column>
21 <el-table-column prop="parentRstName" :label="$t('allocationStorehouseEnter.resourceType')" 14 <el-table-column prop="parentRstName" :label="$t('allocationStorehouseEnter.resourceType')"
22 align="center"> 15 align="center">
@@ -67,7 +60,6 @@ @@ -67,7 +60,6 @@
67 </template> 60 </template>
68 </el-table-column> 61 </el-table-column>
69 </el-table> 62 </el-table>
70 - </el-card>  
71 </el-col> 63 </el-col>
72 </el-row> 64 </el-row>
73 65
src/views/resource/myAuditOrdersList.vue
@@ -112,11 +112,11 @@ export default { @@ -112,11 +112,11 @@ export default {
112 this.auditOrdersInfo.conditions.row = _rows 112 this.auditOrdersInfo.conditions.row = _rows
113 try { 113 try {
114 const res = await listAuditOrders(this.auditOrdersInfo.conditions) 114 const res = await listAuditOrders(this.auditOrdersInfo.conditions)
115 - const _auditOrdersInfo = res.data  
116 - this.auditOrdersInfo.total = _auditOrdersInfo.total  
117 - this.auditOrdersInfo.records = _auditOrdersInfo.records  
118 - this.auditOrdersInfo.auditOrders = _auditOrdersInfo.data  
119 - this.total = _auditOrdersInfo.records 115 + this.auditOrdersInfo.total = res.total
  116 + this.auditOrdersInfo.records = res.records
  117 + this.auditOrdersInfo.auditOrders = res.data
  118 + console.log(res)
  119 + this.total = res.total
120 this.currentPage = _page 120 this.currentPage = _page
121 } catch (error) { 121 } catch (error) {
122 console.error('请求失败:', error) 122 console.error('请求失败:', error)
@@ -139,7 +139,7 @@ export default { @@ -139,7 +139,7 @@ export default {
139 }, 139 },
140 _openDetailPurchaseApplyModel(_purchaseApply) { 140 _openDetailPurchaseApplyModel(_purchaseApply) {
141 this.$router.push({ 141 this.$router.push({
142 - path: '/views/resource/purchaseApplyDetaill', 142 + path: '/views/resource/purchaseApplyDetail',
143 query: { 143 query: {
144 applyOrderId: _purchaseApply.applyOrderId, 144 applyOrderId: _purchaseApply.applyOrderId,
145 resOrderType: _purchaseApply.resOrderType 145 resOrderType: _purchaseApply.resOrderType
src/views/resource/myItemOutAuditOrdersList.vue
@@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
57 <script> 57 <script>
58 import { getCollectionAuditOrder } from '@/api/resource/myItemOutAuditOrdersApi' 58 import { getCollectionAuditOrder } from '@/api/resource/myItemOutAuditOrdersApi'
59 import { getCommunityId } from '@/api/community/communityApi' 59 import { getCommunityId } from '@/api/community/communityApi'
  60 +import { getUserId } from '@/api/user/userApi'
60 61
61 export default { 62 export default {
62 name: 'MyItemOutAuditOrdersList', 63 name: 'MyItemOutAuditOrdersList',
@@ -88,7 +89,7 @@ export default { @@ -88,7 +89,7 @@ export default {
88 } 89 }
89 }, 90 },
90 created() { 91 created() {
91 - this.auditOrdersInfo.currentUserId = this.$store.getters.userId 92 + this.auditOrdersInfo.currentUserId = getUserId()
92 this._listAuditOrders(this.DEFAULT_PAGE, this.DEFAULT_ROWS) 93 this._listAuditOrders(this.DEFAULT_PAGE, this.DEFAULT_ROWS)
93 }, 94 },
94 methods: { 95 methods: {
@@ -117,6 +118,7 @@ export default { @@ -117,6 +118,7 @@ export default {
117 query: { 118 query: {
118 applyOrderId: auditOrder.applyOrderId, 119 applyOrderId: auditOrder.applyOrderId,
119 resOrderType: auditOrder.resOrderType, 120 resOrderType: auditOrder.resOrderType,
  121 + flowId: auditOrder.flowId,
120 action: 'audit', 122 action: 'audit',
121 taskId: auditOrder.taskId 123 taskId: auditOrder.taskId
122 } 124 }
@@ -127,7 +129,7 @@ export default { @@ -127,7 +129,7 @@ export default {
127 }, 129 },
128 _openDetailPurchaseApplyModel(purchaseApply) { 130 _openDetailPurchaseApplyModel(purchaseApply) {
129 this.$router.push({ 131 this.$router.push({
130 - path: '/views/resource/purchaseApplyDetaill', 132 + path: '/views/resource/purchaseApplyDetail',
131 query: { 133 query: {
132 applyOrderId: purchaseApply.applyOrderId, 134 applyOrderId: purchaseApply.applyOrderId,
133 resOrderType: purchaseApply.resOrderType 135 resOrderType: purchaseApply.resOrderType
@@ -145,11 +147,12 @@ export default { @@ -145,11 +147,12 @@ export default {
145 }, 147 },
146 _distributionOrder(purchaseApply) { 148 _distributionOrder(purchaseApply) {
147 this.$router.push({ 149 this.$router.push({
148 - path: '/pages/common/resourceOutManage', 150 + path: '/pages/admin/resourceOutManage',
149 query: { 151 query: {
150 applyOrderId: purchaseApply.applyOrderId, 152 applyOrderId: purchaseApply.applyOrderId,
151 resOrderType: purchaseApply.resOrderType, 153 resOrderType: purchaseApply.resOrderType,
152 - taskId: purchaseApply.taskId 154 + taskId: purchaseApply.taskId,
  155 + flowId: purchaseApply.flowId
153 } 156 }
154 }) 157 })
155 }, 158 },
src/views/resource/printEquipmentAccountLabelList.vue
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 <script> 86 <script>
87 import { getEquipmentAccountList } from '@/api/resource/printEquipmentAccountLabelApi' 87 import { getEquipmentAccountList } from '@/api/resource/printEquipmentAccountLabelApi'
88 import QRCode from 'qrcodejs2' 88 import QRCode from 'qrcodejs2'
89 -import { getCommunityId } from '@/api/community/communityApi' 89 +import { getCommunityId ,getCommunityName} from '@/api/community/communityApi'
90 90
91 export default { 91 export default {
92 name: 'PrintEquipmentAccountLabelList', 92 name: 'PrintEquipmentAccountLabelList',
@@ -131,7 +131,7 @@ export default { @@ -131,7 +131,7 @@ export default {
131 this._initPrintRepairDetailDateInfo() 131 this._initPrintRepairDetailDateInfo()
132 const myDate = new Date() 132 const myDate = new Date()
133 this.nowTime = myDate.toLocaleDateString() 133 this.nowTime = myDate.toLocaleDateString()
134 - this.printEquipmentAccountInfo.yqName = this.$store.getters.currentCommunity.name 134 + this.printEquipmentAccountInfo.yqName = getCommunityName()
135 }, 135 },
136 methods: { 136 methods: {
137 async _initPrintRepairDetailDateInfo() { 137 async _initPrintRepairDetailDateInfo() {
src/views/resource/purchaseApplyDetailList.vue
@@ -231,7 +231,8 @@ export default { @@ -231,7 +231,8 @@ export default {
231 auditUsers: [], 231 auditUsers: [],
232 warehousingWay: '', 232 warehousingWay: '',
233 action: '', 233 action: '',
234 - taskId: '' 234 + taskId: '',
  235 + flowId: ''
235 }, 236 },
236 communityId: '' 237 communityId: ''
237 } 238 }
@@ -242,6 +243,7 @@ export default { @@ -242,6 +243,7 @@ export default {
242 this.purchaseApplyDetailInfo.resOrderType = this.$route.query.resOrderType 243 this.purchaseApplyDetailInfo.resOrderType = this.$route.query.resOrderType
243 this.purchaseApplyDetailInfo.action = this.$route.query.action 244 this.purchaseApplyDetailInfo.action = this.$route.query.action
244 this.purchaseApplyDetailInfo.taskId = this.$route.query.taskId 245 this.purchaseApplyDetailInfo.taskId = this.$route.query.taskId
  246 + this.purchaseApplyDetailInfo.flowId = this.$route.query.flowId
245 this._listPurchaseApply() 247 this._listPurchaseApply()
246 }, 248 },
247 methods: { 249 methods: {
@@ -267,6 +269,7 @@ export default { @@ -267,6 +269,7 @@ export default {
267 createUserId: purchaseApply.createUserId, 269 createUserId: purchaseApply.createUserId,
268 action: this.purchaseApplyDetailInfo.action, 270 action: this.purchaseApplyDetailInfo.action,
269 taskId: this.purchaseApplyDetailInfo.taskId, 271 taskId: this.purchaseApplyDetailInfo.taskId,
  272 + flowId: this.purchaseApplyDetailInfo.flowId,
270 url: '/purchaseApply.auditApplyOrder', 273 url: '/purchaseApply.auditApplyOrder',
271 id: purchaseApply.applyOrderId, 274 id: purchaseApply.applyOrderId,
272 }) 275 })
src/views/resource/resourceAuditFlowList.vue
@@ -182,14 +182,14 @@ export default { @@ -182,14 +182,14 @@ export default {
182 this.loading = true 182 this.loading = true
183 const res = await deployWorkflow({ modelId: row.modelId }) 183 const res = await deployWorkflow({ modelId: row.modelId })
184 if (res.code === 0) { 184 if (res.code === 0) {
185 - this.$message.success(this.$t('resourceAuditFlow.deploySuccess')) 185 + this.$message.success(this.$t('common.submitSuccess'))
186 this.fetchData() 186 this.fetchData()
187 } else { 187 } else {
188 - this.$message.error(res.msg || this.$t('resourceAuditFlow.deployFailed')) 188 + this.$message.error(res.msg || this.$t('common.submitFailed'))
189 } 189 }
190 } catch (error) { 190 } catch (error) {
191 console.error('部署流程失败:', error) 191 console.error('部署流程失败:', error)
192 - this.$message.error(this.$t('resourceAuditFlow.deployFailed')) 192 + this.$message.error(this.$t('common.submitFailed'))
193 } finally { 193 } finally {
194 this.loading = false 194 this.loading = false
195 } 195 }
src/views/resource/resourceEnterManageList.vue
1 <template> 1 <template>
2 <div class="resource-enter-manage-container"> 2 <div class="resource-enter-manage-container">
3 <el-card class="box-card"> 3 <el-card class="box-card">
4 - <div slot="header" class="clearfix">  
5 - <span>{{ $t('resourceEnterManage.orderId') }}:{{resourceEnterManageInfo.applyOrderId}}</span> 4 + <div slot="header" class="flex justify-between">
  5 + <span>{{ $t('resourceEnterManage.orderId') }}:{{ resourceEnterManageInfo.applyOrderId }}</span>
6 </div> 6 </div>
7 7
8 <el-row :gutter="20"> 8 <el-row :gutter="20">
9 <el-col :span="24"> 9 <el-col :span="24">
10 - <el-table  
11 - :data="resourceEnterManageInfo.purchaseApplyDetailVo"  
12 - border  
13 - style="width: 100%"  
14 - class="table-wrapper"  
15 - >  
16 - <el-table-column type="selection" width="55" align="center" @selection-change="handleSelectionChange" /> 10 + <el-table :data="resourceEnterManageInfo.purchaseApplyDetailVo" border style="width: 100%"
  11 + class="table-wrapper" @selection-change="handleSelectionChange">
  12 + <el-table-column type="selection" width="55" align="center" />
17 <el-table-column prop="rstName" :label="$t('resourceEnterManage.itemType')" align="center"> 13 <el-table-column prop="rstName" :label="$t('resourceEnterManage.itemType')" align="center">
18 <template slot-scope="scope"> 14 <template slot-scope="scope">
19 - {{scope.row.rstName || '-'}} 15 + {{ scope.row.rstName || '-' }}
20 </template> 16 </template>
21 </el-table-column> 17 </el-table-column>
22 <el-table-column prop="resName" :label="$t('resourceEnterManage.itemName')" align="center" /> 18 <el-table-column prop="resName" :label="$t('resourceEnterManage.itemName')" align="center" />
23 <el-table-column prop="specName" :label="$t('resourceEnterManage.itemSpec')" align="center"> 19 <el-table-column prop="specName" :label="$t('resourceEnterManage.itemSpec')" align="center">
24 <template slot-scope="scope"> 20 <template slot-scope="scope">
25 - {{scope.row.specName || '-'}} 21 + {{ scope.row.specName || '-' }}
26 </template> 22 </template>
27 </el-table-column> 23 </el-table-column>
28 <el-table-column prop="resCode" :label="$t('resourceEnterManage.itemCode')" align="center" /> 24 <el-table-column prop="resCode" :label="$t('resourceEnterManage.itemCode')" align="center" />
29 <el-table-column prop="stock" :label="$t('resourceEnterManage.itemStock')" align="center" /> 25 <el-table-column prop="stock" :label="$t('resourceEnterManage.itemStock')" align="center" />
30 <el-table-column prop="standardPrice" :label="$t('resourceEnterManage.referencePrice')" align="center"> 26 <el-table-column prop="standardPrice" :label="$t('resourceEnterManage.referencePrice')" align="center">
31 <template slot-scope="scope"> 27 <template slot-scope="scope">
32 - ¥{{scope.row.standardPrice}} 28 + ¥{{ scope.row.standardPrice }}
33 </template> 29 </template>
34 </el-table-column> 30 </el-table-column>
35 <el-table-column prop="quantity" :label="$t('resourceEnterManage.applyQuantity')" align="center" /> 31 <el-table-column prop="quantity" :label="$t('resourceEnterManage.applyQuantity')" align="center" />
36 <el-table-column :label="$t('resourceEnterManage.purchaseQuantity')" align="center"> 32 <el-table-column :label="$t('resourceEnterManage.purchaseQuantity')" align="center">
37 <template slot-scope="scope"> 33 <template slot-scope="scope">
38 - <el-input  
39 - v-model.number="scope.row.purchaseQuantity"  
40 - type="number"  
41 - :placeholder="$t('resourceEnterManage.purchaseQuantityPlaceholder')"  
42 - /> 34 + <el-input v-model.number="scope.row.purchaseQuantity" type="number"
  35 + :placeholder="$t('resourceEnterManage.purchaseQuantityPlaceholder')" />
43 </template> 36 </template>
44 </el-table-column> 37 </el-table-column>
45 <el-table-column :label="$t('resourceEnterManage.purchasePrice')" align="center"> 38 <el-table-column :label="$t('resourceEnterManage.purchasePrice')" align="center">
46 <template slot-scope="scope"> 39 <template slot-scope="scope">
47 - <el-input  
48 - v-model.number="scope.row.price"  
49 - type="number"  
50 - :placeholder="$t('resourceEnterManage.purchasePricePlaceholder')"  
51 - /> 40 + <el-input v-model.number="scope.row.price" type="number"
  41 + :placeholder="$t('resourceEnterManage.purchasePricePlaceholder')" />
52 </template> 42 </template>
53 </el-table-column> 43 </el-table-column>
54 <el-table-column :label="$t('resourceEnterManage.supplier')" align="center"> 44 <el-table-column :label="$t('resourceEnterManage.supplier')" align="center">
55 <template slot-scope="scope"> 45 <template slot-scope="scope">
56 - <el-select  
57 - v-model="scope.row.rsId"  
58 - :placeholder="$t('resourceEnterManage.selectSupplier')"  
59 - style="width:100%"  
60 - >  
61 - <el-option  
62 - v-for="supplier in resourceEnterManageInfo.resourceSuppliers"  
63 - :key="supplier.rsId"  
64 - :label="supplier.supplierName"  
65 - :value="supplier.rsId"  
66 - /> 46 + <el-select v-model="scope.row.rsId" :placeholder="$t('resourceEnterManage.selectSupplier')"
  47 + style="width:100%">
  48 + <el-option v-for="supplier in resourceEnterManageInfo.resourceSuppliers" :key="supplier.rsId"
  49 + :label="supplier.supplierName" :value="supplier.rsId" />
67 </el-select> 50 </el-select>
68 </template> 51 </template>
69 </el-table-column> 52 </el-table-column>
70 <el-table-column :label="$t('resourceEnterManage.remark')" align="center"> 53 <el-table-column :label="$t('resourceEnterManage.remark')" align="center">
71 <template slot-scope="scope"> 54 <template slot-scope="scope">
72 - <el-input  
73 - v-model="scope.row.purchaseRemark"  
74 - type="text"  
75 - :placeholder="$t('resourceEnterManage.remarkPlaceholder')"  
76 - /> 55 + <el-input v-model="scope.row.purchaseRemark" type="text"
  56 + :placeholder="$t('resourceEnterManage.remarkPlaceholder')" />
77 </template> 57 </template>
78 </el-table-column> 58 </el-table-column>
79 </el-table> 59 </el-table>
@@ -125,7 +105,7 @@ export default { @@ -125,7 +105,7 @@ export default {
125 applyOrderId: this.resourceEnterManageInfo.applyOrderId, 105 applyOrderId: this.resourceEnterManageInfo.applyOrderId,
126 resOrderType: this.resourceEnterManageInfo.resOrderType 106 resOrderType: this.resourceEnterManageInfo.resOrderType
127 } 107 }
128 - const { data } = await listPurchaseApplys(params) 108 + const data = await listPurchaseApplys(params)
129 const purchaseApply = data.purchaseApplys[0] 109 const purchaseApply = data.purchaseApplys[0]
130 Object.assign(this.resourceEnterManageInfo, purchaseApply) 110 Object.assign(this.resourceEnterManageInfo, purchaseApply)
131 this.resourceEnterManageInfo.purchaseApplyDetailVo.forEach(item => { 111 this.resourceEnterManageInfo.purchaseApplyDetailVo.forEach(item => {
@@ -148,12 +128,13 @@ export default { @@ -148,12 +128,13 @@ export default {
148 } 128 }
149 }, 129 },
150 handleSelectionChange(selection) { 130 handleSelectionChange(selection) {
  131 + console.log(selection)
151 this.resourceEnterManageInfo.selectResIds = selection.map(item => item.resId) 132 this.resourceEnterManageInfo.selectResIds = selection.map(item => item.resId)
152 }, 133 },
153 async handleSubmit() { 134 async handleSubmit() {
154 // Validation 135 // Validation
155 let msg = '' 136 let msg = ''
156 - const selectedItems = this.resourceEnterManageInfo.purchaseApplyDetailVo.filter(item => 137 + const selectedItems = this.resourceEnterManageInfo.purchaseApplyDetailVo.filter(item =>
157 this.resourceEnterManageInfo.selectResIds.includes(item.resId) 138 this.resourceEnterManageInfo.selectResIds.includes(item.resId)
158 ) 139 )
159 140
@@ -168,7 +149,7 @@ export default { @@ -168,7 +149,7 @@ export default {
168 break 149 break
169 } 150 }
170 item.purchaseQuantity = parseInt(item.purchaseQuantity) 151 item.purchaseQuantity = parseInt(item.purchaseQuantity)
171 - 152 +
172 if (!item.price || parseFloat(item.price) <= 0) { 153 if (!item.price || parseFloat(item.price) <= 0) {
173 msg = this.$t('resourceEnterManage.purchasePriceError') 154 msg = this.$t('resourceEnterManage.purchasePriceError')
174 break 155 break
src/views/resource/resourceOutManageList.vue
1 <template> 1 <template>
2 <div class="resource-out-manage-container"> 2 <div class="resource-out-manage-container">
3 - <el-card class="box-card">  
4 - <div slot="header" class="flex justify-between"> 3 + <div class="box-card">
  4 + <div class="card-header flex justify-between">
5 <span>{{ $t('resourceOutManage.orderId') }}:{{ resourceOutManageInfo.applyOrderId }}</span> 5 <span>{{ $t('resourceOutManage.orderId') }}:{{ resourceOutManageInfo.applyOrderId }}</span>
6 </div> 6 </div>
7 - <el-row>  
8 - <el-col :span="24">  
9 - <el-table :data="resourceOutManageInfo.purchaseApplyDetailVo" border style="width: 100%" v-loading="loading">  
10 - <el-table-column prop="rstName" :label="$t('resourceOutManage.itemType')" align="center" width="180">  
11 - <template slot-scope="scope">  
12 - {{ scope.row.rstName || '-' }}  
13 - </template>  
14 - </el-table-column>  
15 - <el-table-column prop="resName" :label="$t('resourceOutManage.itemName')" align="center" width="180" />  
16 - <el-table-column prop="specName" :label="$t('resourceOutManage.itemSpec')" align="center" width="180">  
17 - <template slot-scope="scope">  
18 - {{ scope.row.specName || '-' }}  
19 - </template>  
20 - </el-table-column>  
21 - <el-table-column prop="resCode" :label="$t('resourceOutManage.itemCode')" align="center" width="180" />  
22 - <el-table-column prop="stock" :label="$t('resourceOutManage.itemStock')" align="center" width="120" />  
23 - <el-table-column prop="quantity" :label="$t('resourceOutManage.applyQuantity')" align="center"  
24 - width="120" />  
25 - <el-table-column :label="$t('resourceOutManage.issueQuantity')" align="center" width="200">  
26 - <template slot-scope="scope">  
27 - <el-input v-model.number="scope.row.purchaseQuantity" type="number"  
28 - :placeholder="$t('resourceOutManage.issueQuantityPlaceholder')" clearable />  
29 - </template>  
30 - </el-table-column>  
31 - <el-table-column :label="$t('resourceOutManage.remark')" align="center" width="200">  
32 - <template slot-scope="scope">  
33 - <el-input v-model="scope.row.purchaseRemark" type="text"  
34 - :placeholder="$t('resourceOutManage.remarkPlaceholder')" clearable />  
35 - </template>  
36 - </el-table-column>  
37 - </el-table>  
38 - </el-col>  
39 - </el-row>  
40 -  
41 - <el-row class="footer-row">  
42 - <el-col :span="24" class="text-right">  
43 - <el-button type="primary" @click="handleSubmit"> 7 +
  8 + <div class="table-container">
  9 + <!-- 加载状态 -->
  10 + <div v-if="loading" class="loading-overlay">
  11 + <div class="loading-spinner">加载中...</div>
  12 + </div>
  13 +
  14 + <!-- 普通HTML表格 -->
  15 + <table class="data-table" v-if="!loading">
  16 + <thead>
  17 + <tr>
  18 + <th class="table-header">{{ $t('resourceOutManage.itemType') }}</th>
  19 + <th class="table-header">{{ $t('resourceOutManage.itemName') }}</th>
  20 + <th class="table-header">{{ $t('resourceOutManage.itemSpec') }}</th>
  21 + <th class="table-header">{{ $t('resourceOutManage.itemCode') }}</th>
  22 + <th class="table-header">{{ $t('resourceOutManage.itemStock') }}</th>
  23 + <th class="table-header">{{ $t('resourceOutManage.applyQuantity') }}</th>
  24 + <th class="table-header">{{ $t('resourceOutManage.issueQuantity') }}</th>
  25 + <th class="table-header">{{ $t('resourceOutManage.remark') }}</th>
  26 + </tr>
  27 + </thead>
  28 + <tbody>
  29 + <tr v-for="(item, index) in resourceOutManageInfo.purchaseApplyDetailVo" :key="index" class="table-row">
  30 + <td class="table-cell">{{ item.rstName || '-' }}</td>
  31 + <td class="table-cell">{{ item.resName }}</td>
  32 + <td class="table-cell">{{ item.specName || '-' }}</td>
  33 + <td class="table-cell">{{ item.resCode }}</td>
  34 + <td class="table-cell">{{ item.stock }}</td>
  35 + <td class="table-cell">{{ item.quantity }}</td>
  36 + <td class="table-cell">
  37 + <input
  38 + v-model.number="item.purchaseQuantity"
  39 + type="number"
  40 + class="form-input"
  41 + :placeholder="$t('resourceOutManage.issueQuantityPlaceholder')"
  42 + @input="validateQuantity(item)"
  43 + />
  44 + </td>
  45 + <td class="table-cell">
  46 + <input
  47 + v-model="item.purchaseRemark"
  48 + type="text"
  49 + class="form-input"
  50 + :placeholder="$t('resourceOutManage.remarkPlaceholder')"
  51 + />
  52 + </td>
  53 + </tr>
  54 + </tbody>
  55 + </table>
  56 +
  57 + <!-- 空数据状态 -->
  58 + <div v-if="!loading && resourceOutManageInfo.purchaseApplyDetailVo.length === 0" class="empty-data">
  59 + 暂无数据
  60 + </div>
  61 + </div>
  62 +
  63 + <div class="footer-row">
  64 + <div class="text-right">
  65 + <button type="button" class="btn btn-primary" @click="handleSubmit">
44 {{ $t('resourceOutManage.submit') }} 66 {{ $t('resourceOutManage.submit') }}
45 - </el-button>  
46 - </el-col>  
47 - </el-row>  
48 - </el-card> 67 + </button>
  68 + </div>
  69 + </div>
  70 + </div>
49 </div> 71 </div>
50 </template> 72 </template>
51 73
@@ -81,7 +103,7 @@ export default { @@ -81,7 +103,7 @@ export default {
81 applyOrderId: this.resourceOutManageInfo.applyOrderId, 103 applyOrderId: this.resourceOutManageInfo.applyOrderId,
82 resOrderType: this.resourceOutManageInfo.resOrderType 104 resOrderType: this.resourceOutManageInfo.resOrderType
83 } 105 }
84 - const { data } = await listPurchaseApplys(params) 106 + const data = await listPurchaseApplys(params)
85 const purchaseApply = data.purchaseApplys[0] 107 const purchaseApply = data.purchaseApplys[0]
86 this.resourceOutManageInfo = { 108 this.resourceOutManageInfo = {
87 ...this.resourceOutManageInfo, 109 ...this.resourceOutManageInfo,
@@ -99,6 +121,14 @@ export default { @@ -99,6 +121,14 @@ export default {
99 this.loading = false 121 this.loading = false
100 } 122 }
101 }, 123 },
  124 +
  125 + // 新增:验证数量输入
  126 + validateQuantity(item) {
  127 + if (item.purchaseQuantity && parseFloat(item.purchaseQuantity) > parseFloat(item.stock)) {
  128 + this.$message.warning('出库数量不能超过库存数量')
  129 + }
  130 + },
  131 +
102 async handleSubmit() { 132 async handleSubmit() {
103 try { 133 try {
104 // Validate form 134 // Validate form
@@ -140,15 +170,167 @@ export default { @@ -140,15 +170,167 @@ export default {
140 padding: 20px; 170 padding: 20px;
141 171
142 .box-card { 172 .box-card {
  173 + background: #fff;
  174 + border-radius: 4px;
  175 + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
143 margin-bottom: 20px; 176 margin-bottom: 20px;
144 } 177 }
145 178
  179 + .card-header {
  180 + padding: 20px;
  181 + border-bottom: 1px solid #ebeef5;
  182 + font-size: 16px;
  183 + font-weight: 500;
  184 + color: #303133;
  185 + }
  186 +
  187 + .table-container {
  188 + position: relative;
  189 + padding: 20px;
  190 + }
  191 +
  192 + .loading-overlay {
  193 + position: absolute;
  194 + top: 0;
  195 + left: 0;
  196 + right: 0;
  197 + bottom: 0;
  198 + background: rgba(255, 255, 255, 0.8);
  199 + display: flex;
  200 + align-items: center;
  201 + justify-content: center;
  202 + z-index: 10;
  203 + }
  204 +
  205 + .loading-spinner {
  206 + color: #409eff;
  207 + font-size: 14px;
  208 + }
  209 +
  210 + .data-table {
  211 + width: 100%;
  212 + border-collapse: collapse;
  213 + border: 1px solid #ebeef5;
  214 + border-radius: 4px;
  215 + overflow: hidden;
  216 + }
  217 +
  218 + .table-header {
  219 + background-color: #fafafa;
  220 + color: #606266;
  221 + font-weight: 500;
  222 + padding: 12px 8px;
  223 + text-align: center;
  224 + border-bottom: 1px solid #ebeef5;
  225 + font-size: 14px;
  226 + min-width: 120px;
  227 + }
  228 +
  229 + .table-row {
  230 + &:hover {
  231 + background-color: #f5f7fa;
  232 + }
  233 +
  234 + &:nth-child(even) {
  235 + background-color: #fafafa;
  236 + }
  237 + }
  238 +
  239 + .table-cell {
  240 + padding: 12px 8px;
  241 + text-align: center;
  242 + border-bottom: 1px solid #ebeef5;
  243 + font-size: 14px;
  244 + color: #606266;
  245 + vertical-align: middle;
  246 + }
  247 +
  248 + .form-input {
  249 + width: 100%;
  250 + padding: 8px 12px;
  251 + border: 1px solid #dcdfe6;
  252 + border-radius: 4px;
  253 + font-size: 14px;
  254 + color: #606266;
  255 + background-color: #fff;
  256 + transition: border-color 0.2s;
  257 + box-sizing: border-box;
  258 +
  259 + &:focus {
  260 + outline: none;
  261 + border-color: #409eff;
  262 + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  263 + }
  264 +
  265 + &::placeholder {
  266 + color: #c0c4cc;
  267 + }
  268 +
  269 + &:hover {
  270 + border-color: #c0c4cc;
  271 + }
  272 + }
  273 +
  274 + .empty-data {
  275 + text-align: center;
  276 + padding: 40px;
  277 + color: #909399;
  278 + font-size: 14px;
  279 + }
  280 +
146 .footer-row { 281 .footer-row {
147 margin-top: 20px; 282 margin-top: 20px;
  283 + padding: 20px;
  284 + border-top: 1px solid #ebeef5;
148 } 285 }
149 286
150 .text-right { 287 .text-right {
151 text-align: right; 288 text-align: right;
152 } 289 }
  290 +
  291 + .btn {
  292 + padding: 10px 20px;
  293 + border: none;
  294 + border-radius: 4px;
  295 + font-size: 14px;
  296 + cursor: pointer;
  297 + transition: all 0.3s;
  298 +
  299 + &.btn-primary {
  300 + background-color: #409eff;
  301 + color: #fff;
  302 +
  303 + &:hover {
  304 + background-color: #66b1ff;
  305 + }
  306 +
  307 + &:active {
  308 + background-color: #3a8ee6;
  309 + }
  310 +
  311 + &:disabled {
  312 + background-color: #a0cfff;
  313 + cursor: not-allowed;
  314 + }
  315 + }
  316 + }
  317 +
  318 + // 响应式设计
  319 + @media (max-width: 768px) {
  320 + .data-table {
  321 + font-size: 12px;
  322 + }
  323 +
  324 + .table-header,
  325 + .table-cell {
  326 + padding: 8px 4px;
  327 + min-width: 80px;
  328 + }
  329 +
  330 + .form-input {
  331 + padding: 6px 8px;
  332 + font-size: 12px;
  333 + }
  334 + }
153 } 335 }
154 </style> 336 </style>
155 \ No newline at end of file 337 \ No newline at end of file
src/views/resource/storehouseManageLang.js
@@ -7,7 +7,8 @@ export const messages = { @@ -7,7 +7,8 @@ export const messages = {
7 shName: 'Please enter warehouse name', 7 shName: 'Please enter warehouse name',
8 shId: 'Please enter warehouse ID', 8 shId: 'Please enter warehouse ID',
9 isShow: 'Please select whether it is open to the public', 9 isShow: 'Please select whether it is open to the public',
10 - shDesc: 'Please enter warehouse description' 10 + shDesc: 'Please enter warehouse description',
  11 + selectFlow: 'Please select flow'
11 }, 12 },
12 options: { 13 options: {
13 all: 'All', 14 all: 'All',
@@ -49,7 +50,8 @@ export const messages = { @@ -49,7 +50,8 @@ export const messages = {
49 shName: '请输入仓库名称', 50 shName: '请输入仓库名称',
50 shId: '请输入仓库编号', 51 shId: '请输入仓库编号',
51 isShow: '请选择是否对外开放', 52 isShow: '请选择是否对外开放',
52 - shDesc: '请输入仓库描述' 53 + shDesc: '请输入仓库描述',
  54 + selectFlow: '请选择流程'
53 }, 55 },
54 options: { 56 options: {
55 all: '全部', 57 all: '全部',