<template>
|
<view>
|
<view class="tabs" id="tabs">
|
<view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view>
|
<view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">明细信息</view>
|
<view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view>
|
<view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view>
|
</view>
|
<!-- 基本信息 -->
|
<template v-if="tabs == 0">
|
<view class="form" :style="{
|
height: containerHeight + 'px',
|
overflow: 'auto'
|
}">
|
<view class="form-item">
|
<view class="title">设备条码:</view>
|
<view class="right">
|
<input v-model="hform.HBarCode" @confirm="GetMessageByBarCode(hform.HBarCode)"
|
placeholder="请输入(或扫描)设备条码" />
|
</view>
|
<view class="icon-wrapper">
|
<uni-icons type="scan" size="20" @click="toScanCode"></uni-icons>
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">点检开始:</view>
|
<view class="right">
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
|
<input :value="hform.HBeginDate" />
|
</uni-datetime-picker>
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">点检结束:</view>
|
<view class="right">
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
|
<input :value="hform.HEndDate" />
|
</uni-datetime-picker>
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">数量:</view>
|
<view class="right">
|
<input type="number" v-model="hform.HQty" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">最终结论:</view>
|
<view class="right none-border">
|
<radio-group @change="radioChange" class="radio_Container">
|
<label>
|
<view>
|
<radio value="OK" :checked="calcHLastResult == 'OK'" />
|
<text>OK</text>
|
</view>
|
</label>
|
</label>
|
<view>
|
<radio value="NG" :checked="calcHLastResult == 'NG'" />
|
<text>NG</text>
|
</view>
|
</label>
|
</radio-group>
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">异常情况记录:</view>
|
<view class="right">
|
<input v-model="hform.HErrNote" placeholder="请输入异常情况记录" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">重大安全隐患记录:</view>
|
<view class="right">
|
<input v-model="hform.HBigSafeNote" placeholder="请输入重大安全隐患记录" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">点检数据:</view>
|
<view class="right">
|
<input v-model="hform.HDotCheckNote" placeholder="请输入点检数据" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">生产班次:</view>
|
<zxz-uni-data-select class="right" :localdata="HShiftsList" dataKey="班次名称" dataValue="HItemID"
|
v-model="hform.HShiftsID">
|
</zxz-uni-data-select>
|
</view>
|
<view class="form-item">
|
<view class="title">单据号:</view>
|
<view class="righton">
|
<input disabled v-model="hform.HBillNo" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">单据日期:</view>
|
<view class="righton">
|
<input disabled v-model="hform.HDate" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">部门:</view>
|
<zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="部门名称" dataValue="HItemID"
|
v-model="hform.HDeptID">
|
|
</zxz-uni-data-select>
|
<!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> -->
|
</view>
|
<view class="form-item">
|
<view class="title">备注:</view>
|
<view class="right">
|
<input v-model="hform.HRemark" placeholder="请输入备注" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">设备名称:</view>
|
<view class="righton">
|
<input v-model="hform.HBarName" disabled />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">设备规格:</view>
|
<view class="righton">
|
<input v-model="hform.HBarSpec" disabled />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">设备型号:</view>
|
<view class="righton">
|
<input v-model="hform.HBarModel" disabled />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">点检计划:</view>
|
<view class="righton">
|
<input v-model="hform.HPlanNo" disabled />
|
</view>
|
</view>
|
</view>
|
</template>
|
<!-- 明细信息 -->
|
<template v-if="tabs == 1">
|
<view class="form" :style="{
|
height: containerHeight + 'px',
|
overflow: 'auto'
|
}">
|
<view class="form-item">
|
<view class="left">
|
设备点检规程
|
</view>
|
<view class="right">
|
<input type="text" :value="hform.HEquipDotCheckRuleInterNo" />
|
</view>
|
<view class="icon-wrapper">
|
<uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
|
</view>
|
</view>
|
|
<view class="list" v-for="(item,index) in HCheckFileList" :key="index">
|
<uni-card style="margin: 10px;">
|
<view class="card-detail">
|
<view class="detail">
|
<text>序号:</text>{{index+1}}
|
</view>
|
<view class="detail">
|
<text>结果:</text>
|
<checkbox-group style="display: inline-block;"
|
@change="checkBoxChangeHandler(index, $event)">
|
<checkbox value="enabled" :checked="item.HDotCheckResult" />
|
</checkbox-group>
|
</view>
|
<view class="detail">
|
<text>点检项目分类:</text>{{item.HDotCheckItemClassName}}
|
</view>
|
<view class="detail">
|
<text>点检项目:</text>{{item.HDotCheckItem}}
|
</view>
|
<view class="detail">
|
<text>点检部位:</text>{{item.HDotCheckPart}}
|
</view>
|
<view class="detail">
|
<text>负责人名称:</text>{{item.HManagerName}}
|
</view>
|
<view class="detail">
|
<text>备注:</text>{{item.HRemark}}
|
</view>
|
</view>
|
</uni-card>
|
</view>
|
<view class="over" v-if="HCheckFileList.length == 0">暂无数据</view>
|
</view>
|
</template>
|
<!-- 其他信息 -->
|
<template v-if="tabs == 2">
|
<view class="form" :style="{
|
height: containerHeight + 'px',
|
overflow: 'auto'
|
}">
|
<view class="form-item">
|
<view class="title">创建人:</view>
|
<view class="righton">
|
<input v-model="hform.HMaker" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">创建日期:</view>
|
<view class="righton">
|
<input v-model="hform.HMakeDate" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">修改人:</view>
|
<view class="righton">
|
<input v-model="hform.HUpDater" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">修改日期:</view>
|
<view class="righton">
|
<input v-model="hform.HUpDateDate" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">审核人:</view>
|
<view class="righton">
|
<input v-model="hform.HChecker" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">审核时间:</view>
|
<view class="righton">
|
<input v-model="hform.HCheckDate" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">作废人:</view>
|
<view class="righton">
|
<input v-model="hform.HDeleteMan" />
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">作废日期:</view>
|
<view class="righton">
|
<input v-model="hform.HDeleteDate" />
|
</view>
|
</view>
|
</view>
|
|
</template>
|
<!-- 附件信息 -->
|
<template v-if="tabs == 3">
|
<view class="card-item-wrapper">
|
<view class="attachment-btns">
|
<button type="primary" size="mini" @tap="fileUpload">选择文件</button>
|
<view style="flex: 1;"></view>
|
</view>
|
<view v-for="(item, index) in attachmentInfo" :key="index">
|
<uni-card :title="item['fileName']" :thumbnail="item.filePath">
|
<view class="card-detail">
|
<view class="detail">
|
<text>大小:</text>{{item["size"]}}
|
</view>
|
<view class="detail">
|
<text>状态:</text>{{item["status"]}}
|
</view>
|
<view class="detail operation" v-if="item['status']!='上传成功'">
|
<text>操作:</text>
|
<button class="btn-a" size="mini" @tap.stop="uploadFile(index)">上传</button>
|
<button class="btn-b" size="mini" @tap.stop="delFile(index)">删除</button>
|
</view>
|
</view>
|
</uni-card>
|
</view>
|
</view>
|
</template>
|
<!-- 操作按钮 -->
|
<view class="buttons" id="buttons">
|
<button class="btn-a" size="mini" @tap="submit">提交</button>
|
<view style="flex: 1;"></view>
|
<button class="btn-a" size="mini" @tap="addNew">新增</button>
|
<button class="btn-c" size="mini" @tap="goBack">退出</button>
|
</view>
|
<xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload>
|
<BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'DJ'"></BillSelectorPopupVue>
|
</view>
|
</template>
|
|
<script>
|
import dayjs from "dayjs";
|
import {
|
CommonUtils
|
} from "@/utils/common";
|
import {
|
MpaasScan
|
} from "@/utils/mpaasScan.js"
|
import {
|
getUserInfo
|
} from "../../../utils/auth";
|
import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue";
|
export default {
|
name: 'sb_EquipDotCheckBill',
|
components: {
|
BillSelectorPopupVue
|
},
|
data() {
|
return {
|
tabs: 0,
|
HMainSourceBillType: "",
|
btnTop: 0,
|
tabsBottom: 0,
|
HModName: "sb_EquipDotCheckBill",
|
HBillType: '3903',
|
operationType: 1,
|
uploadOptions: {},
|
|
HDeptList: [],
|
HShiftsList: [],
|
HCheckFileList: [],
|
attachmentInfo: [],
|
|
hform: {
|
HBarCode: "",
|
HBeginDate: dayjs(new Date()).format("YYYY-MM-DD"),
|
HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
|
HQty: 0,
|
HErrNote: "",
|
HBigSafeNote: "",
|
HDotCheckNote: "",
|
HShiftsName: "",
|
HShiftsID: 0,
|
HBillNo: "",
|
HInterID: 0,
|
HDate: dayjs(new Date()).format("YYYY-MM-DD"),
|
HDeptName: getUserInfo().HDeptName,
|
HDeptID: getUserInfo().HDeptID,
|
HRemark: "",
|
HBarName: "",
|
HEquipID: 0,
|
HBarSpec: "",
|
HBarModel: "",
|
HPlanNo: "",
|
HPlanInterID: 0,
|
HPlanEntryID: 0,
|
HEquipDotCheckRuleInterID: 0,
|
HEquipDotCheckRuleInterNo: "",
|
HMaker: getUserInfo()['Czymc'],
|
HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"),
|
HUpDater: "",
|
HUpDateDate: "",
|
HChecker: "",
|
HCheckDate: "",
|
HDeleteMan: "",
|
HDeleteDate: "",
|
lngBillKey: 0,
|
lngBillSubKey: 0,
|
HLastResult: "OK"
|
}
|
};
|
},
|
computed: {
|
containerHeight: {
|
get() {
|
return this.btnTop - this.tabsBottom - 5
|
}
|
},
|
calcHLastResult: {
|
get() {
|
if (this.HCheckFileList.length == 0) {
|
return 'OK'
|
} else {
|
let okCount = this.HCheckFileList.reduce((acc, item) => {
|
if (item.HDotCheckResult) {
|
return acc + 1
|
}
|
return acc
|
}, 0)
|
if (okCount == this.HCheckFileList.length) {
|
return 'OK'
|
}
|
return 'NG'
|
}
|
}
|
}
|
|
},
|
methods: {
|
billSelectHandler(billData) {
|
console.log('billData: ', billData);
|
let data = billData.retVal[this.hform.HEquipID]
|
this.get_DocCheckItem2(data.hmainid)
|
},
|
|
toCheckFile() {
|
if (this.hform.HEquipID == 0) {
|
return CommonUtils.showTips({
|
message: '不能选择点检规程,请先扫描设备条码!!!'
|
})
|
}
|
this.$refs['billSelector'].showPopup(this.hform.HEquipID)
|
},
|
addNew() {
|
uni.redirectTo({
|
url: './Sb_EquipDotCheckBill?operationType=1'
|
})
|
},
|
goBack() {
|
uni.navigateBack()
|
},
|
checkBoxChangeHandler(index, e) {
|
let cr = e.detail.value
|
if (cr.length == 0) {
|
this.HCheckFileList[index]["HDotCheckResult"] = false
|
} else {
|
this.HCheckFileList[index]["HDotCheckResult"] = true
|
}
|
},
|
uploadFile(index) {
|
console.log('filePath: ', this.attachmentInfo[index].filePath);
|
// 通过临时路径读取文件
|
uni.uploadFile({
|
url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile",
|
filePath: this.attachmentInfo[index].filePath,
|
name: 'file',
|
formData: {
|
HBillNo: this.hform.HBillNo,
|
HRemark: "",
|
HUserName: getUserInfo()["Czymc"]
|
},
|
success: (uploadRes) => {
|
CommonUtils.showTips({
|
message: "上传成功"
|
})
|
this.attachmentInfo[index].status = "上传成功"
|
},
|
fail: (err) => {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: `上传失败: ${err}`
|
})
|
}
|
})
|
},
|
delFile(index) {
|
console.log('attachmentInfo: ', this.attachmentInfo[index]);
|
uni.showModal({
|
title: '提示',
|
content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!',
|
success: (res) => {
|
if (res.confirm) {
|
this.attachmentInfo.splice(index, 1)
|
}
|
},
|
})
|
|
},
|
handleUploadCallback(res) { // 文件上传回调
|
console.log('file: ', res);
|
let fileInfo = res.data[0]
|
this.attachmentInfo.push({
|
fileName: fileInfo.name,
|
size: fileInfo.size,
|
status: '等待上传',
|
filePath: fileInfo.tempFilePath
|
})
|
},
|
// 上传文件
|
fileUpload() {
|
this.$refs.XeUpload.upload('file', {});
|
},
|
//获取班次数据
|
async getShiftList() {
|
try {
|
let res = await CommonUtils.doRequest2Async({
|
url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
|
data: {
|
sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`,
|
HMaker: getUserInfo()["Czymc"],
|
},
|
})
|
|
let {
|
data,
|
count,
|
Message
|
} = res.data
|
if (count == 1) {
|
this.HShiftsList = data
|
} else {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: Message
|
})
|
}
|
} catch (err) {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: err
|
})
|
}
|
},
|
//获取使用部门数据
|
async getHDeptList() {
|
try {
|
let res = await CommonUtils.doRequest2Async({
|
url: '/Gy_Department/list',
|
data: {
|
sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')} `,
|
user: uni.getStorageSync('HUserName'),
|
Organization: uni.getStorageSync('Organization')
|
}
|
})
|
|
let {
|
data,
|
count,
|
Message
|
} = res.data
|
if (count == 1) {
|
this.HDeptList = data
|
} else {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: Message
|
})
|
}
|
} catch (err) {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: err
|
})
|
}
|
},
|
toScanCode() {
|
MpaasScan.scanCode(cb => {
|
this.hform.HBarCode = cb
|
this.GetMessageByBarCode(cb)
|
})
|
},
|
async GetMessageByBarCode(HBarCode) {
|
try {
|
let res = await CommonUtils.doRequest2Sync({
|
url: "/Gy_EquipFileBill/txtHBarCode_KeyDown",
|
data: {
|
HBarCode: HBarCode,
|
user: getUserInfo()["Czymc"]
|
},
|
})
|
|
|
if (!res) {
|
return
|
}
|
|
let {
|
data,
|
count,
|
Message
|
} = res.data
|
|
if (count == 1) {
|
console.log('data: ', data);
|
this.hform.HEquipID = data[0].HInterID
|
this.hform.HBarName = data[0].设备名称
|
this.hform.HBarSpec = data[0].设备规格
|
this.hform.HBarModel = data[0].设备型号
|
this.hform.HQty = 1
|
|
// 获取检验规程
|
this.GetItemByEquipFile()
|
} else {
|
CommonUtils.showTips({
|
title: "温馨提示",
|
message: Message
|
})
|
}
|
|
} catch (err) {
|
CommonUtils.showTips({
|
title: "温馨提示",
|
message: err
|
})
|
}
|
},
|
// 获取保养规程
|
async get_DocCheckItem2(HDotCheckRuleInterID) {
|
try {
|
let res = await CommonUtils.doRequest2Async({
|
url: "/Web/GetDotCheckRuleItemByDotCheckRuleID",
|
data: {
|
"HDotCheckRuleInterID": HDotCheckRuleInterID
|
},
|
})
|
|
let {
|
data,
|
count,
|
Message
|
} = res.data
|
if (count == 1) {
|
console.log('data: ',data);
|
this.hform.HEquipDotCheckRuleInterID = data[0].HInterID
|
this.hform.HEquipDotCheckRuleInterNo = data[0].HBillNo
|
this.hform.HPlanNo = data[0].点检计划单
|
this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0]
|
.点检计划ID
|
this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[
|
0].点检计划子ID
|
|
this.HCheckFileList = Array.from(data).map(item => {
|
return {
|
"HDotCheckItemID": item.HDotCheckItemID,
|
"HDotCheckCode": item.点检项目代码,
|
"HDotCheckItem": item.点检项目,
|
"HDotCheckPart": item.点检部位,
|
"HClaim": item.具体要求,
|
"HManagerID": item.负责人ID,
|
"HManagerCode": item.负责人代码,
|
"HManagerName": item.负责人名称,
|
"HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID,
|
"HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID,
|
"HSourceBillNo": item.点检计划单,
|
"HDotCheckItemClassID": 0,
|
"HDotCheckItemClassName": "",
|
"HDotCheckItemMethodID": 0,
|
"HDotCheckItemMethodName": "",
|
//"HDotCheckResult": item.默认结论 == 1 ? true : false
|
"HDotCheckResult": item.默认点检结果 == 'OK' ? true : false
|
}
|
})
|
|
this.enableEdit = false
|
this.$refs["billSelector"].exit()
|
|
} else {
|
CommonUtils.showTips({
|
message: Message
|
})
|
}
|
} catch (err) {
|
CommonUtils.showTips({
|
message: err
|
})
|
}
|
},
|
async GetItemByEquipFile() {
|
try {
|
let res = await CommonUtils.doRequest2Async({
|
url: "/Web/GetItemByEquipFile",
|
data: {
|
"EquipProjectID": this.hform.HEquipID,
|
"Type": "DJ",
|
"HDate": this.hform.HBeginDate
|
}
|
})
|
|
let {
|
data,
|
Message,
|
count
|
} = res.data
|
if (count == 1) {
|
this.hform.HEquipDotCheckRuleInterID = data[0].点检规程ID
|
this.hform.HEquipDotCheckRuleInterNo = data[0].点检规程单号
|
this.hform.HPlanNo = data[0].点检计划单
|
this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0]
|
.点检计划ID
|
this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[
|
0].点检计划子ID
|
|
this.HCheckFileList = Array.from(data).map(item => {
|
return {
|
"HDotCheckItemID": item.HDotCheckItemID,
|
"HDotCheckCode": item.点检项目代码,
|
"HDotCheckItem": item.点检项目名称,
|
"HDotCheckPart": item.点检部位,
|
"HClaim": item.具体要求,
|
"HManagerID": item.负责人ID,
|
"HManagerCode": item.负责人代码,
|
"HManagerName": item.负责人名称,
|
"HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID,
|
"HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID,
|
"HSourceBillNo": item.点检计划单,
|
"HDotCheckItemClassID": 0,
|
"HDotCheckItemClassName": "",
|
"HDotCheckItemMethodID": 0,
|
"HDotCheckItemMethodName": "",
|
"HDotCheckResult": item.默认点检结果 == 'OK' ? true : false
|
}
|
})
|
this.tabs = 1
|
} else {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: `获取点检规程错误: ${Message}`
|
})
|
}
|
} catch (err) {
|
CommonUtils.showTips({
|
title: '温馨提示',
|
message: `获取点检规程错误: ${err}`
|
})
|
}
|
},
|
radioChange({
|
detail: {
|
value
|
}
|
}) {
|
this.HLastResult = value
|
},
|
async getMaxNum() {
|
try {
|
let res = await CommonUtils.doRequest2Async({
|
url: "/Web/GetMAXNum",
|
data: {
|
"HBillType": this.HBillType
|
}
|
})
|
|
let {
|
count,
|
data,
|
Message
|
} = res.data
|
console.log('data: ', data);
|
this.hform.HInterID = 0
|
this.hform.HBillNo = data[0]["HBillNo"]
|
} catch (err) {
|
CommonUtils.showTips({
|
title: "温馨提示",
|
message: "获取单据信息异常: " + err
|
})
|
}
|
},
|
async submit() {
|
try {
|
let oMain = JSON.stringify(this.hform);
|
let sSubStr = JSON.stringify(this.HCheckFileList);
|
let sMainSub = oMain + ';' + sSubStr;
|
let res = await CommonUtils.doRequest2Sync({
|
url: "/Sb_PDA_EquipDotCheckBill/SaveGetEquipDotCheckBillList",
|
data: {
|
"msg": sMainSub
|
},
|
method: "POST"
|
})
|
|
if (!res) {
|
return
|
}
|
|
let {
|
count,
|
Message
|
} = res.data
|
if (count == 1) {
|
uni.showModal({
|
title: '提示',
|
content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)',
|
success: (res) => {
|
if (res.confirm) {
|
console.log('用户点击确定');
|
uni.redirectTo({
|
url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1'
|
})
|
} else if (res.cancel) {
|
console.log('用户点击取消');
|
setTimeout(() => {
|
uni.navigateBack();
|
}, 50)
|
}
|
}
|
});
|
} else {
|
CommonUtils.showTips({
|
title: "温馨提示",
|
message: "提交单据失败: " + Message
|
})
|
}
|
|
|
} catch (err) {
|
CommonUtils.showTips({
|
title: "温馨提示",
|
message: "提交单据失败: " + err
|
})
|
}
|
}
|
},
|
onLoad(e) {
|
console.log('e: ', e);
|
if (!e.operationType) {
|
this.operationType = 1
|
} else {
|
this.operationType = e.operationType
|
}
|
|
if (this.operationType == 1) {
|
// 新增
|
this.getMaxNum()
|
} else if (this.operationType == 2) {
|
// 复制
|
} else if (this.operationType == 3) {
|
// 编辑
|
|
} else if (this.operationType == 4) {
|
// 浏览
|
|
}
|
|
this.getHDeptList()
|
this.getShiftList()
|
},
|
onReady() {
|
const query = uni.createSelectorQuery().in(this)
|
query.select("#buttons")
|
.boundingClientRect()
|
.select("#tabs")
|
.boundingClientRect()
|
.exec(res => {
|
this.btnTop = Math.floor(res[0].top)
|
this.tabsBottom = Math.ceil(res[1].bottom)
|
})
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
@import "@/pages/MJGL/style/MJBillStyle.scss"
|
</style>
|