供应商信息修改

product
chuang 2 years ago
parent 0d544c979a
commit 2ef890d014

@ -6,13 +6,6 @@
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="24" >
<el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"bold","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}' value="供应商编辑">
</JNPF-Text>
</el-form-item>
</el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="供应商编码" <el-form-item label="供应商编码"
prop="supplierCode" > prop="supplierCode" >
@ -20,33 +13,33 @@
</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="companyId" >
<p>{{dataForm.supplierName}}</p> <p>{{dataForm.companyId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="供应商地点ID" <el-form-item label="供应商名称"
prop="supplierSiteId" > prop="supplierName" >
<p>{{dataForm.supplierSiteId}}</p> <p>{{dataForm.supplierName}}</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="supplierSiteCode" > prop="country" >
<p>{{dataForm.supplierSiteCode}}</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="companyId" > prop="supply" >
<p>{{dataForm.companyId}}</p> <p>{{dataForm.supply}}</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="province" >
<p>{{dataForm.address}}</p> <p>{{dataForm.province}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
@ -55,6 +48,12 @@
<p>{{dataForm.contactName}}</p> <p>{{dataForm.contactName}}</p>
</el-form-item> </el-form-item>
</el-col> </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-col :span="12" >
<el-form-item label="联系电话" <el-form-item label="联系电话"
prop="contactPhone" > prop="contactPhone" >
@ -62,15 +61,75 @@
</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="enterprise" >
<p>{{ dataForm.supplierLevel | dynamicText(supplierLevelOptions) }} </p> <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-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="启用" <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" > prop="status" >
<p>{{dataForm.status}}</p> <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-form-item>
</el-col> </el-col>
</template> </template>
@ -97,17 +156,37 @@
dataForm: { dataForm: {
id :'', id :'',
supplierCode : '', supplierCode : '',
companyId : "",
supplierName : '', supplierName : '',
supplierSiteId : '', country : "CHINA",
supplierSiteCode : '', supply : '',
companyId : [], province : [],
address : '',
contactName : '', contactName : '',
contactPhone : '',
supplierLevel : "1", supplierLevel : "1",
status : 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"}], 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"}],
} }
}, },
@ -130,7 +209,7 @@
if(this.dataForm.id){ if(this.dataForm.id){
this.loading = true this.loading = true
request({ request({
url: '/api/supplier/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)

@ -6,13 +6,6 @@
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="24" >
<el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"bold","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}' value="供应商编辑">
</JNPF-Text>
</el-form-item>
</el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="供应商编码" <el-form-item label="供应商编码"
prop="supplierCode" > prop="supplierCode" >
@ -22,6 +15,17 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </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-col :span="12" >
<el-form-item label="供应商名称" <el-form-item label="供应商名称"
prop="supplierName" > prop="supplierName" >
@ -32,39 +36,30 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="供应商地点ID" <el-form-item label="国家"
prop="supplierSiteId" > prop="country" >
<el-input v-model="dataForm.supplierSiteId" <el-input v-model="dataForm.country"
placeholder="请输入供应商地点ID" clearable :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="supplierSiteCode" > prop="supply" >
<el-input v-model="dataForm.supplierSiteCode" <el-input v-model="dataForm.supply"
placeholder="请输入供应商地点名称" clearable :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="companyId" > prop="province" >
<com-select v-model="dataForm.companyId" <JNPF-Address v-model="dataForm.province"
placeholder="请选择" clearable > placeholder="请选择省市区" clearable :level=2 >
</com-select> </JNPF-Address>
</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-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
@ -76,6 +71,16 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </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-col :span="12" >
<el-form-item label="联系电话" <el-form-item label="联系电话"
prop="contactPhone" > prop="contactPhone" >
@ -86,22 +91,127 @@
</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="enterprise" >
<el-select v-model="dataForm.supplierLevel" <el-radio-group v-model="dataForm.enterprise"
placeholder="请选择" clearable :style='{"width":"100%"}'> size="small" >
<el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option> <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-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-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-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" >
<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-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-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" > prop="status" >
<el-switch v-model="dataForm.status" <el-radio-group v-model="dataForm.status"
:active-value="1" :inactive-value="0" > 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-switch> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
@ -127,15 +237,29 @@
isDetail: false, isDetail: false,
dataForm: { dataForm: {
supplierCode : '', supplierCode : '',
companyId : "",
supplierName : '', supplierName : '',
supplierSiteId : '', country : "CHINA",
supplierSiteCode : '', supply : '',
companyId : [], province : [],
address : '',
contactName : '', contactName : '',
contactPhone : '',
supplierLevel : "1", supplierLevel : "1",
status : 1, contactPhone : '',
enterprise : "0",
address : '',
classification : "0",
bank : '',
taxCode : "0",
vatRegistrationNum : '',
isPurchase : "0",
bankAccount : '',
isPayment : "0",
payable : '',
status : "1",
prepaid : '',
supplierSiteCode : '',
creatorTime : "",
lastModifyTime : "",
}, },
rules: rules:
{ {
@ -153,8 +277,21 @@
trigger: 'blur' 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"}], 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"}],
} }
}, },
@ -184,7 +321,7 @@
if(this.dataForm.id){ if(this.dataForm.id){
this.loading = true this.loading = true
request({ request({
url: '/api/supplier/Supplier/'+this.dataForm.id, url: '/api/example/Supplier/'+this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
@ -208,7 +345,7 @@
var _data =this.dataList() var _data =this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/supplier/Supplier', url: '/api/example/Supplier',
method: 'post', method: 'post',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -224,7 +361,7 @@
}) })
}else{ }else{
request({ request({
url: '/api/supplier/Supplier/'+this.dataForm.id, url: '/api/example/Supplier/'+this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -242,14 +379,12 @@
}, },
dataList(){ dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.companyId = JSON.stringify(_data.companyId) _data.province = JSON.stringify(_data.province)
_data.status = parseInt(_data.status)
return _data; return _data;
}, },
dataInfo(dataAll){ dataInfo(dataAll){
let _dataAll =dataAll let _dataAll =dataAll
_dataAll.companyId = JSON.parse( _dataAll.companyId) _dataAll.province = JSON.parse( _dataAll.province)
_dataAll.status = parseInt( _dataAll.status)
this.dataForm = _dataAll this.dataForm = _dataAll
}, },
}, },

@ -14,10 +14,33 @@
<el-input v-model="query.supplierName" placeholder="请输入" clearable> </el-input> <el-input v-model="query.supplierName" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="联系人">
<el-input v-model="query.contactName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="联系电话">
<el-input v-model="query.contactPhone" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商地点">
<el-input v-model="query.supplierSiteCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<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-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -43,17 +66,17 @@
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="supplierCode" label="供应商编码" width="0" align="left" <el-table-column prop="supplierCode" label="供应商编码" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" <el-table-column prop="companyId" label="所属公司" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierSiteId" label="供应商地点ID" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="supplierSiteCode" label="供应商地点名称" width="0" align="left" <el-table-column prop="supplierName" label="供应商名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="companyId" label="公司名称" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="country" label="国家" width="0" align="left"
/>
<el-table-column prop="supply" label="供货指标" width="0" align="left"
/>
<el-table-column prop="province" label="省" width="0" align="left"
/>
<el-table-column prop="contactName" label="联系人" width="0" align="left" <el-table-column prop="contactName" label="联系人" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left" <el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left"
sortable="custom" > sortable="custom" >
@ -61,26 +84,66 @@
{{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }} {{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left"
sortable="custom" />
<el-table-column label="供应商性质" width="0" prop="enterprise" algin="left"
>
<template slot-scope="scope">
{{ scope.row.enterprise | dynamicText(enterpriseOptions) }}
</template>
</el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left" <el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" /> sortable="custom" />
<el-table-column prop="status" label="启用" width="0" align="left" sortable="custom" > <el-table-column label="供应商类型" width="0" prop="classification" algin="left"
<template slot-scope="scope"> >
<el-tag type="success" disable-transitions v-if="scope.row.status == '1'"> <template slot-scope="scope">
</el-tag> {{ scope.row.classification | dynamicText(classificationOptions) }}
<el-tag type="danger" disable-transitions v-else></el-tag> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="bank" label="开户行" width="0" align="left"
/>
<el-table-column prop="vatRegistrationNum" label="纳税编号" width="0" align="left"
/>
<el-table-column prop="bankAccount" label="银行账户" width="0" align="left"
/>
<el-table-column label="默认税码" width="0" prop="taxCode" algin="left"
>
<template slot-scope="scope">
{{ scope.row.taxCode | dynamicText(taxCodeOptions) }}
</template>
</el-table-column>
<el-table-column prop="payable" label="应付科目" width="0" align="left"
/>
<el-table-column label="是否采购" width="0" prop="isPurchase" algin="left"
>
<template slot-scope="scope">
{{ scope.row.isPurchase | dynamicText(isPurchaseOptions) }}
</template>
</el-table-column>
<el-table-column prop="prepaid" label="预付科目" width="0" align="left"
/>
<el-table-column label="是否付款" width="0" prop="isPayment" algin="left"
>
<template slot-scope="scope">
{{ scope.row.isPayment | dynamicText(isPaymentOptions) }}
</template>
</el-table-column>
<el-table-column label="是否启用" width="0" prop="status" algin="left"
sortable="custom" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="supplierSiteCode" label="供应商地点" width="0" align="left"
sortable="custom" />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right"
width="150" > width="100" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑 @click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
@ -105,10 +168,14 @@ width="150" >
components: {JNPFForm, ExportBox,Detail}, components: {JNPFForm, ExportBox,Detail},
data() { data() {
return { return {
showAll: false,
detailVisible: false, detailVisible: false,
query: { query: {
supplierCode:undefined, supplierCode:undefined,
supplierName:undefined, supplierName:undefined,
contactName:undefined,
contactPhone:undefined,
supplierSiteCode:undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -122,24 +189,48 @@ width="150" >
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "supplierCode", sidx: "creatorTime",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'supplierCode', label: '供应商编码'}, {prop: 'supplierCode', label: '供应商编码'},
{prop: 'companyId', label: '所属公司'},
{prop: 'supplierName', label: '供应商名称'}, {prop: 'supplierName', label: '供应商名称'},
{prop: 'supplierSiteId', label: '供应商地点ID'}, {prop: 'country', label: '国家'},
{prop: 'supplierSiteCode', label: '供应商地点名称'}, {prop: 'supply', label: '供货指标'},
{prop: 'companyId', label: '公司名称'}, {prop: 'province', label: '省'},
{prop: 'contactName', label: '联系人'}, {prop: 'contactName', label: '联系人'},
{prop: 'contactPhone', label: '联系电话'},
{prop: 'supplierLevel', label: '供应商等级'}, {prop: 'supplierLevel', label: '供应商等级'},
{prop: 'contactPhone', label: '联系电话'},
{prop: 'enterprise', label: '供应商性质'},
{prop: 'address', label: '地址'}, {prop: 'address', label: '地址'},
{prop: 'status', label: '启用'}, {prop: 'classification', label: '供应商类型'},
{prop: 'bank', label: '开户行'},
{prop: 'vatRegistrationNum', label: '纳税编号'},
{prop: 'bankAccount', label: '银行账户'},
{prop: 'taxCode', label: '默认税码'},
{prop: 'payable', label: '应付科目'},
{prop: 'isPurchase', label: '是否采购'},
{prop: 'prepaid', label: '预付科目'},
{prop: 'isPayment', label: '是否付款'},
{prop: 'status', label: '是否启用'},
{prop: 'supplierSiteCode', label: '供应商地点'},
], ],
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"}],
supplierLevelProps:{"label":"fullName","value":"id"}, supplierLevelProps:{"label":"fullName","value":"id"},
enterpriseOptions:[{"fullName":"民营","id":"0"},{"fullName":"私营","id":"1"}],
enterpriseProps:{"label":"fullName","value":"id"},
classificationOptions:[{"fullName":"国内","id":"0"},{"fullName":"国外","id":"1"}],
classificationProps:{"label":"fullName","value":"id"},
taxCodeOptions:[{"fullName":"13个点","id":"0"},{"fullName":"9个点","id":"1"},{"fullName":"6个点","id":"2"},{"fullName":"5个点","id":"3"}],
taxCodeProps:{"label":"fullName","value":"id"},
isPurchaseOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
isPurchaseProps:{"label":"fullName","value":"id"},
isPaymentOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
isPaymentProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"启用","id":"1"},{"fullName":"停用","id":"2"}],
statusProps:{"label":"fullName","value":"id"},
} }
}, },
computed: { computed: {
@ -170,7 +261,7 @@ width="150" >
menuId:this.menuId menuId:this.menuId
}; };
request({ request({
url: `/api/supplier/Supplier/getList`, url: `/api/example/Supplier/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
@ -190,7 +281,7 @@ width="150" >
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/supplier/Supplier/${id}`, url: `/api/example/Supplier/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
@ -222,7 +313,7 @@ width="150" >
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/supplier/Supplier/batchRemove/${ids}`, url: `/api/example/Supplier/batchRemove/${ids}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
@ -251,7 +342,7 @@ width="150" >
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({ request({
url: `/api/supplier/Supplier/Actions/Export`, url: `/api/example/Supplier/Actions/Export`,
method: 'GET', method: 'GET',
data: query data: query
}).then(res => { }).then(res => {
@ -266,7 +357,7 @@ width="150" >
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "supplierCode", sidx: "creatorTime",
} }
this.initData() this.initData()
}, },

Loading…
Cancel
Save