Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
eda14df89c
|
@ -69,11 +69,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
url: `${config.API_URL}/ofm/mroom/delete/`,
|
name: "删除",
|
||||||
name: "批量物理删除",
|
req: async function (id) {
|
||||||
req: async function(data){
|
return await http.delete(`${config.API_URL}/ofm/mroom/${id}/`);
|
||||||
return await http.post(this.url, data);
|
},
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mroombooking: {
|
mroombooking: {
|
||||||
|
@ -97,12 +96,19 @@ export default {
|
||||||
return await http.post(this.url, data);
|
return await http.post(this.url, data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
delete: {
|
update: {
|
||||||
url: `${config.API_URL}/ofm/mroombooking/delete/`,
|
name: "更新",
|
||||||
name: "批量物理删除",
|
req: async function(id, data){
|
||||||
req: async function(data){
|
return await http.put(
|
||||||
return await http.post(this.url, data);
|
`${config.API_URL}/ofm/mroombooking/${id}/`,data
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.delete(`${config.API_URL}/ofm/mroombooking/${id}/`);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mroomslot: {
|
mroomslot: {
|
||||||
|
|
|
@ -0,0 +1,293 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-main>
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
ref="addForm"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-form-item label="标题" prop="title">
|
||||||
|
<el-input v-model="form.title" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="会议室" prop="mroom">
|
||||||
|
<el-select v-model="form.mroom" placeholder="请选择" @change="mRoomChange" style="width: 100%;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in mRoomList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="时间" prop="mdate">
|
||||||
|
<el-date-picker v-model="form.mdate" type="date" value-format="YYYY-MM-DD" style="width: 100%;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div v-for="(item,$index) in timesList" :key="item.value">
|
||||||
|
<div v-if="item.isSelect" class="timeBlock selectedTimeBlock" @click="selectTime($index)">{{ item.label }}</div>
|
||||||
|
<div v-else class="timeBlock" @click="selectTime($index)">{{ item.label }}</div>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-footer v-show="mode!=='show'">
|
||||||
|
<ticketd_b_start
|
||||||
|
:workflow_key="'booking'"
|
||||||
|
:title="bookingTitle"
|
||||||
|
:t_id="form.id"
|
||||||
|
:ticketId="form.ticket"
|
||||||
|
@success="()=>{$emit('success')}"
|
||||||
|
:submit_b_func="submit_b_func"
|
||||||
|
ref="ticketd_b_start"
|
||||||
|
></ticketd_b_start>
|
||||||
|
<el-button @click="$emit('closed')">取消</el-button>
|
||||||
|
</el-footer>
|
||||||
|
</el-main>
|
||||||
|
<el-aside width="20%" v-if="form.ticket">
|
||||||
|
<ticketd :ticketId="form.ticket" @success="$emit('success')"></ticketd>
|
||||||
|
</el-aside>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||||
|
import ticketd from '@/views/wf/ticketd.vue'
|
||||||
|
export default {
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
name: "index",
|
||||||
|
components: {
|
||||||
|
ticketd_b_start, ticketd
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: "add",
|
||||||
|
},
|
||||||
|
editId: {
|
||||||
|
type: String,
|
||||||
|
default: "add",
|
||||||
|
},
|
||||||
|
bookingIitem: {
|
||||||
|
type: String,
|
||||||
|
default: "add",
|
||||||
|
},
|
||||||
|
t_id: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: this.$API.ofm.mroombooking.list,
|
||||||
|
bookingTitle: "会议预定",
|
||||||
|
query: {},
|
||||||
|
mroomName:'',
|
||||||
|
isSaving: false,
|
||||||
|
limitedVisible: false,
|
||||||
|
titleMap: {
|
||||||
|
add: "新增会议预定",
|
||||||
|
edit: "编辑会议预定",
|
||||||
|
show: "查看会议预定",
|
||||||
|
},
|
||||||
|
//表单数据
|
||||||
|
form: {
|
||||||
|
mroom: "",
|
||||||
|
mdate: "",
|
||||||
|
title: "",
|
||||||
|
slots: [],
|
||||||
|
},
|
||||||
|
//验证规则
|
||||||
|
rules: {
|
||||||
|
mroom: [{ required: true, message: "请输入会议室名称", trigger: "blur" }],
|
||||||
|
mdate: [{ required: true, message: "请输入地点", trigger: "blur" }],
|
||||||
|
title: [{ required: true, message: "请输入容纳人数", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
timesList:[
|
||||||
|
{value:0,label:'00:00-00:30',isSelect:false},
|
||||||
|
{value:1,label:'00:30-01:00',isSelect:false},
|
||||||
|
{value:2,label:'01:00-01:30',isSelect:false},
|
||||||
|
{value:3,label:'01:30-02:00',isSelect:false},
|
||||||
|
{value:4,label:'02:00-02:30',isSelect:false},
|
||||||
|
{value:5,label:'02:30-03:00',isSelect:false},
|
||||||
|
{value:6,label:'03:00-03:30',isSelect:false},
|
||||||
|
{value:7,label:'03:30-04:00',isSelect:false},
|
||||||
|
{value:8,label:'04:00-04:30',isSelect:false},
|
||||||
|
{value:9,label:'04:30-05:00',isSelect:false},
|
||||||
|
{value:10,label:'05:00-05:30',isSelect:false},
|
||||||
|
{value:11,label:'05:30-06:00',isSelect:false},
|
||||||
|
{value:12,label:'06:00-06:30',isSelect:false},
|
||||||
|
{value:13,label:'06:30-07:00',isSelect:false},
|
||||||
|
{value:14,label:'07:00-07:30',isSelect:false},
|
||||||
|
{value:15,label:'07:30-08:00',isSelect:false},
|
||||||
|
{value:16,label:'08:00-08:30',isSelect:false},
|
||||||
|
{value:17,label:'08:30-09:00',isSelect:false},
|
||||||
|
{value:18,label:'09:00-09:30',isSelect:false},
|
||||||
|
{value:19,label:'09:30-10:00',isSelect:false},
|
||||||
|
{value:20,label:'10:00-10:30',isSelect:false},
|
||||||
|
{value:21,label:'10:30-11:00',isSelect:false},
|
||||||
|
{value:22,label:'11:00-11:30',isSelect:false},
|
||||||
|
{value:23,label:'11:30-12:00',isSelect:false},
|
||||||
|
{value:24,label:'12:00-12:30',isSelect:false},
|
||||||
|
{value:25,label:'12:30-13:00',isSelect:false},
|
||||||
|
{value:26,label:'13:00-13:30',isSelect:false},
|
||||||
|
{value:27,label:'13:30-14:00',isSelect:false},
|
||||||
|
{value:28,label:'14:00-14:30',isSelect:false},
|
||||||
|
{value:29,label:'14:30-15:00',isSelect:false},
|
||||||
|
{value:30,label:'15:00-15:30',isSelect:false},
|
||||||
|
{value:31,label:'15:30-16:00',isSelect:false},
|
||||||
|
{value:32,label:'16:00-16:30',isSelect:false},
|
||||||
|
{value:33,label:'16:30-17:00',isSelect:false},
|
||||||
|
{value:34,label:'17:00-17:30',isSelect:false},
|
||||||
|
{value:35,label:'17:30-18:00',isSelect:false},
|
||||||
|
{value:36,label:'18:00-18:30',isSelect:false},
|
||||||
|
{value:37,label:'18:30-19:00',isSelect:false},
|
||||||
|
{value:38,label:'19:00-19:30',isSelect:false},
|
||||||
|
{value:39,label:'19:30-20:00',isSelect:false},
|
||||||
|
{value:40,label:'20:00-20:30',isSelect:false},
|
||||||
|
{value:41,label:'20:30-21:00',isSelect:false},
|
||||||
|
{value:42,label:'21:00-21:30',isSelect:false},
|
||||||
|
{value:43,label:'21:30-22:00',isSelect:false},
|
||||||
|
{value:44,label:'22:00-22:30',isSelect:false},
|
||||||
|
{value:45,label:'22:30-23:00',isSelect:false},
|
||||||
|
{value:46,label:'23:00-23:30',isSelect:false},
|
||||||
|
{value:47,label:'23:30-24:00',isSelect:false}
|
||||||
|
],
|
||||||
|
mRoomList: [],
|
||||||
|
timeselectList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
that.getmRoomList();
|
||||||
|
that.getTid();
|
||||||
|
if(that.type=='edit'){
|
||||||
|
that.form = that.bookingIitem;
|
||||||
|
that.mroomName = that.bookingIitem.mroom_name;
|
||||||
|
that.bookingTitle = that.mroomName+"预定";
|
||||||
|
that.handleEidt(that.editId);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getmRoomList(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.ofm.mroom.list.req({page:0}).then(res=>{
|
||||||
|
that.mRoomList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTid (){
|
||||||
|
var that = this;
|
||||||
|
if (that.t_id) {
|
||||||
|
that.$API.wpm.handover.item.req(that.t_id).then(res=>{
|
||||||
|
that.setData(res);
|
||||||
|
if(res.ticket_.state_.type == 1 && res.create_by == that.$TOOL.data.get("USER_INFO").id ) {
|
||||||
|
that.mode = "edit";
|
||||||
|
}else{
|
||||||
|
that.mode = "show";
|
||||||
|
}
|
||||||
|
that.$nextTick(()=>{
|
||||||
|
that.$refs.ticketd_b_start.init();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mRoomChange(){
|
||||||
|
let that = this;
|
||||||
|
that.mRoomList.forEach(item=>{
|
||||||
|
if(item.id == that.form.mroom){
|
||||||
|
that.mroomName = item.name;
|
||||||
|
that.bookingTitle = item.name+"预定";
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectTime(index){
|
||||||
|
let that = this;
|
||||||
|
that.form.slots = [];
|
||||||
|
that.timesList[index].isSelect = !that.timesList[index].isSelect;
|
||||||
|
that.timesList.forEach(item=>{
|
||||||
|
if(item.isSelect){
|
||||||
|
that.form.slots.push(item.value);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitHandle() {
|
||||||
|
let that = this;
|
||||||
|
this.$refs.addForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaving = true;
|
||||||
|
that.submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async submit_b_func() {
|
||||||
|
let that = this;
|
||||||
|
if(that.mode == "add") {
|
||||||
|
let res = await that.$API.ofm.mroombooking.create.req(that.form);
|
||||||
|
that.form.id = res.id;
|
||||||
|
} else if (that.mode == "edit") {
|
||||||
|
await that.$API.ofm.mroombooking.update.req(that.form.id, that.form);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async submit() {
|
||||||
|
let that = this,res = null;
|
||||||
|
console.log('that.form',that.form);
|
||||||
|
try {
|
||||||
|
if (that.type === "add") {
|
||||||
|
res = await that.$API.ofm.mroombooking.create.req(that.form);
|
||||||
|
} else {
|
||||||
|
res = await that.$API.ofm.mroombooking.update.req(that.form.id,that.form);
|
||||||
|
}
|
||||||
|
that.isSaving = false;
|
||||||
|
that.limitedVisible = false;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
} catch (e) {
|
||||||
|
that.isSaving = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleEidt(id) {
|
||||||
|
let that = this;
|
||||||
|
that.$API.ofm.mroomslot.list.req({booking:id,page:0}).then(res=>{
|
||||||
|
res.forEach(item=>{
|
||||||
|
that.timesList[item.slot].isSelect = true;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//搜索
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.table.queryData(this.query);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.left-panel-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
.timeBlock{
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 10px;
|
||||||
|
line-height: 40px;
|
||||||
|
margin-right: 10px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #b9f0cb;
|
||||||
|
}
|
||||||
|
.selectedTimeBlock{
|
||||||
|
background-color: #00a870;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -9,37 +9,35 @@
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input
|
<el-date-picker
|
||||||
v-model="query.search"
|
v-model="query.slot_b__mdate"
|
||||||
placeholder="会议室名称"
|
type="date"
|
||||||
clearable
|
value-format="YYYY-MM-DD" />
|
||||||
@keyup.enter="handleQuery"
|
<el-select v-model="query.slot_b__mroom" clearable placeholder="请选择会议室">
|
||||||
></el-input>
|
<el-option
|
||||||
<el-button
|
v-for="item in mRoomList"
|
||||||
type="primary"
|
:key="item.id"
|
||||||
icon="el-icon-search"
|
:label="item.name"
|
||||||
@click="handleQuery"
|
:value="item.id"
|
||||||
></el-button>
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
<el-table-column label="#" type="index"></el-table-column>
|
<el-table-column label="#" type="index"></el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="标题" prop="title"></el-table-column>
|
||||||
label="会议室名称"
|
<el-table-column label="会议室名称" prop="mroom_name"></el-table-column>
|
||||||
prop="name"
|
<el-table-column label="预约日期" prop="mdate"></el-table-column>
|
||||||
min-width="100"
|
<el-table-column label="预约时间" prop="time_ranges">
|
||||||
></el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column
|
<span v-for="item in scope.row.time_ranges" :key="item">{{ item }}、</span>
|
||||||
label="位置"
|
</template>
|
||||||
prop="location"
|
|
||||||
min-width="100"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="容纳人数"
|
|
||||||
prop="capacity"
|
|
||||||
min-width="120"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -47,20 +45,11 @@
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="mroomEidt(scope.row)"
|
@click="handleEidt(scope.row)"
|
||||||
>编辑
|
>编辑</el-button>
|
||||||
</el-button>
|
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row)">
|
||||||
<el-popconfirm
|
|
||||||
title="确定删除吗?"
|
|
||||||
@confirm="mroomDel(scope.row)"
|
|
||||||
>
|
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button
|
<el-button link size="small" type="danger">删除</el-button>
|
||||||
link
|
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
|
@ -68,139 +57,66 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<el-dialog :title="titleMap[type] " v-model="limitedVisible" width="600px">
|
<el-drawer :title="titleMap[type]" v-model="limitedVisible" :size="'80%'">
|
||||||
<el-form
|
<bookingDialog
|
||||||
:model="addForm"
|
:type="type"
|
||||||
:rules="rules"
|
:editId="editId"
|
||||||
ref="addForm"
|
:bookingIitem="bookingIitem"
|
||||||
label-width="100px"
|
@success="handleSuccess"
|
||||||
label-position="left"
|
@cancel="handleCancel"
|
||||||
>
|
></bookingDialog>
|
||||||
<el-form-item label="会议室名称" prop="name">
|
</el-drawer>
|
||||||
<el-input v-model="addForm.name" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="地点" prop="location">
|
|
||||||
<el-input v-model="addForm.location" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="容纳人数" prop="capacity">
|
|
||||||
<el-input v-model="addForm.capacity" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="handleCancel">取 消</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="type !== 'show'"
|
|
||||||
type="primary"
|
|
||||||
:loading="isSaving"
|
|
||||||
@click="submitHandle()"
|
|
||||||
>保 存</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import degraDialog from "../wf/degraD3.vue";
|
import bookingDialog from "./booking_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "index",
|
name: "index",
|
||||||
// components: {
|
components: { bookingDialog },
|
||||||
// degraDialog
|
|
||||||
// },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
workflowName:"",
|
apiObj: this.$API.ofm.mroombooking.list,
|
||||||
workFlowId:'',
|
|
||||||
apiObj: this.$API.wf.workflow.list,
|
|
||||||
selection: [],
|
|
||||||
checkList: [],
|
|
||||||
fileList: [],
|
|
||||||
timeRange: [],
|
|
||||||
lending_type: "",
|
|
||||||
query: {},
|
query: {},
|
||||||
editId: null,
|
editId: null,
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
limitedVisible: false,
|
limitedVisible: false,
|
||||||
limitedWatch: false,
|
|
||||||
type: "add",
|
type: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: "新增",
|
add: "新增会议预定",
|
||||||
edit: "编辑",
|
edit: "编辑会议预定",
|
||||||
show: "查看",
|
show: "查看会议预定",
|
||||||
},
|
},
|
||||||
//表单数据
|
mRoomList: []
|
||||||
addForm: {
|
|
||||||
seal: [],
|
|
||||||
seal_other: "",
|
|
||||||
filename: "",
|
|
||||||
contents: "",
|
|
||||||
file_count: "",
|
|
||||||
is_lending: "",
|
|
||||||
contacts: "",
|
|
||||||
lending_date: "",
|
|
||||||
return_date: "",
|
|
||||||
actual_return_date: "",
|
|
||||||
reason: "",
|
|
||||||
},
|
|
||||||
//验证规则
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getmRoomList();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//添加工作流
|
getmRoomList(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.ofm.mroom.list.req({page:0}).then(res=>{
|
||||||
|
that.mRoomList = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//添加
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.type = "add";
|
this.type = "add";
|
||||||
this.limitedVisible = true;
|
this.limitedVisible = true;
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.limitedVisible = false; // 关闭弹窗
|
this.limitedVisible = false;
|
||||||
this.lending_type = ""; // 重置 lending_type
|
},
|
||||||
// 如果需要,也可以重置整个表单:
|
handleEidt(row) {
|
||||||
// this.addForm = { lending_type: "", ...其他字段... };
|
|
||||||
},
|
|
||||||
|
|
||||||
submitHandle() {
|
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$refs.addForm.validate((valid) => {
|
that.type = "edit";
|
||||||
if (valid) {
|
that.editId = row.id;
|
||||||
that.isSaving = true;
|
that.bookingIitem = row;
|
||||||
that.submit();
|
that.limitedVisible = true;
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
async handleDel(row) {
|
||||||
async submit() {
|
|
||||||
let that = this;
|
|
||||||
let res = null;
|
|
||||||
try {
|
|
||||||
if (that.type === "add") {
|
|
||||||
res = await that.$API.ofm.mroom.create.req(that.addForm);
|
|
||||||
} else {
|
|
||||||
res = await that.$API.ofm.mroom.update.req(
|
|
||||||
that.editId,
|
|
||||||
that.addForm
|
|
||||||
);
|
|
||||||
}
|
|
||||||
that.isSaving = false;
|
|
||||||
that.limitedVisible = false;
|
|
||||||
that.$refs.table.refresh();
|
|
||||||
} catch (e) {
|
|
||||||
that.isSaving = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
fileUPSuccess(res) {
|
|
||||||
let that = this;
|
|
||||||
console.log('res',res);
|
|
||||||
this.test_file = res.path;
|
|
||||||
},
|
|
||||||
mroomEidt(row) {
|
|
||||||
this.type = "edit";
|
|
||||||
this.editId = row.id;
|
|
||||||
this.limitedVisible = true;
|
|
||||||
this.addForm = Object.assign({}, row);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async mroomDel(row) {
|
|
||||||
var id = row.id;
|
var id = row.id;
|
||||||
var res = await this.$API.ofm.mroom.delete.req(id);
|
var res = await this.$API.ofm.mroombooking.delete.req(id);
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
this.$message.error(res.err_msg);
|
this.$message.error(res.err_msg);
|
||||||
} else {
|
} else {
|
||||||
|
@ -208,61 +124,19 @@ export default {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.treeMain {
|
|
||||||
height: 280px;
|
|
||||||
overflow: auto;
|
|
||||||
border: 1px solid #dcdfe6;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
|
||||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
|
||||||
background-color: #fefefe;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
border-radius: 5px;
|
|
||||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
.node rect {
|
|
||||||
stroke: #606266;
|
|
||||||
fill: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edgePath path {
|
|
||||||
stroke: #606266;
|
|
||||||
fill: #333;
|
|
||||||
stroke-width: 1.5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
g.conditions > rect {
|
|
||||||
fill: #00ffd0;
|
|
||||||
stroke: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon-close {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left-panel-group {
|
.left-panel-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
gap: 6px;
|
||||||
margin-left: 0; /* 靠左 */
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24" v-if="mtype==30||type==50">
|
||||||
<el-form-item label="更改批次">
|
<el-form-item label="更改批次">
|
||||||
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
|
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||||
<el-form-item label="新批次号" prop="new_batch">
|
<el-form-item label="新批次号" prop="new_batch">
|
||||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
<el-input v-model="form.new_batch" placeholder="新批次号" :disabled="type==50"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -361,6 +361,7 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.type = that.type;
|
that.form.type = that.type;
|
||||||
if(that.type==50){
|
if(that.type==50){
|
||||||
|
that.form.mtype=30;
|
||||||
that.change_batch = true;
|
that.change_batch = true;
|
||||||
}
|
}
|
||||||
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
|
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
|
||||||
|
@ -596,7 +597,9 @@ export default {
|
||||||
data = that.materialOptions.filter((item) => {
|
data = that.materialOptions.filter((item) => {
|
||||||
return that.selectItems.indexOf(item.id)>-1;
|
return that.selectItems.indexOf(item.id)>-1;
|
||||||
});
|
});
|
||||||
that.form.new_batch = data[0].batch+'g';
|
if(that.type==50){
|
||||||
|
that.form.new_batch = data[0].batch+'-G';
|
||||||
|
}
|
||||||
let materialId = data[0].material;
|
let materialId = data[0].material;
|
||||||
if(that.type==50){}else{
|
if(that.type==50){}else{
|
||||||
let params = {
|
let params = {
|
||||||
|
@ -667,7 +670,6 @@ export default {
|
||||||
that.$refs.dialogForm.validate(async (valid) => {
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if(that.mtype==30){
|
if(that.mtype==30){
|
||||||
that.form.mtype = 30;
|
|
||||||
that.form.recive_mgroup = that.form.send_mgroup;
|
that.form.recive_mgroup = that.form.send_mgroup;
|
||||||
}
|
}
|
||||||
//合批、分批、报废,这三个交接操作直接创建并提交
|
//合批、分批、报废,这三个交接操作直接创建并提交
|
||||||
|
@ -773,7 +775,9 @@ export default {
|
||||||
let hasArr = [];
|
let hasArr = [];
|
||||||
that.materialOptions.forEach((item) => {
|
that.materialOptions.forEach((item) => {
|
||||||
if(item.batch == res.batch){
|
if(item.batch == res.batch){
|
||||||
that.form.new_batch = res.batch+'g';
|
if(that.type==50){
|
||||||
|
that.form.new_batch = data[0].batch+'-G';
|
||||||
|
}
|
||||||
hasArr.push(item);
|
hasArr.push(item);
|
||||||
let params = {material: item.material,type: that.type};
|
let params = {material: item.material,type: that.type};
|
||||||
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
|
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
|
||||||
|
@ -827,7 +831,9 @@ export default {
|
||||||
if(arr2.length>0){
|
if(arr2.length>0){
|
||||||
that.$message.error("该批次已存在")
|
that.$message.error("该批次已存在")
|
||||||
}else{
|
}else{
|
||||||
that.form.new_batch = arr[0].batch+'g';
|
if(that.type==50){
|
||||||
|
that.form.new_batch = data[0].batch+'-G';
|
||||||
|
}
|
||||||
let params = {material: arr[0].material,type: that.type};
|
let params = {material: arr[0].material,type: that.type};
|
||||||
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
|
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
|
||||||
that.mgroupOptions = res0;
|
that.mgroupOptions = res0;
|
||||||
|
@ -882,7 +888,9 @@ export default {
|
||||||
}else{//handoverb里没有有这个物料批次
|
}else{//handoverb里没有有这个物料批次
|
||||||
that.materialOptions.forEach((item) => {
|
that.materialOptions.forEach((item) => {
|
||||||
if(item.id == res[0].wm){
|
if(item.id == res[0].wm){
|
||||||
that.form.new_batch = item.batch+'g';
|
if(that.type==50){
|
||||||
|
that.form.new_batch = data[0].batch+'-G';
|
||||||
|
}
|
||||||
let params = {material: item.material,type: that.type};
|
let params = {material: item.material,type: that.type};
|
||||||
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
|
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
|
||||||
that.mgroupOptions = res1;
|
that.mgroupOptions = res1;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- 日志详情 mlog信息以及mlogb -->
|
<!-- 日志详情 mlog信息以及mlogb -->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer v-model="visible" :size="'95%'" :show-close="false">
|
<el-drawer v-model="visible" :size="'95%'" :show-close="false" destroy-on-close="true">
|
||||||
<template #header>
|
<template #header>
|
||||||
<h4>日志详情</h4>
|
<h4>日志详情</h4>
|
||||||
<el-button type="danger" @click="closedPage()">关闭</el-button>
|
<el-button type="danger" @click="closedPage()">关闭</el-button>
|
||||||
|
@ -557,8 +557,10 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.mlogItem = {};
|
||||||
this.paramsIn.mlog = "";
|
this.paramsIn.mlog = "";
|
||||||
this.paramsOut.mlog = "";
|
this.paramsOut.mlog = "";
|
||||||
|
this.apiObj = "";
|
||||||
this.route_code = this.$route.path.split("/")[2];
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
this.paramsIn.mlog = this.mlogId;
|
this.paramsIn.mlog = this.mlogId;
|
||||||
this.paramsOut.mlog = this.mlogId;
|
this.paramsOut.mlog = this.mlogId;
|
||||||
|
@ -925,6 +927,7 @@ export default {
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
|
that.$emit('closed',false);
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
|
|
|
@ -93,6 +93,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.mpointList = [];
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
let height = document.getElementById("tableWap").clientHeight;
|
let height = document.getElementById("tableWap").clientHeight;
|
||||||
|
@ -114,13 +115,13 @@ export default {
|
||||||
},
|
},
|
||||||
handleClick(val){
|
handleClick(val){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.option.xAxis.data = [];
|
||||||
|
that.option.series.data = [];
|
||||||
that.mpointList.forEach(item=>{
|
that.mpointList.forEach(item=>{
|
||||||
if(item.nickname == that.activeName){
|
if(item.nickname == that.activeName){
|
||||||
that.query.mpoint = item.id;
|
that.query.mpoint = item.id;
|
||||||
that.query.page = 1;
|
that.query.page = 1;
|
||||||
that.option.title.text = that.activeName;
|
that.option.title.text = that.activeName;
|
||||||
that.option.xAxis.data = [];
|
|
||||||
that.option.series.data = [];
|
|
||||||
let params = {};
|
let params = {};
|
||||||
params.mpoint = item.id;
|
params.mpoint = item.id;
|
||||||
params.timex__gte = that.startTime;
|
params.timex__gte = that.startTime;
|
||||||
|
|
Loading…
Reference in New Issue