commit
1aa1a69623
@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 导入
|
||||
export function ImportData(data) {
|
||||
return request({
|
||||
url: '/api/arinvoices/Arinvoices/ImportData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导入预览
|
||||
export function ImportPreview(data) {
|
||||
return request({
|
||||
url: '/api/arinvoices/Arinvoices/ImportPreview',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
//模板下载
|
||||
export function TemplateDownload() {
|
||||
return request({
|
||||
url: '/api/arinvoices/Arinvoices/TemplateDownload',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
@ -1,225 +1,202 @@
|
||||
<template>
|
||||
<el-dialog title="详情"
|
||||
:close-on-click-modal="false" append-to-body
|
||||
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||
width="1000px">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
|
||||
<template v-if="!loading">
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商编码"
|
||||
prop="supplierCode" >
|
||||
<p>{{dataForm.supplierCode}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="所属公司"
|
||||
prop="companyId" >
|
||||
<p>{{dataForm.companyId}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商名称"
|
||||
prop="supplierName" >
|
||||
<p>{{dataForm.supplierName}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="国家"
|
||||
prop="country" >
|
||||
<p>{{dataForm.country}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供货指标"
|
||||
prop="supply" >
|
||||
<p>{{dataForm.supply}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="省"
|
||||
prop="province" >
|
||||
<p>{{dataForm.province}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="联系人"
|
||||
prop="contactName" >
|
||||
<p>{{dataForm.contactName}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商等级"
|
||||
prop="supplierLevel" >
|
||||
<p>{{ dataForm.supplierLevel | dynamicText(supplierLevelOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="联系电话"
|
||||
prop="contactPhone" >
|
||||
<p>{{dataForm.contactPhone}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商性质"
|
||||
prop="enterprise" >
|
||||
<p>{{ dataForm.enterprise | dynamicText(enterpriseOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="地址"
|
||||
prop="address" >
|
||||
<p>{{dataForm.address}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商类型"
|
||||
prop="classification" >
|
||||
<p>{{ dataForm.classification | dynamicText(classificationOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="开户行"
|
||||
prop="bank" >
|
||||
<p>{{dataForm.bank}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="默认税码"
|
||||
prop="taxCode" >
|
||||
<p>{{ dataForm.taxCode | dynamicText(taxCodeOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="纳税编号"
|
||||
prop="vatRegistrationNum" >
|
||||
<p>{{dataForm.vatRegistrationNum}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="是否采购"
|
||||
prop="isPurchase" >
|
||||
<p>{{ dataForm.isPurchase | dynamicText(isPurchaseOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="银行账户"
|
||||
prop="bankAccount" >
|
||||
<p>{{dataForm.bankAccount}}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="是否付款"
|
||||
prop="isPayment" >
|
||||
<p>{{ dataForm.isPayment | dynamicText(isPaymentOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<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 title="详情" :close-on-click-modal="false" append-to-body :visible.sync="visible"
|
||||
class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<p>{{ dataForm.supplierCode }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="companyId">
|
||||
<p>{{ dataForm.companyId }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<p>{{ dataForm.supplierName }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="国家" prop="country">
|
||||
<p>{{ dataForm.country }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供货指标" prop="supply">
|
||||
<p>{{ dataForm.supply }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="省" prop="province">
|
||||
<p>{{ dataForm.province }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<p>{{ dataForm.contactName }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商等级" prop="supplierLevel">
|
||||
<p>{{ dataForm.supplierLevel | dynamicText(supplierLevelOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="contactPhone">
|
||||
<p>{{ dataForm.contactPhone }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商性质" prop="enterprise">
|
||||
<p>{{ dataForm.enterprise | dynamicText(enterpriseOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<p>{{ dataForm.address }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商类型" prop="classification">
|
||||
<p>{{ dataForm.classification | dynamicText(classificationOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行" prop="bank">
|
||||
<p>{{ dataForm.bank }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认税码" prop="taxCode">
|
||||
<p>{{ dataForm.taxCode | dynamicText(taxCodeOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="纳税编号" prop="vatRegistrationNum">
|
||||
<p>{{ dataForm.vatRegistrationNum }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否采购" prop="isPurchase">
|
||||
<p>{{ dataForm.isPurchase | dynamicText(isPurchaseOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="银行账户" prop="bankAccount">
|
||||
<p>{{ dataForm.bankAccount }}</p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否付款" prop="isPayment">
|
||||
<p>{{ dataForm.isPayment | dynamicText(isPaymentOptions) }} </p>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import PrintBrowse from '@/components/PrintBrowse'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
export default {
|
||||
components: {PrintBrowse},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
printBrowseVisible: false,
|
||||
printId: '',
|
||||
import request from '@/utils/request'
|
||||
import PrintBrowse from '@/components/PrintBrowse'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
export default {
|
||||
components: { PrintBrowse },
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
printBrowseVisible: false,
|
||||
printId: '',
|
||||
dataForm: {
|
||||
id :'',
|
||||
supplierCode : '',
|
||||
companyId : "",
|
||||
supplierName : '',
|
||||
country : "CHINA",
|
||||
supply : '',
|
||||
province : [],
|
||||
contactName : '',
|
||||
supplierLevel : "1",
|
||||
contactPhone : '',
|
||||
enterprise : "0",
|
||||
address : '',
|
||||
classification : "0",
|
||||
bank : '',
|
||||
taxCode : "0",
|
||||
vatRegistrationNum : '',
|
||||
isPurchase : "0",
|
||||
bankAccount : '',
|
||||
isPayment : "0",
|
||||
payable : '',
|
||||
status : "1",
|
||||
prepaid : '',
|
||||
supplierSiteCode : '',
|
||||
creatorTime : "",
|
||||
lastModifyTime : "",
|
||||
id: '',
|
||||
supplierCode: '',
|
||||
companyId: "",
|
||||
supplierName: '',
|
||||
country: "CHINA",
|
||||
supply: '',
|
||||
province: [],
|
||||
contactName: '',
|
||||
supplierLevel: "1",
|
||||
contactPhone: '',
|
||||
enterprise: "0",
|
||||
address: '',
|
||||
classification: "0",
|
||||
bank: '',
|
||||
taxCode: "0",
|
||||
vatRegistrationNum: '',
|
||||
isPurchase: "0",
|
||||
bankAccount: '',
|
||||
isPayment: "0",
|
||||
payable: '',
|
||||
status: "1",
|
||||
prepaid: '',
|
||||
supplierSiteCode: '',
|
||||
creatorTime: "",
|
||||
lastModifyTime: "",
|
||||
},
|
||||
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],
|
||||
enterpriseOptions:[{"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"}],
|
||||
isPurchaseOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
|
||||
isPaymentOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
|
||||
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"停用","id":"2"}],
|
||||
supplierLevelOptions: [{ "fullName": "一级", "id": "1" }, { "fullName": "二级", "id": "2" }, { "fullName": "三级", "id": "3" }, { "fullName": "四级", "id": "4" }],
|
||||
enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '国有', 'id': '1' }, { 'fullName': '其它', 'id': '2' }],
|
||||
classificationOptions: [{ "fullName": "国内", "id": "0" }, { "fullName": "国外", "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" }],
|
||||
isPurchaseOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
|
||||
isPaymentOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
|
||||
statusOptions: [{ "fullName": "启用", "id": "1" }, { "fullName": "停用", "id": "2" }],
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/Supplier/detail/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/Supplier/detail/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -1,393 +1,363 @@
|
||||
<template>
|
||||
<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">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
|
||||
<template v-if="!loading">
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商编码"
|
||||
prop="supplierCode" >
|
||||
<el-input v-model="dataForm.supplierCode"
|
||||
placeholder="请输入供应商编码" clearable :style='{"width":"100%"}'>
|
||||
<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">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-input v-model="dataForm.supplierCode" placeholder="请输入供应商编码" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="所属公司"
|
||||
prop="companyId" >
|
||||
<popupSelect v-model="dataForm.companyId"
|
||||
placeholder="请选择" clearable field="companyId" interfaceId="394016341591396805" :columnOptions="companyIdcolumnOptions" propsValue="F_Id" relationField="F_FullName" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属公司" prop="companyId">
|
||||
<popupSelect v-model="dataForm.companyId" placeholder="请选择" clearable field="companyId"
|
||||
interfaceId="394016341591396805" :columnOptions="companyIdcolumnOptions" propsValue="F_Id"
|
||||
relationField="F_FullName" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商名称"
|
||||
prop="supplierName" >
|
||||
<el-input v-model="dataForm.supplierName"
|
||||
placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input v-model="dataForm.supplierName" placeholder="请输入供应商名称" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="国家"
|
||||
prop="country" >
|
||||
<el-input v-model="dataForm.country"
|
||||
placeholder="请输入国家" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="国家" prop="country">
|
||||
<el-input v-model="dataForm.country" placeholder="请输入国家" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供货指标"
|
||||
prop="supply" >
|
||||
<el-input v-model="dataForm.supply"
|
||||
placeholder="请输入供货指标" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供货指标" prop="supply">
|
||||
<el-input v-model="dataForm.supply" placeholder="请输入供货指标" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="省"
|
||||
prop="province" >
|
||||
<JNPF-Address v-model="dataForm.province"
|
||||
placeholder="请选择省市区" clearable :level=2 >
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="省" prop="province">
|
||||
<JNPF-Address v-model="dataForm.province" placeholder="请选择省市区" clearable :level=2>
|
||||
|
||||
</JNPF-Address>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="联系人"
|
||||
prop="contactName" >
|
||||
<el-input v-model="dataForm.contactName"
|
||||
placeholder="请输入联系人" clearable :style='{"width":"100%"}'>
|
||||
</JNPF-Address>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input v-model="dataForm.contactName" placeholder="请输入联系人" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商等级"
|
||||
prop="supplierLevel" >
|
||||
<el-select v-model="dataForm.supplierLevel"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商等级" prop="supplierLevel">
|
||||
<el-select v-model="dataForm.supplierLevel" placeholder="请选择" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
<el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="联系电话"
|
||||
prop="contactPhone" >
|
||||
<el-input v-model="dataForm.contactPhone"
|
||||
placeholder="请输入联系电话" clearable :style='{"width":"100%"}'>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="contactPhone">
|
||||
<el-input v-model="dataForm.contactPhone" placeholder="请输入联系电话" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商性质"
|
||||
prop="enterprise" >
|
||||
<el-radio-group v-model="dataForm.enterprise"
|
||||
size="small" >
|
||||
<el-radio v-for="(item, index) in enterpriseOptions" :key="index" :label="item.id" :disabled="item.disabled" >
|
||||
{{item.fullName}}
|
||||
</el-radio>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商性质" prop="enterprise">
|
||||
<el-radio-group v-model="dataForm.enterprise" size="small">
|
||||
<el-radio v-for="(item, index) in enterpriseOptions" :key="index" :label="item.id"
|
||||
:disabled="item.disabled">
|
||||
{{ item.fullName }}
|
||||
</el-radio>
|
||||
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="地址"
|
||||
prop="address" >
|
||||
<el-input v-model="dataForm.address"
|
||||
placeholder="请输入地址" clearable :style='{"width":"100%"}'>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="dataForm.address" placeholder="请输入地址" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="供应商类型"
|
||||
prop="classification" >
|
||||
<el-radio-group v-model="dataForm.classification"
|
||||
size="small" >
|
||||
<el-radio v-for="(item, index) in classificationOptions" :key="index" :label="item.id" :disabled="item.disabled" >
|
||||
{{item.fullName}}
|
||||
</el-radio>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商类型" prop="classification">
|
||||
<el-radio-group v-model="dataForm.classification" size="small">
|
||||
<el-radio v-for="(item, index) in classificationOptions" :key="index" :label="item.id"
|
||||
:disabled="item.disabled">
|
||||
{{ item.fullName }}
|
||||
</el-radio>
|
||||
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="开户行"
|
||||
prop="bank" >
|
||||
<el-input v-model="dataForm.bank"
|
||||
placeholder="请输入开户行" clearable :style='{"width":"100%"}'>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行" prop="bank">
|
||||
<el-input v-model="dataForm.bank" placeholder="请输入开户行" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="默认税码"
|
||||
prop="taxCode" >
|
||||
<el-select v-model="dataForm.taxCode"
|
||||
placeholder="请选择税码" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in taxCodeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认税码" prop="taxCode">
|
||||
<el-select v-model="dataForm.taxCode" placeholder="请选择税码" clearable :style='{ "width": "100%" }'>
|
||||
<el-option v-for="(item, index) in taxCodeOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="纳税编号"
|
||||
prop="vatRegistrationNum" >
|
||||
<el-input v-model="dataForm.vatRegistrationNum"
|
||||
placeholder="请输入纳税编号" clearable :style='{"width":"100%"}'>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="纳税编号" prop="vatRegistrationNum">
|
||||
<el-input v-model="dataForm.vatRegistrationNum" placeholder="请输入纳税编号" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="是否采购"
|
||||
prop="isPurchase" >
|
||||
<el-radio-group v-model="dataForm.isPurchase"
|
||||
size="small" >
|
||||
<el-radio v-for="(item, index) in isPurchaseOptions" :key="index" :label="item.id" :disabled="item.disabled" >
|
||||
{{item.fullName}}
|
||||
</el-radio>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否采购" prop="isPurchase">
|
||||
<el-radio-group v-model="dataForm.isPurchase" size="small">
|
||||
<el-radio v-for="(item, index) in isPurchaseOptions" :key="index" :label="item.id"
|
||||
:disabled="item.disabled">
|
||||
{{ item.fullName }}
|
||||
</el-radio>
|
||||
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="银行账户"
|
||||
prop="bankAccount" >
|
||||
<el-input v-model="dataForm.bankAccount"
|
||||
placeholder="请输入银行账户" clearable :style='{"width":"100%"}'>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="银行账户" prop="bankAccount">
|
||||
<el-input v-model="dataForm.bankAccount" placeholder="请输入银行账户" clearable
|
||||
:style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="是否付款"
|
||||
prop="isPayment" >
|
||||
<el-radio-group v-model="dataForm.isPayment"
|
||||
size="small" >
|
||||
<el-radio v-for="(item, index) in isPaymentOptions" :key="index" :label="item.id" :disabled="item.disabled" >
|
||||
{{item.fullName}}
|
||||
</el-radio>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否付款" prop="isPayment">
|
||||
<el-radio-group v-model="dataForm.isPayment" size="small">
|
||||
<el-radio v-for="(item, index) in isPaymentOptions" :key="index" :label="item.id"
|
||||
:disabled="item.disabled">
|
||||
{{ item.fullName }}
|
||||
</el-radio>
|
||||
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="应付科目"
|
||||
prop="payable" >
|
||||
<el-input v-model="dataForm.payable"
|
||||
placeholder="请输入应付科目" clearable :style='{"width":"100%"}'>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="应付科目" prop="payable">
|
||||
<el-input v-model="dataForm.payable" placeholder="请输入应付科目" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="是否启用"
|
||||
prop="status" >
|
||||
<el-radio-group v-model="dataForm.status"
|
||||
size="small" >
|
||||
<el-radio v-for="(item, index) in statusOptions" :key="index" :label="item.id" :disabled="item.disabled" >
|
||||
{{item.fullName}}
|
||||
</el-radio>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-radio-group v-model="dataForm.status" size="small">
|
||||
<el-radio v-for="(item, index) in statusOptions" :key="index" :label="item.id"
|
||||
:disabled="item.disabled">
|
||||
{{ item.fullName }}
|
||||
</el-radio>
|
||||
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="预付科目"
|
||||
prop="prepaid" >
|
||||
<el-input v-model="dataForm.prepaid"
|
||||
placeholder="请输入预付科目" clearable :style='{"width":"100%"}'>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预付科目" prop="prepaid">
|
||||
<el-input v-model="dataForm.prepaid" placeholder="请输入预付科目" clearable :style='{ "width": "100%" }'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
supplierCode : '',
|
||||
companyId : "",
|
||||
supplierName : '',
|
||||
country : "CHINA",
|
||||
supply : '',
|
||||
province : [],
|
||||
contactName : '',
|
||||
supplierLevel : "1",
|
||||
contactPhone : '',
|
||||
enterprise : "0",
|
||||
address : '',
|
||||
classification : "0",
|
||||
bank : '',
|
||||
taxCode : "0",
|
||||
vatRegistrationNum : '',
|
||||
isPurchase : "0",
|
||||
bankAccount : '',
|
||||
isPayment : "0",
|
||||
payable : '',
|
||||
status : "1",
|
||||
prepaid : '',
|
||||
supplierSiteCode : '',
|
||||
creatorTime : "",
|
||||
lastModifyTime : "",
|
||||
supplierCode: '',
|
||||
companyId: "",
|
||||
supplierName: '',
|
||||
country: "CHINA",
|
||||
supply: '',
|
||||
province: [],
|
||||
contactName: '',
|
||||
supplierLevel: "1",
|
||||
contactPhone: '',
|
||||
enterprise: "0",
|
||||
address: '',
|
||||
classification: "0",
|
||||
bank: '',
|
||||
taxCode: "0",
|
||||
vatRegistrationNum: '',
|
||||
isPurchase: "0",
|
||||
bankAccount: '',
|
||||
isPayment: "0",
|
||||
payable: '',
|
||||
status: "1",
|
||||
prepaid: '',
|
||||
supplierSiteCode: '',
|
||||
creatorTime: "",
|
||||
lastModifyTime: "",
|
||||
},
|
||||
rules:
|
||||
{
|
||||
supplierCode: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入供应商编码',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
supplierName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入供应商名称',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
supply: [
|
||||
],
|
||||
contactPhone: [
|
||||
],
|
||||
bankAccount: [
|
||||
],
|
||||
supplierCode: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入供应商编码',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
supplierName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入供应商名称',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
supply: [
|
||||
],
|
||||
contactPhone: [
|
||||
],
|
||||
bankAccount: [
|
||||
],
|
||||
},
|
||||
companyIdcolumnOptions:[ {"label":"公司编码","value":"F_EnCode"}, {"label":"公司名称","value":"F_FullName"},],
|
||||
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],
|
||||
enterpriseOptions:[{"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"}],
|
||||
isPurchaseOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
|
||||
isPaymentOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
|
||||
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"停用","id":"2"}],
|
||||
companyIdcolumnOptions: [{ "label": "公司编码", "value": "F_EnCode" }, { "label": "公司名称", "value": "F_FullName" },],
|
||||
supplierLevelOptions: [{ "fullName": "一级", "id": "1" }, { "fullName": "二级", "id": "2" }, { "fullName": "三级", "id": "3" }, { "fullName": "四级", "id": "4" }],
|
||||
enterpriseOptions: [{ 'fullName': '民营', 'id': '0' }, { 'fullName': '国有', 'id': '1' }, { 'fullName': '其它', 'id': '2' }],
|
||||
classificationOptions: [{ "fullName": "国内", "id": "0" }, { "fullName": "国外", "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" }],
|
||||
isPurchaseOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
|
||||
isPaymentOptions: [{ "fullName": "否", "id": "0" }, { "fullName": "是", "id": "1" }],
|
||||
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: {},
|
||||
watch: {},
|
||||
created() {
|
||||
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/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: {
|
||||
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] = "";
|
||||
}
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.request()
|
||||
}
|
||||
},
|
||||
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/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', {})
|
||||
},
|
||||
// 表单提交
|
||||
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)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
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({
|
||||
url: '/api/example/Supplier/'+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)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/example/Supplier/' + 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)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.province = JSON.stringify(_data.province)
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
_dataAll.province = JSON.parse( _dataAll.province)
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.province = JSON.stringify(_data.province)
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
_dataAll.province = JSON.parse(_dataAll.province)
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in new issue