This commit is contained in:
xiaofajia 2024-11-21 15:20:03 +08:00
commit 406ab65a4f
20 changed files with 1544 additions and 609 deletions

View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 分页查询节点提成
export function getRoyaltyList(params) {
return request({
url: '/system/info/getRoyaltyList',
method: 'get',
params: params
})
}
// 分页查询节点提成总和
export function getRoyaltySum(params) {
return request({
url: '/system/info/getRoyaltySum',
method: 'get',
params: params
})
}

View File

@ -18,6 +18,15 @@ export function updateDlInspectionProject(data) {
}) })
} }
// 更新检测项目排序
export function updateSort(data) {
return request({
url: '/inspection/dl-inspection-project/updateSort',
method: 'put',
data: data
})
}
// 删除检测项目 // 删除检测项目
export function deleteDlInspectionProject(id) { export function deleteDlInspectionProject(id) {
return request({ return request({
@ -61,3 +70,15 @@ export function getRole(params) {
}, },
}) })
} }
// 获取商品 Excel
export function getGoods(params) {
return request({
url: 'system/inspectionGoods/listPartnerGoods',
method: 'get',
params: {
pageNum: 1,
pageSize: 10000
},
})
}

View File

@ -52,7 +52,7 @@ export default {
if (isExternal(item)) { if (isExternal(item)) {
return srcList.push(item); return srcList.push(item);
} }
return srcList.push(process.env.VUE_APP_BASE_API + item); return srcList.push(process.env.VUE_APP_IMAGE_URL + item);
}); });
return srcList; return srcList;
}, },

View File

@ -0,0 +1,414 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="员工名称" prop="dealUserName">
<el-input
v-model="queryParams.dealUserName"
placeholder="请输入员工名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="月份" prop="rescueStartMonth">
<el-date-picker
v-model="queryParams.rescueStartMonth"
value-format="yyyy-MM"
type="month"
placeholder="选择月份"
>
</el-date-picker>
</el-form-item>
<el-form-item label="检测时间" prop="maintenanceTime">
<el-date-picker
v-model="time1"
type="daterange"
value-format="yyyy-MM-dd"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- :loading="exportLoading"-->
<!-- >导出-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
<div style="display: flex;justify-content:right;font-weight: bold;font-size: 16px">
<!-- <span>-->
<!-- 施救总金额{{ moneyManagementData.allMoney }} -->
<!-- </span>-->
<!-- <span style="margin-left: 3%">-->
<!-- 出车次数{{ moneyManagementData.allNum }} -->
<!-- </span>-->
<!-- <span style="margin-left: 3%">-->
<!-- 提成总金额{{ moneyManagementData.tcAll }} -->
<!-- </span>-->
<span style="margin-left: 3%">
提成总金额{{ moneyManagementData.royaltyAmountSum }}
</span>
</div>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<!-- <el-table-column label="序号" align="center">-->
<!-- <template scope="scope">-->
<!-- <span>{{ scope.$index + 1 }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="员工" align="center" prop="handlerName" />
<el-table-column label="提成" align="center" prop="royaltyAmount" />
<el-table-column label="项目完成时间" align="center" prop="node_create_time" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.node_create_time, '{y}-{m}-{d} {h}:{m}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { moneyManagement, moneyManagementData, exportManagement } from '@/api/rescue/info'
import { getmap } from '@/api/Map/map'
import {getRoyaltyList, getRoyaltySum} from "@/api/inspection/cw";
// import Map from '../../components/Map/index'
export default {
name: 'Info',
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no', 'jy_status', 'jy_order_status'],
data() {
return {
//
exportLoading: false,
pickerOptions: null,
chooseDriverId: '',
rescueInfoId: '',
//
loading: true,
ztlist: [],
//
ids: [],
time1: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
infoList: [],
//
title: '',
//
open: false,
opens: false,
designateFlag: false,
zong: '',
repaymentForm: {},
repaymentOpen: false,
moneyManagementData: {},
//
queryParams: {
pageNo: 1,
pageSize: 10,
connectionName: null,
isAppointment: null,
rescueType: null,
feeType: null,
carBrand: null,
destinationInfo: null,
rescueStatus: null,
rescueAmount: null,
rescueStart: null
},
//
form: {},
driverList: [],
//
rules: {
connectionName: [
{ required: true, message: '联系人名称不能为空', trigger: 'blur' }
],
connectionPhone: [
{ required: true, message: '联系人手机号不能为空', trigger: 'blur' }
],
licenseNum: [
{ required: true, message: '车牌号不能为空', trigger: 'blur' }
],
isAppointment: [
{ required: true, message: '是否为预约单不能为空', trigger: 'change' }
],
rescueType: [
{ required: true, message: '救援类型 1拖车2送油3搭电4换台5扣车不能为空', trigger: 'change' }
],
carType: [
{ required: true, message: '车辆类型 大中小不能为空', trigger: 'change' }
],
rescuePosition: [
{ required: true, message: '救援地点 详细描述不能为空', trigger: 'blur' }
],
feeType: [
{ required: true, message: '收费类型不能为空', trigger: 'change' }
]
}
}
},
components: {
Map
},
created() {
this.getList()
},
methods: {
cancelRepayment() {
this.repaymentForm = {}
this.repaymentOpen = false
},
repaymentSubmit() {
this.$refs['repaymentForm'].validate(valid => {
if (valid) {
returnOrder(this.repaymentForm).then(res => {
this.$modal.msgSuccess('还款成功')
this.repaymentOpen = false
this.repaymentForm = {}
this.getList()
})
}
})
},
repayment(data) {
this.repaymentOpen = true
this.repaymentForm.rescueOrderId = data.rescueOrderId
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
driverOk() {
this.designateFlag = false
designateDriver(this.rescueInfoId, this.chooseDriverId).then(res => {
this.$message.success('指派成功')
this.getList()
})
},
/** 查询道路救援模块列表 */
getList() {
this.loading = true
getRoyaltyList(this.queryParams).then(response => {
console.log("响应",response)
this.infoList = response.data.records
this.total = response.data.total
this.loading = false
})
getRoyaltySum(this.queryParams).then(response => {
this.moneyManagementData = response.data
})
},
getDriverList() {
getDriver().then(response => {
this.driverList = response.rows
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
connectionName: null,
connectionPhone: null,
licenseNum: null,
isAppointment: null,
rescueTime: null,
rescueType: null,
carType: null,
rescuePosition: null,
rescueLongitude: null,
rescueLatitude: null,
feeType: null,
carBrand: null,
destinationInfo: null,
destinationLongitude: null,
destinationLatitude: null,
rescueStatus: null,
driverId: null,
rescueAmount: null,
createTime: null,
createBy: null,
updateTime: null,
updateBy: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
if (this.time1 && this.time1.length > 0) {
this.queryParams.rescueStart = this.time1[0]
this.queryParams.rescueEnd = this.time1[1]
}
this.queryParams.pageNo = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.time1 = []
this.resetForm('queryForm')
this.queryParams = {}
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加道路救援模块'
},
pickDriver(row) {
},
designateDriver(row) {
this.designateFlag = true
this.rescueInfoId = row.id
this.getDriverList()
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data
this.open = true
this.title = '修改道路救援模块'
})
},
handleMap(row) {
this.rescueInfoId = row.id
routeInfo(row.id).then(res => {
this.ztlist = res.data
this.none(res.data)
})
getmap(row.id).then(res => {
let datas = []
res.data.forEach(it => {
let temp = [it.longitude, it.latitude]
datas.push(temp)
})
this.$refs.mapComponent.initMap(datas)
})
this.opens = true
},
none(arr) {
let sum = 0
for (var i = 0; i < arr.length; i++) {
sum += arr[i].distanceMeter
}
this.zong = sum
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInfo(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addInfo(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认删除道路救援模块编号为"' + ids + '"的数据项?').then(function() {
return delInfo(ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
async handleExport() {
try {
this.exportLoading = true
this.queryParams.pageNo = 1
this.queryParams.pageSize = 500
this.$modal.msgError("系统故障,联系管理员")
const data = await exportManagement(this.queryParams)
// this.$download.excel(data, `_${new Date().getTime()}.xlsx`)
} catch {
} finally {
this.exportLoading = false
}
}
}
}
</script>
<style scoped>
.lang-for {
width: 100%;
margin: 10px auto;
}
</style>

View File

@ -231,7 +231,7 @@
getList() { getList() {
this.loading = true; this.loading = true;
listNews(this.queryParams).then(response => { listNews(this.queryParams).then(response => {
this.newsList = response.rows; this.newsList = response.data.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -233,7 +233,7 @@
this.loading = true; this.loading = true;
this.queryParams.allPlatform = '1' this.queryParams.allPlatform = '1'
listCouponTemplate(this.queryParams).then(response => { listCouponTemplate(this.queryParams).then(response => {
this.couponTemplateList = response.rows; this.couponTemplateList = response.data.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -258,6 +258,7 @@
}, },
shopconfigList: [], shopconfigList: [],
shopConfig: {}, shopConfig: {},
baseImageUrl: process.env.VUE_APP_FILE_API,
// //
loading: true, loading: true,
// //
@ -429,7 +430,7 @@
this.dialogTableVisibles = true this.dialogTableVisibles = true
pinglun(data).then(res=>{ pinglun(data).then(res=>{
console.log(res) console.log(res)
this.pinglunlist = res.rows this.pinglunlist = res.data.records
this.pltotal = res.total this.pltotal = res.total
}) })
}, },
@ -444,7 +445,7 @@
this.dialogTableVisibles = true this.dialogTableVisibles = true
pinglun(data).then(res=>{ pinglun(data).then(res=>{
console.log(res) console.log(res)
this.pinglunlist = res.rows this.pinglunlist = res.data.records
this.pltotal = res.total this.pltotal = res.total
}) })
}, },
@ -469,13 +470,13 @@
this.loading = true; this.loading = true;
listMallPartners(this.queryParams).then(response => { listMallPartners(this.queryParams).then(response => {
this.mallPartnersList = response.rows; this.mallPartnersList = response.data.records;
console.log('查询合作商管理列表 ',this.mallPartnersList) console.log('查询合作商管理列表 ',this.mallPartnersList)
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
listCategory(this.queryParamss).then(responses => { listCategory(this.queryParamss).then(responses => {
this.options = responses.rows; this.options = responses.data.records;
}); });
}, },

View File

@ -183,7 +183,7 @@
getList() { getList() {
this.loading = true; this.loading = true;
listDetail(this.queryParams).then(response => { listDetail(this.queryParams).then(response => {
this.detailList = response.rows; this.detailList = response.data.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -198,7 +198,7 @@
getList() { getList() {
this.loading = true; this.loading = true;
listInfo(this.queryParams).then(response => { listInfo(this.queryParams).then(response => {
this.infoList = response.rows; this.infoList = response.data.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -134,7 +134,7 @@
getList() { getList() {
this.loading = true; this.loading = true;
listFzRecord(this.queryParams).then(response => { listFzRecord(this.queryParams).then(response => {
this.fzRecordList = response.rows; this.fzRecordList = response.data.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -122,11 +122,11 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="不参与/参与" align="center" prop="isAttend">--> <el-table-column label="不参与/参与" align="center" prop="isAttend">
<!-- <template slot-scope="scope">--> <template slot-scope="scope">
<!-- <dict-tag :options="dict.type.yes_no" :value="scope.row.isAttend"/>--> <dict-tag :options="dict.type.yes_no" :value="scope.row.isAttend"/>
<!-- </template>--> </template>
<!-- </el-table-column>--> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -182,7 +182,7 @@
@pagination="getList" @pagination="getList"
/> />
<!-- -->
<el-dialog title="审核" :visible.sync="dialogFormVisible"> <el-dialog title="审核" :visible.sync="dialogFormVisible">
<el-form :model="froms"> <el-form :model="froms">
@ -293,6 +293,7 @@
resource: '', resource: '',
desc: '' desc: ''
}, },
baseImageUrl:'https://www.nuoyunr.com/minio',
formLabelWidth: '120px', formLabelWidth: '120px',
sxjarr:[ sxjarr:[
{ {
@ -429,13 +430,13 @@
getList() { getList() {
this.loading = true; this.loading = true;
listInspectionGoods(this.queryParams).then(response => { listInspectionGoods(this.queryParams).then(response => {
this.inspectionGoodsList = response.rows; this.inspectionGoodsList = response.data.records;
this.inspectionGoodsList.price=this.inspectionGoodsList.price / 100 this.inspectionGoodsList.price=this.inspectionGoodsList.price / 100
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
listMallPartners(this.hzsarr).then(response => { listMallPartners(this.hzsarr).then(response => {
this.mallPartnersList = response.rows; this.mallPartnersList = response.data.records;
console.log('查询合作商管理列表 ',this.mallPartnersList) console.log('查询合作商管理列表 ',this.mallPartnersList)
}); });
listCategory(this.flarr).then(response => { listCategory(this.flarr).then(response => {

View File

@ -19,6 +19,20 @@
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注"/> <el-input v-model="formData.remark" placeholder="请输入备注"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="排序" prop="remark">-->
<!-- <el-input v-model="formData.sort" placeholder="请输入排序"/>-->
<!-- </el-form-item>-->
<el-form-item label="提成价格">
<el-table :data="tableData" style="width: 100%" height="250">
<el-table-column fixed prop="title" label="商品名称">
</el-table-column>
<el-table-column label="提成价格">
<template #default="scope">
<el-input v-model="scope.row.royaltyAmount" placeholder="输入价格"></el-input>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button> <el-button type="primary" @click="submitForm" :disabled="formLoading"> </el-button>
@ -30,11 +44,12 @@
<script> <script>
import * as DlInspectionProjectApi from '@/api/inspection/project'; import * as DlInspectionProjectApi from '@/api/inspection/project';
import {getRole} from "@/api/inspection/project"; import {getGoods, getRole} from "@/api/inspection/project";
import ElementBaseInfo from "@/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue";
export default { export default {
name: "DlInspectionProjectForm", name: "DlInspectionProjectForm",
components: {}, components: {ElementBaseInfo},
data() { data() {
return { return {
// //
@ -59,12 +74,14 @@ export default {
] ]
}, },
roleList: [], roleList: [],
tableData: []
}; };
}, },
methods: { methods: {
/** 打开弹窗 */ /** 打开弹窗 */
async open(id) { async open(id) {
this.getRole() this.getRole()
this.dialogVisible = true; this.dialogVisible = true;
this.reset(); this.reset();
// //
@ -73,10 +90,16 @@ export default {
try { try {
const res = await DlInspectionProjectApi.getDlInspectionProject(id); const res = await DlInspectionProjectApi.getDlInspectionProject(id);
this.formData = res.data; this.formData = res.data;
if (res.data.projectRoyaltyList.length > 0){
this.tableData = res.data.projectRoyaltyList
console.log('tableData', this.tableData)
}
this.title = "修改检测项目"; this.title = "修改检测项目";
} finally { } finally {
this.formLoading = false; this.formLoading = false;
} }
}else {
this.getGoods()
} }
this.title = "新增检测项目"; this.title = "新增检测项目";
}, },
@ -87,14 +110,28 @@ export default {
this.formLoading = true; this.formLoading = true;
try { try {
const data = this.formData; const data = this.formData;
this.tableData.map(item => {
item.goodsId = item.id
/*如果royaltyAmount 为空则设置为0*/
if (!item.royaltyAmount) {
item.royaltyAmount = 0
}else {
/*将royaltyAmount的单位转为分*/
item.royaltyAmount = item.royaltyAmount * 100
}
delete item.id
})
data.projectRoyaltyList = this.tableData
// //
if (data.id) { if (data.id) {
console.log('商品及提成', this.tableData)
await DlInspectionProjectApi.updateDlInspectionProject(data); await DlInspectionProjectApi.updateDlInspectionProject(data);
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.dialogVisible = false; this.dialogVisible = false;
this.$emit('success'); this.$emit('success');
return; return;
} }
console.log('商品及提成', this.tableData)
// //
await DlInspectionProjectApi.createDlInspectionProject(data); await DlInspectionProjectApi.createDlInspectionProject(data);
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
@ -116,9 +153,13 @@ export default {
/** 获取角色下拉框数据 */ /** 获取角色下拉框数据 */
async getRole() { async getRole() {
const res = await getRole(); const res = await getRole();
console.log("角色的集合", res.data)
this.roleList = res.data this.roleList = res.data
}, },
/** 获取角色下拉框数据 */
async getGoods() {
const res = await getGoods();
this.tableData = res.data.records
},
} }
}; };
</script> </script>

View File

@ -16,12 +16,12 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="创建时间" prop="createTime">--> <!-- <el-form-item label="创建时间" prop="createTime">-->
<!-- <el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"--> <!-- <el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- type="daterange"--> <!-- type="daterange"-->
<!-- range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"--> <!-- range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"-->
<!-- :default-time="['00:00:00', '23:59:59']"/>--> <!-- :default-time="['00:00:00', '23:59:59']"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
@ -32,7 +32,7 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
v-hasPermi="['inspection:dl-inspection-project:create']">新增 >新增
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
@ -50,6 +50,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="remark"/> <el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="排序" align="center" prop="sort">
<template slot-scope="scope">
<el-input
v-model="scope.row.sort"
type="number"
style="width: 80px"
@blur="handleSortChange(scope.row)"
/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
@ -58,10 +69,10 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)" <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
v-hasPermi="['inspection:dl-inspection-project:update']">修改 >修改
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['inspection:dl-inspection-project:delete']">删除 >删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -77,7 +88,7 @@
<script> <script>
import * as DlInspectionProjectApi from '@/api/inspection/project'; import * as DlInspectionProjectApi from '@/api/inspection/project';
import DlInspectionProjectForm from './DlInspectionProjectForm.vue'; import DlInspectionProjectForm from './DlInspectionProjectForm.vue';
import {getRole} from "@/api/inspection/project"; import {getRole, updateSort} from "@/api/inspection/project";
export default { export default {
name: "DlInspectionProject", name: "DlInspectionProject",
@ -147,7 +158,8 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
async handleDelete(row) { async handleDelete(row) {
const id = row.id; const id = row.id;
await this.$modal.confirm('是否确认删除检测项目编号为"' + id + '"的数据项?') const name = row.projectName;
await this.$modal.confirm('是否确认删除检测项目名称为"' + name + '"的数据项?')
try { try {
await DlInspectionProjectApi.deleteDlInspectionProject(id); await DlInspectionProjectApi.deleteDlInspectionProject(id);
await this.getList(); await this.getList();
@ -176,6 +188,19 @@ export default {
getRoleName(id) { getRoleName(id) {
const role = this.roleList.find(item => item.id === id); const role = this.roleList.find(item => item.id === id);
return role ? role.name : ''; return role ? role.name : '';
},
/** 排序值变化处理函数*/
async handleSortChange(row) {
console.log('本行信息:', row)
//
console.log('排序值变化:', row.sort);
//
let data = {
id: row.id,
sort: row.sort
}
let res = await DlInspectionProjectApi.updateSort(data);
this.getList()
} }
} }
}; };

View File

@ -178,4 +178,11 @@ export function delCustomerSource(id) {
method: 'post' method: 'post'
}) })
} }
export function delCustomerSourceBatch(data) {
return request({
url: '/partnerOwn/partner/delCustomerSourceBatch' ,
method: 'post',
data:data
})
}

View File

@ -136,3 +136,27 @@ export function delWorkInfo(id) {
method: 'post' method: 'post'
}) })
} }
export function detail(params) {
return request({
url: '/partnerOwn/partner/inspectionDetail',
method: 'get',
params: params
})
}
export function getINspectionProject(params) {
return request({
url: '/inspection/dl-inspection-project/page',
method: 'get',
params: {
pageNo:1,
pageSize:10000
}
})
}
export function getWeorkNodesById(params) {
return request({
url: '/system/info/getWeorkNodesById',
method: 'get',
params: params
})
}

View File

@ -25,6 +25,15 @@
@click="handleAdd" @click="handleAdd"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-minus"
size="mini"
@click="handleDelete"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -88,7 +97,7 @@
</template> </template>
<script> <script>
import { getCustomerSource,addCustomerSource,delCustomerSource} from "./api/index"; import {getCustomerSource, addCustomerSource, delCustomerSource, delCustomerSourceBatch} from "./api/index";
import { getData,updateData} from "@/api/system/dict/data"; import { getData,updateData} from "@/api/system/dict/data";
export default { export default {
@ -232,7 +241,7 @@
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictCode) this.ids = selection.map(item => item.id)
this.single = selection.length!=1 this.single = selection.length!=1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -270,9 +279,14 @@
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const dictCodes = row.dictCode || this.ids; let dictCodes = []
if (row.id) {
dictCodes.push(row.id)
} else if (this.ids) {
dictCodes = this.ids
}
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
return delCustomerSource(dictCodes); return delCustomerSourceBatch(dictCodes);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");

View File

@ -238,7 +238,7 @@
this.queryParams.params["endNextCheckTime"] = this.daterangeNextCheckTime[1]; this.queryParams.params["endNextCheckTime"] = this.daterangeNextCheckTime[1];
} }
listEquInfo(this.queryParams).then(response => { listEquInfo(this.queryParams).then(response => {
this.equInfoList = response.rows; this.equInfoList = response.data.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -232,8 +232,8 @@
this.queryParams.params["endWarnTime"] = this.daterangeWarnTime[1]; this.queryParams.params["endWarnTime"] = this.daterangeWarnTime[1];
} }
listInspectionFile(this.queryParams).then(response => { listInspectionFile(this.queryParams).then(response => {
this.inspectionFileList = response.rows; this.inspectionFileList = response.data.records;
this.queryParams.fatherId = response.rows[0].fatherId; this.queryParams.fatherId = response.data.records[0].fatherId;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -249,10 +249,10 @@
downloadFile(item) { downloadFile(item) {
// <a> // <a>
// const link = document.createElement('a'); // const link = document.createElement('a');
// link.href = "https://www.nuoyunr.com/cdJdc"+item.filePath; // let href = "https://www.nuoyunr.com/minio"+item.filePath; //
// var lastIndexOf = item.filePath.lastIndexOf("."); // var lastIndexOf = item.filePath.lastIndexOf(".");
// link.download = item.fileName+item.filePath.substr(lastIndexOf); // // link.download = item.fileName+item.filePath.substr(lastIndexOf); //
window.open(item.filePath); window.open(href);
// // // //
// link.click(); // link.click();
}, },

View File

@ -449,7 +449,8 @@
getList() { getList() {
this.loading = true; this.loading = true;
listInspectionGoods(this.queryParams).then(response => { listInspectionGoods(this.queryParams).then(response => {
this.inspectionGoodsList = response.rows; console.log('resp',response)
this.inspectionGoodsList = response.data.records;
this.inspectionGoodsList.price=this.inspectionGoodsList.price / 100 this.inspectionGoodsList.price=this.inspectionGoodsList.price / 100
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;

File diff suppressed because it is too large Load Diff