|
|
@@ -79,31 +79,26 @@
|
|
|
|
|
|
<script>
|
|
|
import axios from 'axios'
|
|
|
- import uploadajax from '@/assets/js/uploadajax.js'
|
|
|
+import uploadajax from '@/assets/js/uploadajax.js'
|
|
|
|
|
|
- // v-viewer
|
|
|
- import Vue from 'vue';
|
|
|
- import Viewer from 'v-viewer'
|
|
|
- import 'viewerjs/dist/viewer.css'
|
|
|
- Vue.use(Viewer)
|
|
|
- Viewer.setDefaults({
|
|
|
- Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
|
|
|
- })
|
|
|
+// v-viewer
|
|
|
+import Vue from 'vue'
|
|
|
+import Viewer from 'v-viewer'
|
|
|
+import 'viewerjs/dist/viewer.css'
|
|
|
|
|
|
-
|
|
|
- import {
|
|
|
- mapGetters
|
|
|
- } from 'vuex'
|
|
|
+import {
|
|
|
+ mapGetters
|
|
|
+} from 'vuex'
|
|
|
+Vue.use(Viewer)
|
|
|
+Viewer.setDefaults({
|
|
|
+ Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
|
|
|
+})
|
|
|
export default {
|
|
|
name: 'ManufacturerList',
|
|
|
props: {
|
|
|
canadd: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
- },
|
|
|
- visible: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
@@ -117,15 +112,16 @@
|
|
|
return {
|
|
|
// visible: false,
|
|
|
SupplierCertId: '0',
|
|
|
+ visible: false,
|
|
|
manufacturerList: [],
|
|
|
- manufacturer:[],
|
|
|
+ manufacturer: [],
|
|
|
Title: '',
|
|
|
- ManufacturerForm:{
|
|
|
+ ManufacturerForm: {
|
|
|
Id: '',
|
|
|
- AgentName:'',
|
|
|
+ AgentName: '',
|
|
|
Remark: '',
|
|
|
FileUrl: '',
|
|
|
- SupplierCertId: '',
|
|
|
+ SupplierCertId: ''
|
|
|
},
|
|
|
currentPage: 1, // 分页
|
|
|
size: 10,
|
|
|
@@ -140,17 +136,17 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- imgFormat(fileurl){
|
|
|
- if(fileurl !=null && fileurl != undefined && fileurl !=''){
|
|
|
- let Format = fileurl.split(".")
|
|
|
- if(Format[1]!=null && Format[1] !='' && Format[1] != undefined){
|
|
|
- let pictureFormat = Format[1];
|
|
|
- if("jpg"== pictureFormat || "bmp" ==pictureFormat || "png" ==pictureFormat || "gif" ==pictureFormat|| "jpeg" ==pictureFormat){
|
|
|
- return true;
|
|
|
- }
|
|
|
+ imgFormat (fileurl) {
|
|
|
+ if (fileurl != null && fileurl != undefined && fileurl != '') {
|
|
|
+ let Format = fileurl.split('.')
|
|
|
+ if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
|
|
|
+ let pictureFormat = Format[1]
|
|
|
+ if (pictureFormat == 'jpg' || pictureFormat == 'bmp' || pictureFormat == 'png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
|
|
|
+ return true
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
- return false;
|
|
|
+ return false
|
|
|
},
|
|
|
fileurlcut (val) {
|
|
|
let fileurlall = val
|
|
|
@@ -161,9 +157,9 @@
|
|
|
const myDomain = window.location.host
|
|
|
retUrl = myDomain + '/' + retUrl
|
|
|
}
|
|
|
- return retUrl;
|
|
|
+ return retUrl
|
|
|
},
|
|
|
- getvalue (certId ) {
|
|
|
+ getvalue (certId) {
|
|
|
this.SupplierCertId = certId
|
|
|
this.initData()
|
|
|
},
|
|
|
@@ -174,8 +170,10 @@
|
|
|
_currentPage: this.currentPage,
|
|
|
_size: this.size
|
|
|
}
|
|
|
- this.$axios.get('manufacturer/manufacturerlist', {params})
|
|
|
+ console.log('参数', params)
|
|
|
+ this.$axios.get('manufacturer/manufacturerlist', { params })
|
|
|
.then(res => {
|
|
|
+ console.log('列表', res.data)
|
|
|
_this.manufacturerList = res.data.items
|
|
|
_this.currentItemCount = res.data.currentItemCount
|
|
|
})
|
|
|
@@ -189,7 +187,7 @@
|
|
|
if (valid) {
|
|
|
if (!this.ManufacturerForm.FileUrl) {
|
|
|
this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
- return false;
|
|
|
+ return false
|
|
|
}
|
|
|
if (!this.ManufacturerForm.Id) {
|
|
|
this.addManufacturer()
|
|
|
@@ -201,6 +199,7 @@
|
|
|
},
|
|
|
addManufacturer () {
|
|
|
let _this = this
|
|
|
+ console.log(_this.ManufacturerForm, 'a111a')
|
|
|
_this.ManufacturerForm.SupplierCertId = parseInt(_this.ManufacturerForm.SupplierCertId)
|
|
|
_this.$axios.post('/manufacturer/addmanufacturer/', _this.ManufacturerForm)
|
|
|
.then(res => {
|
|
|
@@ -302,17 +301,17 @@
|
|
|
|
|
|
showDialog () {
|
|
|
this.Title = '代理制造商'
|
|
|
- this.ManufacturerForm.SupplierCertId=this.SupplierCertId
|
|
|
+ this.ManufacturerForm.SupplierCertId = this.SupplierCertId
|
|
|
this.ManufacturerForm.Id = 0
|
|
|
- this.ManufacturerForm.AgentName=''
|
|
|
+ this.ManufacturerForm.AgentName = ''
|
|
|
this.ManufacturerForm.Remark = ''
|
|
|
this.visible = true
|
|
|
},
|
|
|
openDialog (val) {
|
|
|
this.Title = '编辑代理制造商'
|
|
|
- this.ManufacturerForm.SupplierCertId=val.SupplierCertId
|
|
|
+ this.ManufacturerForm.SupplierCertId = val.SupplierCertId
|
|
|
this.ManufacturerForm.Id = val.Id
|
|
|
- this.ManufacturerForm.AgentName=val.AgentName
|
|
|
+ this.ManufacturerForm.AgentName = val.AgentName
|
|
|
this.ManufacturerForm.Remark = val.Remark
|
|
|
this.visible = true
|
|
|
},
|
|
|
@@ -325,7 +324,7 @@
|
|
|
handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
|
this.initData()
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|