Commit d6a24e0e4071f47c9e3e81163209b75605187834

Authored by 曾湘平
1 parent 953e50cd

盘点界面优化

ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountDetailList.vue
... ... @@ -273,31 +273,31 @@
273 273 }
274 274 },
275 275  
276   - watch: {
277   - record: {
278   - immediate: true,
279   - handler() {
280   - if (this.record != null) {
281   - this.loadData(this.record)
282   - }
283   - }
284   - }
285   - },
  276 + // watch: {
  277 + // record: {
  278 + // immediate: true,
  279 + // handler() {
  280 + // if (this.record != null) {
  281 + // this.loadData(this.record)
  282 + // }
  283 + // }
  284 + // }
  285 + // },
286 286 methods: {
287   - loadData(record) {
288   - this.loading = true
289   - this.dataSource = []
290   - getAction(this.url.list, {
291   - cycleCountHeadId: record.id
292   - }).then((res) => {
293   - if (res.success) {
294   - this.dataSource = res.result.records
295   - }
296   - }).finally(() => {
297   - this.loading = false
298   - })
299   -
300   - },
  287 + // loadData(record) {
  288 + // this.loading = true
  289 + // this.dataSource = []
  290 + // getAction(this.url.list, {
  291 + // cycleCountHeadId: record.id
  292 + // }).then((res) => {
  293 + // if (res.success) {
  294 + // this.dataSource = res.result.records
  295 + // }
  296 + // }).finally(() => {
  297 + // this.loading = false
  298 + // })
  299 + //
  300 + // },
301 301 selectPort(record) {
302 302 this.$refs.modalForm2.edit(record);
303 303 this.$refs.modalForm2.title = "选择出库口";
... ... @@ -305,7 +305,6 @@
305 305 loadDatas(record) {
306 306 this.loading = true
307 307 this.dataSource = []
308   - console.log("loadDatas " + record)
309 308 getAction(this.url.list, {
310 309 cycleCountHeadId: record
311 310 }).then((res) => {
... ...
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue
... ... @@ -49,21 +49,24 @@
49 49 size="middle"
50 50 bordered
51 51 rowKey="id"
  52 + :scroll="{x:true}"
52 53 :columns="columns"
53 54 :dataSource="dataSource"
54 55 :pagination="ipagination"
55 56 :loading="loading"
56 57 :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  58 + :customRow="clickThenSelect"
  59 + :rowClassName="rowClassName"
57 60 class="j-table-force-nowrap"
58 61 @change="handleTableChange">
59 62 <!-- 内嵌table区域 begin -->
60   - <template slot="expandedRowRender" slot-scope="record">
61   - <a-tabs tabPosition="top">
62   - <a-tab-pane tab="盘点明细" key="cycleCountDetailId" forceRender>
63   - <cycle-count-detail-list :record="record" :isLoad="true"/>
64   - </a-tab-pane>
65   - </a-tabs>
66   - </template>
  63 +<!-- <template slot="expandedRowRender" slot-scope="record">-->
  64 +<!-- <a-tabs tabPosition="top">-->
  65 +<!-- <a-tab-pane tab="盘点明细" key="cycleCountDetailId" forceRender>-->
  66 +<!-- <cycle-count-detail-list :record="record" :isLoad="true"/>-->
  67 +<!-- </a-tab-pane>-->
  68 +<!-- </a-tabs>-->
  69 +<!-- </template>-->
67 70 <!-- 内嵌table区域 end -->
68 71 <span slot="companyCode" slot-scope="companyCode">
69 72 <a-tag :key="companyCode" color=blue>
... ... @@ -106,6 +109,12 @@
106 109  
107 110 </a-table>
108 111 </div>
  112 +
  113 + <a-tabs defaultActiveKey="1">
  114 + <a-tab-pane tab="盘点明细" key="1">
  115 + <Cycle-Count-Detail-List ref="CycleCountDetailList"></Cycle-Count-Detail-List>
  116 + </a-tab-pane>
  117 + </a-tabs>
109 118 <cycle-count-header-modal ref="modalForm" @ok="modalFormOk"></cycle-count-header-modal>
110 119 <cycle-count-detail-modal ref="detailModalForm" @ok="detailModalFormOk"/>
111 120 </a-card>
... ... @@ -263,6 +272,30 @@ export default {
263 272 fieldList.push({type: 'string', value: 'closedBy', text: '关闭人', dictCode: ''})
264 273 this.superFieldList = fieldList
265 274 },
  275 + onClearSelected() {
  276 + this.selectedRowKeys = [];
  277 + this.selectionRows = [];
  278 + this.selectedMainId = ''
  279 + },
  280 + onSelectChange(selectedRowKeys, selectionRows) {
  281 + this.selectedMainId = selectedRowKeys[0].toString();
  282 + this.selectedRowKeys = selectedRowKeys;
  283 + this.selectionRows = selectionRows;
  284 + this.$refs.CycleCountDetailList.loadDatas(this.selectedRowKeys[0]);
  285 + },
  286 + clickThenSelect(record,index) {
  287 + return {
  288 + on: {
  289 + click: () => {
  290 + this.selectIndex=index
  291 + this.onSelectChange(record.id.toString().split(","), [record]);
  292 + }
  293 + }
  294 + }
  295 + },
  296 + rowClassName(record, index) {
  297 + return index === this.selectIndex ? 'Rowactive' : ''
  298 + },
266 299 loadFrom() {
267 300 getCompanyList().then((res) => {
268 301 if (res.success) {
... ...