md
This commit is contained in:
parent
a1de51a5ae
commit
ac851fdbde
@ -61,6 +61,8 @@
|
||||
|
||||
<XdTable
|
||||
|
||||
ref="refTable"
|
||||
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
@ -126,7 +128,7 @@
|
||||
v-hasPermi="['emis:emisTmsCostProfit:edit']"
|
||||
>利润重算</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -135,7 +137,7 @@
|
||||
@click="handleExport"
|
||||
v-hasPermi="['emis:emisTmsCostFee:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -238,6 +240,7 @@ export default {
|
||||
total: 0,
|
||||
// TMS运输成本账单表格数据
|
||||
emisTmsCostFeeList: [],
|
||||
selectList:[],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
@ -297,6 +300,8 @@ export default {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
|
||||
this.selectList=selection;
|
||||
},
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
handleSortChange(column) {
|
||||
@ -433,51 +438,59 @@ export default {
|
||||
console.log(sums);
|
||||
return sums
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisTmsCostFee/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisTmsCostFee_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
})
|
||||
|
||||
listEmisTmsCostFee(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||
this.downloadLoading = false
|
||||
if (response.code === 200) {
|
||||
const curList = response.rows
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['id','成本序号','成本名称','成本类型','分摊类型','成本费','总票数','总件数','总重量','总体积','财务确认状态','财务确认日期','财务确认备注','财务确认人','财务确认站点','站点确认状态','站点确认日期','站点确认人','网点确认备注','确认网点代码','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
|
||||
const filterVal = ['id','costNo','costName','feeType','splitType','costFee','sendPieceSum','pieceNumber','totalWeight','totalVolume','blConfirmCenter','confirmCenterDate','confirmCenterNote','confirmCenterManCode','confirmCenterCode','blConfirmSite','confirmSiteDate','confirmSiteManCode','confirmSiteNote','confirmSiteCode','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
||||
const data = this.formatJson(filterVal, curList, response.rows)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: 'TMS运输成本账单',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
}
|
||||
});
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.exportData(this.selectList,loadingInstance);
|
||||
}
|
||||
else{
|
||||
|
||||
let qExportParam={...this.queryParams};
|
||||
qExportParam=this.addDateRange(qExportParam, this.dateTimeRange,'tradeDate')
|
||||
qExportParam.pageNum=1;
|
||||
qExportParam.pageSize=20000;
|
||||
|
||||
listEmisTmsCostFee(qExportParam).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.exportData(response.rows,loadingInstance);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
exportData(selData,loadingInstance){
|
||||
const curList =selData
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const exportParam=this.$refs.refTable.getExportParam();
|
||||
const tHeader = exportParam.header;
|
||||
const filterVal = exportParam.filter;
|
||||
const data = this.formatJson(filterVal, curList, selData)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '成本费用列表',
|
||||
autoWidth: true
|
||||
})
|
||||
loadingInstance.close()
|
||||
})
|
||||
},
|
||||
formatJson(filterVal, jsonData, resData) {
|
||||
let index = 0
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
|
||||
if (j === 'index') {
|
||||
return ++index
|
||||
}
|
||||
if (j === 'status') {
|
||||
var statusStr='xxx'
|
||||
if(v[j] == 10){
|
||||
statusStr='xxx'
|
||||
}
|
||||
return statusStr;
|
||||
else if (j === 'splitType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_cost_split_type,v[j]);
|
||||
}
|
||||
else if (j === 'transType') {
|
||||
return this.selectDictLabel(this.dict.type.emis_biz_shipping_method,v[j]);
|
||||
}
|
||||
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
|
||||
@ -212,7 +212,6 @@
|
||||
<el-button type="primary" @click="addBillToApply">加入单号</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
|
||||
class="cargoList"
|
||||
:cell-style="{
|
||||
'padding': '0px!important',
|
||||
|
||||
@ -114,6 +114,14 @@
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:edit']"
|
||||
>修改批次</el-button>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleBatchAdd"
|
||||
v-hasPermi="['emis:emisTmsSiteBatch:add']"
|
||||
>批量导入</el-button>
|
||||
<el-button style="margin-right: 5px;"
|
||||
type="danger"
|
||||
plain
|
||||
@ -142,6 +150,8 @@
|
||||
@click="handleDownBatchDtl"
|
||||
>导出批次明细</el-button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
@ -198,6 +208,9 @@
|
||||
<el-table-column :label="$t('操作员')" align="center" prop="createByName" min-width="150" />
|
||||
</XdTable>
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="90%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||
<BatchImportSiteBatch @on-changed="handleFormChanged" @on-cancel="cancelForm"></BatchImportSiteBatch>
|
||||
</el-dialog>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
@ -218,12 +231,16 @@ import { listEmisTmsSiteBatchDtl} from "@/api/emis/emisTmsSiteBatchDtl";
|
||||
import PackListView from '@/views/emis/emisTmsSiteBatch/packListView';
|
||||
import EmisSupplierPicker from '@/views/emis/EmisBaseTools/EmisSupplierPicker';
|
||||
|
||||
import BatchImportSiteBatch from '@/views/emis/emisTmsSiteBatch/panel/BatchImportSiteBatch.vue';
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: "CenterGenBatchMgnt",
|
||||
components: { EmisGetNextSitePicker, CountryPicker,
|
||||
EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker,
|
||||
TransProductPicker, PackListView,
|
||||
EmisSupplierPicker
|
||||
EmisSupplierPicker,BatchImportSiteBatch
|
||||
},
|
||||
dicts: [
|
||||
'emis_waybill_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi', 'cebp_return_status','emis_declare_mode','emis_customs_clear','emis_big_batch_type'
|
||||
@ -374,6 +391,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
/** 查询TMS组批次列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -437,10 +455,15 @@ export default {
|
||||
this.queryParams.isAsc = column.order;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.$emit("onCreate");
|
||||
},
|
||||
handleBatchAdd(){
|
||||
this.openForm= true;
|
||||
this.titleForm = "批量导入";
|
||||
},
|
||||
handleDelete(row){
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user