parent
d2c1dc1d26
commit
2107379337
File diff suppressed because it is too large
Load Diff
@ -1,454 +1,373 @@
|
||||
<template>
|
||||
<div class="JNPF-common-layout">
|
||||
<div class="JNPF-common-layout">
|
||||
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="query.materialName" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()">导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">生成采购
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-close" @click="exportData()">生成销售
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
||||
@click="reset()" />
|
||||
</el-tooltip>
|
||||
<screenfull isContainer />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="licenseNo" label="车号" fixed="left" sortable width="120" align="center" />
|
||||
<el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" />
|
||||
<el-table-column prop="salesName" label="销售合同" sortable width="150" align="center" />
|
||||
<el-table-column prop="supplierName" label="供应商名称" sortable width="150" align="center" />
|
||||
<el-table-column prop="purchaseName" label="采购合同" sortable width="150" align="center" />
|
||||
<el-table-column prop="materialCode" label="物料编码" sortable width="150" align="center" />
|
||||
<el-table-column prop="materialName" label="物料名称" sortable width="150" align="center" />
|
||||
<el-table-column prop="advance" label="是否垫资" sortable width="100" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.advance | dynamicText(advanceOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" sortable width="100" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.unit | dynamicText(unitOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="grossWeight" sortable label="毛重" width="100" align="center" />
|
||||
<el-table-column prop="tareWeight" sortable label="皮重" width="100" align="center" />
|
||||
<el-table-column prop="buckleWeight" sortable label="扣重" width="100" align="center" />
|
||||
<el-table-column prop="netWeight" sortable label="净重" width="100" align="center" />
|
||||
<el-table-column prop="settlement" sortable label="结算重量" width="100" align="center" />
|
||||
<el-table-column prop="purchasePrice" sortable label="采购单价" width="100" align="center" />
|
||||
<el-table-column prop="salesPrice" sortable label="销售价格" width="100" align="center" />
|
||||
<el-table-column prop="inputDate" sortable label="进项票日期" width="150" align="center" />
|
||||
<el-table-column prop="outputDate" sortable label="销项票日期" width="150" align="center" />
|
||||
<el-table-column prop="payDate" sortable label="付款日期" width="150" align="center" />
|
||||
<el-table-column prop="paymentDate" sortable label="回款日期" width="150" align="center" />
|
||||
<el-table-column prop="poundDate" sortable label="磅单日期" width="150" align="center" />
|
||||
<el-table-column prop="businessName" sortable label="业务员" width="150" align="center" />
|
||||
<el-table-column prop="remark" sortable label="备注" width="150" align="center" />
|
||||
<el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
|
||||
<el-popover placement="bottom" trigger="click" width="1000">
|
||||
<img :src="`/dev${item.url}`" width="100%" />
|
||||
<img
|
||||
slot="reference"
|
||||
:src="`/dev${item.url}`"
|
||||
:alt="`/dev${item.url}`"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px"
|
||||
/>
|
||||
</el-popover>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
|
||||
<el-popover placement="bottom" trigger="click" width="1000">
|
||||
<img :src="`/dev${item.url}`" width="100%" />
|
||||
<img
|
||||
slot="reference"
|
||||
:src="`/dev${item.url}`"
|
||||
:alt="`/dev${item.url}`"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px"
|
||||
/>
|
||||
</el-popover>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
|
||||
</div>
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="磅单日期">
|
||||
<el-date-picker v-model="query.poundDate" type="daterange"
|
||||
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" >
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="磅单号">
|
||||
<el-input v-model="query.poundlistNo" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
||||
@click="reset()"/>
|
||||
</el-tooltip>
|
||||
<screenfull isContainer/>
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
|
||||
<el-table-column prop="vehicleId" label="车牌号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="customerId" label="客户" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="salesId" label="销售合同" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="supplierName" label="供应商" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="purchaseId" label="采购合同" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="materialId" label="物料名称" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.advance | dynamicText(advanceOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" width="0" prop="unit" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.unit | dynamicText(unitOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="grossWeight" label="毛重" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="tareWeight" label="皮重" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="netWeight" label="净重" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="settlement" label="结算重量" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="purchasePrice" label="采购单价" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="inputDate" label="进项票日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="outputDate" label="销项票日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="payDate" label="付款日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="paymentDate" label="回款日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="poundDate" label="磅单日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="businessId" label="业务员" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="remark" label="备注" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
|
||||
<el-popover placement="bottom" trigger="click" width="1000">
|
||||
<img :src="`/dev${item.url}`" width="100%" />
|
||||
<img
|
||||
slot="reference"
|
||||
:src="`/dev${item.url}`"
|
||||
:alt="`/dev${item.url}`"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px"
|
||||
/>
|
||||
</el-popover>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
|
||||
<el-popover placement="bottom" trigger="click" width="1000">
|
||||
<img :src="`/dev${item.url}`" width="100%" />
|
||||
<img
|
||||
slot="reference"
|
||||
:src="`/dev${item.url}`"
|
||||
:alt="`/dev${item.url}`"
|
||||
style="max-height: 70px;max-width: 70px; padding: 5px"
|
||||
/>
|
||||
</el-popover>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="poundlistNo" label="磅单号" width="0" align="left"-->
|
||||
<!--/>-->
|
||||
<!-- <el-table-column label="运输类型" width="0" prop="transportType" algin="left"-->
|
||||
<!-->-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.transportType | dynamicText(transportTypeOptions) }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="transportPrice" label="运费" width="0" align="left"-->
|
||||
<!--/>-->
|
||||
<!-- <el-table-column prop="naturalId" label="自然人" width="0" align="left"-->
|
||||
<!--/>-->
|
||||
<el-table-column label="操作" fixed="right"
|
||||
width="150" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text"
|
||||
@click="addOrUpdateHandle(scope.row.id)" >编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
import request from '@/utils/request'
|
||||
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
JNPFForm,
|
||||
ExportBox,
|
||||
Detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
materialName: undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [],
|
||||
total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'licenseNo',
|
||||
label: '车号'
|
||||
},
|
||||
{
|
||||
prop: 'customerName',
|
||||
label: '客户名称'
|
||||
},
|
||||
{
|
||||
prop: 'salesName',
|
||||
label: '销售合同'
|
||||
},
|
||||
{
|
||||
prop: 'supplierName',
|
||||
label: '供应商名称'
|
||||
},
|
||||
{
|
||||
prop: 'purchaseName',
|
||||
label: '采购合同'
|
||||
},
|
||||
{
|
||||
prop: 'materialCode',
|
||||
label: '物料编码'
|
||||
},
|
||||
{
|
||||
prop: 'materialName',
|
||||
label: '物料名称'
|
||||
},
|
||||
{
|
||||
prop: 'advance',
|
||||
label: '是否垫资'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
label: '单位'
|
||||
},
|
||||
{
|
||||
prop: 'grossWeight',
|
||||
label: '毛重'
|
||||
},
|
||||
{
|
||||
prop: 'tareWeight',
|
||||
label: '皮重'
|
||||
},
|
||||
{
|
||||
prop: 'buckleWeight',
|
||||
label: '扣重'
|
||||
},
|
||||
{
|
||||
prop: 'netWeight',
|
||||
label: '净重'
|
||||
},
|
||||
{
|
||||
prop: 'settlement',
|
||||
label: '结算重量'
|
||||
},
|
||||
{
|
||||
prop: 'purchasePrice',
|
||||
label: '采购单价'
|
||||
},
|
||||
{
|
||||
prop: 'salesPrice',
|
||||
label: '销售价格'
|
||||
},
|
||||
{
|
||||
prop: 'inputDate',
|
||||
label: '进项票日期'
|
||||
},
|
||||
{
|
||||
prop: 'outputDate',
|
||||
label: '销项票日期'
|
||||
},
|
||||
{
|
||||
prop: 'payDate',
|
||||
label: '付款日期'
|
||||
},
|
||||
{
|
||||
prop: 'paymentDate',
|
||||
label: '回款日期'
|
||||
},
|
||||
{
|
||||
prop: 'poundDate',
|
||||
label: '磅单日期'
|
||||
},
|
||||
{
|
||||
prop: 'businessName',
|
||||
label: '业务员名称'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
},
|
||||
],
|
||||
advanceOptions: [{
|
||||
"fullName": "是",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "否",
|
||||
"id": "0"
|
||||
}],
|
||||
advanceProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
transportTypeOptions: [{
|
||||
"fullName": "汽运",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "船运",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "火车",
|
||||
"id": "2"
|
||||
}],
|
||||
transportTypeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
unitOptions: [{
|
||||
"fullName": "吨",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "千克",
|
||||
"id": "1"
|
||||
}],
|
||||
unitProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
goDetail(id) {
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
sortChange({
|
||||
column,
|
||||
prop,
|
||||
order
|
||||
}) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].inputDate = res.data.list[i].inputDate ? res.data.list[i].inputDate.substring(0,
|
||||
10) : '';
|
||||
res.data.list[i].outputDate = res.data.list[i].outputDate ? res.data.list[i].outputDate
|
||||
.substring(0, 10) : '';
|
||||
res.data.list[i].payDate = res.data.list[i].payDate ? res.data.list[i].payDate
|
||||
.substring(0, 10) : '';
|
||||
res.data.list[i].paymentDate = res.data.list[i].paymentDate ? res.data.list[i].paymentDate
|
||||
.substring(0, 10) : '';
|
||||
res.data.list[i].poundDate = res.data.list[i].poundDate ? res.data.list[i].poundDate
|
||||
.substring(0, 10) : '';
|
||||
let _data = res.data.list[i];
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
this.total = res.data.pagination.total
|
||||
export default {
|
||||
components: {JNPFForm, ExportBox,Detail},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
poundDate:undefined,
|
||||
poundlistNo:undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{prop: 'vehicleId', label: '车牌号'},
|
||||
{prop: 'customerId', label: '客户名称'},
|
||||
{prop: 'salesId', label: '销售合同'},
|
||||
{prop: 'supplierName', label: '供应商名称'},
|
||||
{prop: 'purchaseId', label: '采购合同'},
|
||||
{prop: 'materialId', label: '物料名称'},
|
||||
{prop: 'advance', label: '是否垫资'},
|
||||
{prop: 'unit', label: '单位'},
|
||||
{prop: 'grossWeight', label: '毛重'},
|
||||
{prop: 'tareWeight', label: '皮重'},
|
||||
{prop: 'buckleWeight', label: '扣重'},
|
||||
{prop: 'netWeight', label: '净重'},
|
||||
{prop: 'settlement', label: '结算重量'},
|
||||
{prop: 'purchasePrice', label: '采购单价'},
|
||||
{prop: 'salesPrice', label: '销售价格'},
|
||||
{prop: 'inputDate', label: '进项票日期'},
|
||||
{prop: 'outputDate', label: '销项票日期'},
|
||||
{prop: 'payDate', label: '付款日期'},
|
||||
{prop: 'paymentDate', label: '回款日期'},
|
||||
{prop: 'poundDate', label: '磅单日期'},
|
||||
{prop: 'businessId', label: '业务员'},
|
||||
{prop: 'remark', label: '备注'},
|
||||
{prop: 'poundlistNo', label: '磅单号'},
|
||||
{prop: 'transportType', label: '运输类型'},
|
||||
{prop: 'transportPrice', label: '运费'},
|
||||
{prop: 'naturalId', label: '自然人'},
|
||||
],
|
||||
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
||||
unitProps:{"label":"fullName","value":"id"},
|
||||
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
|
||||
transportTypeProps:{"label":"fullName","value":"id"},
|
||||
advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
|
||||
advanceProps:{"label":"fullName","value":"id"},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
goDetail(id){
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
sortChange({column, prop, order}) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId:this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list =[];
|
||||
for(let i=0;i<res.data.list.length;i++){
|
||||
let _data = res.data.list[i];
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
this.total = res.data.pagination.total
|
||||
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = {
|
||||
...data,
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
}
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
|
||||
request({
|
||||
url: `/api/poundlist/Poundlist/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in new issue