Commit c412a802a0cf9943def5eb481ac164b4aaef722a

Authored by wuxw
1 parent 9bb8cd93

优化采购申请

src/api/community/communityApi.js
@@ -14,7 +14,7 @@ export function _loadCommunityInfo(_param) { @@ -14,7 +14,7 @@ export function _loadCommunityInfo(_param) {
14 let _communityInfos = res.communitys; 14 let _communityInfos = res.communitys;
15 if (_communityInfos && _communityInfos.length > 0) { 15 if (_communityInfos && _communityInfos.length > 0) {
16 setCommunitys(_communityInfos); 16 setCommunitys(_communityInfos);
17 - let _currentCommunity = getCurrentCommunity() 17 + let _currentCommunity = JSON.parse(window.localStorage.getItem('hc_currentCommunityInfo'));
18 if(_currentCommunity){ 18 if(_currentCommunity){
19 resolve(res) 19 resolve(res)
20 return ; 20 return ;
src/components/resource/chooseResourceStore2.vue
@@ -3,47 +3,47 @@ @@ -3,47 +3,47 @@
3 <el-row> 3 <el-row>
4 <el-col :span="24"> 4 <el-col :span="24">
5 5
6 - <el-row :gutter="20">  
7 - <el-col :span="4">  
8 - <el-select v-model="chooseResourceStoreInfo2.shId" disabled style="width:100%">  
9 - <el-option selected value="" :label="$t('chooseResourceStore2.selectWarehouse')"></el-option>  
10 - <el-option v-for="(item, index) in chooseResourceStoreInfo2.storehouses" :key="index" :label="item.shName"  
11 - :value="item.shId">  
12 - </el-option>  
13 - </el-select>  
14 - </el-col>  
15 - <el-col :span="4">  
16 - <el-select v-model="chooseResourceStoreInfo2.parentRstId" @change="_listResourceStoreSonTypes"  
17 - style="width:100%">  
18 - <el-option selected value="" :label="$t('chooseResourceStore2.selectItemType')"></el-option>  
19 - <el-option v-for="(item, index) in chooseResourceStoreInfo2.resourceStoreTypes" :key="index"  
20 - :label="item.name" :value="item.rstId">  
21 - </el-option>  
22 - </el-select>  
23 - </el-col>  
24 - <el-col :span="4">  
25 - <el-select v-model="chooseResourceStoreInfo2.rstId" style="width:100%;margin-right:10px">  
26 - <el-option selected value="" :label="$t('chooseResourceStore2.selectSubType')"></el-option>  
27 - <el-option v-for="(item, index) in chooseResourceStoreInfo2.resourceStoreSonTypes" :key="index"  
28 - :label="item.name" :value="item.rstId">  
29 - </el-option>  
30 - </el-select>  
31 - </el-col>  
32 - <el-col :span="4">  
33 - <el-input :placeholder="$t('chooseResourceStore2.inputItemName')"  
34 - v-model.trim="chooseResourceStoreInfo2._currentResourceStoreName"></el-input>  
35 - </el-col>  
36 - <el-col :span="4" style="text-align:right">  
37 - <el-button type="primary" @click="queryResourceStores" style="margin-right:10px">  
38 - <i class="el-icon-search"></i>  
39 - {{ $t('common.search') }}  
40 - </el-button>  
41 - <el-button type="primary" @click="resetResourceStores">  
42 - <i class="el-icon-refresh"></i>  
43 - {{ $t('common.reset') }}  
44 - </el-button>  
45 - </el-col>  
46 - </el-row> 6 + <el-row :gutter="20">
  7 + <el-col :span="4">
  8 + <el-select v-model="chooseResourceStoreInfo2.shId" disabled style="width:100%">
  9 + <el-option selected value="" :label="$t('chooseResourceStore2.selectWarehouse')"></el-option>
  10 + <el-option v-for="(item, index) in chooseResourceStoreInfo2.storehouses" :key="index" :label="item.shName"
  11 + :value="item.shId">
  12 + </el-option>
  13 + </el-select>
  14 + </el-col>
  15 + <el-col :span="4">
  16 + <el-select v-model="chooseResourceStoreInfo2.parentRstId" @change="_listResourceStoreSonTypes"
  17 + style="width:100%">
  18 + <el-option selected value="" :label="$t('chooseResourceStore2.selectItemType')"></el-option>
  19 + <el-option v-for="(item, index) in chooseResourceStoreInfo2.resourceStoreTypes" :key="index"
  20 + :label="item.name" :value="item.rstId">
  21 + </el-option>
  22 + </el-select>
  23 + </el-col>
  24 + <el-col :span="4">
  25 + <el-select v-model="chooseResourceStoreInfo2.rstId" style="width:100%;margin-right:10px">
  26 + <el-option selected value="" :label="$t('chooseResourceStore2.selectSubType')"></el-option>
  27 + <el-option v-for="(item, index) in chooseResourceStoreInfo2.resourceStoreSonTypes" :key="index"
  28 + :label="item.name" :value="item.rstId">
  29 + </el-option>
  30 + </el-select>
  31 + </el-col>
  32 + <el-col :span="4">
  33 + <el-input :placeholder="$t('chooseResourceStore2.inputItemName')"
  34 + v-model.trim="chooseResourceStoreInfo2._currentResourceStoreName"></el-input>
  35 + </el-col>
  36 + <el-col :span="4" style="text-align:right">
  37 + <el-button type="primary" @click="queryResourceStores" style="margin-right:10px">
  38 + <i class="el-icon-search"></i>
  39 + {{ $t('common.search') }}
  40 + </el-button>
  41 + <el-button type="primary" @click="resetResourceStores">
  42 + <i class="el-icon-refresh"></i>
  43 + {{ $t('common.reset') }}
  44 + </el-button>
  45 + </el-col>
  46 + </el-row>
47 47
48 </el-col> 48 </el-col>
49 </el-row> 49 </el-row>
@@ -51,51 +51,51 @@ @@ -51,51 +51,51 @@
51 <el-row style="margin-top:15px"> 51 <el-row style="margin-top:15px">
52 <el-col :span="24"> 52 <el-col :span="24">
53 53
54 - <el-table :data="chooseResourceStoreInfo2.resourceStores" border style="width:100%">  
55 - <el-table-column width="50">  
56 - <template slot-scope="scope">  
57 - <el-checkbox v-model="chooseResourceStoreInfo2.selectResourceStores"  
58 - :label="scope.row.resId"></el-checkbox>  
59 - </template>  
60 - </el-table-column>  
61 - <el-table-column prop="shName" :label="$t('chooseResourceStore2.warehouse')" align="center"></el-table-column>  
62 - <el-table-column prop="type" :label="$t('chooseResourceStore2.itemType')" align="center">  
63 - <template slot-scope="scope">  
64 - {{ scope.row.parentRstName ? scope.row.parentRstName : '-' }} >  
65 - {{ scope.row.rstName ? scope.row.rstName : '-' }}  
66 - </template>  
67 - </el-table-column>  
68 - <el-table-column prop="resName" :label="$t('chooseResourceStore2.itemName')" align="center"></el-table-column>  
69 - <el-table-column prop="rssName" :label="$t('chooseResourceStore2.itemSpec')" align="center">  
70 - <template slot-scope="scope">  
71 - {{ scope.row.rssName ? scope.row.rssName : '-' }}  
72 - </template>  
73 - </el-table-column>  
74 - <el-table-column prop="resCode" :label="$t('chooseResourceStore2.itemCode')" align="center"></el-table-column>  
75 - <el-table-column prop="isFixedName" :label="$t('chooseResourceStore2.fixedItem')"  
76 - align="center"></el-table-column>  
77 - <el-table-column prop="price" :label="$t('chooseResourceStore2.itemPrice')" align="center"></el-table-column>  
78 - <el-table-column prop="stock" :label="$t('chooseResourceStore2.itemStock')" align="center">  
79 - <template slot-scope="scope">  
80 - {{ scope.row.stock }}{{ scope.row.unitCodeName }}  
81 - </template>  
82 - </el-table-column>  
83 - </el-table> 54 + <el-table :data="chooseResourceStoreInfo2.resourceStores" border style="width:100%">
  55 + <el-table-column width="50">
  56 + <template slot-scope="scope">
  57 + <el-checkbox v-model="chooseResourceStoreInfo2.selectResourceStores"
  58 + :label="scope.row.resId"></el-checkbox>
  59 + </template>
  60 + </el-table-column>
  61 + <el-table-column prop="shName" :label="$t('chooseResourceStore2.warehouse')" align="center"></el-table-column>
  62 + <el-table-column prop="type" :label="$t('chooseResourceStore2.itemType')" align="center">
  63 + <template slot-scope="scope">
  64 + {{ scope.row.parentRstName ? scope.row.parentRstName : '-' }} >
  65 + {{ scope.row.rstName ? scope.row.rstName : '-' }}
  66 + </template>
  67 + </el-table-column>
  68 + <el-table-column prop="resName" :label="$t('chooseResourceStore2.itemName')" align="center"></el-table-column>
  69 + <el-table-column prop="rssName" :label="$t('chooseResourceStore2.itemSpec')" align="center">
  70 + <template slot-scope="scope">
  71 + {{ scope.row.rssName ? scope.row.rssName : '-' }}
  72 + </template>
  73 + </el-table-column>
  74 + <el-table-column prop="resCode" :label="$t('chooseResourceStore2.itemCode')" align="center"></el-table-column>
  75 + <el-table-column prop="isFixedName" :label="$t('chooseResourceStore2.fixedItem')"
  76 + align="center"></el-table-column>
  77 + <el-table-column prop="price" :label="$t('chooseResourceStore2.itemPrice')" align="center"></el-table-column>
  78 + <el-table-column prop="stock" :label="$t('chooseResourceStore2.itemStock')" align="center">
  79 + <template slot-scope="scope">
  80 + {{ scope.row.stock }}{{ scope.row.unitCodeName }}
  81 + </template>
  82 + </el-table-column>
  83 + </el-table>
84 84
85 - <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"  
86 - :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"  
87 - @current-change="handleCurrentChange" style="margin-top:20px"></el-pagination> 85 + <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size"
  86 + :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
  87 + @current-change="handleCurrentChange" style="margin-top:20px"></el-pagination>
88 88
89 - <div v-if="chooseResourceStoreInfo2.resourceStores.length > 0" style="margin-top:20px;text-align:right">  
90 - <el-button type="primary" @click="getSelectResourceStores">  
91 - <i class="el-icon-check"></i>  
92 - {{ $t('common.submit') }}  
93 - </el-button>  
94 - <el-button type="warning" @click="handleClose" style="margin-right:20px">  
95 - <i class="el-icon-close"></i>  
96 - {{ $t('common.cancel') }}  
97 - </el-button>  
98 - </div> 89 + <div v-if="chooseResourceStoreInfo2.resourceStores.length > 0" style="margin-top:20px;text-align:right">
  90 + <el-button type="primary" @click="getSelectResourceStores">
  91 + <i class="el-icon-check"></i>
  92 + {{ $t('common.submit') }}
  93 + </el-button>
  94 + <el-button type="warning" @click="handleClose" style="margin-right:20px">
  95 + <i class="el-icon-close"></i>
  96 + {{ $t('common.cancel') }}
  97 + </el-button>
  98 + </div>
99 </el-col> 99 </el-col>
100 </el-row> 100 </el-row>
101 </el-dialog> 101 </el-dialog>
@@ -161,15 +161,15 @@ export default { @@ -161,15 +161,15 @@ export default {
161 161
162 try { 162 try {
163 const res = await listResourceStores({ 163 const res = await listResourceStores({
164 - page: _page,  
165 - row: _row,  
166 - communityId: "",  
167 - resOrderType: _resOrderType,  
168 - shType: _shType,  
169 - resName: this.chooseResourceStoreInfo2._currentResourceStoreName,  
170 - parentRstId: this.chooseResourceStoreInfo2.parentRstId,  
171 - rstId: this.chooseResourceStoreInfo2.rstId,  
172 - shId: this.chooseResourceStoreInfo2.shId 164 + page: _page,
  165 + row: _row,
  166 + communityId: "",
  167 + resOrderType: _resOrderType,
  168 + shType: _shType,
  169 + resName: this.chooseResourceStoreInfo2._currentResourceStoreName,
  170 + parentRstId: this.chooseResourceStoreInfo2.parentRstId,
  171 + rstId: this.chooseResourceStoreInfo2.rstId,
  172 + shId: this.chooseResourceStoreInfo2.shId
173 }) 173 })
174 const _resourceStoreInfo = res 174 const _resourceStoreInfo = res
175 this.chooseResourceStoreInfo2.resourceStores = _resourceStoreInfo.resourceStores 175 this.chooseResourceStoreInfo2.resourceStores = _resourceStoreInfo.resourceStores
src/views/layout/layout.vue
@@ -125,6 +125,8 @@ export default { @@ -125,6 +125,8 @@ export default {
125 async loadCommunity() { 125 async loadCommunity() {
126 const { communitys } = await _loadCommunityInfo() 126 const { communitys } = await _loadCommunityInfo()
127 this.communitys = communitys 127 this.communitys = communitys
  128 + this.curCommunityName = getCommunityName()
  129 +
128 }, 130 },
129 async _loadStoreInfo() { 131 async _loadStoreInfo() {
130 this.loading = true 132 this.loading = true
src/views/resource/addItemOutLang.js
@@ -40,29 +40,7 @@ export const messages = { @@ -40,29 +40,7 @@ export const messages = {
40 contactPhone: 'Contact Phone', 40 contactPhone: 'Contact Phone',
41 applicationNote: 'Application Note' 41 applicationNote: 'Application Note'
42 }, 42 },
43 - chooseResourceStore2: {  
44 - title: 'Select Items (Collection/Purchase/Direct Outbound)',  
45 - warehouse: 'Warehouse',  
46 - warehousePlaceholder: 'Please select warehouse',  
47 - itemType: 'Item Type',  
48 - itemTypePlaceholder: 'Please select item type',  
49 - subType: 'Sub Type',  
50 - subTypePlaceholder: 'Please select sub type',  
51 - itemName: 'Item Name',  
52 - itemNamePlaceholder: 'Enter item name',  
53 - search: 'Search',  
54 - reset: 'Reset',  
55 - submit: 'Submit',  
56 - cancel: 'Cancel',  
57 - selectItemWarning: 'Please select at least one item',  
58 - fetchWarehouseError: 'Failed to fetch warehouses',  
59 - fetchItemTypeError: 'Failed to fetch item types',  
60 - fetchSubItemTypeError: 'Failed to fetch sub item types',  
61 - fetchItemListError: 'Failed to fetch item list',  
62 - itemCode: 'Item Code',  
63 - fixedItem: 'Fixed Item',  
64 - stock: 'Stock'  
65 - }, 43 +
66 }, 44 },
67 zh: { 45 zh: {
68 addItemOut: { 46 addItemOut: {
@@ -105,28 +83,6 @@ export const messages = { @@ -105,28 +83,6 @@ export const messages = {
105 contactPhone: '联系电话', 83 contactPhone: '联系电话',
106 applicationNote: '申请说明' 84 applicationNote: '申请说明'
107 }, 85 },
108 - chooseResourceStore2: {  
109 - title: '【物品领用/采购申请/直接出库】选择物品',  
110 - warehouse: '仓库',  
111 - warehousePlaceholder: '请选择仓库',  
112 - itemType: '物品类型',  
113 - itemTypePlaceholder: '请选择物品类型',  
114 - subType: '二级分类',  
115 - subTypePlaceholder: '请选择二级分类',  
116 - itemName: '物品名称',  
117 - itemNamePlaceholder: '输入物品管理名称',  
118 - search: '查询',  
119 - reset: '重置',  
120 - submit: '提交',  
121 - cancel: '取消',  
122 - selectItemWarning: '请选择需要采购的物品',  
123 - fetchWarehouseError: '获取仓库列表失败',  
124 - fetchItemTypeError: '获取物品类型失败',  
125 - fetchSubItemTypeError: '获取二级分类失败',  
126 - fetchItemListError: '获取物品列表失败',  
127 - itemCode: '物品编码',  
128 - fixedItem: '固定物品',  
129 - stock: '物品库存'  
130 - }, 86 +
131 } 87 }
132 } 88 }
133 \ No newline at end of file 89 \ No newline at end of file
src/views/resource/addPurchaseApplyList.vue
@@ -50,59 +50,62 @@ @@ -50,59 +50,62 @@
50 </div> 50 </div>
51 </div> 51 </div>
52 <div class="card-content"> 52 <div class="card-content">
53 - <el-table :data="addPurchaseApplyInfo.resourceStores" border style="width: 100%">  
54 - <el-table-column prop="type" :label="$t('addPurchaseApply.itemType')" align="center">  
55 - <template slot-scope="scope">  
56 - {{ scope.row.parentRstName ? scope.row.parentRstName : '-' }} >  
57 - {{ scope.row.rstName ? scope.row.rstName : '-' }}  
58 - </template>  
59 - </el-table-column>  
60 - <el-table-column prop="name" :label="$t('addPurchaseApply.itemNameCode')" align="center">  
61 - <template slot-scope="scope">  
62 - {{ scope.row.resName }}({{ scope.row.resCode }})  
63 - </template>  
64 - </el-table-column>  
65 - <el-table-column prop="spec" :label="$t('addPurchaseApply.itemSpec')" align="center">  
66 - <template slot-scope="scope">  
67 - {{ scope.row.rssName ? scope.row.rssName : '-' }}  
68 - </template>  
69 - </el-table-column>  
70 - <el-table-column prop="price" :label="$t('addPurchaseApply.price')" align="center">  
71 - <template slot-scope="scope">  
72 - <el-select v-model="scope.row.timesId" @change="_changeTimesId($event, scope.$index)" style="width:100%">  
73 - <el-option value="" :label="$t('addPurchaseApply.selectPrice')"></el-option>  
74 - <el-option v-for="time in scope.row.times" :key="time.timesId" :label="time.price" :value="time.timesId">  
75 - </el-option>  
76 - </el-select>  
77 - </template>  
78 - </el-table-column>  
79 - <el-table-column prop="stock" :label="$t('addPurchaseApply.itemStock')" align="center">  
80 - <template slot-scope="scope">  
81 - {{ _getTimesStock(scope.row) }}{{ scope.row.unitCodeName }}  
82 - </template>  
83 - </el-table-column>  
84 - <el-table-column prop="quantity" :label="$t('addPurchaseApply.applyQuantity')" align="center">  
85 - <template slot-scope="scope">  
86 - <el-input v-model="scope.row.quantity" type="number" :placeholder="$t('addPurchaseApply.requiredQuantity')"  
87 - style="width:70%;display:inline-block;margin:auto"></el-input>  
88 - &nbsp;&nbsp;{{ scope.row.unitCodeName }}  
89 - </template>  
90 - </el-table-column>  
91 - <el-table-column prop="remark" :label="$t('addPurchaseApply.remark')" align="center">  
92 - <template slot-scope="scope">  
93 - <el-input v-model="scope.row.remark" type="text"  
94 - :placeholder="$t('addPurchaseApply.optionalRemark')"></el-input>  
95 - </template>  
96 - </el-table-column>  
97 - <el-table-column prop="operation" :label="$t('addPurchaseApply.operation')" align="center">  
98 - <template slot-scope="scope">  
99 - <el-button type="danger" size="small" style="margin-right:10px;"  
100 - @click="_removeSelectResourceStoreItem(scope.row.resId)">  
101 - {{ $t('addPurchaseApply.remove') }}  
102 - </el-button>  
103 - </template>  
104 - </el-table-column>  
105 - </el-table> 53 + <div class="table-container">
  54 + <table class="custom-table">
  55 + <thead>
  56 + <tr>
  57 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.itemType') }}</th>
  58 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.itemNameCode') }}</th>
  59 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.itemSpec') }}</th>
  60 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.price') }}</th>
  61 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.itemStock') }}</th>
  62 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.applyQuantity') }}</th>
  63 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.remark') }}</th>
  64 + <th style="text-align: center; padding: 12px 8px;">{{ $t('addPurchaseApply.operation') }}</th>
  65 + </tr>
  66 + </thead>
  67 + <tbody>
  68 + <tr v-for="(item, index) in addPurchaseApplyInfo.resourceStores" :key="index" class="table-row">
  69 + <td style="text-align: center; padding: 12px 8px;">
  70 + {{ item.parentRstName ? item.parentRstName : '-' }} >
  71 + {{ item.rstName ? item.rstName : '-' }}
  72 + </td>
  73 + <td style="text-align: center; padding: 12px 8px;">
  74 + {{ item.resName }}({{ item.resCode }})
  75 + </td>
  76 + <td style="text-align: center; padding: 12px 8px;">
  77 + {{ item.rssName ? item.rssName : '-' }}
  78 + </td>
  79 + <td style="text-align: center; padding: 12px 8px;">
  80 + <select v-model="item.timesId" @change="_changeTimesId($event, index)" class="custom-select">
  81 + <option value="">{{ $t('addPurchaseApply.selectPrice') }}</option>
  82 + <option v-for="time in item.times" :key="time.timesId" :value="time.timesId">
  83 + {{ time.price }}
  84 + </option>
  85 + </select>
  86 + </td>
  87 + <td style="text-align: center; padding: 12px 8px;">
  88 + {{ _getTimesStock(item) }}{{ item.unitCodeName }}
  89 + </td>
  90 + <td style="text-align: center; padding: 12px 8px;">
  91 + <el-input v-model="item.quantity" type="number" :placeholder="$t('addPurchaseApply.requiredQuantity')"
  92 + style="width:70%;margin:auto"></el-input>
  93 + &nbsp;&nbsp;{{ item.unitCodeName }}
  94 + </td>
  95 + <td style="text-align: center; padding: 12px 8px;">
  96 + <el-input v-model="item.remark" type="text"
  97 + :placeholder="$t('addPurchaseApply.optionalRemark')"></el-input>
  98 + </td>
  99 + <td style="text-align: center; padding: 12px 8px;">
  100 + <el-button type="danger" size="small" style="margin-right:10px;"
  101 + @click="_removeSelectResourceStoreItem(item.resId)">
  102 + {{ $t('addPurchaseApply.remove') }}
  103 + </el-button>
  104 + </td>
  105 + </tr>
  106 + </tbody>
  107 + </table>
  108 + </div>
106 </div> 109 </div>
107 </el-card> 110 </el-card>
108 111
@@ -333,6 +336,10 @@ export default { @@ -333,6 +336,10 @@ export default {
333 this.addPurchaseApplyInfo.resourceStores[index].selectedStock = item.stock 336 this.addPurchaseApplyInfo.resourceStores[index].selectedStock = item.stock
334 } 337 }
335 }) 338 })
  339 + // 强制更新视图
  340 + this.$nextTick(() => {
  341 + this.$forceUpdate()
  342 + })
336 }, 343 },
337 _getTimesStock(_resourceStore) { 344 _getTimesStock(_resourceStore) {
338 if (!_resourceStore.timesId) { 345 if (!_resourceStore.timesId) {
@@ -344,9 +351,9 @@ export default { @@ -344,9 +351,9 @@ export default {
344 _stock = _item.stock 351 _stock = _item.stock
345 } 352 }
346 }) 353 })
347 - if (!_resourceStore.quantity) {  
348 - _resourceStore.quantity = ''  
349 - } 354 + // if (!_resourceStore.quantity) {
  355 + // _resourceStore.quantity = ''
  356 + // }
350 return _stock 357 return _stock
351 }, 358 },
352 async _loadStaffOrg(_flowId) { 359 async _loadStaffOrg(_flowId) {
@@ -425,7 +432,6 @@ export default { @@ -425,7 +432,6 @@ export default {
425 } 432 }
426 } 433 }
427 </script> 434 </script>
428 -  
429 <style lang="scss" scoped> 435 <style lang="scss" scoped>
430 .add-purchase-apply-container { 436 .add-purchase-apply-container {
431 padding: 20px; 437 padding: 20px;
@@ -447,5 +453,108 @@ export default { @@ -447,5 +453,108 @@ export default {
447 .el-form-item { 453 .el-form-item {
448 margin-bottom: 22px; 454 margin-bottom: 22px;
449 } 455 }
  456 +
  457 + .table-container {
  458 + overflow-x: auto;
  459 + }
  460 +
  461 + .custom-table {
  462 + width: 100%;
  463 + border-collapse: collapse;
  464 + border: 1px solid #EBEEF5;
  465 +
  466 + th, td {
  467 + border: 1px solid #EBEEF5;
  468 + background-color: #fff;
  469 + }
  470 +
  471 + th {
  472 + background-color: #fafafa;
  473 + font-weight: 500;
  474 + color: #606266;
  475 + font-size: 14px;
  476 + }
  477 +
  478 + .table-row {
  479 + &:hover {
  480 + background-color: #f5f7fa;
  481 + }
  482 +
  483 + &:nth-child(even) {
  484 + background-color: #fafafa;
  485 + }
  486 + }
  487 + }
  488 +
  489 + // 自定义 select 样式,模拟 Element UI 的外观
  490 + .custom-select {
  491 + width: 100%;
  492 + height: 32px;
  493 + line-height: 32px;
  494 + padding: 0 12px;
  495 + border: 1px solid #dcdfe6;
  496 + border-radius: 4px;
  497 + background-color: #fff;
  498 + color: #606266;
  499 + font-size: 14px;
  500 + outline: none;
  501 + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  502 + cursor: pointer;
  503 +
  504 + &:hover {
  505 + border-color: #c0c4cc;
  506 + }
  507 +
  508 + &:focus {
  509 + border-color: #409eff;
  510 + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
  511 + }
  512 +
  513 + // 自定义下拉箭头
  514 + 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");
  515 + background-position: right 8px center;
  516 + background-repeat: no-repeat;
  517 + background-size: 16px;
  518 + padding-right: 32px;
  519 +
  520 + // 移除默认样式
  521 + -webkit-appearance: none;
  522 + -moz-appearance: none;
  523 + appearance: none;
  524 +
  525 + // 兼容性处理
  526 + &::-ms-expand {
  527 + display: none;
  528 + }
  529 +
  530 + // option 样式
  531 + option {
  532 + padding: 8px 12px;
  533 + background-color: #fff;
  534 + color: #606266;
  535 + font-size: 14px;
  536 +
  537 + &:hover {
  538 + background-color: #f5f7fa;
  539 + }
  540 +
  541 + &:checked {
  542 + background-color: #409eff;
  543 + color: #fff;
  544 + }
  545 + }
  546 +
  547 + // 禁用状态
  548 + &:disabled {
  549 + background-color: #f5f7fa;
  550 + border-color: #e4e7ed;
  551 + color: #c0c4cc;
  552 + cursor: not-allowed;
  553 +
  554 + &:hover {
  555 + border-color: #e4e7ed;
  556 + }
  557 + }
  558 + }
450 } 559 }
451 </style> 560 </style>
452 \ No newline at end of file 561 \ No newline at end of file
src/views/resource/purchaseApplyManageList.vue
@@ -4,21 +4,17 @@ @@ -4,21 +4,17 @@
4 <div class="wrapper wrapper-content animated fadeInRight ecommerce"> 4 <div class="wrapper wrapper-content animated fadeInRight ecommerce">
5 <el-row :gutter="20"> 5 <el-row :gutter="20">
6 <el-col :span="4" class="padding-r-0"> 6 <el-col :span="4" class="padding-r-0">
7 - <el-card>  
8 - <div class="border-radius">  
9 - <div class="margin-xs-r treeview attendance-staff">  
10 - <ul class="list-group text-center border-radius">  
11 - <li class="list-group-item node-orgTree" v-for="(item, index) in purchaseApplyManageInfo.states"  
12 - :key="index" @click="swatchState(item)" :class="{  
13 - 'vc-node-selected':  
14 - purchaseApplyManageInfo.conditions.state === item.statusCd,  
15 - }">  
16 - {{ item.name }}  
17 - </li>  
18 - </ul>  
19 - </div> 7 + <div class="list-group-border-radius">
  8 + <div class=" treeview">
  9 + <ul class="list-group text-center ">
  10 + <li v-for="(item, index) in purchaseApplyManageInfo.states" :key="index" @click="swatchState(item)"
  11 + :class="{ 'vc-node-selected': purchaseApplyManageInfo.conditions.state === item.statusCd }"
  12 + class="list-group-item node-orgTree">
  13 + {{ item.name }}
  14 + </li>
  15 + </ul>
20 </div> 16 </div>
21 - </el-card> 17 + </div>
22 </el-col> 18 </el-col>
23 <el-col :span="20"> 19 <el-col :span="20">
24 <el-card> 20 <el-card>
@@ -74,7 +70,8 @@ @@ -74,7 +70,8 @@
74 </div> 70 </div>
75 </div> 71 </div>
76 <el-table :data="purchaseApplyManageInfo.purchaseApplys" border style="width: 100%" v-loading="loading"> 72 <el-table :data="purchaseApplyManageInfo.purchaseApplys" border style="width: 100%" v-loading="loading">
77 - <el-table-column prop="applyOrderId" :label="$t('purchaseApplyManage.table.applyOrderId')" align="center" /> 73 + <el-table-column prop="applyOrderId" :label="$t('purchaseApplyManage.table.applyOrderId')"
  74 + align="center" />
78 <el-table-column prop="userName" :label="$t('purchaseApplyManage.table.userName')" align="center" /> 75 <el-table-column prop="userName" :label="$t('purchaseApplyManage.table.userName')" align="center" />
79 <el-table-column prop="endUserName" :label="$t('purchaseApplyManage.table.endUserName')" align="center" /> 76 <el-table-column prop="endUserName" :label="$t('purchaseApplyManage.table.endUserName')" align="center" />
80 <el-table-column prop="createUserName" :label="$t('purchaseApplyManage.table.createUserName')" 77 <el-table-column prop="createUserName" :label="$t('purchaseApplyManage.table.createUserName')"
@@ -86,10 +83,10 @@ @@ -86,10 +83,10 @@
86 <template slot-scope="scope"> 83 <template slot-scope="scope">
87 {{ 84 {{
88 scope.row.warehousingWay == 10000 85 scope.row.warehousingWay == 10000
89 - ? $t('purchaseApplyManage.warehousingWay.direct')  
90 - : scope.row.warehousingWay == 20000  
91 - ? $t('purchaseApplyManage.warehousingWay.purchase')  
92 - : $t('purchaseApplyManage.warehousingWay.urgent') 86 + ? $t('purchaseApplyManage.warehousingWay.direct')
  87 + : scope.row.warehousingWay == 20000
  88 + ? $t('purchaseApplyManage.warehousingWay.purchase')
  89 + : $t('purchaseApplyManage.warehousingWay.urgent')
93 }} 90 }}
94 </template> 91 </template>
95 </el-table-column> 92 </el-table-column>
@@ -101,18 +98,18 @@ @@ -101,18 +98,18 @@
101 </el-button> 98 </el-button>
102 <el-button size="mini" v-if="scope.row.warehousingWay != 10000 && 99 <el-button size="mini" v-if="scope.row.warehousingWay != 10000 &&
103 scope.row.warehousingWay != 30000 100 scope.row.warehousingWay != 30000
104 - " @click="_openRunWorkflowImage(scope.row)"> 101 + " @click="_openRunWorkflowImage(scope.row)">
105 {{ $t('purchaseApplyManage.button.flowChart') }} 102 {{ $t('purchaseApplyManage.button.flowChart') }}
106 </el-button> 103 </el-button>
107 <el-button size="mini" type="danger" v-if="scope.row.state == '1000' && 104 <el-button size="mini" type="danger" v-if="scope.row.state == '1000' &&
108 purchaseApplyManageInfo.currentUserId == 105 purchaseApplyManageInfo.currentUserId ==
109 scope.row.createUserId 106 scope.row.createUserId
110 - " @click="_openDeletePurchaseApplyModel(scope.row)"> 107 + " @click="_openDeletePurchaseApplyModel(scope.row)">
111 {{ $t('purchaseApplyManage.button.cancelApply') }} 108 {{ $t('purchaseApplyManage.button.cancelApply') }}
112 </el-button> 109 </el-button>
113 <el-button size="mini" type="danger" v-else-if="scope.row.state == '1000' && 110 <el-button size="mini" type="danger" v-else-if="scope.row.state == '1000' &&
114 hasPrivilege('502022032383620003') 111 hasPrivilege('502022032383620003')
115 - " @click="_openDeletePurchaseApplyModel(scope.row)"> 112 + " @click="_openDeletePurchaseApplyModel(scope.row)">
116 {{ $t('purchaseApplyManage.button.cancelApply') }} 113 {{ $t('purchaseApplyManage.button.cancelApply') }}
117 </el-button> 114 </el-button>
118 </template> 115 </template>
@@ -323,25 +320,6 @@ export default { @@ -323,25 +320,6 @@ export default {
323 margin-right: 5px; 320 margin-right: 5px;
324 } 321 }
325 322
326 - .list-group {  
327 - padding: 0;  
328 - margin: 0;  
329 - list-style: none;  
330 -  
331 - .list-group-item {  
332 - padding: 10px;  
333 - border: 1px solid #ebeef5;  
334 - cursor: pointer;  
335 -  
336 - &:hover {  
337 - background-color: #f5f7fa;  
338 - }  
339 -  
340 - &.vc-node-selected {  
341 - background-color: #409eff;  
342 - color: #fff;  
343 - }  
344 - }  
345 - } 323 +
346 } 324 }
347 </style> 325 </style>
348 \ No newline at end of file 326 \ No newline at end of file