|
|
@@ -179,6 +179,7 @@
|
|
|
row-class-name="warning-row"
|
|
|
highlight-current-row
|
|
|
:data="lostTableData"
|
|
|
+ :span-method="objectSpanMethod"
|
|
|
border
|
|
|
size="mini"
|
|
|
style="width: 100%; margin-top:20px">
|
|
|
@@ -324,7 +325,7 @@
|
|
|
return {
|
|
|
IsCompanyUser: '',
|
|
|
loading: false,
|
|
|
- tableloading:false,
|
|
|
+ tableloading: false,
|
|
|
keyword: '',
|
|
|
Ids: [],
|
|
|
SupplierId: 0,
|
|
|
@@ -405,53 +406,53 @@
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
- setManufacturer (operTag){
|
|
|
- let _this = this
|
|
|
- _this.$confirm('是否确定此操作, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- const delload = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: '正在设置请稍后...'
|
|
|
- })
|
|
|
- let postData = {
|
|
|
- CertSubIdList: [],
|
|
|
- SupplierId: parseInt(this.SupplierId),
|
|
|
- SupplierCertId: parseInt(this.SupplierCertId),
|
|
|
- IsManufacturer: operTag
|
|
|
- }
|
|
|
- _this.$axios.post('suppliercertsub/modify-manufacturers/' + this.SupplierCertId, postData)
|
|
|
- .then(function (response) {
|
|
|
- if (response.data.code === 0) {
|
|
|
- _this.$message({
|
|
|
- type: 'success',
|
|
|
- message: response.data.message
|
|
|
- })
|
|
|
- delload.close()
|
|
|
- _this.Ids = []
|
|
|
- _this.initData()
|
|
|
- } else {
|
|
|
- delload.close()
|
|
|
- _this.Ids = []
|
|
|
- _this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: response.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(function (error) {
|
|
|
- console.log(error)
|
|
|
- })
|
|
|
- })
|
|
|
- .catch((ex) => {
|
|
|
- console.error(ex)
|
|
|
- _this.Ids = []
|
|
|
+ setManufacturer (operTag) {
|
|
|
+ let _this = this
|
|
|
+ _this.$confirm('是否确定此操作, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
- },
|
|
|
- type_change(row,canadd,newcanadd){
|
|
|
+ .then(() => {
|
|
|
+ const delload = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '正在设置请稍后...'
|
|
|
+ })
|
|
|
+ let postData = {
|
|
|
+ CertSubIdList: [],
|
|
|
+ SupplierId: parseInt(this.SupplierId),
|
|
|
+ SupplierCertId: parseInt(this.SupplierCertId),
|
|
|
+ IsManufacturer: operTag
|
|
|
+ }
|
|
|
+ _this.$axios.post('suppliercertsub/modify-manufacturers/' + this.SupplierCertId, postData)
|
|
|
+ .then(function (response) {
|
|
|
+ if (response.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: response.data.message
|
|
|
+ })
|
|
|
+ delload.close()
|
|
|
+ _this.Ids = []
|
|
|
+ _this.initData()
|
|
|
+ } else {
|
|
|
+ delload.close()
|
|
|
+ _this.Ids = []
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: response.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch((ex) => {
|
|
|
+ console.error(ex)
|
|
|
+ _this.Ids = []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ type_change (row, canadd, newcanadd) {
|
|
|
if (canadd == true || newcanadd == true) {
|
|
|
this.tableloading = true
|
|
|
let postData = {
|
|
|
@@ -765,15 +766,49 @@
|
|
|
return
|
|
|
}
|
|
|
_this.$axios.post('/suppliercertsub/check-certsub-lost', params).then(res => {
|
|
|
- _this.lostTableData = res.data
|
|
|
+ _this.lostTableData = _this.mergeTableRow(res.data, ['Code'])
|
|
|
this.loading = false
|
|
|
}).catch(err => {
|
|
|
this.loading = false
|
|
|
console.error(err)
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
-
|
|
|
+ objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
|
|
|
+ console.log('没有啊')
|
|
|
+ const span = column['property'] + '-span'
|
|
|
+ if (row[span]) {
|
|
|
+ return row[span]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * table合并行通用 */
|
|
|
+ mergeTableRow (data, merge) {
|
|
|
+ if (!merge || merge.length === 0) {
|
|
|
+ return data
|
|
|
+ }
|
|
|
+ merge.forEach((m) => {
|
|
|
+ const mList = {}
|
|
|
+ data = data.map((v, index) => {
|
|
|
+ const rowVal = v[m]
|
|
|
+ if (mList[rowVal]) {
|
|
|
+ mList[rowVal]++
|
|
|
+ data[index - (mList[rowVal] - 1)][m + '-span'].rowspan++
|
|
|
+ v[m + '-span'] = {
|
|
|
+ rowspan: 0,
|
|
|
+ colspan: 0
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ mList[rowVal] = 1
|
|
|
+ v[m + '-span'] = {
|
|
|
+ rowspan: 1,
|
|
|
+ colspan: 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ })
|
|
|
+ return data
|
|
|
+ },
|
|
|
handleSizeChange (value) {
|
|
|
this.size = value
|
|
|
this.currentPage = 1
|