From 0e394ed580b09329ecaa8476bbb6334f8212b009 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周四, 25 4月 2024 13:40:31 +0800 Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/iWare_RawMaterialWarehouse --- iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addFormBaseCustomer/index.vue | 107 ++++++++++++++++++++++------------------------------- 1 files changed, 45 insertions(+), 62 deletions(-) diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addFormBaseCustomer/index.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addFormBaseCustomer/index.vue index 060d952..7eb397f 100644 --- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addFormBaseCustomer/index.vue +++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabItem/addFormBaseCustomer/index.vue @@ -1,5 +1,5 @@ 锘�<template> - <div ref="boxOutWrap" class="boxOutWrap"> + <div ref="boxOutWrap" class=""> <div ref="boxForm" class="boxForm"> <a-card :bordered="false" :bodyStyle="tstyle"> @@ -7,18 +7,18 @@ <a-form layout="inline"> <a-row :gutter="48"> <a-col :md="8" :sm="24"> - <a-form-item label="瀹㈡埛缂栧彿"> - <a-input v-model="queryParam.custCode" allow-clear placeholder="璇疯緭鍏ュ鎴风紪鍙�" /> + <a-form-item label="缂栧彿"> + <a-input v-model="queryParam.custCode" allow-clear placeholder="璇疯緭鍏ョ紪鍙�" /> </a-form-item> </a-col> <a-col :md="8" :sm="24"> - <a-form-item label="瀹㈡埛涓枃鍚嶇О"> - <a-input v-model="queryParam.custChinaName" allow-clear placeholder="璇疯緭鍏ュ鎴蜂腑鏂囧悕绉�" /> + <a-form-item label="涓枃鍚嶇О"> + <a-input v-model="queryParam.custChinaName" allow-clear placeholder="璇疯緭鍏ヤ腑鏂囧悕绉�" /> </a-form-item> </a-col><template v-if="advanced"> <a-col :md="8" :sm="24"> - <a-form-item label="瀹㈡埛鑻辨枃鍚嶇О"> - <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="璇疯緭鍏ュ鎴疯嫳鏂囧悕绉�" /> + <a-form-item label="鑻辨枃鍚嶇О"> + <a-input v-model="queryParam.custEnglishName" allow-clear placeholder="璇疯緭鍏ヨ嫳鏂囧悕绉�" /> </a-form-item> </a-col> <a-col :md="8" :sm="24"> @@ -27,13 +27,11 @@ </a-form-item> </a-col><a-col :md="8" :sm="24"> <a-form-item label="绫诲瀷"> - <a-input-number v-model="queryParam.custType" style="width: 100%" allow-clear - placeholder="璇疯緭鍏ョ被鍨�" /> - </a-form-item> - </a-col> - <a-col :md="8" :sm="24"> - <a-form-item label="绫诲瀷鍚嶇О"> - <a-input v-model="queryParam.custTypeName" allow-clear placeholder="璇疯緭鍏ョ被鍨嬪悕绉�" /> + <a-select :allowClear="true" style="width: 100%" v-model="queryParam.custType" + placeholder="璇烽�夋嫨绫诲瀷"> + <a-select-option v-for="(item, index) in custTypeData" :key="index" + :value="item.code">{{ item.name }}</a-select-option> + </a-select> </a-form-item> </a-col> <a-col :md="8" :sm="24"> @@ -135,7 +133,7 @@ </div> <a-card :bordered="false"> <s-table ref="table" :columns="columns" :data="loadData" :alert="true" @changeTablePage="pageInfo = $event" - :scroll="{ x: true, y: tableHeight }" :rowKey="(record) => record.id" + :scroll="{ x: true }" :rowKey="(record) => record.id" :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"> <template class="table-operator" slot="operator" v-if="hasPerm('BaseCustomer:add')"> <!-- <div ref="actionBar" class="actionBar"> @@ -145,19 +143,22 @@ <a-button type="info" v-if="hasPerm('BaseCustomer:exportExcel')" icon="download" @click="BaseCustomerToExcel()"> 瀵煎嚭 </a-button> - <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">鏂板瀹㈡埛妗f</a-button> + <a-button type="primary" v-if="hasPerm('BaseCustomer:add')" icon="plus" @click="$refs.addForm.add()">鏂板寰�鏉ュ叧绯�</a-button> </div> --> </template> - <span slot="isDisabledscopedSlots" slot-scope="text"> - <div v-if="text === true"> - <a-tag color="green">鏄�</a-tag> - </div> - <div v-else-if="text == false"> - <a-tag color="volcano">鍚�</a-tag> - </div> - <div v-else=""></div> - </span> - <span slot="action" slot-scope="text, record"> + <span slot="custTypescopedSlots" slot-scope="text"> + {{ 'base_customer_type' | dictType(text) }} + </span> + <span slot="isDisabledscopedSlots" slot-scope="text"> + <div v-if="text===true "> + <a-tag color="green">鏄�</a-tag> + </div> + <div v-else-if="text==false"> + <a-tag color="volcano">鍚�</a-tag> + </div> + <div v-else=""></div> + </span> + <!-- <span slot="action" slot-scope="text, record"> <a v-if="hasPerm('BaseCustomer:edit')" @click="$refs.editForm.edit(record)">缂栬緫</a> <a-divider type="vertical" v-if="hasPerm('BaseCustomer:edit') & hasPerm('BaseCustomer:delete')" /> @@ -165,7 +166,7 @@ @confirm="() => BaseCustomerDelete(record)"> <a>鍒犻櫎</a> </a-popconfirm> - </span> + </span> --> </s-table> <add-form ref="addForm" @ok="handleOk" /> <edit-form ref="editForm" @ok="handleOk" /> @@ -208,7 +209,7 @@ customRender: (text, record, index) => `${index + 1 + (this.pageInfo.current - 1) * this.pageInfo.pageSize}` }, { - title: '瀹㈡埛缂栧彿', + title: '缂栧彿', align: 'center', customHeaderCell: () => { return { @@ -228,7 +229,7 @@ dataIndex: 'custCode' }, { - title: '瀹㈡埛涓枃鍚嶇О', + title: '涓枃鍚嶇О', align: 'center', customHeaderCell: () => { return { @@ -248,7 +249,7 @@ dataIndex: 'custChinaName' }, { - title: '瀹㈡埛鑻辨枃鍚嶇О', + title: '鑻辨枃鍚嶇О', align: 'center', customHeaderCell: () => { return { @@ -293,26 +294,6 @@ customHeaderCell: () => { return { style: { - 'min-width': '80px'//鏈�灏忓垪瀹借缃� - } - } - }, - customCell: () => { - return { - style: { - 'min-width': '80px'//鏈�灏忓垪瀹借缃� - } - } - }, - sorter: true, - dataIndex: 'custType' - }, - { - title: '绫诲瀷鍚嶇О', - align: 'center', - customHeaderCell: () => { - return { - style: { 'min-width': '120px'//鏈�灏忓垪瀹借缃� } } @@ -325,7 +306,8 @@ } }, sorter: true, - dataIndex: 'custTypeName' + dataIndex: 'custType', + scopedSlots: { customRender: 'custTypescopedSlots' } }, { title: '鑱旂郴浜�', @@ -581,14 +563,14 @@ } }, created() { - if (this.hasPerm('BaseCustomer:edit') || this.hasPerm('BaseCustomer:delete')) { - this.columns.push({ - title: '鎿嶄綔', - width: '150px', - dataIndex: 'action', - scopedSlots: { customRender: 'action' } - }) - } + // if (this.hasPerm('BaseCustomer:edit') || this.hasPerm('BaseCustomer:delete')) { + // this.columns.push({ + // title: '鎿嶄綔', + // width: '150px', + // dataIndex: 'action', + // scopedSlots: { customRender: 'action' } + // }) + // } const path = this.$route.path const columnStr = window.localStorage.getItem(path) if (columnStr) { @@ -602,9 +584,11 @@ } }); } + + const custTypeOption = this.$options + this.custTypeData = custTypeOption.filters['dictData']('base_customer_type') const isDisabledOption = this.$options this.isDisabledData = isDisabledOption.filters['dictData']('yes_true_false') - this.handleTableHt() //璁剧疆涓昏〃琛ㄦ牸楂樺害 window.addEventListener( 'resize', @@ -707,8 +691,7 @@ } } </script> -<style lang="less"> -.table-operator { +<style lang="less">.table-operator { margin-bottom: 18px; } -- Gitblit v1.9.3