Commit b49627017620fcfc11d43e6c9db624f8c7d5f6a1

Authored by wuxw
1 parent c412a802

测试采购相关功能

src/api/resource/allocationStorehouseDetailApi.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +import { getCommunityId } from '@/api/community/communityApi'
  3 +
  4 +// 获取调拨仓库申请列表
  5 +export function listAllocationStorehouseApplys(params) {
  6 + return new Promise((resolve, reject) => {
  7 + request({
  8 + url: '/resourceStore.listAllocationStorehouseApplys',
  9 + method: 'get',
  10 + params: {
  11 + ...params,
  12 + communityId: getCommunityId()
  13 + }
  14 + }).then(response => {
  15 + const res = response.data
  16 + resolve(res)
  17 + }).catch(error => {
  18 + reject(error)
  19 + })
  20 + })
  21 +}
  22 +
  23 +// 获取调拨仓库物品列表
  24 +export function listAllocationStorehouses(params) {
  25 + return new Promise((resolve, reject) => {
  26 + request({
  27 + url: '/resourceStore.listAllocationStorehouses',
  28 + method: 'get',
  29 + params: {
  30 + ...params,
  31 + communityId: getCommunityId()
  32 + }
  33 + }).then(response => {
  34 + const res = response.data
  35 + resolve(res)
  36 + }).catch(error => {
  37 + reject(error)
  38 + })
  39 + })
  40 +}
  41 +
  42 +// 审核调拨仓库订单
  43 +export function auditAllocationStoreOrder(data) {
  44 + return new Promise((resolve, reject) => {
  45 + request({
  46 + url: '/resourceStore.auditAllocationStoreOrder',
  47 + method: 'post',
  48 + data: {
  49 + ...data,
  50 + communityId: getCommunityId()
  51 + }
  52 + }).then(response => {
  53 + const res = response.data
  54 + resolve(res)
  55 + }).catch(error => {
  56 + reject(error)
  57 + })
  58 + })
  59 +}
  60 +
  61 +// 查询下一处理人
  62 +export function queryNextDealUser(params) {
  63 + return new Promise((resolve, reject) => {
  64 + request({
  65 + url: '/oaWorkflow.queryNextDealUser',
  66 + method: 'get',
  67 + params: {
  68 + ...params,
  69 + communityId: getCommunityId()
  70 + }
  71 + }).then(response => {
  72 + const res = response.data
  73 + resolve(res)
  74 + }).catch(error => {
  75 + reject(error)
  76 + })
  77 + })
  78 +}
  79 +
  80 +// 查询工作流审核信息
  81 +export function listWorkflowAuditInfo(params) {
  82 + return new Promise((resolve, reject) => {
  83 + request({
  84 + url: '/workflow.listWorkflowAuditInfo',
  85 + method: 'get',
  86 + params: {
  87 + ...params,
  88 + communityId: getCommunityId()
  89 + }
  90 + }).then(response => {
  91 + const res = response.data
  92 + resolve(res)
  93 + }).catch(error => {
  94 + reject(error)
  95 + })
  96 + })
  97 +}
  98 +
  99 +// 查询员工信息
  100 +export function queryStaffInfos(params) {
  101 + return new Promise((resolve, reject) => {
  102 + request({
  103 + url: '/query.staff.infos',
  104 + method: 'get',
  105 + params: {
  106 + ...params,
  107 + communityId: getCommunityId()
  108 + }
  109 + }).then(response => {
  110 + const res = response.data
  111 + resolve(res)
  112 + }).catch(error => {
  113 + reject(error)
  114 + })
  115 + })
  116 +}
  117 +
  118 +// 查询组织树
  119 +export function listOrgTree(params) {
  120 + return new Promise((resolve, reject) => {
  121 + request({
  122 + url: '/org.listOrgTree',
  123 + method: 'get',
  124 + params: {
  125 + ...params,
  126 + communityId: getCommunityId()
  127 + }
  128 + }).then(response => {
  129 + const res = response.data
  130 + resolve(res)
  131 + }).catch(error => {
  132 + reject(error)
  133 + })
  134 + })
  135 +}
0 136 \ No newline at end of file
... ...
src/i18n/commonLang.js
... ... @@ -57,6 +57,7 @@ export const messages = {
57 57 choose:'Choose',
58 58 submitSuccess:'Submit successfully',
59 59 saveSuccess:'successfully',
  60 + noData:'No Data',
60 61 }
61 62 },
62 63 zh: {
... ... @@ -117,6 +118,7 @@ export const messages = {
117 118 choose:'选择',
118 119 submitSuccess:'提交成功',
119 120 saveSuccess:'成功',
  121 + noData:'暂无数据',
120 122 }
121 123 }
122 124 }
123 125 \ No newline at end of file
... ...
src/i18n/resourceI18n.js
... ... @@ -20,6 +20,7 @@ import { messages as allocationUserStorehouseManageMessages } from '../views/res
20 20 import { messages as resourceStoreUseRecordManageMessages } from '../views/resource/resourceStoreUseRecordManageLang'
21 21 import { messages as printEquipmentAccountLabelMessages } from '../views/resource/printEquipmentAccountLabelLang'
22 22 import { messages as resourceDetailMessages } from '../views/resource/resourceDetailLang'
  23 +import { messages as allocationStorehouseDetailMessages } from '../views/resource/allocationStorehouseDetailLang'
23 24  
24 25  
25 26 export const messages = {
... ... @@ -45,6 +46,7 @@ export const messages = {
45 46 ...resourceStoreUseRecordManageMessages.en,
46 47 ...printEquipmentAccountLabelMessages.en,
47 48 ...resourceDetailMessages.en,
  49 + ...allocationStorehouseDetailMessages.en,
48 50 },
49 51 zh: {
50 52 ...resourceAuditFlowMessages.zh,
... ... @@ -68,5 +70,6 @@ export const messages = {
68 70 ...resourceStoreUseRecordManageMessages.zh,
69 71 ...printEquipmentAccountLabelMessages.zh,
70 72 ...resourceDetailMessages.zh,
  73 + ...allocationStorehouseDetailMessages.zh,
71 74 }
72 75 }
73 76 \ No newline at end of file
... ...
src/router/resourceRouter.js
... ... @@ -101,9 +101,14 @@ export default [
101 101 component: () => import('@/views/resource/resourceStoreUseRecordManageList.vue')
102 102 },
103 103 {
104   - path:'/views/resource/resourceDetail',
105   - name:'/views/resource/resourceDetail',
  104 + path: '/views/resource/resourceDetail',
  105 + name: '/views/resource/resourceDetail',
106 106 component: () => import('@/views/resource/resourceDetailList.vue')
107   - },
  107 + },
  108 + {
  109 + path: '/pages/common/allocationStorehouseDetail',
  110 + name: '/pages/common/allocationStorehouseDetail',
  111 + component: () => import('@/views/resource/allocationStorehouseDetailList.vue')
  112 + },
108 113  
109 114 ]
110 115 \ No newline at end of file
... ...
src/views/resource/addItemOutList.vue
... ... @@ -65,68 +65,83 @@
65 65 </el-button>
66 66 </div>
67 67 </div>
68   - <div class="ibox-content">
69   - <el-table :data="addItemOutInfo.resourceStores" border style="width:100%">
70   - <el-table-column prop="parentRstName" :label="$t('addItemOut.itemType')" align="center">
71   - <template slot-scope="scope">
72   - {{ scope.row.parentRstName || '-' }} > {{ scope.row.rstName || '-' }}
73   - </template>
74   - </el-table-column>
75   -
76   - <el-table-column prop="resName" :label="$t('addItemOut.itemName')" align="center">
77   - <template slot-scope="scope">
78   - {{ scope.row.resName }}({{ scope.row.resCode }})
79   - </template>
80   - </el-table-column>
81   -
82   - <el-table-column prop="rssName" :label="$t('addItemOut.itemSpec')" align="center">
83   - <template slot-scope="scope">
84   - {{ scope.row.rssName || '-' }}
85   - </template>
86   - </el-table-column>
87   -
88   - <el-table-column :label="$t('addItemOut.price')" align="center">
89   - <template slot-scope="scope">
90   - <el-select v-model="scope.row.timesId" @change="_changeTimesId($event, scope.$index)"
91   - style="width:100%">
92   - <el-option :label="$t('addItemOut.selectPrice')" value=""></el-option>
93   - <el-option v-for="time in scope.row.times" :key="time.timesId" :label="time.price"
94   - :value="time.timesId"></el-option>
95   - </el-select>
96   - </template>
97   - </el-table-column>
98   -
99   - <el-table-column :label="$t('addItemOut.stock')" align="center">
100   - <template slot-scope="scope">
101   - {{ _getTimesStock(scope.row) }}{{ scope.row.unitCodeName }}
102   - </template>
103   - </el-table-column>
104   -
105   - <el-table-column :label="$t('addItemOut.applyQuantity')" align="center">
106   - <template slot-scope="scope">
107   - <el-input v-model.trim="scope.row.quantity" type="number"
108   - :placeholder="$t('addItemOut.quantityPlaceholder')"
109   - style="width:70%;display:inline-block;"></el-input>
110   - &nbsp;&nbsp;{{ scope.row.unitCodeName }}
111   - </template>
112   - </el-table-column>
113   -
114   - <el-table-column :label="$t('addItemOut.remark')" align="center">
115   - <template slot-scope="scope">
116   - <el-input v-model.trim="scope.row.remark" type="text"
117   - :placeholder="$t('addItemOut.remarkPlaceholder')"></el-input>
118   - </template>
119   - </el-table-column>
120   -
121   - <el-table-column :label="$t('addItemOut.operation')" align="center">
122   - <template slot-scope="scope">
123   - <el-button type="danger" size="small" @click="_removeSelectResourceStoreItem(scope.row.resId)">
124   - <i class="el-icon-delete"></i>
125   - {{ $t('addItemOut.remove') }}
126   - </el-button>
127   - </template>
128   - </el-table-column>
129   - </el-table>
  68 + <div class="">
  69 + <table class="custom-table">
  70 + <thead>
  71 + <tr>
  72 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  73 + {{ $t('addItemOut.itemType') }}
  74 + </th>
  75 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  76 + {{ $t('addItemOut.itemName') }}
  77 + </th>
  78 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  79 + {{ $t('addItemOut.itemSpec') }}
  80 + </th>
  81 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  82 + {{ $t('addItemOut.price') }}
  83 + </th>
  84 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  85 + {{ $t('addItemOut.stock') }}
  86 + </th>
  87 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  88 + {{ $t('addItemOut.applyQuantity') }}
  89 + </th>
  90 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  91 + {{ $t('addItemOut.remark') }}
  92 + </th>
  93 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  94 + {{ $t('addItemOut.operation') }}
  95 + </th>
  96 + </tr>
  97 + </thead>
  98 + <tbody>
  99 + <tr v-for="(item, index) in addItemOutInfo.resourceStores" :key="index"
  100 + style="border-bottom: 1px solid #ebeef5;">
  101 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  102 + {{ item.parentRstName || '-' }} > {{ item.rstName || '-' }}
  103 + </td>
  104 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  105 + {{ item.resName }}({{ item.resCode }})
  106 + </td>
  107 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  108 + {{ item.rssName || '-' }}
  109 + </td>
  110 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  111 + <select v-model="item.timesId" @change="_changeTimesId($event, index)" class="custom-select">
  112 + <option value="">{{ $t('addItemOut.selectPrice') }}</option>
  113 + <option v-for="time in item.times" :key="time.timesId" :value="time.timesId">
  114 + {{ time.price }}
  115 + </option>
  116 + </select>
  117 + </td>
  118 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  119 + {{ _getTimesStock(item) }}{{ item.unitCodeName }}
  120 + </td>
  121 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  122 + <el-input v-model.trim="item.quantity" type="number"
  123 + :placeholder="$t('addItemOut.quantityPlaceholder')"
  124 + style="width:70%;display:inline-block;"></el-input>
  125 + &nbsp;&nbsp;{{ item.unitCodeName }}
  126 + </td>
  127 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  128 + <el-input v-model.trim="item.remark" type="text"
  129 + :placeholder="$t('addItemOut.remarkPlaceholder')"></el-input>
  130 + </td>
  131 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  132 + <el-button type="danger" size="small" @click="_removeSelectResourceStoreItem(item.resId)">
  133 + <i class="el-icon-delete"></i>
  134 + {{ $t('addItemOut.remove') }}
  135 + </el-button>
  136 + </td>
  137 + </tr>
  138 + <tr v-if="addItemOutInfo.resourceStores.length === 0">
  139 + <td colspan="8" style="text-align: center; padding: 20px; color: #909399;">
  140 + {{ $t('common.noData') }}
  141 + </td>
  142 + </tr>
  143 + </tbody>
  144 + </table>
130 145 </div>
131 146 </el-card>
132 147 </el-col>
... ... @@ -329,20 +344,20 @@ export default {
329 344 return
330 345 }
331 346  
332   - let validate = true
333   - resourceStores.forEach(item => {
334   - const selectedStock = item.selectedStock || 0
335   - const quantity = parseFloat(item.quantity) || 0
336   -
337   - if (quantity > selectedStock) {
338   - validate = false
339   - }
340   - })
341   -
342   - if (!validate) {
343   - this.$message.error(this.$t('addItemOut.insufficientStock'))
344   - return
345   - }
  347 + //let validate = true
  348 + // resourceStores.forEach(item => {
  349 + // const selectedStock = item.selectedStock || 0
  350 + // const quantity = parseFloat(item.quantity) || 0
  351 + // console.log('item', item, selectedStock, quantity)
  352 + // if (quantity > selectedStock) {
  353 + // validate = false
  354 + // }
  355 + // })
  356 +
  357 + // if (!validate) {
  358 + // this.$message.error(this.$t('addItemOut.insufficientStock'))
  359 + // return
  360 + // }
