税码等调整

product
mhsnet 2 years ago
parent 9e76c146e7
commit 17bc01ece1

@ -1,225 +1,202 @@
<template> <template>
<el-dialog title="详情" <el-dialog title="详情" :close-on-click-modal="false" append-to-body :visible.sync="visible"
:close-on-click-modal="false" append-to-body class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-col :span="12">
<template v-if="!loading"> <el-form-item label="供应商编码" prop="supplierCode">
<el-col :span="12" > <p>{{ dataForm.supplierCode }}</p>
<el-form-item label="供应商编码" </el-form-item>
prop="supplierCode" > </el-col>
<p>{{dataForm.supplierCode}}</p> <el-col :span="12">
</el-form-item> <el-form-item label="所属公司" prop="companyId">
</el-col> <p>{{ dataForm.companyId }}</p>
<el-col :span="12" > </el-form-item>
<el-form-item label="所属公司" </el-col>
prop="companyId" > <el-col :span="12">
<p>{{dataForm.companyId}}</p> <el-form-item label="供应商名称" prop="supplierName">
</el-form-item> <p>{{ dataForm.supplierName }}</p>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="供应商名称" <el-col :span="12">
prop="supplierName" > <el-form-item label="国家" prop="country">
<p>{{dataForm.supplierName}}</p> <p>{{ dataForm.country }}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="国家" <el-form-item label="供货指标" prop="supply">
prop="country" > <p>{{ dataForm.supply }}</p>
<p>{{dataForm.country}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="12">
<el-col :span="12" > <el-form-item label="省" prop="province">
<el-form-item label="供货指标" <p>{{ dataForm.province }}</p>
prop="supply" > </el-form-item>
<p>{{dataForm.supply}}</p> </el-col>
</el-form-item> <el-col :span="12">
</el-col> <el-form-item label="联系人" prop="contactName">
<el-col :span="12" > <p>{{ dataForm.contactName }}</p>
<el-form-item label="省" </el-form-item>
prop="province" > </el-col>
<p>{{dataForm.province}}</p> <el-col :span="12">
</el-form-item> <el-form-item label="供应商等级" prop="supplierLevel">
</el-col> <p>{{ dataForm.supplierLevel | dynamicText(supplierLevelOptions) }} </p>
<el-col :span="12" > </el-form-item>
<el-form-item label="联系人" </el-col>
prop="contactName" > <el-col :span="12">
<p>{{dataForm.contactName}}</p> <el-form-item label="联系电话" prop="contactPhone">
</el-form-item> <p>{{ dataForm.contactPhone }}</p>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="供应商等级" <el-col :span="12">
prop="supplierLevel" > <el-form-item label="供应商性质" prop="enterprise">
<p>{{ dataForm.supplierLevel | dynamicText(supplierLevelOptions) }} </p> <p>{{ dataForm.enterprise | dynamicText(enterpriseOptions) }} </p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="联系电话" <el-form-item label="地址" prop="address">
prop="contactPhone" > <p>{{ dataForm.address }}</p>
<p>{{dataForm.contactPhone}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="12">
<el-col :span="12" > <el-form-item label="供应商类型" prop="classification">
<el-form-item label="供应商性质" <p>{{ dataForm.classification | dynamicText(classificationOptions) }} </p>
prop="enterprise" > </el-form-item>
<p>{{ dataForm.enterprise | dynamicText(enterpriseOptions) }} </p> </el-col>
</el-form-item> <el-col :span="12">
</el-col> <el-form-item label="开户行" prop="bank">
<el-col :span="12" > <p>{{ dataForm.bank }}</p>
<el-form-item label="地址" </el-form-item>
prop="address" > </el-col>
<p>{{dataForm.address}}</p> <el-col :span="12">
</el-form-item> <el-form-item label="默认税码" prop="taxCode">
</el-col> <p>{{ dataForm.taxCode | dynamicText(taxCodeOptions) }} </p>
<el-col :span="12" > </el-form-item>
<el-form-item label="供应商类型" </el-col>
prop="classification" > <el-col :span="12">
<p>{{ dataForm.classification | dynamicText(classificationOptions) }} </p> <el-form-item label="纳税编号" prop="vatRegistrationNum">
</el-form-item> <p>{{ dataForm.vatRegistrationNum }}</p>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="开户行" <el-col :span="12">
prop="bank" > <el-form-item label="是否采购" prop="isPurchase">
<p>{{dataForm.bank}}</p> <p>{{ dataForm.isPurchase | dynamicText(isPurchaseOptions) }} </p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="默认税码" <el-form-item label="银行账户" prop="bankAccount">
prop="taxCode" > <p>{{ dataForm.bankAccount }}</p>
<p>{{ dataForm.taxCode | dynamicText(taxCodeOptions) }} </p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="12">
<el-col :span="12" > <el-form-item label="是否付款" prop="isPayment">
<el-form-item label="纳税编号" <p>{{ dataForm.isPayment | dynamicText(isPaymentOptions) }} </p>
prop="vatRegistrationNum" > </el-form-item>
<p>{{dataForm.vatRegistrationNum}}</p> </el-col>
</el-form-item> <el-col :span="12">
</el-col> <el-form-item label="应付科目" prop="payable">
<el-col :span="12" > <p>{{ dataForm.payable }}</p>
<el-form-item label="是否采购" </el-form-item>
prop="isPurchase" > </el-col>
<p>{{ dataForm.isPurchase | dynamicText(isPurchaseOptions) }} </p> <el-col :span="12">
</el-form-item> <el-form-item label="是否启用" prop="status">
</el-col> <p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
<el-col :span="12" > </el-form-item>
<el-form-item label="银行账户" </el-col>
prop="bankAccount" > <el-col :span="12">
<p>{{dataForm.bankAccount}}</p> <el-form-item label="预付科目" prop="prepaid">
</el-form-item> <p>{{ dataForm.prepaid }}</p>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="是否付款" </template>
prop="isPayment" > </el-form>
<p>{{ dataForm.isPayment | dynamicText(isPaymentOptions) }} </p> </el-row>
</el-form-item> <span slot="footer" class="dialog-footer">
</el-col> <el-button @click="visible = false"> </el-button>
<el-col :span="12" > </span>
<el-form-item label="应付科目"
prop="payable" >
<p>{{dataForm.payable}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否启用"
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="预付科目"
prop="prepaid" >
<p>{{dataForm.prepaid}}</p>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
</span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse' import PrintBrowse from '@/components/PrintBrowse'
import jnpf from '@/utils/jnpf' import jnpf from '@/utils/jnpf'
export default { export default {
components: {PrintBrowse}, components: { PrintBrowse },
props: [], props: [],
data() { data() {
return { return {
visible: false, visible: false,
loading: false, loading: false,
printBrowseVisible: false, printBrowseVisible: false,
printId: '', printId: '',
dataForm: { dataForm: {
id :'', id: '',
supplierCode : '', supplierCode: '',
companyId : "", companyId: "",
supplierName : '', supplierName: '',
country : "CHINA", country: "CHINA",
supply : '', supply: '',
province : [], province: [],
contactName : '', contactName: '',
supplierLevel : "1", supplierLevel: "1",
contactPhone : '', contactPhone: '',
enterprise : "0", enterprise: "0",
address : '', address: '',
classification : "0", classification: "0",
bank : '', bank: '',
taxCode : "0", taxCode: "0",
vatRegistrationNum : '', vatRegistrationNum: '',
isPurchase : "0", isPurchase: "0",
bankAccount : '', bankAccount: '',
isPayment : "0", isPayment: "0",
payable : '', payable: '',
status : "1", status: "1",
prepaid : '', prepaid: '',
supplierSiteCode : '', supplierSiteCode: '',
creatorTime : "", creatorTime: "",
lastModifyTime : "", lastModifyTime: "",
}, },
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}], supplierLevelOptions: [{ "fullName": "一级", "id": "1" }, { "fullName": "二级", "id": "2" }, { "fullName": "三级", "id": "3" }, { "fullName": "四级", "id": "4" }],
enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私营","id":"1"}], enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '国有', 'id': '1' }, { 'fullName': '其它', 'id': '2' }],
classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}], classificationOptions: [{ "fullName": "国内", "id": "0" }, { "fullName": "国外", "id": "1" }],
taxCodeOptions:[{"fullName":"13个点","id":"0"},{"fullName":"9个点","id":"1"},{"fullName":"6个点","id":"2"},{"fullName":"5个点","id":"3"}], taxCodeOptions: [{ "fullName": "13", "id": "0" }, { "fullName": "9", "id": "1" }, { "fullName": "6", "id": "2" }, { "fullName": "5", "id": "3" }, { "fullName": "3", "id": "4" }, { "fullName": "0", "id": "5" }],
isPurchaseOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], isPurchaseOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
isPaymentOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], isPaymentOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"停用","id":"2"}], statusOptions: [{ "fullName": "启用", "id": "1" }, { "fullName": "停用", "id": "2" }],
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
},
mounted() { },
methods: {
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
}, },
mounted() {},
methods: {
dataInfo(dataAll){
let _dataAll =dataAll
this.dataForm = _dataAll
},
init(id) { init(id) {
this.dataForm.id = id || 0; this.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/example/Supplier/detail/'+this.dataForm.id, url: '/api/example/Supplier/detail/' + 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
}) })
} }
}) })
},
}, },
} },
}
</script> </script>

@ -1,393 +1,363 @@
<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="1000px">
: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="12">
<template v-if="!loading"> <el-form-item label="供应商编码" prop="supplierCode">
<el-col :span="12" > <el-input v-model="dataForm.supplierCode" placeholder="请输入供应商编码" clearable
<el-form-item label="供应商编码" :style='{ "width": "100%" }'>
prop="supplierCode" >
<el-input v-model="dataForm.supplierCode"
placeholder="请输入供应商编码" clearable :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="所属公司" <el-form-item label="所属公司" prop="companyId">
prop="companyId" > <popupSelect v-model="dataForm.companyId" placeholder="请选择" clearable field="companyId"
<popupSelect v-model="dataForm.companyId" interfaceId="394016341591396805" :columnOptions="companyIdcolumnOptions" propsValue="F_Id"
placeholder="请选择" clearable field="companyId" interfaceId="394016341591396805" :columnOptions="companyIdcolumnOptions" propsValue="F_Id" relationField="F_FullName" popupType="dialog" relationField="F_FullName" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
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="供应商名称" <el-form-item label="供应商名称" prop="supplierName">
prop="supplierName" > <el-input v-model="dataForm.supplierName" placeholder="请输入供应商名称" clearable
<el-input v-model="dataForm.supplierName" :style='{ "width": "100%" }'>
placeholder="请输入供应商名称" clearable :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="国家" <el-form-item label="国家" prop="country">
prop="country" > <el-input v-model="dataForm.country" placeholder="请输入国家" clearable :style='{ "width": "100%" }'>
<el-input v-model="dataForm.country"
placeholder="请输入国家" clearable :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="供货指标" <el-form-item label="供货指标" prop="supply">
prop="supply" > <el-input v-model="dataForm.supply" placeholder="请输入供货指标" clearable :style='{ "width": "100%" }'>
<el-input v-model="dataForm.supply"
placeholder="请输入供货指标" clearable :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="省" <el-form-item label="省" prop="province">
prop="province" > <JNPF-Address v-model="dataForm.province" placeholder="请选择省市区" clearable :level=2>
<JNPF-Address v-model="dataForm.province"
placeholder="请选择省市区" clearable :level=2 >
</JNPF-Address> </JNPF-Address>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="联系人" <el-form-item label="联系人" prop="contactName">
prop="contactName" > <el-input v-model="dataForm.contactName" placeholder="请输入联系人" clearable
<el-input v-model="dataForm.contactName" :style='{ "width": "100%" }'>
placeholder="请输入联系人" clearable :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="供应商等级" <el-form-item label="供应商等级" prop="supplierLevel">
prop="supplierLevel" > <el-select v-model="dataForm.supplierLevel" placeholder="请选择" clearable
<el-select v-model="dataForm.supplierLevel" :style='{ "width": "100%" }'>
placeholder="请选择" clearable :style='{"width":"100%"}'> <el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName"
<el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> :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="联系电话" <el-form-item label="联系电话" prop="contactPhone">
prop="contactPhone" > <el-input v-model="dataForm.contactPhone" placeholder="请输入联系电话" clearable
<el-input v-model="dataForm.contactPhone" :style='{ "width": "100%" }'>
placeholder="请输入联系电话" clearable :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="供应商性质" <el-form-item label="供应商性质" prop="enterprise">
prop="enterprise" > <el-radio-group v-model="dataForm.enterprise" size="small">
<el-radio-group v-model="dataForm.enterprise" <el-radio v-for="(item, index) in enterpriseOptions" :key="index" :label="item.id"
size="small" > :disabled="item.disabled">
<el-radio v-for="(item, index) in enterpriseOptions" :key="index" :label="item.id" :disabled="item.disabled" > {{ item.fullName }}
{{item.fullName}} </el-radio>
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="地址" <el-form-item label="地址" prop="address">
prop="address" > <el-input v-model="dataForm.address" placeholder="请输入地址" clearable :style='{ "width": "100%" }'>
<el-input v-model="dataForm.address"
placeholder="请输入地址" clearable :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="供应商类型" <el-form-item label="供应商类型" prop="classification">
prop="classification" > <el-radio-group v-model="dataForm.classification" size="small">
<el-radio-group v-model="dataForm.classification" <el-radio v-for="(item, index) in classificationOptions" :key="index" :label="item.id"
size="small" > :disabled="item.disabled">
<el-radio v-for="(item, index) in classificationOptions" :key="index" :label="item.id" :disabled="item.disabled" > {{ item.fullName }}
{{item.fullName}} </el-radio>
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="开户行" <el-form-item label="开户行" prop="bank">
prop="bank" > <el-input v-model="dataForm.bank" placeholder="请输入开户行" clearable :style='{ "width": "100%" }'>
<el-input v-model="dataForm.bank"
placeholder="请输入开户行" clearable :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="默认税码" <el-form-item label="默认税码" prop="taxCode">
prop="taxCode" > <el-select v-model="dataForm.taxCode" placeholder="请选择税码" clearable :style='{ "width": "100%" }'>
<el-select v-model="dataForm.taxCode" <el-option v-for="(item, index) in taxCodeOptions" :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 taxCodeOptions" :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="12" > <el-col :span="12">
<el-form-item label="纳税编号" <el-form-item label="纳税编号" prop="vatRegistrationNum">
prop="vatRegistrationNum" > <el-input v-model="dataForm.vatRegistrationNum" placeholder="请输入纳税编号" clearable
<el-input v-model="dataForm.vatRegistrationNum" :style='{ "width": "100%" }'>
placeholder="请输入纳税编号" clearable :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="是否采购" <el-form-item label="是否采购" prop="isPurchase">
prop="isPurchase" > <el-radio-group v-model="dataForm.isPurchase" size="small">
<el-radio-group v-model="dataForm.isPurchase" <el-radio v-for="(item, index) in isPurchaseOptions" :key="index" :label="item.id"
size="small" > :disabled="item.disabled">
<el-radio v-for="(item, index) in isPurchaseOptions" :key="index" :label="item.id" :disabled="item.disabled" > {{ item.fullName }}
{{item.fullName}} </el-radio>
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="银行账户" <el-form-item label="银行账户" prop="bankAccount">
prop="bankAccount" > <el-input v-model="dataForm.bankAccount" placeholder="请输入银行账户" clearable
<el-input v-model="dataForm.bankAccount" :style='{ "width": "100%" }'>
placeholder="请输入银行账户" clearable :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="是否付款" <el-form-item label="是否付款" prop="isPayment">
prop="isPayment" > <el-radio-group v-model="dataForm.isPayment" size="small">
<el-radio-group v-model="dataForm.isPayment" <el-radio v-for="(item, index) in isPaymentOptions" :key="index" :label="item.id"
size="small" > :disabled="item.disabled">
<el-radio v-for="(item, index) in isPaymentOptions" :key="index" :label="item.id" :disabled="item.disabled" > {{ item.fullName }}
{{item.fullName}} </el-radio>
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="应付科目" <el-form-item label="应付科目" prop="payable">
prop="payable" > <el-input v-model="dataForm.payable" placeholder="请输入应付科目" clearable :style='{ "width": "100%" }'>
<el-input v-model="dataForm.payable"
placeholder="请输入应付科目" clearable :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="是否启用" <el-form-item label="是否启用" prop="status">
prop="status" > <el-radio-group v-model="dataForm.status" size="small">
<el-radio-group v-model="dataForm.status" <el-radio v-for="(item, index) in statusOptions" :key="index" :label="item.id"
size="small" > :disabled="item.disabled">
<el-radio v-for="(item, index) in statusOptions" :key="index" :label="item.id" :disabled="item.disabled" > {{ item.fullName }}
{{item.fullName}} </el-radio>
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12">
<el-form-item label="预付科目" <el-form-item label="预付科目" prop="prepaid">
prop="prepaid" > <el-input v-model="dataForm.prepaid" placeholder="请输入预付科目" clearable :style='{ "width": "100%" }'>
<el-input v-model="dataForm.prepaid"
placeholder="请输入预付科目" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</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 { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } 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: {
supplierCode : '', supplierCode: '',
companyId : "", companyId: "",
supplierName : '', supplierName: '',
country : "CHINA", country: "CHINA",
supply : '', supply: '',
province : [], province: [],
contactName : '', contactName: '',
supplierLevel : "1", supplierLevel: "1",
contactPhone : '', contactPhone: '',
enterprise : "0", enterprise: "0",
address : '', address: '',
classification : "0", classification: "0",
bank : '', bank: '',
taxCode : "0", taxCode: "0",
vatRegistrationNum : '', vatRegistrationNum: '',
isPurchase : "0", isPurchase: "0",
bankAccount : '', bankAccount: '',
isPayment : "0", isPayment: "0",
payable : '', payable: '',
status : "1", status: "1",
prepaid : '', prepaid: '',
supplierSiteCode : '', supplierSiteCode: '',
creatorTime : "", creatorTime: "",
lastModifyTime : "", lastModifyTime: "",
}, },
rules: rules:
{ {
supplierCode: [ supplierCode: [
{ {
required: true, required: true,
message: '请输入供应商编码', message: '请输入供应商编码',
trigger: 'blur' trigger: 'blur'
}, },
], ],
supplierName: [ supplierName: [
{ {
required: true, required: true,
message: '请输入供应商名称', message: '请输入供应商名称',
trigger: 'blur' trigger: 'blur'
}, },
], ],
supply: [ supply: [
], ],
contactPhone: [ contactPhone: [
], ],
bankAccount: [ bankAccount: [
], ],
}, },
companyIdcolumnOptions:[ {"label":"公司编码","value":"F_EnCode"}, {"label":"公司名称","value":"F_FullName"},], companyIdcolumnOptions: [{ "label": "公司编码", "value": "F_EnCode" }, { "label": "公司名称", "value": "F_FullName" },],
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}], supplierLevelOptions: [{ "fullName": "一级", "id": "1" }, { "fullName": "二级", "id": "2" }, { "fullName": "三级", "id": "3" }, { "fullName": "四级", "id": "4" }],
enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私营","id":"1"}], enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '国有', 'id': '1' }, { 'fullName': '其它', 'id': '2' }],
classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}], classificationOptions: [{ "fullName": "国内", "id": "0" }, { "fullName": "国外", "id": "1" }],
taxCodeOptions:[{"fullName":"13个点","id":"0"},{"fullName":"9个点","id":"1"},{"fullName":"6个点","id":"2"},{"fullName":"5个点","id":"3"}], taxCodeOptions: [{ "fullName": "13", "id": "0" }, { "fullName": "9", "id": "1" }, { "fullName": "6", "id": "2" }, { "fullName": "5", "id": "3" }, { "fullName": "3", "id": "4" }, { "fullName": "0", "id": "5" }],
isPurchaseOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], isPurchaseOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
isPaymentOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], isPaymentOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"停用","id":"2"}], statusOptions: [{ "fullName": "启用", "id": "1" }, { "fullName": "停用", "id": "2" }],
} }
},
computed: {},
watch: {},
created() {
},
mounted() { },
methods: {
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] = "";
}
}
}, },
computed: {}, init(id, isDetail) {
watch: {}, this.dataForm.id = id || 0;
created() { this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/example/Supplier/' + 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', {})
}, },
mounted() {}, //
methods: { dataFormSubmit() {
clearData(data){ this.$refs['elForm'].validate((valid) => {
for (let key in data) { if (valid) {
if (data[key] instanceof Array) { this.request()
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
} }
}, })
init(id, isDetail) { },
this.dataForm.id = id || 0; request() {
this.visible = true; var _data = this.dataList()
this.isDetail = isDetail || false; if (!this.dataForm.id) {
this.$nextTick(() => { request({
this.$refs['elForm'].resetFields(); url: '/api/example/Supplier',
if(this.dataForm.id){ method: 'post',
this.loading = true data: _data
request({ }).then((res) => {
url: '/api/example/Supplier/'+this.dataForm.id, this.$message({
method: 'get' message: res.msg,
}).then(res => { type: 'success',
this.dataInfo(res.data) duration: 1000,
this.loading = false onClose: () => {
}); this.visible = false
}else{ this.$emit('refresh', true)
this.clearData(this.dataForm) }
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/example/Supplier',
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({ } else {
url: '/api/example/Supplier/'+this.dataForm.id, request({
method: 'PUT', url: '/api/example/Supplier/' + this.dataForm.id,
data: _data method: 'PUT',
}).then((res) => { data: _data
this.$message({ }).then((res) => {
message: res.msg, this.$message({
type: 'success', message: res.msg,
duration: 1000, type: 'success',
onClose: () => { duration: 1000,
this.visible = false onClose: () => {
this.$emit('refresh', true) this.visible = false
} this.$emit('refresh', true)
}) }
}) })
} })
}, }
dataList(){ },
var _data = JSON.parse(JSON.stringify(this.dataForm)); dataList() {
_data.province = JSON.stringify(_data.province) var _data = JSON.parse(JSON.stringify(this.dataForm));
return _data; _data.province = JSON.stringify(_data.province)
}, return _data;
dataInfo(dataAll){ },
let _dataAll =dataAll dataInfo(dataAll) {
_dataAll.province = JSON.parse( _dataAll.province) let _dataAll = dataAll
this.dataForm = _dataAll _dataAll.province = JSON.parse(_dataAll.province)
}, this.dataForm = _dataAll
}, },
} },
}
</script> </script>

@ -35,10 +35,10 @@
<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-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll"> <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开 展开
</el-button> </el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
收起 收起
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -48,40 +48,34 @@
<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" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">--> <!-- <el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()"> <el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">--> <!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()">--> <!-- <el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()">-->
<!-- </el-button>--> <!-- </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">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
@click="reset()"/>
</el-tooltip> </el-tooltip>
<screenfull isContainer/> <screenfull isContainer />
</div> </div>
</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 type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="supplierCode" label="供应商编码" width="200" align="center" fixed="left" sortable <el-table-column prop="supplierCode" label="供应商编码" width="200" align="center" fixed="left" sortable
sortable="custom"/> sortable="custom" />
<el-table-column prop="companyId" label="所属公司" width="200" align="center" fixed="left" sortable <el-table-column prop="companyId" label="所属公司" width="200" align="center" fixed="left" sortable
sortable="custom"/> sortable="custom" />
<el-table-column prop="supplierName" label="供应商名称" width="200" align="center" sortable <el-table-column prop="supplierName" label="供应商名称" width="200" align="center" sortable sortable="custom" />
sortable="custom"/> <el-table-column prop="country" label="国家" width="120" align="center" sortable />
<el-table-column prop="country" label="国家" width="120" align="center" sortable <el-table-column prop="supply" label="供货指标" width="120" align="center" sortable />
/> <el-table-column prop="province" label="省" width="120" align="center" sortable />
<el-table-column prop="supply" label="供货指标" width="120" align="center" sortable <el-table-column prop="contactName" label="联系人" width="120" align="center" sortable sortable="custom" />
/>
<el-table-column prop="province" label="省" width="120" align="center" sortable
/>
<el-table-column prop="contactName" label="联系人" width="120" align="center" sortable
sortable="custom"/>
<el-table-column label="供应商等级" width="120" sortable prop="supplierLevel" align="center"> <el-table-column label="供应商等级" width="120" sortable prop="supplierLevel" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -89,8 +83,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="contactPhone" label="联系电话" width="200" align="center" sortable <el-table-column prop="contactPhone" label="联系电话" width="200" align="center" sortable sortable="custom" />
sortable="custom"/>
<el-table-column label="供应商性质" width="120" sortable prop="enterprise" align="center"> <el-table-column label="供应商性质" width="120" sortable prop="enterprise" align="center">
@ -100,8 +93,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="address" label="地址" width="200" align="center" sortable <el-table-column prop="address" label="地址" width="200" align="center" sortable sortable="custom" />
sortable="custom"/>
<el-table-column label="供应商类型" width="120" sortable prop="classification" align="center"> <el-table-column label="供应商类型" width="120" sortable prop="classification" align="center">
@ -110,12 +102,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bank" label="开户行" width="200" align="center" sortable <el-table-column prop="bank" label="开户行" width="200" align="center" sortable />
/> <el-table-column prop="vatRegistrationNum" label="纳税编号" width="200" align="center" sortable />
<el-table-column prop="vatRegistrationNum" label="纳税编号" width="200" align="center" sortable <el-table-column prop="bankAccount" label="银行账户" width="200" align="center" sortable />
/>
<el-table-column prop="bankAccount" label="银行账户" width="200" align="center" sortable
/>
<el-table-column label="默认税码" width="120" sortable prop="taxCode" align="center"> <el-table-column label="默认税码" width="120" sortable prop="taxCode" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -123,8 +112,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payable" label="应付科目" width="120" align="center" sortable <el-table-column prop="payable" label="应付科目" width="120" align="center" sortable />
/>
<el-table-column label="是否采购" width="120" sortable prop="isPurchase" align="center"> <el-table-column label="是否采购" width="120" sortable prop="isPurchase" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -132,8 +120,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="prepaid" label="预付科目" width="120" align="center" sortable <el-table-column prop="prepaid" label="预付科目" width="120" align="center" sortable />
/>
<el-table-column label="是否付款" width="120" sortable prop="isPayment" align="center"> <el-table-column label="是否付款" width="120" sortable prop="isPayment" align="center">
@ -148,254 +135,248 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="supplierSiteCode" label="供应商地点" width="120" align="center" sortable <el-table-column prop="supplierSiteCode" label="供应商地点" width="120" align="center" sortable sortable="custom" />
sortable="custom"/> <el-table-column label="操作" fixed="right" width="80">
<el-table-column label="操作" fixed="right"
width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" v-has="'btn_edit'"--> <!-- <el-button type="text" v-has="'btn_edit'"-->
<!-- @click="addOrUpdateHandle(scope.row.id)">编辑--> <!-- @click="addOrUpdateHandle(scope.row.id)">编辑-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">--> <!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" <el-button type="text" @click="goDetail(scope.row.id)">
@click="goDetail(scope.row.id)">详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/> @pagination="initData" />
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
</div> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: { JNPFForm, ExportBox, Detail }, components: { JNPFForm, ExportBox, Detail },
data() { data() {
return { return {
showAll: false, showAll: false,
detailVisible: false, detailVisible: false,
query: { query: {
supplierCode: undefined, supplierCode: undefined,
supplierName: undefined, supplierName: undefined,
contactName: undefined, contactName: undefined,
contactPhone: undefined, contactPhone: undefined,
supplierSiteCode: undefined supplierSiteCode: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
label: 'fullName', label: 'fullName',
value: 'id' value: 'id'
}, },
list: [], list: [],
listLoading: true, listLoading: true,
multipleSelection: [], total: 0, multipleSelection: [], total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: 'desc',
sidx: 'creatorTime' sidx: 'creatorTime'
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'supplierCode', label: '供应商编码' }, { prop: 'supplierCode', label: '供应商编码' },
{ prop: 'companyId', label: '所属公司' }, { prop: 'companyId', label: '所属公司' },
{ prop: 'supplierName', label: '供应商名称' }, { prop: 'supplierName', label: '供应商名称' },
{ prop: 'country', label: '国家' }, { prop: 'country', label: '国家' },
{ prop: 'supply', label: '供货指标' }, { prop: 'supply', label: '供货指标' },
{ prop: 'province', label: '省' }, { prop: 'province', label: '省' },
{ prop: 'contactName', label: '联系人' }, { prop: 'contactName', label: '联系人' },
{ prop: 'supplierLevel', label: '供应商等级' }, { prop: 'supplierLevel', label: '供应商等级' },
{ prop: 'contactPhone', label: '联系电话' }, { prop: 'contactPhone', label: '联系电话' },
{ prop: 'enterprise', label: '供应商性质' }, { prop: 'enterprise', label: '供应商性质' },
{ prop: 'address', label: '地址' }, { prop: 'address', label: '地址' },
{ prop: 'classification', label: '供应商类型' }, { prop: 'classification', label: '供应商类型' },
{ prop: 'bank', label: '开户行' }, { prop: 'bank', label: '开户行' },
{ prop: 'vatRegistrationNum', label: '纳税编号' }, { prop: 'vatRegistrationNum', label: '纳税编号' },
{ prop: 'bankAccount', label: '银行账户' }, { prop: 'bankAccount', label: '银行账户' },
{ prop: 'taxCode', label: '默认税码' }, { prop: 'taxCode', label: '默认税码' },
{ prop: 'payable', label: '应付科目' }, { prop: 'payable', label: '应付科目' },
{ prop: 'isPurchase', label: '是否采购' }, { prop: 'isPurchase', label: '是否采购' },
{ prop: 'prepaid', label: '预付科目' }, { prop: 'prepaid', label: '预付科目' },
{ prop: 'isPayment', label: '是否付款' }, { prop: 'isPayment', label: '是否付款' },
{ prop: 'status', label: '是否启用' }, { prop: 'status', label: '是否启用' },
{ prop: 'supplierSiteCode', label: '供应商地点' } { prop: 'supplierSiteCode', label: '供应商地点' }
], ],
supplierLevelOptions: [{ 'fullName': '一级', 'id': '1' }, { 'fullName': '二级', 'id': '2' }, { supplierLevelOptions: [{ 'fullName': '一级', 'id': '1' }, { 'fullName': '二级', 'id': '2' }, {
'fullName': '三级', 'fullName': '三级',
'id': '3' 'id': '3'
}, { 'fullName': '四级', 'id': '4' }], }, { 'fullName': '四级', 'id': '4' }],
supplierLevelProps: { 'label': 'fullName', 'value': 'id' }, supplierLevelProps: { 'label': 'fullName', 'value': 'id' },
enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '私营', 'id': '1' }], enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '国有', 'id': '1' }, { 'fullName': '其它', 'id': '2' }],
enterpriseProps: { 'label': 'fullName', 'value': 'id' }, enterpriseProps: { 'label': 'fullName', 'value': 'id' },
classificationOptions: [{ 'fullName': '国内', 'id': '0' }, { 'fullName': '国外', 'id': '1' }], classificationOptions: [{ 'fullName': '国内', 'id': '0' }, { 'fullName': '国外', 'id': '1' }],
classificationProps: { 'label': 'fullName', 'value': 'id' }, classificationProps: { 'label': 'fullName', 'value': 'id' },
taxCodeOptions: [{ 'fullName': '13个点', 'id': '0' }, { 'fullName': '9个点', 'id': '1' }, { taxCodeOptions: [{ "fullName": "13", "id": "0" }, { "fullName": "9", "id": "1" }, { "fullName": "6", "id": "2" }, { "fullName": "5", "id": "3" }, { "fullName": "3", "id": "4" }, { "fullName": "0", "id": "5" }],
'fullName': '6个点', taxCodeProps: { 'label': 'fullName', 'value': 'id' },
'id': '2' isPurchaseOptions: [{ 'fullName': '否', 'id': '0' }, { 'fullName': '是', 'id': '1' }],
}, { 'fullName': '5个点', 'id': '3' }], isPurchaseProps: { 'label': 'fullName', 'value': 'id' },
taxCodeProps: { 'label': 'fullName', 'value': 'id' }, isPaymentOptions: [{ 'fullName': '否', 'id': '0' }, { 'fullName': '是', 'id': '1' }],
isPurchaseOptions: [{ 'fullName': '否', 'id': '0' }, { 'fullName': '是', 'id': '1' }], isPaymentProps: { 'label': 'fullName', 'value': 'id' },
isPurchaseProps: { 'label': 'fullName', 'value': 'id' }, statusOptions: [{ 'fullName': '启用', 'id': '1' }, { 'fullName': '停用', 'id': '2' }],
isPaymentOptions: [{ 'fullName': '否', 'id': '0' }, { 'fullName': '是', 'id': '1' }], statusProps: { 'label': 'fullName', 'value': 'id' }
isPaymentProps: { 'label': 'fullName', 'value': 'id' }, }
statusOptions: [{ 'fullName': '启用', 'id': '1' }, { 'fullName': '停用', 'id': '2' }], },
statusProps: { 'label': 'fullName', 'value': 'id' } computed: {
} menuId() {
}, return this.$route.meta.modelId || ''
computed: { }
menuId() { },
return this.$route.meta.modelId || '' created() {
} this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
}, },
created() { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
}, },
methods: { initData() {
goDetail(id) { this.listLoading = true
this.detailVisible = true let _query = {
this.$nextTick(() => { ...this.listQuery,
this.$refs.Detail.init(id) ...this.query,
}) menuId: this.menuId
}, }
sortChange({ column, prop, order }) { request({
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' url: `/api/example/Supplier/getList`,
this.listQuery.sidx = !order ? '' : prop method: 'post',
this.initData() data: _query
}, }).then(res => {
initData() { var _list = []
this.listLoading = true for (let i = 0; i < res.data.list.length; i++) {
let _query = { let _data = res.data.list[i]
...this.listQuery, _list.push(_data)
...this.query,
menuId: this.menuId
} }
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({ request({
url: `/api/example/Supplier/getList`, url: `/api/example/Supplier/${id}`,
method: 'post', method: 'DELETE'
data: _query
}).then(res => { }).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/example/Supplier/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({ 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'
}).then(() => {
request({
url: `/api/example/Supplier/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
})
}) })
}).catch(() => {
}) })
}, }).catch(() => {
addOrUpdateHandle(id, isDetail) { })
this.formVisible = true },
this.$nextTick(() => { handleSelectionChange(val) {
this.$refs.JNPFForm.init(id, isDetail) const res = val.map(item => item.id)
}) this.multipleSelection = res
}, },
exportData() { handleBatchRemoveDel() {
this.exportBoxVisible = true if (!this.multipleSelection.length) {
this.$nextTick(() => { this.$message({
this.$refs.ExportBox.init(this.columnList) type: 'error',
message: '请选择一条数据',
duration: 1500
}) })
}, return
download(data) { }
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId } const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({ request({
url: `/api/example/Supplier/Actions/Export`, url: `/api/example/Supplier/batchRemove/${ids}`,
method: 'GET', method: 'DELETE'
data: query
}).then(res => { }).then(res => {
if (!res.data.url) return this.$message({
this.jnpf.downloadFile(res.data.url) type: 'success',
this.$refs.ExportBox.visible = false message: res.msg,
this.exportBoxVisible = false onClose: () => {
this.initData()
}
})
}) })
}, }).catch(() => {
search() { })
this.listQuery = { },
currentPage: 1, addOrUpdateHandle(id, isDetail) {
pageSize: 20, this.formVisible = true
sort: 'desc', this.$nextTick(() => {
sidx: 'creatorTime' this.$refs.JNPFForm.init(id, isDetail)
} })
this.initData() },
}, exportData() {
refresh(isrRefresh) { this.exportBoxVisible = true
this.formVisible = false this.$nextTick(() => {
if (isrRefresh) this.reset() this.$refs.ExportBox.init(this.columnList)
}, })
reset() { },
for (let key in this.query) { download(data) {
this.query[key] = undefined let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
} request({
this.search() url: `/api/example/Supplier/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: 'creatorTime'
}
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>

Loading…
Cancel
Save