修改部分样式

dev
e 3 years ago committed by yujialong
commit 7292a868a4
  1. 3
      src/utils/api.js
  2. 120
      src/views/data/Framework.vue
  3. 18
      src/views/data/Introduce.vue
  4. 136
      src/views/data/Product.vue
  5. 36
      src/views/order/AddOrder.vue

@ -1,8 +1,5 @@
let host = 'http://39.108.250.202:9000' let host = 'http://39.108.250.202:9000'
if(process.env.NODE_ENV === 'development'){
host = 'http://192.168.31.216:9000'
}
let host1 = 'http://192.168.31.216:9000'//榕 let host1 = 'http://192.168.31.216:9000'//榕
let host2 = 'http://192.168.31.125:9000'//林 let host2 = 'http://192.168.31.125:9000'//林
// let host = 'http://192.168.31.137:9000'// 陈赓 // let host = 'http://192.168.31.137:9000'// 陈赓

@ -9,7 +9,7 @@
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span> <span :title="node.label">{{ node.label }}</span>
<span class="actions"> <span class="actions">
<i v-if="!data.isThird" class="el-icon-circle-plus-outline" @click.stop="addType(node)"></i> <i v-if="data.level != 3" class="el-icon-circle-plus-outline" @click.stop="addType(node)"></i>
<i class="el-icon-edit" @click.stop="editType(node)"></i> <i class="el-icon-edit" @click.stop="editType(node)"></i>
<i class="el-icon-delete" @click.stop="delType(node)"></i> <i class="el-icon-delete" @click.stop="delType(node)"></i>
</span> </span>
@ -156,19 +156,19 @@ export default {
methods: { methods: {
getType(){ getType(){
this.$post(this.api.getTableByClassification).then(res => { this.$post(this.api.getTableByClassification).then(res => {
res.map(n => { // ,
n.id = String(n.id) function handleId(data,level = 0){
n.label = n.categoryName data.map(n => {
n.children.map(n => {
n.id = String(n.id) n.id = String(n.id)
n.label = n.categoryName n.label = n.categoryName
n.children.map(n => { n.level = level + 1
n.id = String(n.id) if(n.children.length){
n.label = n.categoryName handleId(n.children,n.level)
n.isThird = true }
})
}) })
}) }
handleId(res)
this.typeList = res this.typeList = res
if(res[0].children.length){ if(res[0].children.length){
this.categoryId = res[0].children[0].id this.categoryId = res[0].children[0].id
@ -177,6 +177,7 @@ export default {
this.categoryId = res[0].id this.categoryId = res[0].id
this.defaultActive = [res[0].id] this.defaultActive = [res[0].id]
} }
// id
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.type.setCurrentKey(res[0].children[0].id) this.$refs.type.setCurrentKey(res[0].children[0].id)
}) })
@ -267,6 +268,7 @@ export default {
let data = res.data let data = res.data
data.map(n => { data.map(n => {
for(let i in n){ for(let i in n){
// +0000,,
if(typeof n[i] == 'string' && n[i].endsWith('+0000')) n[i] = this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n[i])) if(typeof n[i] == 'string' && n[i].endsWith('+0000')) n[i] = this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n[i]))
} }
}) })
@ -310,6 +312,7 @@ export default {
this.$message.error('请先选择数据') this.$message.error('请先选择数据')
} }
}, },
//
getMoreTable(list,id){ getMoreTable(list,id){
list.map(n => { list.map(n => {
if(n.id == id){ if(n.id == id){
@ -319,82 +322,91 @@ export default {
} }
}) })
}, },
// ,,id
renderChecked(){
let result = []
let list = this.$refs.typeTree.getCheckedNodes()
list.map((n,i) => {
if(n.tableLen && n.tableLen > n.children.length){
result = [...result,...n.children.map(n => n.id)]
}else{
result.push(n.id)
}
})
this.$refs.typeTree.setCheckedKeys(result)
},
// ,dom,
loadType(e){ loadType(e){
clearTimeout(this.typeTimer) clearTimeout(this.typeTimer)
let typeTree = this.$refs.typeTreeWrap let typeTree = this.$refs.typeTreeWrap
this.typeTimer = setTimeout(() => { this.typeTimer = setTimeout(() => {
this.typeTreeScrollTop = typeTree.scrollTop - this.typeTreeScrollTop this.typeTreeScrollTop = typeTree.scrollTop - this.typeTreeScrollTop
// ,
if(this.typeTreeScrollTop > 0 && typeTree.clientHeight + typeTree.scrollTop == typeTree.scrollHeight){ if(this.typeTreeScrollTop > 0 && typeTree.clientHeight + typeTree.scrollTop == typeTree.scrollHeight){
this.getMoreTable(this.importTypeList,this.curExpand) this.getMoreTable(this.importTypeList,this.curExpand)
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) this.renderChecked()
}) })
},300) },300)
} }
},50) },50)
}, },
//
getTable(n,isConcat){ getTable(n,isConcat){
this.$post(`${this.api.originalListById}?categoryId=${n.realId}&pageNum=${n.typeTreePage ? n.typeTreePage : 1}&pageSize=${this.typeTreeUnit}`).then(res => { this.$post(`${this.api.originalListById}?categoryId=${n.realId}&pageNum=${n.typeTreePage ? n.typeTreePage : 1}&pageSize=${this.typeTreeUnit}`).then(res => {
let list = res.list.records let list = res.list.records
list.map(n => { list.map(n => {
n.label = n.showName n.label = n.showName
n.id = String(n.id) n.id = String(n.id)
// ,
if(this.defaultTypeChecked.includes(n.id)){ if(this.defaultTypeChecked.includes(n.id)){
n.disabled = true n.disabled = true
} }
}) })
// ,
if(isConcat){ if(isConcat){
n.children = n.children.concat(list) n.children = n.children.concat(list)
}else{ }else{
n.children = list n.children = list
n.tableLen = res.list.total n.tableLen = res.list.total
} }
// ,+1
n.typeTreePage++ n.typeTreePage++
}).catch(res => {}) }).catch(res => {})
}, },
batchImport(){ batchImport(){
this.$post(this.api.originalList).then(res => { this.$post(this.api.originalList).then(res => {
res.map(n => { const that = this
this.importTypeIndex++ function handleId(data){
n.realId = n.id data.map(n => {
n.id = String(this.importTypeIndex + n.id) that.importTypeIndex++
n.label = n.categoryName
n.children.map(n => {
n.realId = n.id n.realId = n.id
this.importTypeIndex++ // idid,,
n.id = String(this.importTypeIndex + n.id) n.id = String(that.importTypeIndex + n.id)
n.label = n.categoryName n.label = n.categoryName
n.children.map(n => { if(n.children.length){
this.importTypeIndex++ handleId(n.children)
n.realId = n.id }
n.id = String(this.importTypeIndex + n.id)
n.label = n.categoryName
n.isThird = true
})
}) })
}) }
handleId(res)
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keyword}&pageNum=1&pageSize=10000&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res1 => { this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keyword}&pageNum=1&pageSize=10000&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res1 => {
let list = res1.pageList.records let list = res1.pageList.records
this.defaultTypeChecked = list.map(n => n.copyId) this.defaultTypeChecked = list.map(n => n.copyId)
res.map((n,i) => { const that = this
if(n.children.length){ function handleId(data){
n.children.map(n => { data.map(n => {
if(n.children.length){ if(n.children.length){
n.children.map(n => { handleId(n.children)
n.typeTreePage = 1 }else{
this.getTable(n) // 1
}) n.typeTreePage = 1
}else{ that.getTable(n)
n.typeTreePage = 1 }
this.getTable(n) })
} }
}) handleId(res)
}else{
n.typeTreePage = 1
this.getTable(n)
}
})
setTimeout(() => { setTimeout(() => {
this.importTypeList = res this.importTypeList = res
},500) },500)
@ -407,6 +419,7 @@ export default {
this.$get(`${this.api.staticPreview}?tableName=${this.tableName}`).then(res => { this.$get(`${this.api.staticPreview}?tableName=${this.tableName}`).then(res => {
let comment = res.comment let comment = res.comment
let fieldHead = [] let fieldHead = []
// id
comment.map(n => { comment.map(n => {
n.field != 'id' && n.field != 'operation_time' && fieldHead.push(n) n.field != 'id' && n.field != 'operation_time' && fieldHead.push(n)
}) })
@ -415,6 +428,7 @@ export default {
let data = res.data let data = res.data
data.map(n => { data.map(n => {
for(let i in n){ for(let i in n){
// +0000,,
if(typeof n[i] == 'string' && n[i].endsWith('+0000')) n[i] = this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n[i])) if(typeof n[i] == 'string' && n[i].endsWith('+0000')) n[i] = this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n[i]))
} }
}) })
@ -423,42 +437,51 @@ export default {
this.importVisible = true this.importVisible = true
}, },
importTypeClick(data){ importTypeClick(data){
// ,,
if(data.name){ if(data.name){
this.tableName = data.name this.tableName = data.name
this.curId = data.id this.curId = data.id
this.getFields() this.getFields()
} }
}, },
//
importTypeExpand(obj,node,com){ importTypeExpand(obj,node,com){
this.curExpand = obj.id this.curExpand = obj.id
this.$refs.typeTree.setCheckedKeys(this.defaultTypeChecked) this.renderChecked()
}, },
closeImport(){ closeImport(){
this.$refs.typeTree.setCheckedKeys([]) this.$refs.typeTree.setCheckedKeys([])
this.names = [] this.names = []
this.showNames = [] this.showNames = []
}, },
// namesshowNames,
getNames(){ getNames(){
//
let list = this.$refs.typeTree.getCheckedNodes() let list = this.$refs.typeTree.getCheckedNodes()
return new Promise((resolve,reject) => { return new Promise((resolve,reject) => {
let getLen = 0 let getLen = 0
list.map(n => { list.map(n => {
// tableLen
if(n.tableLen && n.tableLen > n.children.length) getLen++ if(n.tableLen && n.tableLen > n.children.length) getLen++
}) })
list.map((n,i) => { list.map((n,i) => {
if(n.tableLen && n.tableLen > n.children.length){ if(n.tableLen && n.tableLen > n.children.length){
// pageSize10000,,
this.$post(`${this.api.originalListById}?categoryId=${n.realId}&pageNum=1&pageSize=10000`).then(res => { this.$post(`${this.api.originalListById}?categoryId=${n.realId}&pageNum=1&pageSize=10000`).then(res => {
let tableList = res.list.records let tableList = res.list.records
// 1,-1
getLen-- getLen--
tableList.map(n => { tableList.map(n => {
// ,
if(!this.defaultTypeChecked.includes(String(n.id))){ if(!this.defaultTypeChecked.includes(String(n.id))){
this.names.push(n.name) this.names.push(n.name)
this.showNames.push(n.showName) this.showNames.push(n.showName)
} }
}) })
// 0,resolve
if(!getLen) resolve() if(!getLen) resolve()
}).catch(res => {}) }).catch(res => {})
}else if(n.name && !n.disabled && !this.names.includes(n.name)){ }else if(n.name && !n.disabled && !this.names.includes(n.name)){ // ,,,
this.names.push(n.name) this.names.push(n.name)
this.showNames.push(n.showName) this.showNames.push(n.showName)
if(!getLen) resolve() if(!getLen) resolve()
@ -468,6 +491,7 @@ export default {
}, },
confirmImport(){ confirmImport(){
if(this.submited) return false if(this.submited) return false
//
if(!this.$refs.typeTree.getCheckedNodes().length) return this.$message.warning('请选择数据') if(!this.$refs.typeTree.getCheckedNodes().length) return this.$message.warning('请选择数据')
this.getNames().then(() => { this.getNames().then(() => {
let names = Array.from(new Set(this.names)) let names = Array.from(new Set(this.names))

@ -59,19 +59,19 @@ export default {
methods: { methods: {
getData(){ getData(){
this.$post(this.api.getTableByClassification).then(res => { this.$post(this.api.getTableByClassification).then(res => {
res.map(n => { function handleId(data){
n.id = String(n.id) data.map(n => {
n.label = n.categoryName
n.children.map(n => {
n.id = String(n.id) n.id = String(n.id)
n.label = n.categoryName n.label = n.categoryName
n.children.map(n => { if(n.children.length){
n.id = String(n.id) handleId(n.children)
n.label = n.categoryName }
})
}) })
}) }
handleId(res)
this.typeList = res this.typeList = res
// id
if(res[0].children.length){ if(res[0].children.length){
let item = res[0].children[0] let item = res[0].children[0]
this.categoryId = item.id this.categoryId = item.id

@ -208,7 +208,6 @@ export default {
pageSizeConfig: 10, pageSizeConfig: 10,
totalConfig: 0, totalConfig: 0,
listConfigData: [], listConfigData: [],
listConfigAll: [],
previewVisible: false, previewVisible: false,
previewHead: [], previewHead: [],
previewData: [], previewData: [],
@ -267,6 +266,7 @@ export default {
n.label = n.showName n.label = n.showName
n.id = String(n.id) n.id = String(n.id)
}) })
// ,
if(isConcat){ if(isConcat){
n.children = n.children.concat(list) n.children = n.children.concat(list)
}else{ }else{
@ -276,54 +276,49 @@ export default {
n.typePage++ n.typePage++
}).catch(res => {}) }).catch(res => {})
}, },
//
getType(){ getType(){
this.productVisible = true this.productVisible = true
this.$post(this.api.getTableByClassification).then(res => { this.$post(this.api.getTableByClassification).then(res => {
res.map(n => { const that = this
n.originId = n.id function handleId(data){
n.id = String(++this.typeIndex) data.map(n => {
n.label = n.categoryName
n.children.map(n => {
n.originId = n.id n.originId = n.id
n.id = String(++this.typeIndex) n.id = String(++that.typeIndex)
n.label = n.categoryName n.label = n.categoryName
n.children.map(n => { if(n.children.length){
n.originId = n.id handleId(n.children)
n.id = String(++this.typeIndex) }
n.label = n.categoryName
n.isThird = true
})
}) })
}) }
res.map((n,i) => { handleId(res)
if(n.children.length){
n.children.map(n => { //
if(n.children.length){ function getTable(data){
n.children.map(n => { data.map(n => {
n.typePage = 1 if(n.children.length){
this.getTable(n) getTable(n.children)
}) }else{
}else{ n.typePage = 1
n.typePage = 1 that.getTable(n)
this.getTable(n) }
} })
}) }
}else{ getTable(res)
n.typePage = 1
this.getTable(n)
}
})
setTimeout(() => { setTimeout(() => {
this.typeList = res this.typeList = res
},500) },500)
this.importVisible = true this.importVisible = true
}).catch(res => {}) }).catch(res => {})
}, },
//
handleType(data,typeList){ handleType(data,typeList){
let result = data let result = data
if(typeList.length){ if(typeList.length){
typeList.map(e => { typeList.map(e => {
if(result.includes(e.id) && e.children.length){ if(result.includes(e.id) && e.children.length){
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id),1) e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id),1)
} }
e.children.length && this.handleType(data,e.children) e.children.length && this.handleType(data,e.children)
@ -331,9 +326,11 @@ export default {
} }
return result return result
}, },
//
typeExpand(obj,node,com){ typeExpand(obj,node,com){
this.curExpand = obj.id this.curExpand = obj.id
}, },
// ,
getMoreTable(list,id){ getMoreTable(list,id){
list.map(n => { list.map(n => {
if(n.id == id){ if(n.id == id){
@ -343,33 +340,30 @@ export default {
} }
}) })
}, },
// ,dom,
loadType(e){ loadType(e){
clearTimeout(this.typeTimer) clearTimeout(this.typeTimer)
let typeTree = this.$refs.typeWrap let typeTree = this.$refs.typeWrap
this.typeTimer = setTimeout(() => { this.typeTimer = setTimeout(() => {
this.typeScrollTop = typeTree.scrollTop - this.typeScrollTop this.typeScrollTop = typeTree.scrollTop - this.typeScrollTop
// ,
if(this.typeScrollTop > 0 && typeTree.clientHeight + typeTree.scrollTop == typeTree.scrollHeight){ if(this.typeScrollTop > 0 && typeTree.clientHeight + typeTree.scrollTop == typeTree.scrollHeight){
let curExpand = this.curExpand let curExpand = this.curExpand
// ,,curExpand,
if(!curExpand){ if(!curExpand){
let id = this.checkedIds[0] let id = this.checkedIds[0]
let list = this.typeList let list = this.typeList
list.map(n => {
if(n.id == id){ function handleId(data,parentId){
curExpand = n.id data.map(n => {
}else if(n.children && n.children.length){ if(n.id == id){
n.children.map(e => { curExpand = parentId ? parentId : n.id
if(e.id == id){ }else if(n.children && n.children.length){
curExpand = n.id handleId(n.children,n.id)
}else if(e.children && e.children.length){ }
e.children.map(j => { })
if(j.id == id){ }
curExpand = e.id handleId(list)
}
})
}
})
}
})
} }
this.getMoreTable(this.typeList,curExpand) this.getMoreTable(this.typeList,curExpand)
setTimeout(() => { setTimeout(() => {
@ -465,24 +459,30 @@ export default {
this.typeList = [] this.typeList = []
this.tableId = [] this.tableId = []
}, },
// tableId,
getIds(){ getIds(){
//
let list = this.$refs.type.getCheckedNodes() let list = this.$refs.type.getCheckedNodes()
return new Promise((resolve,reject) => { return new Promise((resolve,reject) => {
let getLen = 0 let getLen = 0
list.map(n => { list.map(n => {
// tableLen
if(n.tableLen && n.tableLen > n.children.length) getLen++ if(n.tableLen && n.tableLen > n.children.length) getLen++
}) })
list.map((n,i) => { list.map((n,i) => {
if(n.tableLen && n.tableLen > n.children.length){ if(n.tableLen && n.tableLen > n.children.length){
// pageSize10000,,
this.$post(`${this.api.getIdQueryTable}?categoryId=${n.originId}&showName=&pageNum=1&pageSize=10000&updateTime=`).then(res => { this.$post(`${this.api.getIdQueryTable}?categoryId=${n.originId}&showName=&pageNum=1&pageSize=10000&updateTime=`).then(res => {
let tableList = res.pageList.records let tableList = res.pageList.records
tableList.map(n => { tableList.map(n => {
this.tableId.push(String(n.id)) this.tableId.push(String(n.id))
}) })
// 1,-1
getLen-- getLen--
// 0,resolve
if(!getLen) resolve() if(!getLen) resolve()
}).catch(res => {}) }).catch(res => {})
}else if(n.name && !this.tableId.includes(n.id)){ }else if(n.name && !this.tableId.includes(n.id)){ // ,,
this.tableId.push(n.id) this.tableId.push(n.id)
if(!getLen) resolve() if(!getLen) resolve()
} }
@ -552,23 +552,22 @@ export default {
this.getConfigTable() this.getConfigTable()
}, },
closeConfig(){ closeConfig(){
//
this.$refs.typeConfig.setCheckedNodes([]) this.$refs.typeConfig.setCheckedNodes([])
}, },
//
getConfigType(){ getConfigType(){
this.$post(this.api.getTableByClassification).then(res => { this.$post(this.api.getTableByClassification).then(res => {
res.map(n => { function handleId(data){
n.id = String(n.id) data.map(n => {
n.label = n.categoryName
n.children.map(n => {
n.id = String(n.id) n.id = String(n.id)
n.label = n.categoryName n.label = n.categoryName
n.children.map(n => { if(n.children.length){
n.id = String(n.id) handleId(n.children)
n.label = n.categoryName }
n.isThird = true
})
}) })
}) }
handleId(res)
this.typeConfigList = res this.typeConfigList = res
if(res[0].children.length){ if(res[0].children.length){
this.categoryId = res[0].children[0].id this.categoryId = res[0].children[0].id
@ -578,29 +577,25 @@ export default {
this.getConfigTable() this.getConfigTable()
}).catch(res => {}) }).catch(res => {})
}, },
//
getConfigTable(){ getConfigTable(){
this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keywordConfig}&pageNum=${this.pageConfig}&pageSize=${this.pageSizeConfig}&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res => { this.$post(`${this.api.getIdQueryTable}?categoryId=${this.categoryId}&showName=${this.keywordConfig}&pageNum=${this.pageConfig}&pageSize=${this.pageSizeConfig}&updateTime=${this.updateTime ? this.updateTime : ''}`).then(res => {
let list = res.pageList.records let list = res.pageList.records
list.map(n => { list.map(n => {
//
n.updateTime = n.updateTime ? this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n.updateTime)) : '' n.updateTime = n.updateTime ? this.formatDate('yyyy-MM-dd hh:mm:ss',new Date(n.updateTime)) : ''
}) })
this.listConfigAll = list this.listConfigData = list
this.totalConfig = list.length this.totalConfig = res.pageList.total
this.handlePage()
}).catch(res => {}) }).catch(res => {})
}, },
handlePage(){
let list = this.listConfigAll
let result = list.slice((this.pageConfig - 1) * this.pageSize,this.pageConfig * this.pageSizeConfig)
this.listConfigData = result
},
initConfigData(){ initConfigData(){
this.pageConfig = 1 this.pageConfig = 1
this.getConfigTable() this.getConfigTable()
}, },
handleCurrentConfigChange(){ handleCurrentConfigChange(val){
this.pageConfig = val this.pageConfig = val
this.handlePage() this.getConfigTable()
}, },
previewConfig(row){ previewConfig(row){
this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => { this.$get(`${this.api.previewData}?tableName=${row.name}&tableId=${row.id}`).then(res => {
@ -621,6 +616,7 @@ export default {
this.previewVisible = true this.previewVisible = true
}).catch(res => {}) }).catch(res => {})
}, },
// id
getTableId(list){ getTableId(list){
let checked = this.configChecked let checked = this.configChecked
list.map(n => { list.map(n => {

@ -181,13 +181,13 @@
<el-table :data="dataPlatform" class="orderTable" stripe header-align="center" :summary-method="getSummaries"> <el-table :data="dataPlatform" class="orderTable" stripe header-align="center" :summary-method="getSummaries">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"> <el-table-column prop="productName" label="产品名称" align="center" width="200">
</el-table-column> </el-table-column>
<el-table-column label="使用期限" align="center" width="200"> <el-table-column label="使用期限" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="course-input"> <div class="course-input">
<el-input onkeyup="value=this.value.replace(/\D+/g,'')" :class="!scope.row.periodOfUse&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" maxlength="4" @change="deadLine($event,scope.row),zero($event,scope.row)" oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.periodOfUse" placeholder="输入时间"></el-input> <el-input onkeyup="value=this.value.replace(/\D+/g,'')" :class="!scope.row.periodOfUse&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" maxlength="4" @change="deadLine($event,scope.row),zero($event,scope.row)" oninput="value=value.replace(/[^0-9.]/g,'')" v-model="scope.row.periodOfUse" placeholder="输入时间"></el-input>
<span></span> <span ></span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -199,38 +199,39 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="剩余期限" align="center" width="160px"> <el-table-column label="剩余期限" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.remainingPeriod" placeholder="请输入"type="text"></el-input> <el-input disabled v-model="scope.row.remainingPeriod" placeholder="请输入"type="text"></el-input>
<span></span> <span style="margin-left:5px"></span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="市场价" align="center" width="185"> <el-table-column label="市场价" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input disabled v-model="scope.row.marketValue" placeholder="请输入"type="text"></el-input> <el-input disabled v-model="scope.row.marketValue" placeholder="请输入"type="text"></el-input>
<span>&nbsp;/&nbsp;</span> <span style="margin-left:5px">&nbsp;/&nbsp;</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成交价" align="center" width="185"> <el-table-column label="成交价" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input> <el-input :class="!scope.row.finalPrice&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" @change="[dealComputers($event,scope.row),calculateDiscount($event,scope.row),userAmount($event,scope.row)]" v-model="scope.row.finalPrice" placeholder="请输入"type="text"></el-input>
<span>&nbsp;/&nbsp; </span> <span style="margin-left:5px">&nbsp;/&nbsp; </span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣率" align="center" width="140"> <el-table-column label="折扣率" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="discountRate"> <!-- <div class="discountRate"> -->
<div class="small">
<el-input disabled v-model="scope.row.discountRate" placeholder=""type="text"></el-input> <el-input disabled v-model="scope.row.discountRate" placeholder=""type="text"></el-input>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="账号数" align="center" width="150"> <el-table-column label="账号数" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @change="[dealComputers($event,scope.row),dealBargain($event,scope.row),calculateDiscount($event,scope.row)]" v-model="scope.row.accountNum" placeholder="请输入"type="text"></el-input> <el-input :class="!scope.row.accountNum&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @change="[dealComputers($event,scope.row),dealBargain($event,scope.row),calculateDiscount($event,scope.row)]" v-model="scope.row.accountNum" placeholder="请输入"type="text"></el-input>
@ -238,7 +239,7 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 --> <!-- 金额自动计算计算方式账号数*成交价且可以手动修改保留两位小数 -->
<el-table-column label="总金额(元)" align="center" width="180"> <el-table-column label="总金额(元)" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="small"> <div class="small">
<el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @blur="[allAmount($event,scope.row),allAmountChange($event,scope.row),calculateDiscount($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input> <el-input :class="!scope.row.totalAmount&&whetherSubmit?'red':''" :disabled="disabled||editDisabled" @blur="[allAmount($event,scope.row),allAmountChange($event,scope.row),calculateDiscount($event,scope.row)]" oninput="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" v-model="scope.row.totalAmount" placeholder="请输入"type="text"></el-input>
@ -394,7 +395,7 @@
</el-dialog> </el-dialog>
<!-- 添加数据平台权限弹框 --> <!-- 添加数据平台权限弹框 -->
<el-dialog :visible.sync="showPlatform" width="50%" center> <el-dialog :visible.sync="showPlatform" width="50%" center >
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
@ -404,7 +405,7 @@
<el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="productName" @keyup.enter.native="addDataJurisdiction('search')" clearable></el-input> <el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="productName" @keyup.enter.native="addDataJurisdiction('search')" clearable></el-input>
</div> </div>
</div> </div>
<el-table :data="boxDataPlatform" stripe header-align="center" @selection-change="boxDataPlatformSelection" :row-key="getRowKeys"> <el-table v-loading="dataLoading" :data="boxDataPlatform" stripe header-align="center" @selection-change="boxDataPlatformSelection" :row-key="getRowKeys">
<el-table-column type="selection" :selectable="selectable" width="55" align="center"></el-table-column> <el-table-column type="selection" :selectable="selectable" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column> <el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
@ -497,6 +498,7 @@ export default {
disabled:false,// disabled:false,//
editDisabled:false,// editDisabled:false,//
renewDisabled:false,// renewDisabled:false,//
dataLoading:false,//
whetherSubmit:false,/* 提交否 */ whetherSubmit:false,/* 提交否 */
@ -515,7 +517,7 @@ export default {
customerName:'',// customerName:'',//
}, },
jurisdictionData: [],// jurisdictionData: [],//
dataPlatform:[],// data dataPlatform:[{}],// data
contract:{ // contract:{ //
contractName:'', // contractName:'', //
@ -861,10 +863,14 @@ export default {
status:1, status:1,
productName:this.productName productName:this.productName
} }
this.dataLoading = true
this.$post(this.api.listByEntity,param).then(res=>{ this.$post(this.api.listByEntity,param).then(res=>{
this.boxDataPlatform = res.pageList.records this.boxDataPlatform = res.pageList.records
this.platfromTotals = res.pageList.total this.platfromTotals = res.pageList.total
this.dataLoading = false
}).catch(err=>{ }).catch(err=>{
this.dataLoading = false
}) })
}, },

Loading…
Cancel
Save