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 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 55 export function listWorkflowAuditInfo(params) {
41 56 return new Promise((resolve, reject) => {
... ...
src/components/inspection/maintainanceTaskTransfer.vue
... ... @@ -26,6 +26,7 @@
26 26 import { updateMaintainanceTask } from '@/api/inspection/maintainanceTaskManageApi'
27 27 import { getCommunityId } from '@/api/community/communityApi'
28 28 import { queryStaffInfos } from '@/api/staff/staffApi.js'
  29 +import { getUserId } from '@/api/user/userApi'
29 30  
30 31  
31 32 export default {
... ... @@ -78,7 +79,7 @@ export default {
78 79 this.form = {
79 80 ...this.form,
80 81 ...data,
81   - currentUserId: this.$store.getters.userId,
  82 + currentUserId: getUserId(),
82 83 communityId: getCommunityId()
83 84 }
84 85 this.loadStaffs()
... ...
src/components/resource/AddResourceAuditFlow.vue
1 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 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 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 14 </el-select>
43 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 20 </el-form-item>
57 21 </el-form>
58   -
  22 +
59 23 <div slot="footer" class="dialog-footer">
60 24 <el-button @click="dialogVisible = false">
61 25 {{ $t('resourceAuditFlow.cancel') }}
... ... @@ -112,16 +76,16 @@ export default {
112 76 if (valid) {
113 77 try {
114 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 81 this.dialogVisible = false
118 82 this.$emit('success')
119 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 86 } catch (error) {
123 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 40 <el-form-item prop="purchaseRafId">
41 41 <el-select v-model="form.purchaseRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
42 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 44 :label="item.flowName" :value="item.rafId" />
45 45 </el-select>
46 46 </el-form-item>
... ... @@ -57,7 +57,7 @@
57 57 <el-form-item prop="useRafId">
58 58 <el-select v-model="form.useRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
59 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 61 :label="item.flowName" :value="item.rafId" />
62 62 </el-select>
63 63 </el-form-item>
... ... @@ -74,7 +74,7 @@
74 74 <el-form-item prop="allocationRafId">
75 75 <el-select v-model="form.allocationRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
76 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 78 :label="item.flowName" :value="item.rafId" />
79 79 </el-select>
80 80 </el-form-item>
... ...
src/components/resource/EditStorehouse.vue
... ... @@ -47,7 +47,7 @@
47 47 <el-form-item prop="purchaseRafId">
48 48 <el-select v-model="form.purchaseRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
49 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 51 :label="item.flowName" :value="item.rafId" />
52 52 </el-select>
53 53 </el-form-item>
... ... @@ -65,7 +65,7 @@
65 65 <el-form-item prop="useRafId">
66 66 <el-select v-model="form.useRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
67 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 69 :label="item.flowName" :value="item.rafId" />
70 70 </el-select>
71 71 </el-form-item>
... ... @@ -82,7 +82,7 @@
82 82 <el-form-item prop="allocationRafId">
83 83 <el-select v-model="form.allocationRafId" :placeholder="$t('storehouseManage.placeholders.selectFlow')"
84 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 86 :label="item.flowName" :value="item.rafId" />
87 87 </el-select>
88 88 </el-form-item>
... ... @@ -167,7 +167,7 @@ export default {
167 167 await updateStorehouse(this.form)
168 168 this.$emit('success')
169 169 this.close()
170   - this.$message.success(this.$t('storehouseManage.messages.updateSuccess'))
  170 + this.$message.success(this.$t('common.submitSuccess'))
171 171 } catch (error) {
172 172 if (error.message) {
173 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 147 \ No newline at end of file
... ...
src/components/resource/auditDiv.vue
1 1 <template>
2   - <el-dialog :title="$t('auditDiv.workOrderProcessing')" :visible.sync="visible" width="50%" @close="handleClose">
  2 + <el-card width="50%" >
3 3 <el-form ref="form" :model="formData" label-width="120px">
4 4 <el-form-item :label="$t('auditDiv.action')" prop="auditCode">
5 5 <el-select v-model="formData.auditCode" :placeholder="$t('auditDiv.pleaseSelect')" style="width: 100%">
... ... @@ -27,21 +27,21 @@
27 27 </el-form-item>
28 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 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 35 </template>
36 36  
37 37 <script>
38 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 41 export default {
42 42 name: 'AuditDiv',
43 43 components: {
44   - // SelectStaff
  44 + SelectStaff
45 45 },
46 46 data() {
47 47 return {
... ... @@ -65,7 +65,6 @@ export default {
65 65 this.formData.flowId = data.flowId
66 66 this.formData.id = data.id
67 67 this.createUserId = data.createUserId
68   - this.visible = true
69 68 this.loadNextAuditPerson()
70 69 },
71 70 async loadNextAuditPerson() {
... ... @@ -75,7 +74,7 @@ export default {
75 74 startUserId: this.createUserId
76 75 }
77 76 const res = await queryNextDealUser(params)
78   - if (res.code === '0') {
  77 + if (res.code == '0') {
79 78 this.nextAudit = res.data[0]
80 79 }
81 80 } catch (error) {
... ... @@ -115,7 +114,7 @@ export default {
115 114 const res = await auditApplyOrder(this.formData)
116 115 if (res.code === 0) {
117 116 this.$message.success(this.$t('auditDiv.submitSuccess'))
118   - this.visible = false
  117 + this.$router.go(-1)
119 118 this.$emit('success')
120 119 } else {
121 120 this.$message.error(res.msg)
... ... @@ -137,6 +136,10 @@ export default {
137 136 id: ''
138 137 }
139 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 22  
23 23 <script>
24 24 import { queryAttendanceLog } from '@/api/staff/adminStaffDetailApi'
  25 + import { getCommunityId } from '@/api/community/communityApi'
25 26  
26 27 export default {
27 28 name: 'StaffAttendanceDetail',
... ... @@ -38,7 +39,7 @@
38 39 this.visible = true
39 40 try {
40 41 const { data } = await queryAttendanceLog({
41   - communityId: this.$store.getters.currentCommunityId,
  42 + communityId: getCommunityId(),
42 43 staffId: param.staffId,
43 44 date: param.date,
44 45 page: 1,
... ...
src/components/work/dispatchRepair.vue
... ... @@ -126,7 +126,7 @@ export default {
126 126 context: '',
127 127 action: '',
128 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 43  
44 44 <script>
45 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 48 export default {
49 49 name: 'EditOwnerRepair',
... ... @@ -100,7 +100,7 @@ export default {
100 100 try {
101 101 if (this.formData.repairObjType === '001') {
102 102 this.formData.repairObjId = getCommunityId()
103   - this.formData.repairObjName = this.$store.getters.community.name
  103 + this.formData.repairObjName = getCommunityName()
104 104 }
105 105  
106 106 const data = {
... ...
src/i18n/commonLang.js
... ... @@ -57,6 +57,7 @@ export const messages = {
57 57 audit:'Audit',
58 58 choose:'Choose',
59 59 submitSuccess:'Submit successfully',
  60 + submitFailed:'Submit failed',
60 61 saveSuccess:'successfully',
61 62 noData:'No Data',
62 63 file:'File',
... ... @@ -124,6 +125,7 @@ export const messages = {
124 125 audit:'审核',
125 126 choose:'选择',
126 127 submitSuccess:'提交成功',
  128 + submitFailed:'提交失败',
127 129 saveSuccess:'成功',
128 130 noData:'暂无数据',
129 131 file:'附件',
... ...
src/views/contract/contractApplyAuditOrdersList.vue
... ... @@ -47,6 +47,7 @@
47 47 import { queryContractTask, needAuditContract,listWorkflowStepStaffs } from '@/api/contract/contractApplyAuditOrdersApi'
48 48 import { getCommunityId } from '@/api/community/communityApi'
49 49 import FlowAudit from '@/components/contract/flowAudit'
  50 +import { getUserId } from '@/api/user/userApi'
50 51  
51 52 export default {
52 53 name: 'ContractApplyAuditOrdersList',
... ... @@ -79,7 +80,7 @@ export default {
79 80 },
80 81 created() {
81 82 this.communityId = getCommunityId()
82   - this.contractApplyAuditOrdersInfo.currentUserId = this.$store.getters.userId
  83 + this.contractApplyAuditOrdersInfo.currentUserId = getUserId()
83 84 this._listAuditOrders(this.page.current, this.page.size)
84 85 this._loadStepStaff()
85 86 },
... ...
src/views/contract/contractChangeAuditOrdersList.vue
... ... @@ -49,6 +49,7 @@
49 49 <script>
50 50 import { queryContractChangeTask, needAuditContractPlan } from '@/api/resource/contractChangeAuditOrdersApi'
51 51 import FlowAudit from '@/components/contract/flowAudit'
  52 +import { getUserId } from '@/api/user/userApi'
52 53  
53 54 export default {
54 55 name: 'ContractChangeAuditOrdersList',
... ... @@ -81,7 +82,7 @@ export default {
81 82 }
82 83 },
83 84 created() {
84   - this.currentUserId = this.$store.getters.userId
  85 + this.contractChangeAuditOrdersInfo.currentUserId = getUserId()
85 86 this._listAuditOrders(this.page.current, this.page.size)
86 87 },
87 88 methods: {
... ...
src/views/fee/printPayFeeBangTaiList.vue
... ... @@ -109,7 +109,7 @@
109 109  
110 110 <script>
111 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 113 import { getUserId,getUserName } from '@/api/user/userApi'
114 114 import { dateFormat } from '@/utils/dateUtil'
115 115 import { changeNumMoneyToChinese } from '@/utils/moneyUtil'
... ... @@ -157,7 +157,7 @@ export default {
157 157 }
158 158 },
159 159 async loadData() {
160   - this.printPayFeeInfo.communityName = this.$store.getters.currentCommunity.name
  160 + this.printPayFeeInfo.communityName = getCommunityName()
161 161 await this.loadReceipt()
162 162 await this.loadPrintSpec()
163 163 },
... ...
src/views/oa/newOaWorkflowDoingList.vue
... ... @@ -146,7 +146,7 @@ export default {
146 146 page: 1,
147 147 row: 10
148 148 }
149   - const data = await getUndoInfo(params)
  149 + const {data} = await getUndoInfo(params)
150 150 Object.assign(this.newOaWorkflowDoingInfo, data)
151 151  
152 152 // Update counts in pendingItems
... ...
src/views/resource/addItemOutList.vue
... ... @@ -162,11 +162,11 @@
162 162 <div slot="header" class="clearfix">
163 163 <h5>{{ $t('addItemOut.approver') }}</h5>
164 164 </div>
165   - <div class="ibox-content">
  165 + <div class="">
166 166 <el-form :model="addItemOutInfo" label-position="right" label-width="120px">
167 167 <el-form-item :label="$t('addItemOut.approver')">
168 168 <el-row :gutter="20">
169   - <el-col :span="18">
  169 + <el-col :span="17">
170 170 <el-input :placeholder="$t('addItemOut.approverPlaceholder')"
171 171 v-model="addItemOutInfo.audit.staffName" disabled></el-input>
172 172 </el-col>
... ... @@ -194,15 +194,15 @@
194 194 <choose-resource-store2 ref="chooseResourceStore2"
195 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 198 </div>
199 199 </template>
200 200  
201 201 <script>
202 202 import { getCommunityId } from '@/api/community/communityApi'
203 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 206 import { getUserName, getUserTel } from '@/api/user/userApi'
207 207  
208 208 export default {
... ... @@ -434,10 +434,21 @@ export default {
434 434  
435 435 return stock
436 436 },
437   - _loadStaffOrg(flowId) {
  437 + async _loadStaffOrg(flowId) {
438 438 // 实际调用API的方法
439 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 453 chooseStaff() {
443 454 this.$refs.selectStaff.open(this.addItemOutInfo.audit)
... ... @@ -476,6 +487,12 @@ export default {
476 487  
477 488 const filteredList = newList.filter(item => item['resId'])
478 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 146 <choose-resource-store2 ref="chooseResourceStore2"
147 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 150 </div>
151 151 </template>
152 152  
153 153 <script>
154 154 import { getCommunityId } from '@/api/community/communityApi'
155 155 import ChooseResourceStore2 from '@/components/resource/chooseResourceStore2'
156   -import SelectStaff from '@/components/resource/selectStaff'
  156 +import SelectStaff from '@/components/staff/SelectStaff'
157 157 import { getUserName } from '@/api/user/userApi'
158 158 import {
159 159 listStorehouses,
... ... @@ -282,7 +282,7 @@ export default {
282 282 const res = await purchaseApply(this.addPurchaseApplyInfo)
283 283 if (res.code === 0) {
284 284 this.$router.go(-1)
285   - this.$message.success(this.$t('common.operationSuccess'))
  285 + this.$message.success(this.$t('common.submitSuccess'))
286 286 } else {
287 287 this.$message.error(res.msg)
288 288 }
... ... @@ -423,8 +423,8 @@ export default {
423 423 this.addPurchaseApplyInfo.resourceStores = resourceStores
424 424 },
425 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 429 goBack() {
430 430 this.$router.go(-1)
... ...
src/views/resource/allocationStorehouseApplyList.vue
... ... @@ -136,22 +136,25 @@
136 136 </el-card>
137 137  
138 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 140 <span>{{ $t('allocationStorehouseApply.approverTitle') }}</span>
141 141 </div>
142 142  
143 143 <el-form label-width="120px">
144 144 <el-row :gutter="20">
145   - <el-col :span="24">
  145 + <el-col :span="18">
146 146 <el-form-item :label="$t('allocationStorehouseApply.approver')">
147 147 <el-input v-model="form.audit.staffName" :placeholder="$t('allocationStorehouseApply.selectApprover')"
148 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 150 </el-form-item>
154 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 158 </el-row>
156 159 </el-form>
157 160 </el-card>
... ... @@ -164,14 +167,14 @@
164 167  
165 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 171 </div>
169 172 </template>
170 173  
171 174 <script>
172 175 import { getCommunityId } from '@/api/community/communityApi'
173 176 import ChooseResourceStore from '@/components/resource/chooseResourceStore'
174   -import SelectStaff from '@/components/resource/selectStaff'
  177 +import SelectStaff from '@/components/staff/SelectStaff'
175 178 import {
176 179 listStorehouses,
177 180 saveAllocationStorehouse,
... ... @@ -194,6 +197,7 @@ export default {
194 197 communityId: '',
195 198 shId: '',
196 199 flowId: '',
  200 + apply_type: 10000,
197 201 audit: {
198 202 assignee: '',
199 203 staffId: '',
... ... @@ -322,8 +326,8 @@ export default {
322 326 this.$refs.selectStaff.open(this.form.audit)
323 327 },
324 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 332 async submitApply() {
329 333 // 验证数据
... ...
src/views/resource/allocationStorehouseAuditOrdersList.vue
... ... @@ -62,6 +62,7 @@
62 62 <script>
63 63 import { listAllocationStoreAuditOrders, listWorkflowStepStaffs } from '@/api/resource/allocationStorehouseAuditOrdersApi'
64 64 import { getCommunityId } from '@/api/community/communityApi'
  65 +import { getUserId } from '@/api/user/userApi'
65 66  
66 67 export default {
67 68 name: 'AllocationStorehouseAuditOrdersList',
... ... @@ -91,7 +92,7 @@ export default {
91 92 },
92 93 created() {
93 94 this.communityId = getCommunityId()
94   - this.allocationStorehouseAuditOrdersInfo.currentUserId = this.$store.getters.userId
  95 + this.allocationStorehouseAuditOrdersInfo.currentUserId = getUserId()
95 96 this.listAuditOrders()
96 97 this.loadStepStaff()
97 98 },
... ... @@ -139,7 +140,8 @@ export default {
139 140 query: {
140 141 applyId: auditOrder.applyId,
141 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 17 </div>
18 18 </div>
19 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 50 </el-card>
51 51 </el-col>
52 52 </el-row>
... ... @@ -103,7 +103,7 @@
103 103 v-if="allocationStorehouseDetailInfo.applyType === '10000' && allocationStorehouseDetailInfo.auditUsersCount > 0">
104 104 <el-col :span="24">
105 105 <el-card>
106   - <div slot="header" class="clearfix">
  106 + <div slot="header" class="flex justify-between">
107 107 <span>{{ $t('allocationStorehouseDetail.workflow') }}</span>
108 108 </div>
109 109 <el-table :data="allocationStorehouseDetailInfo.auditUsers" border style="width: 100%">
... ... @@ -125,8 +125,9 @@
125 125 </el-card>
126 126 </el-col>
127 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 131 </div>
131 132 </template>
132 133  
... ... @@ -136,14 +137,14 @@ import {
136 137 listAllocationStorehouseApplys,
137 138 listAllocationStorehouses,
138 139 listWorkflowAuditInfo
139   - // auditAllocationStoreOrder
  140 + // auditAllocationStoreOrder
140 141 } from '@/api/resource/allocationStorehouseDetailApi'
141   -import AuditDiv from '@/components/resource/auditDiv'
  142 +import AllocationAuditDiv from '@/components/resource/allocationAuditDiv'
142 143  
143 144 export default {
144 145 name: 'AllocationStorehouseDetailList',
145 146 components: {
146   - AuditDiv
  147 + AllocationAuditDiv
147 148 },
148 149 data() {
149 150 return {
... ... @@ -160,7 +161,8 @@ export default {
160 161 applyType: '',
161 162 applyTypeName: '',
162 163 action: '',
163   - taskId: ''
  164 + taskId: '',
  165 + flowId: ''
164 166 }
165 167 }
166 168 },
... ... @@ -171,6 +173,7 @@ export default {
171 173 this.allocationStorehouseDetailInfo.applyTypeName = this.$route.query.applyTypeName
172 174 this.allocationStorehouseDetailInfo.action = this.$route.query.action
173 175 this.allocationStorehouseDetailInfo.taskId = this.$route.query.taskId
  176 + this.allocationStorehouseDetailInfo.flowId = this.$route.query.flowId
174 177 this.listAllocationStorehouseApply()
175 178 this.listPurchaseApply(1, 100)
176 179 },
... ... @@ -208,6 +211,7 @@ export default {
208 211 createUserId: purchaseApply.startUserId,
209 212 action: this.allocationStorehouseDetailInfo.action,
210 213 taskId: this.allocationStorehouseDetailInfo.taskId,
  214 + flowId: this.allocationStorehouseDetailInfo.flowId,
211 215 url: '/resourceStore.auditAllocationStoreOrder',
212 216 id: purchaseApply.applyId,
213 217 })
... ...
src/views/resource/allocationStorehouseEnterList.vue
... ... @@ -7,16 +7,9 @@
7 7  
8 8 <el-row :gutter="20">
9 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 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 13 </el-table-column>
21 14 <el-table-column prop="parentRstName" :label="$t('allocationStorehouseEnter.resourceType')"
22 15 align="center">
... ... @@ -67,7 +60,6 @@
67 60 </template>
68 61 </el-table-column>
69 62 </el-table>
70   - </el-card>
71 63 </el-col>
72 64 </el-row>
73 65  
... ...
src/views/resource/myAuditOrdersList.vue
... ... @@ -112,11 +112,11 @@ export default {
112 112 this.auditOrdersInfo.conditions.row = _rows
113 113 try {
114 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 120 this.currentPage = _page
121 121 } catch (error) {
122 122 console.error('请求失败:', error)
... ... @@ -139,7 +139,7 @@ export default {
139 139 },
140 140 _openDetailPurchaseApplyModel(_purchaseApply) {
141 141 this.$router.push({
142   - path: '/views/resource/purchaseApplyDetaill',
  142 + path: '/views/resource/purchaseApplyDetail',
143 143 query: {
144 144 applyOrderId: _purchaseApply.applyOrderId,
145 145 resOrderType: _purchaseApply.resOrderType
... ...
src/views/resource/myItemOutAuditOrdersList.vue
... ... @@ -57,6 +57,7 @@
57 57 <script>
58 58 import { getCollectionAuditOrder } from '@/api/resource/myItemOutAuditOrdersApi'
59 59 import { getCommunityId } from '@/api/community/communityApi'
  60 +import { getUserId } from '@/api/user/userApi'
60 61  
61 62 export default {
62 63 name: 'MyItemOutAuditOrdersList',
... ... @@ -88,7 +89,7 @@ export default {
88 89 }
89 90 },
90 91 created() {
91   - this.auditOrdersInfo.currentUserId = this.$store.getters.userId
  92 + this.auditOrdersInfo.currentUserId = getUserId()
92 93 this._listAuditOrders(this.DEFAULT_PAGE, this.DEFAULT_ROWS)
93 94 },
94 95 methods: {
... ... @@ -117,6 +118,7 @@ export default {
117 118 query: {
118 119 applyOrderId: auditOrder.applyOrderId,
119 120 resOrderType: auditOrder.resOrderType,
  121 + flowId: auditOrder.flowId,
120 122 action: 'audit',
121 123 taskId: auditOrder.taskId
122 124 }
... ... @@ -127,7 +129,7 @@ export default {
127 129 },
128 130 _openDetailPurchaseApplyModel(purchaseApply) {
129 131 this.$router.push({
130   - path: '/views/resource/purchaseApplyDetaill',
  132 + path: '/views/resource/purchaseApplyDetail',
131 133 query: {
132 134 applyOrderId: purchaseApply.applyOrderId,
133 135 resOrderType: purchaseApply.resOrderType
... ... @@ -145,11 +147,12 @@ export default {
145 147 },
146 148 _distributionOrder(purchaseApply) {
147 149 this.$router.push({
148   - path: '/pages/common/resourceOutManage',
  150 + path: '/pages/admin/resourceOutManage',
149 151 query: {
150 152 applyOrderId: purchaseApply.applyOrderId,
151 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 86 <script>
87 87 import { getEquipmentAccountList } from '@/api/resource/printEquipmentAccountLabelApi'
88 88 import QRCode from 'qrcodejs2'
89   -import { getCommunityId } from '@/api/community/communityApi'
  89 +import { getCommunityId ,getCommunityName} from '@/api/community/communityApi'
90 90  
91 91 export default {
92 92 name: 'PrintEquipmentAccountLabelList',
... ... @@ -131,7 +131,7 @@ export default {
131 131 this._initPrintRepairDetailDateInfo()
132 132 const myDate = new Date()
133 133 this.nowTime = myDate.toLocaleDateString()
134   - this.printEquipmentAccountInfo.yqName = this.$store.getters.currentCommunity.name
  134 + this.printEquipmentAccountInfo.yqName = getCommunityName()
135 135 },
136 136 methods: {
137 137 async _initPrintRepairDetailDateInfo() {
... ...
src/views/resource/purchaseApplyDetailList.vue
... ... @@ -231,7 +231,8 @@ export default {
231 231 auditUsers: [],
232 232 warehousingWay: '',
233 233 action: '',
234   - taskId: ''
  234 + taskId: '',
  235 + flowId: ''
235 236 },
236 237 communityId: ''
237 238 }
... ... @@ -242,6 +243,7 @@ export default {
242 243 this.purchaseApplyDetailInfo.resOrderType = this.$route.query.resOrderType
243 244 this.purchaseApplyDetailInfo.action = this.$route.query.action
244 245 this.purchaseApplyDetailInfo.taskId = this.$route.query.taskId
  246 + this.purchaseApplyDetailInfo.flowId = this.$route.query.flowId
245 247 this._listPurchaseApply()
246 248 },
247 249 methods: {
... ... @@ -267,6 +269,7 @@ export default {
267 269 createUserId: purchaseApply.createUserId,
268 270 action: this.purchaseApplyDetailInfo.action,
269 271 taskId: this.purchaseApplyDetailInfo.taskId,
  272 + flowId: this.purchaseApplyDetailInfo.flowId,
270 273 url: '/purchaseApply.auditApplyOrder',
271 274 id: purchaseApply.applyOrderId,
272 275 })
... ...
src/views/resource/resourceAuditFlowList.vue
... ... @@ -182,14 +182,14 @@ export default {
182 182 this.loading = true
183 183 const res = await deployWorkflow({ modelId: row.modelId })
184 184 if (res.code === 0) {
185   - this.$message.success(this.$t('resourceAuditFlow.deploySuccess'))
  185 + this.$message.success(this.$t('common.submitSuccess'))
186 186 this.fetchData()
187 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 190 } catch (error) {
191 191 console.error('部署流程失败:', error)
192   - this.$message.error(this.$t('resourceAuditFlow.deployFailed'))
  192 + this.$message.error(this.$t('common.submitFailed'))
193 193 } finally {
194 194 this.loading = false
195 195 }
... ...
src/views/resource/resourceEnterManageList.vue
1 1 <template>
2 2 <div class="resource-enter-manage-container">
3 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 6 </div>
7 7  
8 8 <el-row :gutter="20">
9 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 13 <el-table-column prop="rstName" :label="$t('resourceEnterManage.itemType')" align="center">
18 14 <template slot-scope="scope">
19   - {{scope.row.rstName || '-'}}
  15 + {{ scope.row.rstName || '-' }}
20 16 </template>
21 17 </el-table-column>
22 18 <el-table-column prop="resName" :label="$t('resourceEnterManage.itemName')" align="center" />
23 19 <el-table-column prop="specName" :label="$t('resourceEnterManage.itemSpec')" align="center">
24 20 <template slot-scope="scope">
25   - {{scope.row.specName || '-'}}
  21 + {{ scope.row.specName || '-' }}
26 22 </template>
27 23 </el-table-column>
28 24 <el-table-column prop="resCode" :label="$t('resourceEnterManage.itemCode')" align="center" />
29 25 <el-table-column prop="stock" :label="$t('resourceEnterManage.itemStock')" align="center" />
30 26 <el-table-column prop="standardPrice" :label="$t('resourceEnterManage.referencePrice')" align="center">
31 27 <template slot-scope="scope">
32   - ¥{{scope.row.standardPrice}}
  28 + ¥{{ scope.row.standardPrice }}
33 29 </template>
34 30 </el-table-column>
35 31 <el-table-column prop="quantity" :label="$t('resourceEnterManage.applyQuantity')" align="center" />
36 32 <el-table-column :label="$t('resourceEnterManage.purchaseQuantity')" align="center">
37 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 36 </template>
44 37 </el-table-column>
45 38 <el-table-column :label="$t('resourceEnterManage.purchasePrice')" align="center">
46 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 42 </template>
53 43 </el-table-column>
54 44 <el-table-column :label="$t('resourceEnterManage.supplier')" align="center">
55 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 50 </el-select>
68 51 </template>
69 52 </el-table-column>
70 53 <el-table-column :label="$t('resourceEnterManage.remark')" align="center">
71 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 57 </template>
78 58 </el-table-column>
79 59 </el-table>
... ... @@ -125,7 +105,7 @@ export default {
125 105 applyOrderId: this.resourceEnterManageInfo.applyOrderId,
126 106 resOrderType: this.resourceEnterManageInfo.resOrderType
127 107 }
128   - const { data } = await listPurchaseApplys(params)
  108 + const data = await listPurchaseApplys(params)
129 109 const purchaseApply = data.purchaseApplys[0]
130 110 Object.assign(this.resourceEnterManageInfo, purchaseApply)
131 111 this.resourceEnterManageInfo.purchaseApplyDetailVo.forEach(item => {
... ... @@ -148,12 +128,13 @@ export default {
148 128 }
149 129 },
150 130 handleSelectionChange(selection) {
  131 + console.log(selection)
151 132 this.resourceEnterManageInfo.selectResIds = selection.map(item => item.resId)
152 133 },
153 134 async handleSubmit() {
154 135 // Validation
155 136 let msg = ''
156   - const selectedItems = this.resourceEnterManageInfo.purchaseApplyDetailVo.filter(item =>
  137 + const selectedItems = this.resourceEnterManageInfo.purchaseApplyDetailVo.filter(item =>
157 138 this.resourceEnterManageInfo.selectResIds.includes(item.resId)
158 139 )
159 140  
... ... @@ -168,7 +149,7 @@ export default {
168 149 break
169 150 }
170 151 item.purchaseQuantity = parseInt(item.purchaseQuantity)
171   -
  152 +
172 153 if (!item.price || parseFloat(item.price) <= 0) {
173 154 msg = this.$t('resourceEnterManage.purchasePriceError')
174 155 break
... ...
src/views/resource/resourceOutManageList.vue
1 1 <template>
2 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 5 <span>{{ $t('resourceOutManage.orderId') }}:{{ resourceOutManageInfo.applyOrderId }}</span>
6 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 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 71 </div>
50 72 </template>
51 73  
... ... @@ -81,7 +103,7 @@ export default {
81 103 applyOrderId: this.resourceOutManageInfo.applyOrderId,
82 104 resOrderType: this.resourceOutManageInfo.resOrderType
83 105 }
84   - const { data } = await listPurchaseApplys(params)
  106 + const data = await listPurchaseApplys(params)
85 107 const purchaseApply = data.purchaseApplys[0]
86 108 this.resourceOutManageInfo = {
87 109 ...this.resourceOutManageInfo,
... ... @@ -99,6 +121,14 @@ export default {
99 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 132 async handleSubmit() {
103 133 try {
104 134 // Validate form
... ... @@ -140,15 +170,167 @@ export default {
140 170 padding: 20px;
141 171  
142 172 .box-card {
  173 + background: #fff;
  174 + border-radius: 4px;
  175 + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
143 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 281 .footer-row {
147 282 margin-top: 20px;
  283 + padding: 20px;
  284 + border-top: 1px solid #ebeef5;
148 285 }
149 286  
150 287 .text-right {
151 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 336 </style>
155 337 \ No newline at end of file
... ...
src/views/resource/storehouseManageLang.js
... ... @@ -7,7 +7,8 @@ export const messages = {
7 7 shName: 'Please enter warehouse name',
8 8 shId: 'Please enter warehouse ID',
9 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 13 options: {
13 14 all: 'All',
... ... @@ -49,7 +50,8 @@ export const messages = {
49 50 shName: '请输入仓库名称',
50 51 shId: '请输入仓库编号',
51 52 isShow: '请选择是否对外开放',
52   - shDesc: '请输入仓库描述'
  53 + shDesc: '请输入仓库描述',
  54 + selectFlow: '请选择流程'
53 55 },
54 56 options: {
55 57 all: '全部',
... ...