领料任务详情接口对接 对接
This commit is contained in:
parent
9fa297de47
commit
9d8bd6d94b
|
|
@ -105,6 +105,7 @@ export function getAgreementInfoById(params = {}){
|
|||
})
|
||||
}
|
||||
|
||||
//提交 领料申请
|
||||
export function submitLeaseApply(params = {}){
|
||||
return request({
|
||||
url:'/base/tm_task/submitLeaseApply',
|
||||
|
|
@ -113,6 +114,23 @@ export function submitLeaseApply(params = {}){
|
|||
})
|
||||
}
|
||||
|
||||
// 参数 领料任务
|
||||
export function deleteTask( taskId ){
|
||||
return request({
|
||||
url:`/base/tm_task/${taskId}`,
|
||||
method:'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据 领料任务id 获取详情数据
|
||||
export function getTaskDetail( params = {} ){
|
||||
return request({
|
||||
url: '/base/tm_task/getLeaseListAll',
|
||||
method:'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -143,9 +161,6 @@ export function submitLeaseApply(params = {}){
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -104,14 +104,12 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -171,7 +169,7 @@
|
|||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { getLeaseAuditListAll,getUnitData,getProData } from "@/api/claimAndRefund/receive";
|
||||
import { getLeaseAuditListAll,getUnitData,getProData,deleteTask } from "@/api/claimAndRefund/receive";
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -251,8 +249,6 @@ export default {
|
|||
async getList() {
|
||||
this.loading = true;
|
||||
|
||||
console.log( 'this.queryParams =============',this.queryParams )
|
||||
|
||||
const params = {
|
||||
unitId:this.queryParams.unitId,
|
||||
projectId:this.queryParams.proId,
|
||||
|
|
@ -266,7 +262,6 @@ export default {
|
|||
|
||||
const res = await getLeaseAuditListAll(params)
|
||||
this.loading = false;
|
||||
console.log('res ============',res)
|
||||
this.leaseAuditList = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
|
||||
|
|
@ -336,13 +331,12 @@ export default {
|
|||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const dictId = row.dictId || this.ids
|
||||
getType(dictId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "验收";
|
||||
});
|
||||
this.$router.push({
|
||||
path:'/claimAndRefund/receive/receiveApplyAdd',
|
||||
query:{
|
||||
taskId:row.taskId
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
|
|
@ -365,14 +359,25 @@ export default {
|
|||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除该数据项?').then(function() {
|
||||
return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
async handleDelete(row) {
|
||||
|
||||
this.$confirm('此操作将永久删除该领料任务, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then( async () => {
|
||||
const res = await deleteTask(row.taskId)
|
||||
if(res.code == 200){
|
||||
this.$message({
|
||||
type:'success',
|
||||
message:'删除成功'
|
||||
})
|
||||
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="协议号" prop="agreementCode">
|
||||
<el-input v-model="queryParams.agreementCode" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="物品类型" prop="status">
|
||||
<el-cascader
|
||||
placeholder="请输入物品类型"
|
||||
|
|
@ -98,7 +101,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="queryParams.leaseApplyDetails" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="leaseApplyDetails" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="120" />
|
||||
<el-table-column label="类型名称" prop="typeCn" width="200" :show-overflow-tooltip="true" />
|
||||
|
|
@ -156,12 +159,18 @@
|
|||
<script>
|
||||
import { getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
|
||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
||||
import { getProData, getUnitData,getDeviceTypeTree,getAgreementInfoById,submitLeaseApply } from '@/api/claimAndRefund/receive'
|
||||
import {
|
||||
getProData,
|
||||
getUnitData,
|
||||
getDeviceTypeTree,
|
||||
getAgreementInfoById,
|
||||
submitLeaseApply,
|
||||
getTaskDetail
|
||||
} from '@/api/claimAndRefund/receive'
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "Role",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -225,6 +234,7 @@ export default {
|
|||
unitId:null,
|
||||
proId:null,
|
||||
agreementId:null, //协议id
|
||||
agreementCode: null, //协议code
|
||||
companyId:'', //登录信息中取
|
||||
createBy: '', //用户名
|
||||
taskType: 29,
|
||||
|
|
@ -238,6 +248,8 @@ export default {
|
|||
//领料详情集合
|
||||
leaseApplyDetails:[]
|
||||
},
|
||||
leaseApplyDetails:[],
|
||||
|
||||
|
||||
|
||||
//领料详情单条模板
|
||||
|
|
@ -303,7 +315,10 @@ export default {
|
|||
|
||||
this.GetDeviceTypeTree()
|
||||
// this.getList();
|
||||
|
||||
console.log('this.$route.query.taskId',this.$route.query.taskId)
|
||||
if(this.$route.query.taskId){
|
||||
this.GetTaskDetail(this.$route.query.taskId)
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
...mapState(['user'])
|
||||
|
|
@ -329,6 +344,8 @@ export default {
|
|||
|
||||
this.GetAgreementInfoById()
|
||||
},
|
||||
|
||||
// 获取 设备树结构数据
|
||||
async GetDeviceTypeTree(){
|
||||
const params = {
|
||||
level:4
|
||||
|
|
@ -337,7 +354,7 @@ export default {
|
|||
this.deviceTypeTree = res.data
|
||||
|
||||
},
|
||||
|
||||
// 获取 协议id
|
||||
async GetAgreementInfoById(){
|
||||
if(this.queryParams.unitId && this.queryParams.proId){
|
||||
const params = {
|
||||
|
|
@ -354,10 +371,51 @@ export default {
|
|||
this.GetProData()
|
||||
}else{
|
||||
this.queryParams.agreementId = res.data.agreementId
|
||||
this.queryParams.agreementCode = res.data.agreementCode
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 获取 任务详情数据
|
||||
async GetTaskDetail(taskId){
|
||||
const res = await getTaskDetail({taskId})
|
||||
|
||||
const data = res.rows[0]
|
||||
console.log('GetTaskDetail =================',data)
|
||||
|
||||
// unitId:null,
|
||||
// proId:null,
|
||||
// agreementId:null, //协议id
|
||||
// agreementCode: null,
|
||||
|
||||
this.queryParams.unitId = data.unitId
|
||||
this.queryParams.proId = data.projectId
|
||||
this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfo.phone
|
||||
this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfo.leasePerson
|
||||
this.queryParams.agreementCode = data.agreementCode
|
||||
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfo.remark
|
||||
|
||||
this.leaseApplyDetails = data.leaseApplyDetails.map(item => {
|
||||
return this.handelEchoData(item)
|
||||
})
|
||||
|
||||
},
|
||||
//生成回显数据
|
||||
handelEchoData(item){
|
||||
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
|
||||
template.createBy = item.createBy
|
||||
template.companyId = item.companyId
|
||||
template.typeId = item.typeId
|
||||
template.unitCn = item.unitName
|
||||
template.typeCn = item.typeName
|
||||
template.guigeCn = item.typeModelName
|
||||
template.remark = item.remark
|
||||
template.preNum = item.preNum
|
||||
template.status = item.status
|
||||
|
||||
return template
|
||||
},
|
||||
|
||||
|
||||
/** 查询角色列表 */
|
||||
async getList() {
|
||||
|
|
@ -450,9 +508,7 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.roleId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
this.queryParams.leaseApplyDetails = selection
|
||||
},
|
||||
// 更多操作触发
|
||||
handleCommand(command, row) {
|
||||
|
|
@ -481,6 +537,7 @@ export default {
|
|||
this.queryParams.createBy = this.user.name
|
||||
this.queryParams.companyId = this.user.id
|
||||
|
||||
|
||||
const res = await submitLeaseApply(this.queryParams)
|
||||
if(res.code == 200){
|
||||
this.$message({
|
||||
|
|
@ -546,7 +603,7 @@ export default {
|
|||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.queryParams.leaseApplyDetails.splice(row.index,1)
|
||||
this.leaseApplyDetails.splice(row.index,1)
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
|
@ -560,14 +617,17 @@ export default {
|
|||
|
||||
/////// 设备类型树 切换
|
||||
deviceTypeChange(val){
|
||||
let nodes = null;
|
||||
// nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : this.$refs.deviceTypeCascader.panel.getNodeByValue(val)
|
||||
//
|
||||
nodes = this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||
console.log(nodes)
|
||||
|
||||
const nodes = this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||
console.log('this.deviceType1 =============',this.deviceType)
|
||||
if(nodes[0].level != 4){
|
||||
return
|
||||
}
|
||||
|
||||
this.queryParams.leaseApplyDetails.push(
|
||||
this.leaseApplyDetails.push(
|
||||
this.handelTableItemData(nodes[0])
|
||||
)
|
||||
|
||||
|
|
@ -576,7 +636,9 @@ export default {
|
|||
// this.$refs.cascader.$refs.panel.activePath = []
|
||||
this.deviceType = {}
|
||||
|
||||
console.log('this.deviceType2 =============',this.deviceType)
|
||||
|
||||
|
||||
|
||||
},
|
||||
//// 将数据处理成 表格中需要的数据
|
||||
handelTableItemData(node){
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>新建</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -84,41 +83,46 @@
|
|||
|
||||
<el-table v-loading="loading" :data="leaseAuditList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="dictId" />
|
||||
<el-table-column label="领料单号" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料单位" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料工程" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="协议号" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料人" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系电话" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请人" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请时间" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="任务状态" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="领料单号" align="center" prop="code" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料工程" align="center" prop="proName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料人" align="center" prop="leasePerson" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系电话" align="center" prop="leasePhone" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请人" align="center" prop="applyFor" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请时间" align="center" prop="createTimes" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="任务状态" align="center" prop="taskName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="审批结果 " align="center" prop="dictName" :show-overflow-tooltip="true" />-->
|
||||
<el-table-column label="备注" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
v-if=" scope.row "
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document-checked"
|
||||
@click="handleExamine(scope.row)"
|
||||
>审批</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
icon="el-icon-document"
|
||||
@click="handleExamine(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>审批</el-button>
|
||||
>领料单</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -180,7 +184,6 @@ import { listType, getType, delType, addType, updateType, refreshCache } from "@
|
|||
import { getLeaseAuditListAll,getUnitData,getProData } from "@/api/claimAndRefund/receive";
|
||||
export default {
|
||||
name: "Dict",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -248,13 +251,15 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
},
|
||||
methods: {
|
||||
/** 查询字典类型列表 */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
|
||||
console.log( 'this.queryParams =============',this.queryParams )
|
||||
|
||||
const params = {
|
||||
unitId:this.queryParams.unitId,
|
||||
|
|
@ -269,10 +274,29 @@ export default {
|
|||
|
||||
const res = await getLeaseAuditListAll(params)
|
||||
this.loading = false;
|
||||
console.log('res ============',res)
|
||||
console.log('getList ============',res)
|
||||
this.leaseAuditList = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
},
|
||||
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData(){
|
||||
const params = {
|
||||
id:this.queryParams.proId
|
||||
}
|
||||
const res = await getUnitData(params)
|
||||
this.unitList = res.data
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData(){
|
||||
const params = {
|
||||
id:this.queryParams.unitId
|
||||
}
|
||||
const res = await getProData(params)
|
||||
this.proList = res.data
|
||||
},
|
||||
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue