Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit f6ff1f3a9a

@ -1,426 +1,511 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentNo">
<el-col :span="8" > <el-input v-model="dataForm.documentNo" placeholder="系统自动生成" readonly>
<el-form-item label="单据编号"
prop="documentNo" >
<el-input v-model="dataForm.documentNo"
placeholder="系统自动生成" readonly>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="客户名称" <el-form-item label="客户名称" prop="customerName">
prop="customerName" > <popupSelect v-model="dataForm.customerName" placeholder="请选择" clearable field="customerName"
<popupSelect v-model="dataForm.customerName" interfaceId="393371066040385285" :columnOptions="customerNamecolumnOptions" propsValue="supplier_nm"
placeholder="请选择" clearable field="customerName" interfaceId="393371066040385285" :columnOptions="customerNamecolumnOptions" propsValue="supplier_nm" relationField="supplier_nm" popupType="dialog" relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
popupTitle="选择数据" popupWidth="800px" @change="popupSelect" @change="popupSelect">
> </popupSelect>
</popupSelect> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8" > <el-form-item label="收款金额" prop="amountCollected">
<el-form-item label="收款金额" <el-input v-model="dataForm.amountCollected" placeholder="请输入" clearable :style='{"width":"100%"}'>
prop="amountCollected" >
<el-input v-model="dataForm.amountCollected"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款账户" <el-form-item label="收款账户" prop="collectionCount">
prop="collectionCount" > <el-input v-model="dataForm.collectionCount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.collectionCount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款银行" <el-form-item label="收款银行" prop="collectionBank">
prop="collectionBank" > <el-input v-model="dataForm.collectionBank" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.collectionBank"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款类型 " <el-form-item label="收款类型 " prop="paymentType">
prop="paymentType" > <el-select v-model="dataForm.paymentType" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.paymentType" <el-option v-for="(item, index) in paymentTypeOptions" :key="index" :label="item.fullName"
placeholder="请选择" clearable :style='{"width":"100%"}'> :value="item.id" :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in paymentTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="币别 " <el-form-item label="币别 " prop="currency">
prop="currency" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.currency" <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="结算类型" <el-form-item label="结算类型" prop="settlementType">
prop="settlementType" > <el-select v-model="dataForm.settlementType" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.settlementType" <el-option v-for="(item, index) in settlementTypeOptions" :key="index" :label="item.fullName"
placeholder="请选择" clearable :style='{"width":"100%"}'> :value="item.id" :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in settlementTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="备注信息" <el-form-item label="备注信息" prop="remark">
prop="remark" > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款凭证" <el-form-item label="收款凭证" prop="voucher">
prop="voucher" > <JNPF-UploadFz v-model="dataForm.voucher" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传">
<JNPF-UploadFz v-model="dataForm.voucher"
:fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" >
</JNPF-UploadFz> </JNPF-UploadFz>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="单据状态 " <el-form-item label="单据状态 " prop="status">
prop="status" > <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.status" <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
placeholder="请选择" clearable :style='{"width":"100%"}'> :disabled="item.disabled"></el-option>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="制单人" <el-form-item label="制单人" prop="creatorUserName">
prop="creatorUserName" > <el-input v-model="dataForm.creatorUserName" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.creatorUserName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activeojnisi" tab-position="top" class="mb-20"> <el-tabs v-model="activeojnisi" tab-position="top" class="mb-20">
<el-tab-pane label="收款明细"> <el-tab-pane label="收款明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.collection_item0List" size='mini' > <el-table :data="dataForm.collection_item0List" size='mini' show-summary>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="收款金额"> <el-table-column prop="amount" label="收款金额" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.amount" <el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"200%"}'> </el-input>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="creatorUserId" label="订单金额" align="center" >
<el-table-column prop="creatorUserId" label="订单金额"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.price" </el-input>
placeholder="请输入" clearable :style='{"width":"200%"}'> </template>
</el-input> </el-table-column>
</template> <el-table-column prop="creatorUserName" label="已收款金额" align="center" >
</el-table-column> <template slot-scope="scope">
<el-table-column prop="creatorUserName" label="已收款金额"> <el-input v-model="scope.row.amountCollected" placeholder="请输入" clearable
<template slot-scope="scope"> :style='{"width":"100%"}'>
<el-input v-model="scope.row.amountCollected" </el-input>
placeholder="请输入" clearable :style='{"width":"200%"}'> </template>
</el-input> </el-table-column>
</template> <el-table-column prop="deleteTime" label="销售订单编号" align="center" >
</el-table-column> <template slot-scope="scope">
<el-table-column prop="deleteTime" label="销售订单编号"> <popupSelect v-model="scope.row.documentNo" placeholder="请选择" clearable
<template slot-scope="scope"> :field="'deleteTime'+scope.$index" interfaceId="393372436705378053"
<popupSelect v-model="scope.row.documentNo" :columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no"
placeholder="请选择" clearable :field="'deleteTime'+scope.$index" interfaceId="393372436705378053" :columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog" relationField="document_no" popupType="dialog" popupWidth="800px"
popupWidth="800px" :bissId="dataForm.customerCode" @change="popupSelect2" :bissId="dataForm.customerCode" @change="popupSelect2">
> </popupSelect>
</popupSelect> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="lastModifyUserId" label="合同编号" align="center" >
<el-table-column prop="lastModifyUserId" label="合同编号"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.contractCode" placeholder="请输入" clearable
<el-input v-model="scope.row.contractCode" :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"200%"}'> </el-input>
</el-input> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="lastModifyUserName" label="数量" align="center" >
<el-table-column prop="lastModifyUserName" label="重量"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.num" </el-input>
placeholder="请输入" clearable :style='{"width":"200%"}'> </template>
</el-input> </el-table-column>
</template> <!-- <el-table-column prop="taxRate" label="税率">-->
</el-table-column> <!-- <template slot-scope="scope">-->
<!-- <el-table-column prop="taxRate" label="税率">--> <!-- <el-select v-model="scope.row.taxRate"-->
<!-- <template slot-scope="scope">--> <!-- placeholder="请选择" clearable :style='{"width":"100%"}'>-->
<!-- <el-select v-model="scope.row.taxRate"--> <!-- <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
<!-- placeholder="请选择" clearable :style='{"width":"100%"}'>--> <!-- </el-select>-->
<!-- <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>--> <!-- </template>-->
<!-- </el-select>--> <!-- </el-table-column>-->
<!-- </template>--> <el-table-column prop="lastModifyTime" label="垫资金额" align="center" >
<!-- </el-table-column>--> <template slot-scope="scope">
<el-table-column prop="lastModifyTime" label="垫资金额"> <el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
<template slot-scope="scope"> :style='{"width":"100%"}'>
<el-input v-model="scope.row.advanceAmount" </el-input>
placeholder="请输入" clearable :style='{"width":"200%"}'> </template>
</el-input> </el-table-column>
</template> <el-table-column prop="deleteUserId" label="税额" align="center" >
</el-table-column> <template slot-scope="scope">
<el-table-column prop="deleteUserId" label="税额"> <el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}'>
<template slot-scope="scope"> </el-input>
<el-input v-model="scope.row.rate" </template>
placeholder="请输入" clearable :style='{"width":"200%"}'> </el-table-column>
</el-input> <el-table-column prop="deleteUserName" label="不含税金额" align="center" >
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.notPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-table-column prop="deleteUserName" label="不含税金额"> </el-input>
<template slot-scope="scope"> </template>
<el-input v-model="scope.row.notPrice" </el-table-column>
placeholder="请输入" clearable :style='{"width":"200%"}'> <el-table-column prop="creatorTime" label="业务日期" align="center" >
</el-input> <template slot-scope="scope">
</template> <el-date-picker v-model="scope.row.creatorTime" placeholder="请选择" clearable
</el-table-column> :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
<el-table-column prop="creatorTime" label="业务日期"> </el-date-picker>
<template slot-scope="scope"> </template>
<el-date-picker v-model="scope.row.creatorTime" </el-table-column>
placeholder="请选择" clearable :style='{"width":"200%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" > <el-table-column label="操作" width="50">
</el-date-picker> <template slot-scope="scope">
</template> <el-button size="mini" type="text" class="JNPF-table-delBtn"
</el-table-column> @click="delcollection_item0List(scope.$index)">删除</el-button>
<el-table-column label="操作" width="50" > </template>
<template slot-scope="scope"> </el-table-column>
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcollection_item0List(scope.$index)"></el-button> </el-table>
</template> <div class="table-actions" @click="addcollection_item0List()">
</el-table-column> <el-button type="text" icon="el-icon-plus">添加</el-button>
</el-table> </div>
<div class="table-actions" @click="addcollection_item0List()"> </el-form-item>
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tabs>
</el-col> </el-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import {
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
isDetail: false, data() {
dataForm: { return {
customerCode : '', visible: false,
documentNo : '', loading: false,
customerName : '', isDetail: false,
amountCollected : '', dataForm: {
collectionCount : '', customerCode: '',
collectionBank : '', documentNo: '',
paymentType : "0", customerName: '',
currency : "0", amountCollected: '',
settlementType : "0", collectionCount: '',
remark : '', collectionBank: '',
voucher : [], paymentType: "0",
status : "0", currency: "0",
creatorUserName : '', settlementType: "0",
collection_item0List:[], remark: '',
}, voucher: [],
activeojnisi:'0', status: "0",
rules: creatorUserName: '',
{ collection_item0List: [],
},
customerNamecolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"客户地点名称","value":"supplier_site_code"}, {"label":"客户等级","value":"customer_level"},],
jg_collection_item0deleteTimecolumnOptions:[ {"label":"销售订单ID","value":"id"},{"label":"销售订单编号","value":"document_no"}, {"label":"合同编号","value":"contract_code"},
{"label":"订单金额","value":"price"}, {"label":"已收款金额","value":"amount_collected"},
{"label":"重量","value":"num"}, {"label":"垫资金额","value":"advance_amount"},
{"label":"税额","value":"rate"}, {"label":"不含税金额","value":"not_price"}, {"label":"业务日期","value":"creator_time"},],
paymentTypeOptions:[{"fullName":"货款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
}
},
computed: {},
watch: {},
created() {
}, },
mounted() {}, activeojnisi: '0',
methods: { rules: {},
popupSelect(e,d){ customerNamecolumnOptions: [{
this.dataForm.customerCode = d.id; "label": "客户编码",
"value": "supplier_cd"
}, {
"label": "客户名称",
"value": "supplier_nm"
}, {
"label": "客户地点名称",
"value": "supplier_site_code"
}, {
"label": "客户等级",
"value": "customer_level"
}, ],
jg_collection_item0deleteTimecolumnOptions: [{
"label": "销售订单ID",
"value": "id"
}, {
"label": "销售订单编号",
"value": "document_no"
}, {
"label": "合同编号",
"value": "contract_code"
}, },
popupSelect2(a,b) { {
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) { "label": "订单金额",
if (a == this.dataForm.collection_item0List[i].documentNo) { "value": "price"
this.dataForm.collection_item0List[i].id = b.id; }, {
this.dataForm.collection_item0List[i].price = b.price; "label": "已收款金额",
this.dataForm.collection_item0List[i].amountCollected = b.amount_collected; "value": "amount_collected"
this.dataForm.collection_item0List[i].contractCode = b.contract_code;
this.dataForm.collection_item0List[i].num = b.num;
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
this.dataForm.collection_item0List[i].rate = b.rate;
this.dataForm.collection_item0List[i].notPrice = b.not_price;
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
}
}
}, },
collection_item0Exist() { {
let isOk = true; "label": "重量",
for(let i=0;i<this.dataForm.collection_item0List.length;i++){ "value": "num"
const e = this.dataForm.collection_item0List[i]; }, {
} "label": "垫资金额",
return isOk; "value": "advance_amount"
}, },
clearData(data){ {
for (let key in data) { "label": "税额",
if (data[key] instanceof Array) { "value": "rate"
data[key] = []; }, {
} else if (data[key] instanceof Object) { "label": "不含税金额",
this.clearData(data[key]); "value": "not_price"
} else { }, {
data[key] = ""; "label": "业务日期",
} "value": "creator_time"
} },
}, ],
init(id, isDetail) { paymentTypeOptions: [{
this.dataForm.id = id || 0; "fullName": "货款",
this.visible = true; "id": "0"
this.isDetail = isDetail || false; }, {
this.$nextTick(() => { "fullName": "运费",
this.$refs['elForm'].resetFields(); "id": "1"
if(this.dataForm.id){ }, {
this.loading = true "fullName": "仓储",
request({ "id": "2"
url: '/api/collection/Collection/'+this.dataForm.id, }],
method: 'get' currencyOptions: [{
}).then(res => { "fullName": "人民币",
this.dataInfo(res.data) "id": "0"
this.loading = false }, {
}); "fullName": "美元",
}else{ "id": "1"
this.clearData(this.dataForm) }, {
} "fullName": "英镑",
}); "id": "2"
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) }],
}, settlementTypeOptions: [{
// "fullName": "现金",
dataFormSubmit() { "id": "0"
this.$refs['elForm'].validate((valid) => { }, {
if (valid) { "fullName": "赊购",
if (!this.collection_item0Exist()) return "id": "1"
this.request() }, {
} "fullName": "网银",
}) "id": "2"
}, }, {
request() { "fullName": "银企直连",
var _data =this.dataList() "id": "3"
if (!this.dataForm.id) { }, {
request({ "fullName": "银票",
url: '/api/collection/Collection', "id": "4"
method: 'post', }, {
data: _data "fullName": "商票",
}).then((res) => { "id": "5"
this.$message({ }],
message: res.msg, statusOptions: [{
type: 'success', "fullName": "已保存",
duration: 1000, "id": "0"
onClose: () => { }, {
this.visible = false "fullName": "审批中",
this.$emit('refresh', true) "id": "1"
} }, {
}) "fullName": "已审批",
}) "id": "2"
}else{ }, {
request({ "fullName": "已付款",
url: '/api/collection/Collection/'+this.dataForm.id, "id": "3"
method: 'PUT', }],
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
addcollection_item0List(){
let item = {
amount:undefined,
creatorUserId:undefined,
creatorUserName:undefined,
deleteTime:undefined,
lastModifyUserId:undefined,
lastModifyUserName:undefined,
taxRate:undefined,
lastModifyTime:undefined,
deleteUserId:undefined,
deleteUserName:undefined,
creatorTime:undefined,
}
this.dataForm.collection_item0List.push(item)
},
delcollection_item0List(index) {
this.dataForm.collection_item0List.splice(index, 1);
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.voucher = JSON.stringify(_data.voucher)
for(let i=0;i<_data.collection_item0List.length;i++){
var _list = _data.collection_item0List[i];
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.voucher = JSON.parse( _dataAll.voucher)
for(let i=0;i<_dataAll.collection_item0List.length;i++){
var _list = _dataAll.collection_item0List[i];
}
this.dataForm = _dataAll
},
},
}
taxRateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
popupSelect(e, d) {
this.dataForm.customerCode = d.id;
},
popupSelect2(a, b) {
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
if (a == this.dataForm.collection_item0List[i].documentNo) {
this.dataForm.collection_item0List[i].id = b.id;
this.dataForm.collection_item0List[i].price = b.price;
this.dataForm.collection_item0List[i].amountCollected = b.amount_collected;
this.dataForm.collection_item0List[i].contractCode = b.contract_code;
this.dataForm.collection_item0List[i].num = b.num;
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
this.dataForm.collection_item0List[i].rate = b.rate;
this.dataForm.collection_item0List[i].notPrice = b.not_price;
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
}
}
},
collection_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
const e = this.dataForm.collection_item0List[i];
}
return isOk;
},
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/collection/Collection/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.collection_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/collection/Collection',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/collection/Collection/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
addcollection_item0List() {
let item = {
amount: undefined,
creatorUserId: undefined,
creatorUserName: undefined,
deleteTime: undefined,
lastModifyUserId: undefined,
lastModifyUserName: undefined,
taxRate: undefined,
lastModifyTime: undefined,
deleteUserId: undefined,
deleteUserName: undefined,
creatorTime: undefined,
}
this.dataForm.collection_item0List.push(item)
},
delcollection_item0List(index) {
this.dataForm.collection_item0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.voucher = JSON.stringify(_data.voucher)
for (let i = 0; i < _data.collection_item0List.length; i++) {
var _list = _data.collection_item0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.voucher = JSON.parse(_dataAll.voucher)
for (let i = 0; i < _dataAll.collection_item0List.length; i++) {
var _list = _dataAll.collection_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -1,323 +1,423 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input> <el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmprice()"> <el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button> </el-button>
</div> <el-button type="text" icon="el-icon-close" @click="exportData()">
<div class="JNPF-common-head-right"> </el-button>
<el-tooltip effect="dark" content="刷新" placement="top"> <el-button type="text" icon="el-icon-check" @click="exportData()">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" </el-button>
@click="reset()"/> <el-button type="text" icon="el-icon-check" @click="confirmprice()">
</el-tooltip> </el-button>
<screenfull isContainer/> </div>
</div> <div class="JNPF-common-head-right">
</div> <el-tooltip effect="dark" content="刷新" placement="top">
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
<el-table-column prop="documentNo" label="单据编号" width="0" align="left" </el-tooltip>
/> <screenfull isContainer />
<el-table-column prop="customerName" label="客户名称" width="0" align="left" </div>
/>
<el-table-column label="币别 " width="0" prop="currency" algin="left"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="收款金额" width="0" align="left"
/>
<el-table-column prop="collectionCount" label="收款账户" width="0" align="left"
/>
<el-table-column prop="collectionBank" label="收款银行" width="0" align="left"
/>
<el-table-column label="收款类型 " width="0" prop="paymentType" algin="left"
>
<template slot-scope="scope">
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
</template>
</el-table-column>
<el-table-column label="结算类型" width="0" prop="settlementType" algin="left"
>
<template slot-scope="scope">
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态 " width="0" prop="status" algin="left"
>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" 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> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> @selection-change="handleSelectionChange" border>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" fixed="left" sortable width="200" align="center" />
<el-table-column prop="customerName" label="客户名称" fixed="left" sortable width="200" align="center" />
<el-table-column label="币别 " width="80" sortable prop="currency" align="center" >
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="amountCollected" sortable label="收款金额" width="150" align="center" />
<el-table-column prop="collectionCount" sortable label="收款账户" width="150" align="center" />
<el-table-column prop="collectionBank" sortable label="收款银行" width="150" align="center" />
<el-table-column label="收款类型" sortable width="150" prop="paymentType" align="center" >
<template slot-scope="scope">
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
</template>
</el-table-column>
<el-table-column label="结算类型" sortable width="150" prop="settlementType" align="center" >
<template slot-scope="scope">
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态" sortable width="150" prop="status" align="center" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" sortable label="制单人" width="150" align="center" />
<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> </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> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import {
import JNPFForm from './Form' getDictionaryDataSelector
import ExportBox from './ExportBox' } from '@/api/systemData/dictionary'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import JNPFForm from './Form'
import Detail from './Detail' import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: {
data() { JNPFForm,
return { ExportBox,
detailVisible: false, Detail
query: { },
documentNo:undefined, data() {
}, return {
treeProps: { detailVisible: false,
children: 'children', query: {
label: 'fullName', documentNo: undefined,
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'documentNo', label: '单据编号'},
{prop: 'customerName', label: '客户名称'},
{prop: 'currency', label: '币别 '},
{prop: 'amountCollected', label: '收款金额'},
{prop: 'collectionCount', label: '收款账户'},
{prop: 'collectionBank', label: '收款银行'},
{prop: 'paymentType', label: '收款类型 '},
{prop: 'settlementType', label: '结算类型'},
{prop: 'status', label: '单据状态 '},
{prop: 'creatorUserName', label: '制单人'},
],
paymentTypeOptions:[{"fullName":"货款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
paymentTypeProps:{"label":"fullName","value":"id"},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
settlementTypeProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
statusProps:{"label":"fullName","value":"id"},
}
}, },
computed: { treeProps: {
menuId() { children: 'children',
return this.$route.meta.modelId || '' label: 'fullName',
} value: 'id'
}, },
created() { list: [],
this.initData() listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}, },
methods: { formVisible: false,
goDetail(id){ exportBoxVisible: false,
this.detailVisible = true columnList: [{
this.$nextTick(() => { prop: 'documentNo',
this.$refs.Detail.init(id) label: '单据编号'
}) },
}, {
sortChange({column, prop, order}) { prop: 'customerName',
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' label: '客户名称'
this.listQuery.sidx = !order ? '' : prop },
this.initData() {
}, prop: 'currency',
initData() { label: '币别 '
this.listLoading = true; },
let _query = { {
...this.listQuery, prop: 'amountCollected',
...this.query, label: '收款金额'
menuId:this.menuId },
}; {
request({ prop: 'collectionCount',
url: `/api/collection/Collection/getList`, label: '收款账户'
method: 'post', },
data: _query {
}).then(res => { prop: 'collectionBank',
var _list =[]; label: '收款银行'
for(let i=0;i<res.data.list.length;i++){ },
let _data = res.data.list[i]; {
_list.push(_data) prop: 'paymentType',
} label: '收款类型 '
this.list = _list },
this.total = res.data.pagination.total {
prop: 'settlementType',
label: '结算类型'
},
{
prop: 'status',
label: '单据状态 '
},
{
prop: 'creatorUserName',
label: '制单人'
},
],
paymentTypeOptions: [{
"fullName": "货款",
"id": "0"
}, {
"fullName": "运费",
"id": "1"
}, {
"fullName": "仓储",
"id": "2"
}],
paymentTypeProps: {
"label": "fullName",
"value": "id"
},
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
currencyProps: {
"label": "fullName",
"value": "id"
},
settlementTypeOptions: [{
"fullName": "现金",
"id": "0"
}, {
"fullName": "赊购",
"id": "1"
}, {
"fullName": "网银",
"id": "2"
}, {
"fullName": "银企直连",
"id": "3"
}, {
"fullName": "银票",
"id": "4"
}, {
"fullName": "商票",
"id": "5"
}],
settlementTypeProps: {
"label": "fullName",
"value": "id"
},
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}, {
"fullName": "已付款",
"id": "3"
}],
statusProps: {
"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/collection/Collection/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 this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/collection/Collection/${id}`, url: `/api/collection/Collection/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData() 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/collection/Collection/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
confirmprice(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
} }
let id = this.multipleSelection.join() });
let param = {}; })
param = this.list.find(function(param) { }).catch(() => {});
debugger },
return param.id == id; handleSelectionChange(val) {
}) const res = val.map(item => item.id)
request({ this.multipleSelection = res
url: `/api/collection/Collection/confirmprice`, },
method: 'POST', handleBatchRemoveDel() {
data: param if (!this.multipleSelection.length) {
}).then(res => { this.$message({
this.$message({ type: 'error',
type: 'success', message: '请选择一条数据',
message: res.msg, duration: 1500,
onClose: () => { })
this.initData() return
} }
}); const ids = this.multipleSelection.join()
}) this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
}, type: 'warning'
addOrUpdateHandle(id, isDetail) { }).then(() => {
this.formVisible = true request({
this.$nextTick(() => { url: `/api/collection/Collection/batchRemove/${ids}`,
this.$refs.JNPFForm.init(id, isDetail) method: 'DELETE'
}) }).then(res => {
}, this.$message({
exportData() { type: 'success',
this.exportBoxVisible = true message: res.msg,
this.$nextTick(() => { onClose: () => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/collection/Collection/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() this.initData()
}, }
refresh(isrRefresh) { });
this.formVisible = false })
if (isrRefresh) this.reset() }).catch(() => {})
}, },
reset() { confirmprice() {
for (let key in this.query) { if (!this.multipleSelection.length) {
this.query[key] = undefined this.$message({
} type: 'error',
this.search() message: '请选择一条数据',
duration: 1500,
})
return
}
let id = this.multipleSelection.join()
let param = {};
param = this.list.find(function(param) {
debugger
return param.id == id;
})
request({
url: `/api/collection/Collection/confirmprice`,
method: 'POST',
data: param
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
} }
});
})
},
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/collection/Collection/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> </script>

@ -44,6 +44,7 @@
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border> @selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="paymentno" label="来源单号" fixed="left" sortable width="200" align="center" /> <el-table-column prop="paymentno" label="来源单号" fixed="left" sortable width="200" align="center" />
<el-table-column prop="documentno" label="单据编号" fixed="left" sortable width="200" align="center" /> <el-table-column prop="documentno" label="单据编号" fixed="left" sortable width="200" align="center" />
<el-table-column prop="suppliername" label="供应商" fixed="left" sortable width="150" align="center" /> <el-table-column prop="suppliername" label="供应商" fixed="left" sortable width="150" align="center" />

@ -1,352 +1,349 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px"> :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1200px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
label-position="right"> <template v-if="!loading">
<template v-if="!loading"> <el-col :span="12">
<el-col :span="12"> <el-form-item label="物料编码" prop="materialCode">
<el-form-item label="物料编码" prop="materialCode"> <popup-select v-model="dataForm.materialCode" placeholder="请选择" clearable field="materialCode"
<popup-select v-model="dataForm.materialCode" placeholder="请选择" clearable interfaceId="381037852907038533" :columnOptions="materialCodecolumnOptions" propsValue="item_code"
field="materialCode" interfaceId="381037852907038533" :columnOptions="materialCodecolumnOptions" propsValue="item_code" relationField="item_code" popupType="dialog" relationField="item_code" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
popupTitle="选择数据" popupWidth="800px">
</popup-select> </popup-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料名称" prop="materialName">
<el-input v-model="dataForm.materialName" placeholder="请输入" clearable <el-input v-model="dataForm.materialName" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="销售合同" prop="salesName"> <el-form-item label="销售合同" prop="salesName">
<popup-select v-model="dataForm.salesName" placeholder="请选择" clearable field="salesName" <popup-select v-model="dataForm.salesName" placeholder="请选择" clearable field="salesName"
interfaceId="381038993740949317" :columnOptions="salesNamecolumnOptions" propsValue="contract_name" relationField="contract_name" popupType="dialog" interfaceId="381038993740949317" :columnOptions="salesNamecolumnOptions" propsValue="contract_name"
popupTitle="选择数据" popupWidth="800px"> relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
</popup-select> </popup-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户名称" prop="customerName"> <el-form-item label="客户名称" prop="customerName">
<el-input v-model="dataForm.customerName" placeholder="请输入" clearable <el-input v-model="dataForm.customerName" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否垫资" prop="advance"> <el-form-item label="是否垫资" prop="advance">
<el-select v-model="dataForm.advance" placeholder="请选择" clearable :style='{"width":"100%"}'> <el-select v-model="dataForm.advance" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" <el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id"
:value="item.id" :disabled="item.disabled"></el-option> :disabled="item.disabled"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="销售价格" prop="salesPrice"> <el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" placeholder="数字文本" :step="1"> <el-input-number v-model="dataForm.salesPrice" placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="运输方式" prop="transportType"> <el-form-item label="运输方式" prop="transportType">
<el-select v-model="dataForm.transportType" placeholder="请选择" clearable <el-select v-model="dataForm.transportType" placeholder="请选择" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'> <el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName"
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :value="item.id" :disabled="item.disabled"></el-option>
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="运费" prop="departmentId"> <el-form-item label="运费" prop="departmentId">
<el-input-number v-model="dataForm.departmentId" placeholder="数字文本" :step="1"> <el-input-number v-model="dataForm.departmentId" placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="车号" prop="licenseNo"> <el-form-item label="车号" prop="licenseNo">
<popupSelect v-model="dataForm.licenseNo" placeholder="请选择" clearable field="licenseNo" <popupSelect v-model="dataForm.licenseNo" placeholder="请选择" clearable field="licenseNo"
interfaceId="381432451370615173" :columnOptions="licenseNocolumnOptions" propsValue="ticketno" relationField="ticketno" popupType="dialog" interfaceId="381432451370615173" :columnOptions="licenseNocolumnOptions" propsValue="ticketno"
popupTitle="选择数据" popupWidth="800px"> relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="业务员名称" prop="businessName"> <el-form-item label="业务员名称" prop="businessName">
<el-input v-model="dataForm.businessName" placeholder="请输入" clearable <el-input v-model="dataForm.businessName" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="磅单图片" prop="poundPictures"> <el-form-item label="磅单图片" prop="poundPictures">
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9"> <JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg> </JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="皮重" prop="tareWeight"> <el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" placeholder="数字文本" :step="1"> <el-input-number v-model="dataForm.tareWeight" placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="毛重" prop="grossWeight"> <el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" placeholder="数字文本" :step="1"> <el-input-number v-model="dataForm.grossWeight" placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="扣重" prop="buckleWeight"> <el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" placeholder="数字文本" :step="1"> <el-input-number v-model="dataForm.buckleWeight" placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="净重" prop="netWeight"> <el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" placeholder="数字文本" :step="1"> <el-input-number v-model="dataForm.netWeight" placeholder="数字文本" :step="1">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="司机名称" prop="driverName"> <el-form-item label="司机名称" prop="driverName">
<el-input v-model="dataForm.driverName" placeholder="请输入" clearable <el-input v-model="dataForm.driverName" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="车辆图片" prop="vehiclePictures"> <el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9"> <JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg> </JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="制单人" prop="creatorusername"> <el-form-item label="制单人" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable <el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="供应商名称" prop="supplierName"> <el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="dataForm.supplierName" placeholder="请输入" clearable <el-input v-model="dataForm.supplierName" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="采购合同" prop="purchaseName"> <el-form-item label="采购合同" prop="purchaseName">
<relationForm v-model="dataForm.purchaseName" placeholder="请选择" clearable <relationForm v-model="dataForm.purchaseName" placeholder="请选择" clearable field="purchaseName"
field="purchaseName" modelId="294090217084722181" modelId="294090217084722181" :columnOptions="purchaseNamecolumnOptions" relationField="selectField121">
:columnOptions="purchaseNamecolumnOptions" relationField="selectField121">
</relationForm> </relationForm>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单位" prop="unit"> <el-form-item label="单位" prop="unit">
<el-select v-model="dataForm.unit" placeholder="请选择" clearable :style='{"width":"100%"}'> <el-select v-model="dataForm.unit" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" <el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id"
:value="item.id" :disabled="item.disabled"></el-option> :disabled="item.disabled"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="结算重量" prop="settlement"> <el-form-item label="结算重量" prop="settlement">
<el-input v-model="dataForm.settlement" placeholder="请输入" clearable <el-input v-model="dataForm.settlement" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="采购单价" prop="purchasePrice"> <el-form-item label="采购单价" prop="purchasePrice">
<el-input v-model="dataForm.purchasePrice" placeholder="请输入" clearable <el-input v-model="dataForm.purchasePrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
:style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="进项票日期" prop="inputDate"> <el-form-item label="进项票日期" prop="inputDate">
<el-date-picker v-model="dataForm.inputDate" placeholder="请选择" clearable <el-date-picker v-model="dataForm.inputDate" placeholder="请选择" clearable :style='{"width":"100%"}'
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" type="datetime" format="yyyy-MM-dd" value-format="timestamp">
value-format="timestamp">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="销项票日期" prop="outputDate"> <el-form-item label="销项票日期" prop="outputDate">
<el-date-picker v-model="dataForm.outputDate" placeholder="请选择" clearable <el-date-picker v-model="dataForm.outputDate" placeholder="请选择" clearable :style='{"width":"100%"}'
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" type="datetime" format="yyyy-MM-dd" value-format="timestamp">
value-format="timestamp">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="付款日期" prop="payDate"> <el-form-item label="付款日期" prop="payDate">
<el-date-picker v-model="dataForm.payDate" placeholder="请选择" clearable <el-date-picker v-model="dataForm.payDate" placeholder="请选择" clearable :style='{"width":"100%"}'
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" type="datetime" format="yyyy-MM-dd" value-format="timestamp">
value-format="timestamp">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="回款日期" prop="paymentDate"> <el-form-item label="回款日期" prop="paymentDate">
<el-date-picker v-model="dataForm.paymentDate" placeholder="请选择" clearable <el-date-picker v-model="dataForm.paymentDate" placeholder="请选择" clearable :style='{"width":"100%"}'
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" type="datetime" format="yyyy-MM-dd" value-format="timestamp">
value-format="timestamp">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="磅单日期" prop="poundDate"> <el-form-item label="磅单日期" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable <el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" type="datetime" format="yyyy-MM-dd" value-format="timestamp">
value-format="timestamp">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
</el-form> </el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { import {
getDataInterfaceRes getDataInterfaceRes
} from '@/api/systemData/dataInterface' } from '@/api/systemData/dataInterface'
import { import {
getDictionaryDataSelector getDictionaryDataSelector
} from '@/api/systemData/dictionary' } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
data() { data() {
return { return {
visible: false, visible: false,
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
materialCode: "", materialCode: "",
materialName: '', materialName: '',
salesName: "", salesName: "",
customerName: '', customerName: '',
advance: "", advance: "",
salesPrice: '', salesPrice: '',
transportType: "", transportType: "",
departmentId: 11.225, departmentId: 11.225,
licenseNo: "", licenseNo: "",
businessName: '', businessName: '',
poundPictures: [], poundPictures: [],
tareWeight: '', tareWeight: '',
grossWeight: '', grossWeight: '',
buckleWeight: '', buckleWeight: '',
netWeight: '', netWeight: '',
remark: '', remark: '',
driverName: '', driverName: '',
vehiclePictures: [], vehiclePictures: [],
creatorusername: '', creatorusername: '',
supplierName: '', supplierName: '',
purchaseName: "", purchaseName: "",
unit: "", unit: "",
settlement: '', settlement: '',
purchasePrice: '', purchasePrice: '',
inputDate: '', inputDate: '',
outputDate: '', outputDate: '',
payDate: '', payDate: '',
paymentDate: '', paymentDate: '',
poundDate: '', poundDate: '',
}, },
rules: { rules: {
materialCode: [{ materialCode: [{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, ], }, ],
salesName: [{ salesName: [{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, ], }, ],
licenseNo: [{ licenseNo: [{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, ], }, ],
poundPictures: [{ poundPictures: [{
required: true, required: true,
message: '请至少选择一个', message: '请至少选择一个',
trigger: 'click' trigger: 'click'
}, ], }, ],
tareWeight: [{ tareWeight: [{
required: true, required: true,
message: '数字文本', message: '数字文本',
trigger: ["blur", "change"] trigger: ["blur", "change"]
}, ], }, ],
grossWeight: [{ grossWeight: [{
required: true, required: true,
message: '数字文本', message: '数字文本',
trigger: ["blur", "change"] trigger: ["blur", "change"]
}, ], }, ],
buckleWeight: [{ buckleWeight: [{
required: true, required: true,
message: '数字文本', message: '数字文本',
trigger: ["blur", "change"] trigger: ["blur", "change"]
}, ], }, ],
netWeight: [{ netWeight: [{
required: true, required: true,
message: '数字文本', message: '数字文本',
trigger: ["blur", "change"] trigger: ["blur", "change"]
}, ], }, ],
},
materialCodecolumnOptions:[ {"label":"物料编码","value":"item_code"},
{"label":"物料名称","value":"description"},
{"label":"库存组织","value":"organization_id"},
{"label":"默认库区","value":"areaname"},],
salesNamecolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
}, },
materialCodecolumnOptions: [{
"label": "物料编码",
"value": "item_code"
},
{
"label": "物料名称",
"value": "description"
},
{
"label": "库存组织",
"value": "organization_id"
},
{
"label": "默认库区",
"value": "areaname"
},
],
salesNamecolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
},
{ {
"label": "合同名称", "label": "合同名称",
"value": "contract_name" "value": "contract_name"
@ -358,28 +355,29 @@
{ {
"label": "供应商/客户名称", "label": "供应商/客户名称",
"value": "name" "value": "name"
},], },
advanceOptions: [{ ],
"fullName": "是", advanceOptions: [{
"id": "1" "fullName": "是",
}, { "id": "1"
"fullName": "否", }, {
"id": "0" "fullName": "否",
}], "id": "0"
transportTypeOptions: [{ }],
"fullName": "汽运", transportTypeOptions: [{
"id": "0" "fullName": "汽运",
}, { "id": "0"
"fullName": "船运", }, {
"id": "1" "fullName": "船运",
}, { "id": "1"
"fullName": "火车", }, {
"id": "2" "fullName": "火车",
}], "id": "2"
licenseNocolumnOptions: [{ }],
"label": "车牌号", licenseNocolumnOptions: [{
"value": "ticketno" "label": "车牌号",
}, "value": "ticketno"
},
{ {
"label": "司机", "label": "司机",
"value": "drivername" "value": "drivername"
@ -399,114 +397,115 @@
{ {
"label": "创建时间", "label": "创建时间",
"value": "f_creatortime" "value": "f_creatortime"
},], },
purchaseNamecolumnOptions: [{ ],
"label": "事件等级", purchaseNamecolumnOptions: [{
"value": "selectField121" "label": "事件等级",
}, ], "value": "selectField121"
unitOptions: [{ }, ],
"fullName": "吨", unitOptions: [{
"id": "0" "fullName": "吨",
}, { "id": "0"
"fullName": "千克", }, {
"id": "1" "fullName": "千克",
}], "id": "1"
}],
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
clearData(data) { clearData(data) {
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = [];
} else if (data[key] instanceof Object) { } else if (data[key] instanceof Object) {
this.clearData(data[key]); this.clearData(data[key]);
} else { } else {
data[key] = ""; data[key] = "";
} }
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.isDetail = isDetail || false; this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/poundlist/Poundlist/' + this.dataForm.id, url: '/api/poundlist/Poundlist/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); });
} else { } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); });
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['elForm'].validate((valid) => { this.$refs['elForm'].validate((valid) => {
if (valid) { if (valid) {
this.request() this.request()
} }
}) })
}, },
request() { request() {
var _data = this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/poundlist/Poundlist', url: '/api/poundlist/Poundlist',
method: 'post', method: 'post',
data: _data data: _data
}).then((res) => { }).then((res) => {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: 'success', type: 'success',
duration: 1000, duration: 1000,
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.$emit('refresh', true) this.$emit('refresh', true)
} }
}) })
}) })
} else { } else {
request({ request({
url: '/api/poundlist/Poundlist/' + this.dataForm.id, url: '/api/poundlist/Poundlist/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
this.$message({ this.$message({
message: res.msg, message: res.msg,
type: 'success', type: 'success',
duration: 1000, duration: 1000,
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.$emit('refresh', true) this.$emit('refresh', true)
} }
}) })
}) })
} }
}, },
dataList() { dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures) _data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures) _data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
return _data; return _data;
}, },
dataInfo(dataAll) { dataInfo(dataAll) {
let _dataAll = dataAll let _dataAll = dataAll
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures) _dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures) _dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
this.dataForm = _dataAll this.dataForm = _dataAll
}, },
}, },
} }
</script> </script>

@ -20,12 +20,16 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()"> <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </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>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
@ -35,40 +39,41 @@
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange" border>
<el-table-column prop="licenseNo" label="车号" width="0" align="left" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="customerName" label="客户名称" width="0" align="left" /> <el-table-column prop="licenseNo" label="车号" fixed="left" sortable width="120" align="center" />
<el-table-column prop="salesName" label="销售合同" width="0" align="left" /> <el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" /> <el-table-column prop="salesName" label="销售合同" sortable width="150" align="center" />
<el-table-column prop="purchaseName" label="采购合同" width="0" align="left" /> <el-table-column prop="supplierName" label="供应商名称" sortable width="150" align="center" />
<el-table-column prop="materialCode" label="物料编码" width="0" align="left" /> <el-table-column prop="purchaseName" label="采购合同" sortable width="150" align="center" />
<el-table-column prop="materialName" label="物料名称" width="0" align="left" /> <el-table-column prop="materialCode" label="物料编码" sortable width="150" align="center" />
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"> <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"> <template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }} {{ scope.row.advance | dynamicText(advanceOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" width="0" prop="unit" algin="left"> <el-table-column prop="unit" label="单位" sortable width="100" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }} {{ scope.row.unit | dynamicText(unitOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="grossWeight" label="毛重" width="0" align="left" /> <el-table-column prop="grossWeight" sortable label="毛重" width="100" align="center" />
<el-table-column prop="tareWeight" label="皮重" width="0" align="left" /> <el-table-column prop="tareWeight" sortable label="皮重" width="100" align="center" />
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left" /> <el-table-column prop="buckleWeight" sortable label="扣重" width="100" align="center" />
<el-table-column prop="netWeight" label="净重" width="0" align="left" /> <el-table-column prop="netWeight" sortable label="净重" width="100" align="center" />
<el-table-column prop="settlement" label="结算重量" width="0" align="left" /> <el-table-column prop="settlement" sortable label="结算重量" width="100" align="center" />
<el-table-column prop="purchasePrice" label="采购单价" width="0" align="left" /> <el-table-column prop="purchasePrice" sortable label="采购单价" width="100" align="center" />
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left" /> <el-table-column prop="salesPrice" sortable label="销售价格" width="100" align="center" />
<el-table-column prop="inputDate" label="进项票日期" width="0" align="left" /> <el-table-column prop="inputDate" sortable label="进项票日期" width="150" align="center" />
<el-table-column prop="outputDate" label="销项票日期" width="0" align="left" /> <el-table-column prop="outputDate" sortable label="销项票日期" width="150" align="center" />
<el-table-column prop="payDate" label="付款日期" width="0" align="left" /> <el-table-column prop="payDate" sortable label="付款日期" width="150" align="center" />
<el-table-column prop="paymentDate" label="回款日期" width="0" align="left" /> <el-table-column prop="paymentDate" sortable label="回款日期" width="150" align="center" />
<el-table-column prop="poundDate" label="磅单日期" width="0" align="left" /> <el-table-column prop="poundDate" sortable label="磅单日期" width="150" align="center" />
<el-table-column prop="businessName" label="业务员" width="0" align="left" /> <el-table-column prop="businessName" sortable label="业务员" width="150" align="center" />
<el-table-column prop="remark" label="备注" width="0" align="left" /> <el-table-column prop="remark" sortable label="备注" width="150" align="center" />
<el-table-column prop="poundPictures" label="磅单图片" width="0" align="left"> <el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index"> <span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000"> <el-popover placement="bottom" trigger="click" width="1000">
@ -83,7 +88,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片" width="0" align="left"> <el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index"> <span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000"> <el-popover placement="bottom" trigger="click" width="1000">
@ -98,7 +103,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="100"> <el-table-column label="操作" fixed="right" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"> <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button> </el-button>
@ -327,6 +332,16 @@
}).then(res => { }).then(res => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { 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]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data)
} }

File diff suppressed because it is too large Load Diff

@ -1,300 +1,386 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input> <el-input v-model="query.documentNo" placeholder="请输入" clearable> </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-select v-model="query.status" placeholder="请选择" <el-select v-model="query.status" placeholder="请选择" clearable>
clearable> <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
<el-option v-for="(item, index) in statusOptions" :key="index" :disabled="item.disabled"></el-option>
:label="item.fullName" :value="item.id" </el-select>
:disabled="item.disabled"></el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item>
<el-col :span="6"> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-form-item> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> </el-form-item>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> </el-col>
</el-form-item> </el-form>
</el-col> </el-row>
</el-form> <div class="JNPF-common-layout-main JNPF-flex-main">
</el-row> <div class="JNPF-common-head">
<div class="JNPF-common-layout-main JNPF-flex-main"> <div>
<div class="JNPF-common-head"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
<div> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button> </el-button>
</div> <el-button type="text" icon="el-icon-close" @click="exportData()">
<div class="JNPF-common-head-right"> </el-button>
<el-tooltip effect="dark" content="刷新" placement="top"> <el-button type="text" icon="el-icon-check" @click="exportData()">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" </el-button>
@click="reset()"/> <el-button type="text" icon="el-icon-close" @click="exportData()">
</el-tooltip> </el-button>
<screenfull isContainer/> <el-button type="text" icon="el-icon-check" @click="exportData()">退
</div> </el-button>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <div class="JNPF-common-head-right">
<el-table-column prop="documentNo" label="单据编号" width="0" align="left" <el-tooltip effect="dark" content="刷新" placement="top">
/> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
<el-table-column prop="costomerName" label="客户名称" width="0" align="left" </el-tooltip>
/> <screenfull isContainer />
<el-table-column prop="price" label="金额" width="0" align="left" </div>
/>
<el-table-column prop="num" label="数量" width="0" align="left"
/>
<el-table-column label="币别" width="0" prop="currency" algin="left"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="已回款金额" width="0" align="left"
/>
<el-table-column prop="invoiceNum" label="发票数量" width="0" align="left"
/>
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="left"
/>
<el-table-column label="来源系统" width="0" prop="sourceSystem" algin="left"
>
<template slot-scope="scope">
{{ scope.row.sourceSystem | dynamicText(sourceSystemOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态 " width="0" prop="status" algin="left"
>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" 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> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> @selection-change="handleSelectionChange" border>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" sortable fixed="left" width="200" align="center" />
<el-table-column prop="costomerName" label="客户名称" sortable fixed="left" width="150" align="center" />
<el-table-column prop="price" label="金额" sortable width="150" align="center" />
<el-table-column prop="num" label="数量" sortable width="150" align="center" />
<el-table-column label="币别" width="100" sortable prop="currency" align="center" >
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="amountCollected" sortable label="已回款金额" width="150" align="center" />
<el-table-column prop="invoiceNum" sortable label="发票数量" width="150" align="center" />
<el-table-column prop="invoiceAmount" sortable label="发票金额" width="150" align="center" />
<el-table-column label="来源系统" width="150" sortable prop="sourceSystem" align="center" >
<template slot-scope="scope">
{{ scope.row.sourceSystem | dynamicText(sourceSystemOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态 " width="150" sortable prop="status" align="center" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="制单人" sortable width="150" align="center" />
<el-table-column label="操作" fixed="right" width="150" 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>
<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> </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> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import {
import JNPFForm from './Form' getDictionaryDataSelector
import ExportBox from './ExportBox' } from '@/api/systemData/dictionary'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import JNPFForm from './Form'
import Detail from './Detail' import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: {
data() { JNPFForm,
return { ExportBox,
detailVisible: false, Detail
query: { },
documentNo:undefined, data() {
status:undefined, return {
}, detailVisible: false,
treeProps: { query: {
children: 'children', documentNo: undefined,
label: 'fullName', status: undefined,
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'documentNo', label: '单据编号'},
{prop: 'costomerName', label: '客户名称'},
{prop: 'price', label: '金额'},
{prop: 'num', label: '数量'},
{prop: 'currency', label: '币别'},
{prop: 'amountCollected', label: '已回款金额'},
{prop: 'invoiceNum', label: '发票数量'},
{prop: 'invoiceAmount', label: '发票金额'},
{prop: 'sourceSystem', label: '来源系统'},
{prop: 'status', label: '单据状态 '},
{prop: 'creatorUserName', label: '制单人'},
],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
sourceSystemOptions:[{"fullName":"人工创建","id":"0"},{"fullName":"商城平台","id":"1"}],
sourceSystemProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}],
statusProps:{"label":"fullName","value":"id"},
}
}, },
computed: { treeProps: {
menuId() { children: 'children',
return this.$route.meta.modelId || '' label: 'fullName',
} value: 'id'
}, },
created() { list: [],
this.initData() listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}, },
methods: { formVisible: false,
goDetail(id){ exportBoxVisible: false,
this.detailVisible = true columnList: [{
this.$nextTick(() => { prop: 'documentNo',
this.$refs.Detail.init(id) label: '单据编号'
}) },
}, {
sortChange({column, prop, order}) { prop: 'costomerName',
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' label: '客户名称'
this.listQuery.sidx = !order ? '' : prop },
this.initData() {
}, prop: 'price',
initData() { label: '金额'
this.listLoading = true; },
let _query = { {
...this.listQuery, prop: 'num',
...this.query, label: '数量'
menuId:this.menuId },
}; {
request({ prop: 'currency',
url: `/api/saleorder/Saleorder/getList`, label: '币别'
method: 'post', },
data: _query {
}).then(res => { prop: 'amountCollected',
var _list =[]; label: '已回款金额'
for(let i=0;i<res.data.list.length;i++){ },
let _data = res.data.list[i]; {
_list.push(_data) prop: 'invoiceNum',
} label: '发票数量'
this.list = _list },
this.total = res.data.pagination.total {
prop: 'invoiceAmount',
label: '发票金额'
},
{
prop: 'sourceSystem',
label: '来源系统'
},
{
prop: 'status',
label: '单据状态 '
},
{
prop: 'creatorUserName',
label: '制单人'
},
],
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
currencyProps: {
"label": "fullName",
"value": "id"
},
sourceSystemOptions: [{
"fullName": "人工创建",
"id": "0"
}, {
"fullName": "商城平台",
"id": "1"
}],
sourceSystemProps: {
"label": "fullName",
"value": "id"
},
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "开票中",
"id": "1"
}, {
"fullName": "付款申请",
"id": "2"
}, {
"fullName": "待回款",
"id": "3"
}, {
"fullName": "回款中",
"id": "4"
}, {
"fullName": "归档",
"id": "5"
}],
statusProps: {
"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/saleorder/Saleorder/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 this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/saleorder/Saleorder/${id}`, url: `/api/saleorder/Saleorder/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg, message: res.msg,
onClose: () => { 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/saleorder/Saleorder/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/saleorder/Saleorder/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() this.initData()
}, }
refresh(isrRefresh) { });
this.formVisible = false })
if (isrRefresh) this.reset() }).catch(() => {});
}, },
reset() { handleSelectionChange(val) {
for (let key in this.query) { const res = val.map(item => item.id)
this.query[key] = undefined this.multipleSelection = res
} },
this.search() 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/saleorder/Saleorder/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/saleorder/Saleorder/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> </script>

@ -20,7 +20,7 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()"> <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
@ -35,33 +35,34 @@
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange" border>
<el-table-column prop="licenseNo" label="车号" width="0" align="left" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="materialName" label="物料名称" width="0" align="left" /> <el-table-column prop="licenseNo" label="车号" fixed="left" sortable width="120" align="center" />
<el-table-column prop="grossWeight" label="毛重" width="0" align="left" /> <el-table-column prop="materialName" label="物料名称" fixed="left" sortable sortable width="150" align="center" />
<el-table-column prop="tareWeight" label="皮重" width="0" align="left" /> <el-table-column prop="grossWeight" label="毛重" width="100" sortable align="center" />
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left" /> <el-table-column prop="tareWeight" label="皮重" width="100" sortable align="center" />
<el-table-column prop="netWeight" label="净重" width="0" align="left" /> <el-table-column prop="buckleWeight" label="扣重" width="100" sortable align="center" />
<el-table-column prop="driverName" label="司机名称" width="0" align="left" /> <el-table-column prop="netWeight" label="净重" width="100" sortable align="center" />
<el-table-column prop="customerName" label="客户名称" width="0" align="left" /> <el-table-column prop="driverName" label="司机名称" width="120" sortable align="center" />
<el-table-column prop="salesName" label="销售合同" width="0" align="left" /> <el-table-column prop="customerName" label="客户名称" width="150" sortable align="center" />
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"> <el-table-column prop="salesName" label="销售合同" width="150" sortable align="center" />
<el-table-column prop="advance" label="是否垫资" width="120" sortable align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }} {{ scope.row.advance | dynamicText(advanceOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="运输方式" width="0" prop="transportType" algin="left"> <el-table-column prop="transportType" label="运输方式" sortable width="100" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.transportType | dynamicText(transportTypeOptions) }} {{ scope.row.transportType | dynamicText(transportTypeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="departmentId" label="运费" width="0" align="left" /> <el-table-column prop="departmentId" label="运费" sortable width="100" align="center" />
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left" /> <el-table-column prop="salesPrice" label="销售价格" sortable width="100" align="center" />
<el-table-column prop="creatorusername" label="制单人" width="0" align="left" /> <el-table-column prop="creatorusername" label="制单人" sortable width="150" align="center" />
<el-table-column prop="businessName" label="业务员" width="0" align="left" /> <el-table-column prop="businessName" label="业务员" sortable width="150" align="center" />
<el-table-column prop="remark" label="备注" width="0" align="left" /> <el-table-column prop="remark" label="备注" sortable width="150" align="center" />
<el-table-column prop="poundPictures" label="磅单图片" width="0" align="left"> <el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index"> <span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000"> <el-popover placement="bottom" trigger="click" width="1000">
@ -76,7 +77,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片" width="0" align="left"> <el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index"> <span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000"> <el-popover placement="bottom" trigger="click" width="1000">
@ -91,7 +92,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="100"> <el-table-column label="操作" fixed="right" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"> <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button> </el-button>

Loading…
Cancel
Save