Commit 24852c90 authored by zhoutong's avatar zhoutong

供应商1.6

parent 172c8b4f
...@@ -26,6 +26,15 @@ export function deleteSupplier(id) { ...@@ -26,6 +26,15 @@ export function deleteSupplier(id) {
}) })
} }
// 获得供应商列表
export function getSupplierList(query) {
return request({
url: '/ecw/supplier/list',
method: 'get',
params: query
})
}
// 获得供应商 // 获得供应商
export function getSupplier(id) { export function getSupplier(id) {
return request({ return request({
...@@ -52,3 +61,21 @@ export function exportSupplierExcel(query) { ...@@ -52,3 +61,21 @@ export function exportSupplierExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 创建清关文件号码
export function createFileNo(data) {
return request({
url: '/ecw/clearance-file-no/create',
method: 'post',
data: data
})
}
// 获得清关文件号码
export function getFileNoPage(query) {
return request({
url: '/ecw/clearance-file-no/page',
method: 'get',
params: query
})
}
\ No newline at end of file
<template>
<el-select
v-model="valueSync"
multiple
filterable
clearable
remote
reserve-keyword
:disabled="disabled"
placeholder="请输入关键词"
@focus="remoteMethod('')"
:remote-method="remoteMethod"
:loading="loading">
<el-option
v-for="(item) in list"
:key="item.id"
:label="$l(item, 'company') + '('+item.companyCode+')'"
:value="item.id">
</el-option>
</el-select>
</template>
<script>
import {getSupplierList, getSupplierPage} from '@/api/ecw/supplier'
export default {
props:{
companyType: [String, Number],
value: [Array],
disabled: {
type: Boolean,
default: false
}
},
data(){
return {
valueSync: [],
list:[],
loading: false
}
},
computed:{
},
watch:{
valueSync(val){
this.$emit('input', val)
},
value(val){
this.valueSync = this.value
this.init(val)
}
},
created(){
this.valueSync = this.value
this.init(this.value)
},
methods:{
init(val){
if(val === null || val == undefined || val == '') return
let params = {
ids: val.toString()
}
getSupplierList(params).then(res => {
this.list = res.data
})
},
remoteMethod(keyword){
let params = {
pageSize: 500,
companyType: this.companyType
}
params.keyword = keyword
this.loading = true
getSupplierPage(params)
.then(res => this.list = res.data.list)
.finally(() => this.loading = false)
}
}
}
</script>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
</el-table-column> </el-table-column>
<el-table-column fixed="right" :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column fixed="right" :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleDetail(scope.row)"
v-hasPermi="['ecw:supplier:query']">{{$t('详情')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:supplier:update']">{{$t('修改')}}</el-button> v-hasPermi="['ecw:supplier:update']">{{$t('修改')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
...@@ -198,6 +200,11 @@ export default { ...@@ -198,6 +200,11 @@ export default {
handleAdd() { handleAdd() {
return this.$router.push('/supplier/edit') return this.$router.push('/supplier/edit')
}, },
/** 详情按钮操作 */
handleDetail(row) {
return this.$router.push('detail?id=' + row.id)
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment