parent
a8ce879d9e
commit
1dbc7f2fa2
|
|
@ -22,6 +22,11 @@ export function addWorkFlow(data) {
|
||||||
return postData('workflow/addWorkFlow',data);
|
return postData('workflow/addWorkFlow',data);
|
||||||
}
|
}
|
||||||
// 项目列表维护查询
|
// 项目列表维护查询
|
||||||
export function commonDate(data) {
|
export function commonPost(url,data) {
|
||||||
return postData('project/findProjectList',data);
|
try {
|
||||||
|
return postData(url,data);
|
||||||
|
} catch (error) {
|
||||||
|
return { code:500, message:'接口连接错误' }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { commonDate } from "../../api/api.js"
|
import { commonPost } from "../../api/api.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -119,24 +119,15 @@ export default {
|
||||||
queryFrom: {projectName:'',createdStartDt:'',createdEndDt:''},
|
queryFrom: {projectName:'',createdStartDt:'',createdEndDt:''},
|
||||||
selectShow: false,
|
selectShow: false,
|
||||||
showTime: false,
|
showTime: false,
|
||||||
columns: [['全部', '针灸', '拔火罐']],
|
columns: [],
|
||||||
time: '',
|
time: '',
|
||||||
tableData: [{
|
tableData: []
|
||||||
"sid": 5,
|
|
||||||
"createdBy": "带头大哥",
|
|
||||||
"createdDt": "2024-04-06T11:27:11.000+00:00",
|
|
||||||
"projectName": "针灸1225",
|
|
||||||
"unitPrice": 1750.00,
|
|
||||||
"updateBy": "带头大哥",
|
|
||||||
"updateDt": "2024-04-08 15:06:42",
|
|
||||||
"createdDtFormatted": "2024-04-06 11:27:11"
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
this.queryFunc()
|
this.queryFunc()
|
||||||
const res = await commonDate('project/findProjectNameList',{})
|
const res = await commonPost('project/findProjectNameList',{})
|
||||||
this.columns = res.data
|
this.columns = res.data
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -162,7 +153,7 @@ export default {
|
||||||
},
|
},
|
||||||
async queryFunc() {
|
async queryFunc() {
|
||||||
this.showPop = false
|
this.showPop = false
|
||||||
const res = await commonDate(this.queryFrom)
|
const res = await commonPost(this.queryFrom)
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
this.tableData = res.data
|
this.tableData = res.data
|
||||||
|
|
@ -191,10 +182,13 @@ export default {
|
||||||
this.addAndEditShow = true
|
this.addAndEditShow = true
|
||||||
},
|
},
|
||||||
async delItem(item) {
|
async delItem(item) {
|
||||||
const res = await commonDate('project/delProject',{sid:item.sid})
|
const res = await commonPost('project/delProject',{sid:item.sid})
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
this.queryFunc()
|
this.queryFunc()
|
||||||
}
|
}
|
||||||
|
if(res.code == 500){
|
||||||
|
console.log(res.message)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async commitInfo(){
|
async commitInfo(){
|
||||||
const {projectName,unitPrice,sid} = this.selectRow
|
const {projectName,unitPrice,sid} = this.selectRow
|
||||||
|
|
@ -207,17 +201,23 @@ export default {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(sid){
|
if(sid){
|
||||||
const res = await commonDate('project/editProject',this.selectRow)
|
const res = await commonPost('project/editProject',this.selectRow)
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
this.addAndEditShow = false
|
this.addAndEditShow = false
|
||||||
this.queryFunc()
|
this.queryFunc()
|
||||||
}
|
}
|
||||||
|
if(res.code == 500){
|
||||||
|
console.log(res.message)
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
const res = await commonDate('project/addProject',this.selectRow)
|
const res = await commonPost('project/addProject',this.selectRow)
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
this.addAndEditShow = false
|
this.addAndEditShow = false
|
||||||
this.queryFunc()
|
this.queryFunc()
|
||||||
}
|
}
|
||||||
|
if(res.code == 500){
|
||||||
|
console.log(res.message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue