Browse Source

价格表

master
常熟吴彦祖 3 weeks ago
parent
commit
e1d2ca5cba
  1. 26
      src/views/modules/srmPart/partInfoList.vue
  2. 24
      src/views/modules/srmSupplier/supplierList.vue

26
src/views/modules/srmPart/partInfoList.vue

@ -50,6 +50,8 @@
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button> <el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button>
<el-button @click="addPart()" type="primary" style="margin-left: 2px">新增</el-button> <el-button @click="addPart()" type="primary" style="margin-left: 2px">新增</el-button>
<el-button @click="openCopyDialog" type="primary" style="margin-left: 2px">复制</el-button> <el-button @click="openCopyDialog" type="primary" style="margin-left: 2px">复制</el-button>
<!-- 主表导出:风格与供应商列表一致,复用当前查询条件全量导出 - rqrq -->
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -1434,20 +1436,32 @@ export default {
} }
}, },
/**
* 主表导出。
* 业务意图:与供应商列表导出风格保持一致。
* 规则:
* 1) 复用当前查询条件与主表列配置;
* 2) 分页改为 page=1、limit=-1,一次导出全部命中数据;
* 3) 产品阶段列按描述文案导出,避免只导出编码。
*/
async exportExcel () { async exportExcel () {
this.searchData.limit = -1
this.searchData.page = 1
// 导出单独组参,避免把列表当前 pageSize 改成 -1。site 以前端查询条件为准。 - rqrq
const params = Object.assign({}, this.searchData, {
page: 1,
limit: -1,
site: this.searchData.site || this.$store.state.user.site
})
excel.exportTable({ excel.exportTable({
url: '/part/searchPartList', url: '/part/searchPartList',
columnMapping: this.columnArray1,
mergeSetting: [],
params: this.searchData,
columnMapping: this.columnArray1, // 可以直接用table,不需要的列就剔除
mergeSetting: [], // 需要合并的列
params: params,
fileName: this.exportName + '.xlsx', fileName: this.exportName + '.xlsx',
rowFetcher: res => res.data, rowFetcher: res => res.data,
columnFormatter: [ columnFormatter: [
{ columnProp: 'partStage', formatter: (val) => this.formatPartStageDesc(val) } { columnProp: 'partStage', formatter: (val) => this.formatPartStageDesc(val) }
], ],
dropColumns: []
dropColumns: []// 需要剔除的列
}) })
}, },

24
src/views/modules/srmSupplier/supplierList.vue

@ -31,7 +31,7 @@
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button> <el-button class="customer-bun-min" type="primary" @click="getMainData" style="">查询</el-button>
<el-button @click="addSupplier()" type="primary" style="margin-left: 2px">新增</el-button> <el-button @click="addSupplier()" type="primary" style="margin-left: 2px">新增</el-button>
<!-- <el-button @click="handleTestCurrentLoginSite" type="primary" style="margin-left: 2px">测试</el-button>--> <!-- <el-button @click="handleTestCurrentLoginSite" type="primary" style="margin-left: 2px">测试</el-button>-->
<!-- <el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>-->
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -275,13 +275,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<!-- 最低出货金额排在手续费前一格;新增/编辑均可填写,默认 0,不强制固定小数位 - rqrq -->
<!-- 最低出货金额排在小单费前一格;新增/编辑均可填写,默认 0,不强制固定小数位 - rqrq -->
<el-form-item label="最低出货金额"> <el-form-item label="最低出货金额">
<el-input v-model="currentSupplier.minShipAccount" type="number"></el-input> <el-input v-model="currentSupplier.minShipAccount" type="number"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="手续费">
<el-form-item label="小单费">
<el-input v-model="currentSupplier.handlingCharge" type="number"></el-input> <el-input v-model="currentSupplier.handlingCharge" type="number"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -746,7 +746,7 @@ export default {
columnProp: 'handlingCharge', columnProp: 'handlingCharge',
headerAlign: 'center', headerAlign: 'center',
align: 'center', align: 'center',
columnLabel: '手续费',
columnLabel: '小单费',
columnWidth: '120', columnWidth: '120',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
@ -1354,7 +1354,7 @@ export default {
}, },
/** /**
* 查询列表数值去尾零。 * 查询列表数值去尾零。
* 业务意图:最低出货金额/手续费按“去尾零”展示,整数显示为 1 而不是 1.000。
* 业务意图:最低出货金额/小单费按“去尾零”展示,整数显示为 1 而不是 1.000。
* 边界:空值显示空;非数字原样返回。 * 边界:空值显示空;非数字原样返回。
*/ */
formatSupplierNumberDisplay (value) { formatSupplierNumberDisplay (value) {
@ -1618,14 +1618,22 @@ export default {
this.refreshAddressTable() this.refreshAddressTable()
} }
}, },
/**
* 主表导出。
* 复用当前查询条件,单独传 page=1、limit=-1 一次取全部,不改写列表当前分页状态。
* site 以前端查询条件为准,漏传时回落到当前登录 site。
*/
async exportExcel () { async exportExcel () {
this.searchData.limit = -1
this.searchData.page = 1
const params = Object.assign({}, this.searchData, {
page: 1,
limit: -1,
site: this.searchData.site || this.$store.state.user.site
})
excel.exportTable({ excel.exportTable({
url: '/srmSupplier/searchSrmSupplierList', url: '/srmSupplier/searchSrmSupplierList',
columnMapping: this.columnArray1, // 可以直接用table,不需要的列就剔除 columnMapping: this.columnArray1, // 可以直接用table,不需要的列就剔除
mergeSetting: [], // 需要合并的列 mergeSetting: [], // 需要合并的列
params: this.searchData,
params: params,
fileName: this.exportName + '.xlsx', fileName: this.exportName + '.xlsx',
rowFetcher: res => res.data, rowFetcher: res => res.data,
columnFormatter: [], columnFormatter: [],

Loading…
Cancel
Save