|
@@ -6,8 +6,8 @@
|
|
|
<Poptip trigger="focus" width="250" placement="bottom">
|
|
|
<div slot="content">
|
|
|
<ul style="" class="commons-select-search">
|
|
|
- <li :key="i.id" v-for="i in supplierList" @click="params.keyword = i.name">
|
|
|
- {{i.name}}
|
|
|
+ <li :key="i.id" v-for="i in supplierList" @click="params.keyword = i.supplierName">
|
|
|
+ {{i.supplierName}}
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
@@ -1000,16 +1000,8 @@ export default {
|
|
|
},
|
|
|
on: {
|
|
|
click: () => {
|
|
|
- this.show = true
|
|
|
- this.$post('/api/storage-restructure/supplier/details',{id:params.row.id}).then(res=>{
|
|
|
-
|
|
|
- v.$set(v,'formData',res.data)
|
|
|
-
|
|
|
- console.log(this.formData)
|
|
|
- this.formType = 'form'
|
|
|
- this.title = '供应商详情'
|
|
|
- this.show = true
|
|
|
- })
|
|
|
+ this.getDtl('form',params.row.id)
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -1029,14 +1021,8 @@ export default {
|
|
|
},
|
|
|
on: {
|
|
|
click: () => {
|
|
|
+ this.getDtl('edit',params.row.id)
|
|
|
|
|
|
- this.$post('/api/storage-restructure/supplier/details',{id:params.row.id}).then(res=>{
|
|
|
- this.formData = res.data
|
|
|
-
|
|
|
- this.formType = 'edit'
|
|
|
- this.title = '修改'
|
|
|
- this.show = true
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1053,9 +1039,9 @@ export default {
|
|
|
on: {
|
|
|
click: () => {
|
|
|
this.$MyModal.show({ text: '是否删除?' }).$on('confirm', () => {
|
|
|
- axios.post('/cloudApi/supplier/delete',{id:params.row.id}).then(res=>{
|
|
|
- if (res.data.code == 200) {
|
|
|
- v.$Message.info(res.data.msg)
|
|
|
+ this.$post('/api/storage-restructure/supplier/delete',{id:params.row.id}).then(res=>{
|
|
|
+ if (res.code == 200) {
|
|
|
+ v.$Message.info(res.msg)
|
|
|
v.getList()
|
|
|
}
|
|
|
})
|
|
@@ -1142,6 +1128,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getDtl(formType,id){
|
|
|
+ this.$post('/api/storage-restructure/supplier/details',{id:id}).then(res=>{
|
|
|
+ this.formData = {...this.formData,...res.data}
|
|
|
+ this.formType = formType
|
|
|
+ this.title = '供应商详情'
|
|
|
+ this.show = true
|
|
|
+ })
|
|
|
+ this.$post('/api/storage-restructure/supplierContacts/details',{id:id}).then(res=>{
|
|
|
+ this.formData = {...this.formData,...res.data}
|
|
|
+ })
|
|
|
+ this.$post('/api/storage-restructure/supplierBank/details',{id:id}).then(res=>{
|
|
|
+ this.formData = {...this.formData,...res.data}
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
getSafetyWarnDayList(){
|
|
|
const v = this
|
|
|
this.$post('/api/storage-restructure/supplier/getSafetyWarnDay',{}).then(res=>{
|
|
@@ -1194,7 +1195,6 @@ export default {
|
|
|
|
|
|
this.$post('/api/storage-restructure/supplier/add',formDataCopy).then(res=>{
|
|
|
this.show = false
|
|
|
- this.$Message.info(res.data.msg)
|
|
|
if(res.code === 200){
|
|
|
this.show = false
|
|
|
this.$Message.info(res.msg)
|
|
@@ -1202,11 +1202,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else if (type === 'edit') {
|
|
|
-
|
|
|
this.$post('/api/storage-restructure/supplier/edit',formDataCopy).then(res=>{
|
|
|
- this.show = false
|
|
|
- this.$Message.info(res.data.msg)
|
|
|
+ this.$Message.info(res.msg)
|
|
|
this.getList()
|
|
|
+ this.show = false
|
|
|
})
|
|
|
|
|
|
}
|
|
@@ -1302,13 +1301,13 @@ export default {
|
|
|
getSupplierSelectList(req){
|
|
|
const v = this
|
|
|
v.loading = true
|
|
|
- axios
|
|
|
- .post('/cloudApi/supplier/selectList', {keyword:this.params.keyword})
|
|
|
- .then((res) => {
|
|
|
- v.supplierList = res.data.data
|
|
|
+ this.$post('/api/storage-restructure/supplier/page', {pageNum:1,pageSize:999})
|
|
|
+ .then((res) => {
|
|
|
+ this.supplierList = res.data.records
|
|
|
+ this.params.total = res.data.total
|
|
|
v.loading = false
|
|
|
- console.log(v.supplierList)
|
|
|
- })
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
getStatisticsClassify(){
|
|
|
this
|