346 361  
347 362 this.addItemOutInfo.endUserName = this.addItemOutInfo.endUserInfo.staffName
348 363 this.addItemOutInfo.endUserTel = this.addItemOutInfo.endUserInfo.staffTel
... ... @@ -394,6 +409,9 @@ export default {
394 409 this.addItemOutInfo.resourceStores[index].selectedStock = item.stock
395 410 }
396 411 })
  412 + this.$nextTick(() => {
  413 + this.$forceUpdate()
  414 + })
397 415 },
398 416 _getTimesStock(resourceStore) {
399 417 if (!resourceStore.timesId) return "-"
... ... @@ -405,9 +423,6 @@ export default {
405 423 }
406 424 })
407 425  
408   - if (!resourceStore.quantity) {
409   - resourceStore.quantity = ''
410   - }
411 426  
412 427 return stock
413 428 },
... ... @@ -483,4 +498,48 @@ export default {
483 498 .clearfix:after {
484 499 clear: both;
485 500 }
  501 +
  502 +.custom-table {
  503 + width: 100%;
  504 + border-collapse: collapse;
  505 + border: 1px solid #ebeef5;
  506 +}
  507 +
  508 +.custom-table th {
  509 + background-color: #fafafa;
  510 + color: #606266;
  511 + font-weight: 500;
  512 + font-size: 14px;
  513 +}
  514 +
  515 +.custom-table td {
  516 + color: #606266;
  517 + font-size: 14px;
  518 +}
  519 +
  520 +.custom-table tr:hover {
  521 + background-color: #f5f7fa;
  522 +}
  523 +
  524 +.custom-select {
  525 + width: 100%;
  526 + height: 32px;
  527 + line-height: 32px;
  528 + border: 1px solid #dcdfe6;
  529 + border-radius: 4px;
  530 + padding: 0 12px;
  531 + font-size: 14px;
  532 + color: #606266;
  533 + background-color: #fff;
  534 + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  535 +}
  536 +
  537 +.custom-select:focus {
  538 + outline: none;
  539 + border-color: #409eff;
  540 +}
  541 +
  542 +.custom-select:hover {
  543 + border-color: #c0c4cc;
  544 +}
486 545 </style>
487 546 \ No newline at end of file
... ...
src/views/resource/allocationStorehouseApplyList.vue
... ... @@ -40,81 +40,99 @@
40 40 </el-button>
41 41 </div>
42 42  
43   - <el-table :data="resourceStores" border style="width: 100%">
44   - <el-table-column prop="type" :label="$t('allocationStorehouseApply.itemType')" align="center">
45   - <template slot-scope="scope">
46   - {{ scope.row.parentRstName || '-' }} > {{ scope.row.rstName || '-' }}
47   - </template>
48   - </el-table-column>
49   -
50   - <el-table-column prop="name" :label="$t('allocationStorehouseApply.itemName')" align="center">
51   - <template slot-scope="scope">
52   - {{ scope.row.resName }}({{ scope.row.resCode }})
53   - </template>
54   - </el-table-column>
55   -
56   - <el-table-column prop="spec" :label="$t('allocationStorehouseApply.itemSpec')" align="center">
57   - <template slot-scope="scope">
58   - {{ scope.row.rssName || '-' }}
59   - </template>
60   - </el-table-column>
61   -
62   - <el-table-column prop="isFixed" :label="$t('allocationStorehouseApply.fixedItem')" align="center">
63   - <template slot-scope="scope">
64   - {{ scope.row.isFixedName }}
65   - </template>
66   - </el-table-column>
67   -
68   - <el-table-column prop="sourceWarehouse" :label="$t('allocationStorehouseApply.sourceWarehouse')" align="center">
69   - <template slot-scope="scope">
70   - {{ scope.row.shaName }}
71   - </template>
72   - </el-table-column>
73   -
74   - <el-table-column prop="price" :label="$t('allocationStorehouseApply.referencePrice')" align="center">
75   - <template slot-scope="scope">
76   - <el-select v-model="scope.row.timesId" @change="changeTimesId($event, scope.$index)" style="width:100%">
77   - <el-option :value="''" :label="$t('allocationStorehouseApply.selectPrice')"></el-option>
78   - <el-option v-for="time in scope.row.times" :key="time.timesId" :label="time.price"
79   - :value="time.timesId"></el-option>
80   - </el-select>
81   - </template>
82   - </el-table-column>
83   -
84   - <el-table-column prop="stock" :label="$t('allocationStorehouseApply.stock')" align="center">
85   - <template slot-scope="scope">
86   - {{ getTimesStock(scope.row) }}{{ scope.row.unitCodeName }}
87   - </template>
88   - </el-table-column>
89   -
90   - <el-table-column prop="targetWarehouse" :label="$t('allocationStorehouseApply.targetWarehouse')" align="center">
91   - <template slot-scope="scope">
92   - <el-select v-model="scope.row.shzId" style="width:100%">
93   - <el-option :value="''" :label="$t('allocationStorehouseApply.selectTargetWarehouse')"></el-option>
94   - <template v-for="item in storehouses">
95   - <el-option :key="item.shId" :label="item.shName" :value="item.shId"
96   - v-if="item.shId != scope.row.shId && item.communityId == communityId"></el-option>
97   - </template>
98   - </el-select>
99   - </template>
100   - </el-table-column>
101   -
102   - <el-table-column prop="quantity" :label="$t('allocationStorehouseApply.transferQuantity')" align="center">
103   - <template slot-scope="scope">
104   - <el-input-number v-model="scope.row.curStock" :min="0" :precision="0"
105   - controls-position="right"></el-input-number>
106   - {{ scope.row.unitCodeName }}
107   - </template>
108   - </el-table-column>
109   -
110   - <el-table-column prop="operation" :label="$t('allocationStorehouseApply.operation')" align="center" width="150">
111   - <template slot-scope="scope">
112   - <el-button type="danger" size="mini" @click="removeItem(scope.row)">
113   - {{ $t('allocationStorehouseApply.cancelTransfer') }}
114   - </el-button>
115   - </template>
116   - </el-table-column>
117   - </el-table>
  43 + <table class="custom-table">
  44 + <thead>
  45 + <tr>
  46 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  47 + {{ $t('allocationStorehouseApply.itemType') }}
  48 + </th>
  49 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  50 + {{ $t('allocationStorehouseApply.itemName') }}
  51 + </th>
  52 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  53 + {{ $t('allocationStorehouseApply.itemSpec') }}
  54 + </th>
  55 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  56 + {{ $t('allocationStorehouseApply.fixedItem') }}
  57 + </th>
  58 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  59 + {{ $t('allocationStorehouseApply.sourceWarehouse') }}
  60 + </th>
  61 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  62 + {{ $t('allocationStorehouseApply.referencePrice') }}
  63 + </th>
  64 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  65 + {{ $t('allocationStorehouseApply.stock') }}
  66 + </th>
  67 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  68 + {{ $t('allocationStorehouseApply.targetWarehouse') }}
  69 + </th>
  70 + <th style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa;">
  71 + {{ $t('allocationStorehouseApply.transferQuantity') }}
  72 + </th>
  73 + <th
  74 + style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5; background-color: #fafafa; width: 150px;">
  75 + {{ $t('allocationStorehouseApply.operation') }}
  76 + </th>
  77 + </tr>
  78 + </thead>
  79 + <tbody>
  80 + <tr v-for="(item, index) in resourceStores" :key="index" style="border-bottom: 1px solid #ebeef5;">
  81 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  82 + {{ item.parentRstName || '-' }} > {{ item.rstName || '-' }}
  83 + </td>
  84 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  85 + {{ item.resName }}({{ item.resCode }})
  86 + </td>
  87 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  88 + {{ item.rssName || '-' }}
  89 + </td>
  90 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  91 + {{ item.isFixedName }}
  92 + </td>
  93 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  94 + {{ item.shaName }}
  95 + </td>
  96 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  97 + <select v-model="item.timesId" @change="changeTimesId($event, index)" class="custom-select">
  98 + <option value="">{{ $t('allocationStorehouseApply.selectPrice') }}</option>
  99 + <option v-for="time in item.times" :key="time.timesId" :value="time.timesId">
  100 + {{ time.price }}
  101 + </option>
  102 + </select>
  103 + </td>
  104 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  105 + {{ getTimesStock(item) }}{{ item.unitCodeName }}
  106 + </td>
  107 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  108 + <select v-model="item.shzId" class="custom-select">
  109 + <option value="">{{ $t('allocationStorehouseApply.selectTargetWarehouse') }}</option>
  110 + <template v-for="storehouse in storehouses">
  111 + <option :key="storehouse.shId" :value="storehouse.shId"
  112 + v-if="storehouse.shId != item.shId && storehouse.communityId == communityId">
  113 + {{ storehouse.shName }}
  114 + </option>
  115 + </template>
  116 + </select>
  117 + </td>
  118 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  119 + <el-input-number v-model="item.curStock" :min="0" :precision="0"
  120 + controls-position="right"></el-input-number>
  121 + {{ item.unitCodeName }}
  122 + </td>
  123 + <td style="text-align: center; padding: 12px 8px; border: 1px solid #ebeef5;">
  124 + <el-button type="danger" size="mini" @click="removeItem(item)">
  125 + {{ $t('allocationStorehouseApply.cancelTransfer') }}
  126 + </el-button>
  127 + </td>
  128 + </tr>
  129 + <tr v-if="resourceStores.length === 0">
  130 + <td colspan="10" style="text-align: center; padding: 20px; color: #909399;">
  131 + {{ $t('common.noData') }}
  132 + </td>
  133 + </tr>
  134 + </tbody>
  135 + </table>
118 136 </el-card>
119 137  
120 138 <el-card class="box-card margin-top" v-if="form.audit.assignee === '-2'">
... ... @@ -255,6 +273,9 @@ export default {
255 273 this.resourceStores[index].selectedStock = item.stock
256 274 }
257 275 })
  276 + this.$nextTick(() => {
  277 + this.$forceUpdate()
  278 + })
258 279 },
259 280 getTimesStock(item) {
260 281 if (!item.timesId) return "-"
... ... @@ -397,5 +418,49 @@ export default {
397 418 text-align: right;
398 419 margin-top: 20px;
399 420 }
  421 +
  422 + .custom-table {
  423 + width: 100%;
  424 + border-collapse: collapse;
  425 + border: 1px solid #ebeef5;
  426 + }
  427 +
  428 + .custom-table th {
  429 + background-color: #fafafa;
  430 + color: #606266;
  431 + font-weight: 500;
  432 + font-size: 14px;
  433 + }
  434 +
  435 + .custom-table td {
  436 + color: #606266;
  437 + font-size: 14px;
  438 + }
  439 +
  440 + .custom-table tr:hover {
  441 + background-color: #f5f7fa;
  442 + }
  443 +
  444 + .custom-select {
  445 + width: 100%;
  446 + height: 32px;
  447 + line-height: 32px;
  448 + border: 1px solid #dcdfe6;
  449 + border-radius: 4px;
  450 + padding: 0 12px;
  451 + font-size: 14px;
  452 + color: #606266;
  453 + background-color: #fff;
  454 + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  455 + }
  456 +
  457 + .custom-select:focus {
  458 + outline: none;
  459 + border-color: #409eff;
  460 + }
  461 +
  462 + .custom-select:hover {
  463 + border-color: #c0c4cc;
  464 + }
400 465 }
401 466 </style>
402 467 \ No newline at end of file
... ...
src/views/resource/allocationStorehouseDetailLang.js 0 → 100644
  1 +export const messages = {
  2 + en: {
  3 + allocationStorehouseDetail: {
  4 + applyInfo: 'Application Information',
  5 + print: 'Print',
  6 + back: 'Back',
  7 + applicant: 'Applicant:',
  8 + applyTime: 'Application Time:',
  9 + type: 'Type:',
  10 + status: 'Status:',
  11 + applyRemark: 'Application Remark:',
  12 + allocationGoods: 'Allocation Goods',
  13 + goodsId: 'Goods ID',
  14 + goodsType: 'Goods Type',
  15 + goodsName: 'Goods Name',
  16 + goodsSpec: 'Goods Specification',
  17 + goodsCode: 'Goods Code',
  18 + fixedGoods: 'Fixed Goods',
  19 + transferredWarehouse: 'Transferred Warehouse',
  20 + returnPerson: 'Return Person',
  21 + targetWarehouse: 'Target Warehouse',
  22 + originalStock: 'Original Stock',
  23 + allocationQuantity: 'Allocation Quantity',
  24 + workflow: 'Workflow Process',
  25 + serialNumber: 'No.',
  26 + handler: 'Handler',
  27 + processTime: 'Process Time',
  28 + timeConsuming: 'Time Consuming',
  29 + opinion: 'Opinion'
  30 + },
  31 +
  32 + },
  33 + zh: {
  34 + allocationStorehouseDetail: {
  35 + applyInfo: '申请信息',
  36 + print: '打印',
  37 + back: '返回',
  38 + applicant: '申请人:',
  39 + applyTime: '申请时间:',
  40 + type: '类型:',
  41 + status: '状态:',
  42 + applyRemark: '申请说明:',
  43 + allocationGoods: '调拨物品',
  44 + goodsId: '物品ID',
  45 + goodsType: '物品类型',
  46 + goodsName: '物品名称',
  47 + goodsSpec: '物品规格',
  48 + goodsCode: '物品编码',
  49 + fixedGoods: '固定物品',
  50 + transferredWarehouse: '被调仓库',
  51 + returnPerson: '退还人',
  52 + targetWarehouse: '目标仓库',
  53 + originalStock: '原库存',
  54 + allocationQuantity: '调拨数量',
  55 + workflow: '工单流转',
  56 + serialNumber: '序号',
  57 + handler: '处理人',
  58 + processTime: '处理时间',
  59 + timeConsuming: '耗时',
  60 + opinion: '意见'
  61 + },
  62 +
  63 + }
  64 +}
0 65 \ No newline at end of file
... ...
src/views/resource/allocationStorehouseDetailList.vue 0 → 100644
  1 +<template>
  2 + <div class="allocation-storehouse-detail-container">
  3 + <el-row :gutter="20">
  4 + <el-col :span="24">
  5 + <el-card>
  6 + <div slot="header" class="flex justify-between">
  7 + <span>{{ $t('allocationStorehouseDetail.applyInfo') }}</span>
  8 + <div class="card-header-actions">
  9 + <el-button type="primary" size="small" @click="printAllocationStorehouse">
  10 + <i class="el-icon-printer"></i>
  11 + {{ $t('allocationStorehouseDetail.print') }}
  12 + </el-button>
  13 + <el-button type="primary" size="small" @click="callBackListPurchaseApply">
  14 + <i class="el-icon-close"></i>
  15 + {{ $t('common.back') }}
  16 + </el-button>
  17 + </div>
  18 + </div>
  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>
  50 + </el-card>
  51 + </el-col>
  52 + </el-row>
  53 +
  54 + <el-row :gutter="20" class="mt-20">
  55 + <el-col :span="24">
  56 + <el-card>
  57 + <div slot="header" class="flex justify-between">
  58 + <span>{{ $t('allocationStorehouseDetail.allocationGoods') }}</span>
  59 + </div>
  60 + <el-table :data="allocationStorehouseDetailInfo.resourceStores" border style="width: 100%">
  61 + <el-table-column prop="resId" :label="$t('allocationStorehouseDetail.goodsId')" align="center" />
  62 + <el-table-column :label="$t('allocationStorehouseDetail.goodsType')" align="center">
  63 + <template slot-scope="scope">
  64 + {{ scope.row.parentRstName }} > {{ scope.row.rstName }}
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column prop="resName" :label="$t('allocationStorehouseDetail.goodsName')" align="center" />
  68 + <el-table-column :label="$t('allocationStorehouseDetail.goodsSpec')" align="center">
  69 + <template slot-scope="scope">
  70 + {{ scope.row.specName || '-' }}
  71 + </template>
  72 + </el-table-column>
  73 + <el-table-column prop="resCode" :label="$t('allocationStorehouseDetail.goodsCode')" align="center" />
  74 + <el-table-column prop="isFixedName" :label="$t('allocationStorehouseDetail.fixedGoods')" align="center" />
  75 + <el-table-column
  76 + :label="allocationStorehouseDetailInfo.applyType === '10000' || allocationStorehouseDetailInfo.applyType === '30000' ? $t('allocationStorehouseDetail.transferredWarehouse') : $t('allocationStorehouseDetail.returnPerson')"
  77 + align="center">
  78 + <template slot-scope="scope">
  79 + {{ allocationStorehouseDetailInfo.applyType === '10000' || allocationStorehouseDetailInfo.applyType ===
  80 + '30000' ? scope.row.shaName : allocationStorehouseDetailInfo.startUserName }}
  81 + </template>
  82 + </el-table-column>
  83 + <el-table-column prop="shzName" :label="$t('allocationStorehouseDetail.targetWarehouse')" align="center" />
  84 + <el-table-column
  85 + :label="$t('allocationStorehouseDetail.originalStock') + '(' + (allocationStorehouseDetailInfo.applyType === '30000' ? $t('allocationStorehouseDetail.targetWarehouse') : $t('allocationStorehouseDetail.transferredWarehouse')) + ')'"
  86 + align="center">
  87 + <template slot-scope="scope">
  88 + {{ scope.row.originalStock }}{{ scope.row.unitCodeName }}
  89 + </template>
  90 + </el-table-column>
  91 + <el-table-column :label="$t('allocationStorehouseDetail.allocationQuantity')" align="center">
  92 + <template slot-scope="scope">
  93 + {{ scope.row.stock }}{{ scope.row.applyType === '20000' ? scope.row.miniUnitCodeName :
  94 + scope.row.unitCodeName }}
  95 + </template>
  96 + </el-table-column>
  97 + </el-table>
  98 + </el-card>
  99 + </el-col>
  100 + </el-row>
  101 +
  102 + <el-row :gutter="20" class="mt-20"
  103 + v-if="allocationStorehouseDetailInfo.applyType === '10000' && allocationStorehouseDetailInfo.auditUsersCount > 0">
  104 + <el-col :span="24">
  105 + <el-card>
  106 + <div slot="header" class="clearfix">
  107 + <span>{{ $t('allocationStorehouseDetail.workflow') }}</span>
  108 + </div>
  109 + <el-table :data="allocationStorehouseDetailInfo.auditUsers" border style="width: 100%">
  110 + <el-table-column :label="$t('allocationStorehouseDetail.serialNumber')" align="center">
  111 + <template slot-scope="scope">
  112 + {{ scope.$index + 1 }}
  113 + </template>
  114 + </el-table-column>
  115 + <el-table-column :label="$t('allocationStorehouseDetail.handler')" align="center">
  116 + <template slot-scope="scope">
  117 + {{ scope.row.userName || scope.row.auditName }}
  118 + </template>
  119 + </el-table-column>
  120 + <el-table-column prop="stateName" :label="$t('allocationStorehouseDetail.status')" align="center" />
  121 + <el-table-column prop="auditTime" :label="$t('allocationStorehouseDetail.processTime')" align="center" />
  122 + <el-table-column prop="duration" :label="$t('allocationStorehouseDetail.timeConsuming')" align="center" />
  123 + <el-table-column prop="message" :label="$t('allocationStorehouseDetail.opinion')" align="center" />
  124 + </el-table>
  125 + </el-card>
  126 + </el-col>
  127 + </el-row>
  128 +
  129 + <audit-div v-if="allocationStorehouseDetailInfo.action === 'audit'" ref="auditDiv" />
  130 + </div>
  131 +</template>
  132 +
  133 +<script>
  134 +import { getCommunityId } from '@/api/community/communityApi'
  135 +import {
  136 + listAllocationStorehouseApplys,
  137 + listAllocationStorehouses,
  138 + listWorkflowAuditInfo
  139 + // auditAllocationStoreOrder
  140 +} from '@/api/resource/allocationStorehouseDetailApi'
  141 +import AuditDiv from '@/components/resource/auditDiv'
  142 +
  143 +export default {
  144 + name: 'AllocationStorehouseDetailList',
  145 + components: {
  146 + AuditDiv
  147 + },
  148 + data() {
  149 + return {
  150 + communityId: '',
  151 + allocationStorehouseDetailInfo: {
  152 + applyId: '',
  153 + resourceStores: [],
  154 + remark: '',
  155 + startUserName: '',
  156 + createTime: '',
  157 + auditUsers: [],
  158 + auditUsersCount: 0,
  159 + stateName: '',
  160 + applyType: '',
  161 + applyTypeName: '',
  162 + action: '',
  163 + taskId: ''
  164 + }
  165 + }
  166 + },
  167 + created() {
  168 + this.communityId = getCommunityId()
  169 + this.allocationStorehouseDetailInfo.applyId = this.$route.query.applyId
  170 + this.allocationStorehouseDetailInfo.applyType = this.$route.query.applyType
  171 + this.allocationStorehouseDetailInfo.applyTypeName = this.$route.query.applyTypeName
  172 + this.allocationStorehouseDetailInfo.action = this.$route.query.action
  173 + this.allocationStorehouseDetailInfo.taskId = this.$route.query.taskId
  174 + this.listAllocationStorehouseApply()
  175 + this.listPurchaseApply(1, 100)
  176 + },
  177 + methods: {
  178 + async listPurchaseApply(page, rows) {
  179 + try {
  180 + const params = {
  181 + page,
  182 + row: rows,
  183 + applyId: this.allocationStorehouseDetailInfo.applyId
  184 + }
  185 + const { data } = await listAllocationStorehouses(params)
  186 + this.allocationStorehouseDetailInfo.resourceStores = data
  187 + } catch (error) {
  188 + console.error('请求失败:', error)
  189 + }
  190 + },
  191 + async listAllocationStorehouseApply() {
  192 + try {
  193 + const params = {
  194 + page: 1,
  195 + row: 1,
  196 + applyId: this.allocationStorehouseDetailInfo.applyId
  197 + }
  198 + const { data } = await listAllocationStorehouseApplys(params)
  199 + const purchaseApply = data[0]
  200 + Object.assign(this.allocationStorehouseDetailInfo, purchaseApply)
  201 +
  202 + if (this.allocationStorehouseDetailInfo.applyType === '10000') {
  203 + this.loadAuditUser()
  204 + }
  205 +
  206 + if (this.allocationStorehouseDetailInfo.action === 'audit') {
  207 + this.$refs.auditDiv.open({
  208 + createUserId: purchaseApply.startUserId,
  209 + action: this.allocationStorehouseDetailInfo.action,
  210 + taskId: this.allocationStorehouseDetailInfo.taskId,
  211 + url: '/resourceStore.auditAllocationStoreOrder',
  212 + id: purchaseApply.applyId,
  213 + })
  214 + }
  215 + } catch (error) {
  216 + console.error('请求失败:', error)
  217 + }
  218 + },
  219 + async loadAuditUser() {
  220 + try {
  221 + const params = {
  222 + businessKey: this.allocationStorehouseDetailInfo.applyId,
  223 + communityId: this.communityId,
  224 + }
  225 + const { data } = await listWorkflowAuditInfo(params)
  226 + this.allocationStorehouseDetailInfo.auditUsers = data
  227 + this.allocationStorehouseDetailInfo.auditUsersCount = data.length
  228 + } catch (error) {
  229 + console.error('请求失败:', error)
  230 + }
  231 + },
  232 + callBackListPurchaseApply() {
  233 + this.$router.go(-1)
  234 + },
  235 + printAllocationStorehouse() {
  236 + window.open(`/print.html#/pages/property/printAllocationStorehouse?applyId=${this.allocationStorehouseDetailInfo.applyId}`)
  237 + }
  238 + }
  239 +}
  240 +</script>
  241 +
  242 +<style lang="scss" scoped>
  243 +.allocation-storehouse-detail-container {
  244 + padding: 20px;
  245 +
  246 + .mt-20 {
  247 + margin-top: 20px;
  248 + }
  249 +
  250 + .card-header-actions {
  251 + float: right;
  252 + }
  253 +
  254 + .el-form-item {
  255 + margin-bottom: 0;
  256 +
  257 + span {
  258 + display: inline-block;
  259 + padding: 0 10px;
  260 + }
  261 + }
  262 +}
  263 +</style>
0 264 \ No newline at end of file
... ...
src/views/resource/allocationStorehouseManageList.vue
1 1 <template>
2 2 <div class="animated fadeInRight ecommerce">
3   - <el-row>
  3 + <el-row :gutter="20">
4 4 <el-col :span="4" class="padding-r-0">
5   - <div class="border-radius">
6   - <div class="margin-xs-r treeview attendance-staff">
7   - <ul class="list-group text-center border-radius">
8   - <li class="list-group-item node-orgTree" v-for="(item, index) in states" :key="index"
9   - @click="swatchState(item)" :class="{ 'vc-node-selected': conditions.state == item.statusCd }">
  5 + <div class="list-group-border-radius">
  6 + <div class=" treeview">
  7 + <ul class="list-group text-center ">
  8 + <li v-for="(item, index) in states" :key="index" @click="swatchState(item)"
  9 + :class="{ 'vc-node-selected': conditions.state == item.statusCd }"
  10 + class="list-group-item node-orgTree">
10 11 {{ item.name }}
11 12 </li>
12 13 </ul>
... ... @@ -311,37 +312,7 @@ export default {
311 312 margin-right: 5px;
312 313 }
313 314  
314   -.treeview {
315   - background: #fff;
316   - border: 1px solid #e6e6e6;
317   - padding: 10px;
318   -}
319   -
320   -.list-group {
321   - padding-left: 0;
322   - margin-bottom: 0;
323   -
324   - &-item {
325   - position: relative;
326   - display: block;
327   - padding: 10px 15px;
328   - margin-bottom: -1px;
329   - background-color: #fff;
330   - border: 1px solid #e6e6e6;
331   - cursor: pointer;
332 315  
333   - &:hover {
334   - background-color: #f5f5f5;
335   - }
336   - }
337   -}
338   -
339   -.node-orgTree {
340   - &.vc-node-selected {
341   - background-color: #409EFF;
342   - color: #fff;
343   - }
344   -}
345 316  
346 317 .text-center {
347 318 text-align: center;
... ...
src/views/resource/itemOutManageList.vue
1 1 <template>
2 2 <div class="item-out-manage-container">
3   - <el-row class="wrapper">
  3 + <el-row class="wrapper" :gutter="10">
4 4 <el-col :span="4" class="padding-r-0">
5 5 <div class="border-radius">
6 6 <div class="margin-xs-r treeview attendance-staff">
... ... @@ -128,7 +128,7 @@ export default {
128 128 loading: false,
129 129 itemOutManageInfo: {
130 130 itemOuts: [],
131   - states: [],
  131 + states: [{ statusCd: '', name: this.$t('common.all') }],
132 132 currentUserId: '',
133 133 conditions: {
134 134 applyOrderId: '',
... ... @@ -199,7 +199,7 @@ export default {
199 199 },
200 200 _openDetailItemOutModel(itemOut) {
201 201 this.$router.push({
202   - path: '/resource/purchaseApplyDetail',
  202 + path: '/views/resource/purchaseApplyDetail',
203 203 query: {
204 204 applyOrderId: itemOut.applyOrderId,
205 205 resOrderType: this.itemOutManageInfo.conditions.resOrderType
... ... @@ -247,7 +247,7 @@ export default {
247 247 }
248 248 await exportData(params)
249 249 this.$message.success(this.$t('common.exportSuccess'))
250   - this.$router.push('/resource/downloadTempFile?tab=downloadCenter')
  250 + this.$router.push('/pages/property/downloadTempFile?tab=downloadCenter')
251 251 } catch (error) {
252 252 console.error('导出失败:', error)
253 253 }
... ... @@ -296,7 +296,6 @@ export default {
296 296 padding: 10px 15px;
297 297 margin-bottom: -1px;
298 298 background-color: #fff;
299   - border: 1px solid #ddd;
300 299 cursor: pointer;
301 300  
302 301 &:hover {
... ...
src/views/resource/purchaseApplyDetailManageList.vue
1 1 <template>
2 2 <div class="purchase-apply-detail-manage-container">
3 3 <el-row :gutter="20">
4   - <el-col :span="2">
  4 + <el-col :span="3">
5 5 <div class="border-radius">
6 6 <div class="margin-xs-r treeview attendance-staff">
7 7 <ul class="list-group text-center border-radius">
8 8 <li v-for="(item, index) in resOrderTypes" :key="index" class="list-group-item node-orgTree"
9   - :class="{ 'vc-node-selected': conditions.resOrderType == item.statusCd }" @click="swatchResOrderTypes(item)">
  9 + :class="{ 'vc-node-selected': conditions.resOrderType == item.statusCd }"
  10 + @click="swatchResOrderTypes(item)">
10 11 {{ item.name }}
11 12 </li>
12 13 </ul>
13 14 </div>
14 15 </div>
15 16 </el-col>
16   - <el-col :span="22">
  17 + <el-col :span="21">
17 18 <el-card class="box-card">
18 19 <div slot="header" class="flex justify-between">
19 20 <span>{{ $t('purchaseApplyDetailManage.search.title') }}</span>
... ... @@ -187,7 +188,8 @@
187 188 </template>
188 189 </el-table-column>
189 190 <el-table-column prop="stateName" :label="$t('purchaseApplyDetailManage.table.stateName')" align="center" />
190   - <el-table-column prop="createTime" :label="$t('purchaseApplyDetailManage.table.createTime')" align="center" />
  191 + <el-table-column prop="createTime" :label="$t('purchaseApplyDetailManage.table.createTime')"
  192 + align="center" />
191 193 </el-table>
192 194 <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
193 195 :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
... ... @@ -200,7 +202,7 @@
200 202 </template>
201 203  
202 204 <script>
203   -import { listPurchaseApplyDetails, exportData,listResourceSuppliers,listResourceStoreTypes,listResourceStoreSpecifications,listStorehouses } from '@/api/resource/purchaseApplyDetailManageApi'
  205 +import { listPurchaseApplyDetails, exportData, listResourceSuppliers, listResourceStoreTypes, listResourceStoreSpecifications, listStorehouses } from '@/api/resource/purchaseApplyDetailManageApi'
204 206 import { getDict } from '@/api/community/communityApi'
205 207 import { getCommunityId } from '@/api/community/communityApi'
206 208 import ViewImage from '@/components/system/viewImage'
... ...
src/views/resource/purchaseApplyManageList.vue
... ... @@ -278,7 +278,7 @@ export default {
278 278 }
279 279 await exportData(params)
280 280 this.$message.success(this.$t('common.exportSuccess'))
281   - this.$router.push('/resource/downloadTempFile?tab=downloadCenter')
  281 + this.$router.push('/pages/property/downloadTempFile?tab=下载中心')
282 282 } catch (error) {
283 283 console.error('导出失败:', error)
284 284 }
... ...
src/views/resource/urgentPurchaseApplyStepList.vue
... ... @@ -43,73 +43,70 @@
43 43 </div>
44 44 </div>
45 45  
46   - <el-table :data="urgentPurchaseApplyStepInfo.resourceStores" border style="width: 100%">
47   - <el-table-column prop="parentRstName" :label="$t('urgentPurchaseApplyStep.itemType')" align="center">
48   - <template slot-scope="scope">
49   - {{ scope.row.parentRstName || '-' }} > {{ scope.row.rstName || '-' }}
50   - </template>
51   - </el-table-column>
52   -
53   - <el-table-column prop="resName" :label="$t('urgentPurchaseApplyStep.nameCode')" align="center">
54   - <template slot-scope="scope">
55   - {{ scope.row.resName }}({{ scope.row.resCode }})
56   - </template>
57   - </el-table-column>
58   -
59   - <el-table-column prop="rssName" :label="$t('urgentPurchaseApplyStep.spec')" align="center">
60   - <template slot-scope="scope">
61   - {{ scope.row.rssName || '-' }}
62   - </template>
63   - </el-table-column>
64   -
65   - <el-table-column prop="price" :label="$t('urgentPurchaseApplyStep.referencePrice')" align="center" />
66   -
67   - <el-table-column prop="stock" :label="$t('urgentPurchaseApplyStep.stock')" align="center">
68   - <template slot-scope="scope">
69   - {{ scope.row.stock }}{{ scope.row.unitCodeName }}
70   - </template>
71   - </el-table-column>
72   -
73   - <el-table-column :label="$t('urgentPurchaseApplyStep.applyQuantity')" align="center" width="150">
74   - <template slot-scope="scope">
75   - <el-input-number v-model="scope.row.quantity" :min="1"
76   - :placeholder="$t('urgentPurchaseApplyStep.requiredQuantity')" style="width: 80%" />
77   - {{ scope.row.unitCodeName }}
78   - </template>
79   - </el-table-column>
80   -
81   - <el-table-column :label="$t('urgentPurchaseApplyStep.purchasePrice')" align="center" width="150">
82   - <template slot-scope="scope">
83   - <el-input-number v-model="scope.row.urgentPrice" :min="0.01"
84   - :placeholder="$t('urgentPurchaseApplyStep.requiredPrice')" style="width: 100%" />
85   - </template>
86   - </el-table-column>
87   -
88   - <el-table-column :label="$t('urgentPurchaseApplyStep.targetWarehouse')" align="center" width="150">
89   - <template slot-scope="scope">
90   - <el-select v-model="scope.row.shzId" @change="storeHousesChange($event, scope.$index)" style="width:100%">
91   - <el-option value="" :label="$t('urgentPurchaseApplyStep.requiredTargetWarehouse')" />
92   - <el-option v-for="(item, index) in urgentPurchaseApplyStepInfo.storehousesB" :key="index"
93   - :label="item.shName" :value="item.shId" />
94   - </el-select>
95   - </template>
96   - </el-table-column>
97   -
98   - <el-table-column :label="$t('urgentPurchaseApplyStep.remark')" align="center" width="150">
99   - <template slot-scope="scope">
100   - <el-input v-model="scope.row.remark" :placeholder="$t('urgentPurchaseApplyStep.optionalRemark')" />
101   - </template>
102   - </el-table-column>
103   -
104   - <el-table-column :label="$t('urgentPurchaseApplyStep.operation')" align="center" fixed="right">
105   - <template slot-scope="scope">
106   - <el-button type="danger" size="mini" @click="_removeSelectResourceStoreItem(scope.row.resId)">
107   - <i class="el-icon-delete"></i>
108   - {{ $t('urgentPurchaseApplyStep.remove') }}
109   - </el-button>
110   - </template>
111   - </el-table-column>
112   - </el-table>
  46 + <div class="table-container">
  47 + <table class="custom-table">
  48 + <thead>
  49 + <tr>
  50 + <th style="text-align: center; padding: 12px 8px;">{{ $t('urgentPurchaseApplyStep.itemType') }}</th>
  51 + <th style="text-align: center; padding: 12px 8px;">{{ $t('urgentPurchaseApplyStep.nameCode') }}</th>
  52 + <th style="text-align: center; padding: 12px 8px;">{{ $t('urgentPurchaseApplyStep.spec') }}</th>
  53 + <th style="text-align: center; padding: 12px 8px;">{{ $t('urgentPurchaseApplyStep.referencePrice') }}</th>
  54 + <th style="text-align: center; padding: 12px 8px;">{{ $t('urgentPurchaseApplyStep.stock') }}</th>
  55 + <th style="text-align: center; padding: 12px 8px; width: 150px;">{{ $t('urgentPurchaseApplyStep.applyQuantity') }}</th>
  56 + <th style="text-align: center; padding: 12px 8px; width: 150px;">{{ $t('urgentPurchaseApplyStep.purchasePrice') }}</th>
  57 + <th style="text-align: center; padding: 12px 8px; width: 150px;">{{ $t('urgentPurchaseApplyStep.targetWarehouse') }}</th>
  58 + <th style="text-align: center; padding: 12px 8px; width: 150px;">{{ $t('urgentPurchaseApplyStep.remark') }}</th>
  59 + <th style="text-align: center; padding: 12px 8px;">{{ $t('urgentPurchaseApplyStep.operation') }}</th>
  60 + </tr>
  61 + </thead>
  62 + <tbody>
  63 + <tr v-for="(item, index) in urgentPurchaseApplyStepInfo.resourceStores" :key="index" class="table-row">
  64 + <td style="text-align: center; padding: 12px 8px;">
  65 + {{ item.parentRstName || '-' }} > {{ item.rstName || '-' }}
  66 + </td>
  67 + <td style="text-align: center; padding: 12px 8px;">
  68 + {{ item.resName }}({{ item.resCode }})
  69 + </td>
  70 + <td style="text-align: center; padding: 12px 8px;">
  71 + {{ item.rssName || '-' }}
  72 + </td>
  73 + <td style="text-align: center; padding: 12px 8px;">
  74 + {{ item.price }}
  75 + </td>
  76 + <td style="text-align: center; padding: 12px 8px;">
  77 + {{ item.stock }}{{ item.unitCodeName }}
  78 + </td>
  79 + <td style="text-align: center; padding: 12px 8px;">
  80 + <el-input-number v-model="item.quantity" :min="1"
  81 + :placeholder="$t('urgentPurchaseApplyStep.requiredQuantity')" style="width: 80%" />
  82 + {{ item.unitCodeName }}
  83 + </td>
  84 + <td style="text-align: center; padding: 12px 8px;">
  85 + <el-input-number v-model="item.urgentPrice" :min="0.01"
  86 + :placeholder="$t('urgentPurchaseApplyStep.requiredPrice')" style="width: 100%" />
  87 + </td>
  88 + <td style="text-align: center; padding: 12px 8px;">
  89 + <select v-model="item.shzId" @change="storeHousesChange($event, index)" class="custom-select">
  90 + <option value="">{{ $t('urgentPurchaseApplyStep.requiredTargetWarehouse') }}</option>
  91 + <option v-for="(storehouse, storeIndex) in urgentPurchaseApplyStepInfo.storehousesB" :key="storeIndex"
  92 + :value="storehouse.shId">
  93 + {{ storehouse.shName }}
  94 + </option>
  95 + </select>
  96 + </td>
  97 + <td style="text-align: center; padding: 12px 8px;">
  98 + <el-input v-model="item.remark" :placeholder="$t('urgentPurchaseApplyStep.optionalRemark')" />
  99 + </td>
  100 + <td style="text-align: center; padding: 12px 8px;">
  101 + <el-button type="danger" size="mini" @click="_removeSelectResourceStoreItem(item.resId)">
  102 + <i class="el-icon-delete"></i>
  103 + {{ $t('urgentPurchaseApplyStep.remove') }}
  104 + </el-button>
  105 + </td>
  106 + </tr>
  107 + </tbody>
  108 + </table>
  109 + </div>
113 110 </el-card>
114 111  
115 112 <div class="footer-buttons">
... ... @@ -334,5 +331,108 @@ export default {
334 331 text-align: right;
335 332 margin-top: 20px;
336 333 }
  334 +
  335 + .table-container {
  336 + overflow-x: auto;
  337 + }
  338 +
  339 + .custom-table {
  340 + width: 100%;
  341 + border-collapse: collapse;
  342 + border: 1px solid #EBEEF5;
  343 +
  344 + th, td {
  345 + border: 1px solid #EBEEF5;
  346 + background-color: #fff;
  347 + }
  348 +
  349 + th {
  350 + background-color: #fafafa;
  351 + font-weight: 500;
  352 + color: #606266;
  353 + font-size: 14px;
  354 + }
  355 +
  356 + .table-row {
  357 + &:hover {
  358 + background-color: #f5f7fa;
  359 + }
  360 +
  361 + &:nth-child(even) {
  362 + background-color: #fafafa;
  363 + }
  364 + }
  365 + }
  366 +
  367 + // 自定义 select 样式,模拟 Element UI 的外观
  368 + .custom-select {
  369 + width: 100%;
  370 + height: 32px;
  371 + line-height: 32px;
  372 + padding: 0 12px;
  373 + border: 1px solid #dcdfe6;
  374 + border-radius: 4px;
  375 + background-color: #fff;
  376 + color: #606266;
  377 + font-size: 14px;
  378 + outline: none;
  379 + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  380 + cursor: pointer;
  381 +
  382 + &:hover {
  383 + border-color: #c0c4cc;
  384 + }
  385 +
  386 + &:focus {
  387 + border-color: #409eff;
  388 + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  389 + }
  390 +
  391 + // 自定义下拉箭头
  392 + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  393 + background-position: right 8px center;
  394 + background-repeat: no-repeat;
  395 + background-size: 16px;
  396 + padding-right: 32px;
  397 +
  398 + // 移除默认样式
  399 + -webkit-appearance: none;
  400 + -moz-appearance: none;
  401 + appearance: none;
  402 +
  403 + // 兼容性处理
  404 + &::-ms-expand {
  405 + display: none;
  406 + }
  407 +
  408 + // option 样式
  409 + option {
  410 + padding: 8px 12px;
  411 + background-color: #fff;
  412 + color: #606266;
  413 + font-size: 14px;
  414 +
  415 + &:hover {
  416 + background-color: #f5f7fa;
  417 + }
  418 +
  419 + &:checked {
  420 + background-color: #409eff;
  421 + color: #fff;
  422 + }
  423 + }
  424 +
  425 + // 禁用状态
  426 + &:disabled {
  427 + background-color: #f5f7fa;
  428 + border-color: #e4e7ed;
  429 + color: #c0c4cc;
  430 + cursor: not-allowed;
  431 +
  432 + &:hover {
  433 + border-color: #e4e7ed;
  434 + }
  435 + }
  436 + }
337 437 }
338 438 </style>
339 439 \ No newline at end of file
... ...