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: {
|
||||
url: `${config.API_URL}/ofm/mroom/delete/`,
|
||||
name: "批量物理删除",
|
||||
req: async function(data){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/ofm/mroom/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
mroombooking: {
|
||||
|
@ -97,12 +96,19 @@ export default {
|
|||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
url: `${config.API_URL}/ofm/mroombooking/delete/`,
|
||||
name: "批量物理删除",
|
||||
req: async function(data){
|
||||
return await http.post(this.url, data);
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/ofm/mroombooking/${id}/`,data
|
||||
);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/ofm/mroombooking/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
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>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
placeholder="会议室名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-date-picker
|
||||
v-model="query.slot_b__mdate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD" />
|
||||
<el-select v-model="query.slot_b__mroom" clearable placeholder="请选择会议室">
|
||||
<el-option
|
||||
v-for="item in mRoomList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="会议室名称"
|
||||
prop="name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="位置"
|
||||
prop="location"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="容纳人数"
|
||||
prop="capacity"
|
||||
min-width="120"
|
||||
>
|
||||
<el-table-column label="标题" prop="title"></el-table-column>
|
||||
<el-table-column label="会议室名称" prop="mroom_name"></el-table-column>
|
||||
<el-table-column label="预约日期" prop="mdate"></el-table-column>
|
||||
<el-table-column label="预约时间" prop="time_ranges">
|
||||
<template #default="scope">
|
||||
<span v-for="item in scope.row.time_ranges" :key="item">{{ item }}、</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
|
@ -47,20 +45,11 @@
|
|||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="mroomEidt(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="mroomDel(scope.row)"
|
||||
>
|
||||
@click="handleEidt(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="handleDel(scope.row)">
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button link size="small" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
|
@ -68,139 +57,66 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-dialog :title="titleMap[type] " v-model="limitedVisible" width="600px">
|
||||
<el-form
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
ref="addForm"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="会议室名称" prop="name">
|
||||
<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>
|
||||
<el-drawer :title="titleMap[type]" v-model="limitedVisible" :size="'80%'">
|
||||
<bookingDialog
|
||||
:type="type"
|
||||
:editId="editId"
|
||||
:bookingIitem="bookingIitem"
|
||||
@success="handleSuccess"
|
||||
@cancel="handleCancel"
|
||||
></bookingDialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import degraDialog from "../wf/degraD3.vue";
|
||||
import bookingDialog from "./booking_form.vue";
|
||||
export default {
|
||||
name: "index",
|
||||
// components: {
|
||||
// degraDialog
|
||||
// },
|
||||
components: { bookingDialog },
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.wf.workflow.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
apiObj: this.$API.ofm.mroombooking.list,
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
add: "新增会议预定",
|
||||
edit: "编辑会议预定",
|
||||
show: "查看会议预定",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
seal: [],
|
||||
seal_other: "",
|
||||
filename: "",
|
||||
contents: "",
|
||||
file_count: "",
|
||||
is_lending: "",
|
||||
contacts: "",
|
||||
lending_date: "",
|
||||
return_date: "",
|
||||
actual_return_date: "",
|
||||
reason: "",
|
||||
},
|
||||
//验证规则
|
||||
mRoomList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getmRoomList();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
getmRoomList(){
|
||||
let that = this;
|
||||
that.$API.ofm.mroom.list.req({page:0}).then(res=>{
|
||||
that.mRoomList = res;
|
||||
})
|
||||
},
|
||||
//添加
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
// 如果需要,也可以重置整个表单:
|
||||
// this.addForm = { lending_type: "", ...其他字段... };
|
||||
},
|
||||
|
||||
submitHandle() {
|
||||
this.limitedVisible = false;
|
||||
},
|
||||
handleEidt(row) {
|
||||
let that = this;
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaving = true;
|
||||
that.submit();
|
||||
}
|
||||
});
|
||||
that.type = "edit";
|
||||
that.editId = row.id;
|
||||
that.bookingIitem = row;
|
||||
that.limitedVisible = true;
|
||||
},
|
||||
|
||||
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) {
|
||||
async handleDel(row) {
|
||||
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) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
|
@ -208,61 +124,19 @@ export default {
|
|||
this.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<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 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
||||
margin-left: 0; /* 靠左 */
|
||||
gap: 6px;
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</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-switch v-model="change_batch" :disabled="type==50"></el-switch>
|
||||
</el-form-item>
|
||||
|
@ -216,7 +216,7 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_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-col>
|
||||
</el-row>
|
||||
|
@ -361,6 +361,7 @@ export default {
|
|||
let that = this;
|
||||
that.form.type = that.type;
|
||||
if(that.type==50){
|
||||
that.form.mtype=30;
|
||||
that.change_batch = true;
|
||||
}
|
||||
let materialObj = that.$TOOL.data.get("MATERIAL_OBJECT");
|
||||
|
@ -596,7 +597,9 @@ export default {
|
|||
data = that.materialOptions.filter((item) => {
|
||||
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;
|
||||
if(that.type==50){}else{
|
||||
let params = {
|
||||
|
@ -667,7 +670,6 @@ export default {
|
|||
that.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
if(that.mtype==30){
|
||||
that.form.mtype = 30;
|
||||
that.form.recive_mgroup = that.form.send_mgroup;
|
||||
}
|
||||
//合批、分批、报废,这三个交接操作直接创建并提交
|
||||
|
@ -773,7 +775,9 @@ export default {
|
|||
let hasArr = [];
|
||||
that.materialOptions.forEach((item) => {
|
||||
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);
|
||||
let params = {material: item.material,type: that.type};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
|
||||
|
@ -827,7 +831,9 @@ export default {
|
|||
if(arr2.length>0){
|
||||
that.$message.error("该批次已存在")
|
||||
}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};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res0) => {
|
||||
that.mgroupOptions = res0;
|
||||
|
@ -882,7 +888,9 @@ export default {
|
|||
}else{//handoverb里没有有这个物料批次
|
||||
that.materialOptions.forEach((item) => {
|
||||
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};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
|
||||
that.mgroupOptions = res1;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!-- 日志详情 mlog信息以及mlogb -->
|
||||
<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>
|
||||
<h4>日志详情</h4>
|
||||
<el-button type="danger" @click="closedPage()">关闭</el-button>
|
||||
|
@ -557,8 +557,10 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.mlogItem = {};
|
||||
this.paramsIn.mlog = "";
|
||||
this.paramsOut.mlog = "";
|
||||
this.apiObj = "";
|
||||
this.route_code = this.$route.path.split("/")[2];
|
||||
this.paramsIn.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.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit('closed',false);
|
||||
that.$message.success("操作成功");
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
|
|
|
@ -93,6 +93,7 @@ export default {
|
|||
methods: {
|
||||
open() {
|
||||
let that = this;
|
||||
that.mpointList = [];
|
||||
this.visible = true;
|
||||
that.$nextTick(() => {
|
||||
let height = document.getElementById("tableWap").clientHeight;
|
||||
|
@ -114,13 +115,13 @@ export default {
|
|||
},
|
||||
handleClick(val){
|
||||
let that = this;
|
||||
that.option.xAxis.data = [];
|
||||
that.option.series.data = [];
|
||||
that.mpointList.forEach(item=>{
|
||||
if(item.nickname == that.activeName){
|
||||
that.query.mpoint = item.id;
|
||||
that.query.page = 1;
|
||||
that.option.title.text = that.activeName;
|
||||
that.option.xAxis.data = [];
|
||||
that.option.series.data = [];
|
||||
let params = {};
|
||||
params.mpoint = item.id;
|
||||
params.timex__gte = that.startTime;
|
||||
|
|
Loading…
Reference in New Issue