From e14ed882d12df3b48e59390eba364442cdff70bd Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期三, 28 五月 2025 15:46:32 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue | 315 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 315 insertions(+), 0 deletions(-) diff --git a/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue b/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue new file mode 100644 index 0000000..189bab2 --- /dev/null +++ b/src/views/tms/storeEarlyWarning/ToolsStoreEarlyWarningList.vue @@ -0,0 +1,315 @@ +<template> + <a-card :bordered="false"> + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="宸ュ叿缂栧彿" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ伐鍏风紪鐮佹绱�" + v-model="queryParam.toolCode" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鍘傚" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ巶瀹舵绱�" + v-model="queryParam.supplierId" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鏉愯川" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ユ潗璐ㄦ绱�" + v-model="queryParam.toolMaterial" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鍒�鍏疯鏍�" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ垁鍏疯鏍兼绱�" + v-model="queryParam.toolModel" + ></a-input> + </a-form-item> + </a-col> + <a-col :md="6" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> + </span> + </a-col> + + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> +<!-- <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>--> +<!-- <a-button type="primary" icon="download" @click="handleExportXls('tms_store_early warning')">瀵煎嚭</a-button>--> +<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> +<!-- <a-button type="primary" icon="import">瀵煎叆</a-button>--> +<!-- </a-upload>--> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-menu slot="overlay"> + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item> + </a-menu> + <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + :rowClassName="setRowClassName" + @change="handleTableChange"> + + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text,record"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span> + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)"> + 涓嬭浇 + </a-button> + </template> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleDetail(record)">璇︽儏</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <tools-store-early-warning-modal ref="modalForm" @ok="modalFormOk"></tools-store-early-warning-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import ToolsStoreEarlyWarningModal from './modules/ToolsStoreEarlyWarningModal.vue' + + export default { + name: 'TmsStoreEarlyWarningList', + mixins:[JeecgListMixin, mixinDevice], + components: { + ToolsStoreEarlyWarningModal + }, + data () { + return { + description: 'tms_store_early warning绠$悊椤甸潰', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'缂栫爜', + align:"center", + dataIndex: 'classifyId' + }, + { + title:'鍚嶇О', + align:"center", + dataIndex: 'toolName' + }, + { + title:'宸ュ叿绫诲瀷', + align:"center", + dataIndex: 'toolType' + }, + { + title:'瑙勬牸', + align:"center", + dataIndex: 'toolModel' + }, + { + title:'鏉愯川', + align:"center", + dataIndex: 'materialName' + }, + { + title:'瀛樺偍浣嶇疆', + align:"center", + dataIndex: 'goodsShelvesId' + }, + { + title:'鍘傚', + align:"center", + dataIndex: 'supplierId' + }, + { + title:'搴撳瓨涓婇檺', + align:"center", + dataIndex: 'highestInventory' + }, + { + title:'搴撳瓨涓嬮檺', + align:"center", + dataIndex: 'lowerInventory' + }, + { + title:'鎬诲簱瀛樻暟閲�', + align:"center", + dataIndex: 'totalCount' + }, + { + title:'鍙敤搴撳瓨鏁伴噺', + align:"center", + dataIndex: 'availableQuantity' + }, + { + title:'鐘舵��;', + align:"center", + dataIndex: 'status' + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + ], + url: { + list: "tms/toolsStoreEarlyWarning/list", + delete: "tms/toolsStoreEarlyWarning/delete", + deleteBatch: "tools/tmsStoreEarlyWarning/deleteBatch", + exportXlsUrl: "tools/tmsStoreEarlyWarning/exportXls", + importExcelUrl: "toolsStoreEarlyWarning/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + setRowClassName(record,index){ + + //鍒ゆ柇骞惰繑鍥炶鐨勬牱寮忓悕绉� + if(record){ + return "bg-blue" + } + }, + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'toolCode',text:'缂栫爜',dictCode:''}) + fieldList.push({type:'string',value:'toolName',text:'鍚嶇О',dictCode:''}) + fieldList.push({type:'string',value:'toolType',text:'宸ュ叿绫诲瀷',dictCode:''}) + fieldList.push({type:'string',value:'toolModel',text:'瑙勬牸',dictCode:''}) + fieldList.push({type:'string',value:'supplierId',text:'鏉愯川',dictCode:''}) + fieldList.push({type:'string',value:'goodsShelvesId',text:'瀛樺偍浣嶇疆',dictCode:''}) + fieldList.push({type:'string',value:'toolModel',text:'鍨嬪彿/鍥惧彿',dictCode:''}) + fieldList.push({type:'string',value:'supplierId',text:'鍘傚',dictCode:''}) + fieldList.push({type:'string',value:'toolMaterial',text:'鏉愯川',dictCode:''}) + fieldList.push({type:'string',value:'totalCount',text:'鎬诲簱瀛樻暟閲�',dictCode:''}) + fieldList.push({type:'string',value:'availableQuantity',text:'鍙敤搴撳瓨鏁伴噺',dictCode:''}) + fieldList.push({type:'BigDecimal',value:'lowerInventory',text:'搴撳瓨涓嬮檺',dictCode:''}) + fieldList.push({type:'string',value:'highestInventory',text:'搴撳瓨涓婇檺',dictCode:''}) + fieldList.push({type:'string',value:'status',text:'鐘舵��;',dictCode:''}) + fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) + fieldList.push({type:'string',value:'tenantId',text:'绉熸埛鍙�',dictCode:''}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + ::v-deep .bg-blue{ + + background-color:#C1194E; + + } +</style> -- Gitblit v1.9.3