123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797 |
- <template>
- <div class="app-container" v-if="!open">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
- <el-form-item label="仓库名称" prop="fWarehouseid">
- <el-select
- v-model="queryParams.fWarehouseid"
- filterable
- placeholder="请选择仓库名称"
- >
- <el-option
- v-for="(item, index) in warehouseOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="计划日期">
- <el-date-picker
- v-model="fPlanneddate"
- @change="planDateMethod"
- type="daterange"
- :clearable="false"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- value-format="yyyy-MM-dd HH:mm:ss"
- :default-time="['00:00:00', '23:59:59']">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="巡检人" prop="fInspectorid">
- <el-select
- v-model="queryParams.fInspectorid"
- filterable
- placeholder="请选择巡检人"
- >
- <el-option
- v-for="(item, index) in patrolInspection"
- :key="index.userId"
- :label="item.userName"
- :value="item.userId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="巡检备注" prop="remark">
- <el-input
- v-model="queryParams.remark"
- placeholder="请输入巡检备注"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item>
- <el-button type="cyan" 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="primary"
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- >新增
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- >修改
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- >删除
- </el-button>
- </el-col>
- <!-- <el-col :span="1.5">-->
- <!-- <el-button-->
- <!-- type="warning"-->
- <!-- icon="el-icon-download"-->
- <!-- size="mini"-->
- <!-- @click="handleExport"-->
- <!-- >导出-->
- <!-- </el-button>-->
- <!-- </el-col>-->
- <right-toolbar :showSearch.sync="showSearch" @queryTable="resetQuery"></right-toolbar>
- </el-row>
- <el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange" ref="table"
- :height="tableHeight">
- <el-table-column type="selection" width="55" align="center"/>
- <el-table-column label="序号" type="index" width="50" fixed align="center"/>
- <el-table-column label="仓库名称" align="center" prop="fWarehouseName"/>
- <el-table-column label="巡检人" align="center" prop="fInspectorName"/>
- <el-table-column label="巡检计划日期起" align="center" prop="fInspectorBeginDatetime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.fInspectorBeginDatetime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="巡检计划日期止" align="center" prop="fInspectorEndDatetime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.fInspectorEndDatetime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="制单人" align="center" prop="fCreateByName"/>
- <el-table-column label="制单日期" align="center" prop="fCreateTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.fCreateTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="更新人" align="center" prop="fUpdateByName"/>
- <el-table-column label="最新时间" align="center" prop="fUpdateTime" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.fUpdateTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="系统编号" align="center" prop="fSystemNo"/>
- <el-table-column label="备注" align="center" prop="fRemark"/>
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="viewDetails(scope.row)"
- >查看
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- <div class="app-container" v-else>
- <!-- 添加或修改入出库状态对话框 -->
- <el-button type="danger" size="mini" @click="cancel">返回列表</el-button>
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
- <el-row>
- <el-col :span="8">
- <el-form-item label="仓库名称" prop="fWarehouseFid">
- <el-select
- v-model="form.fWarehouseFid"
- filterable
- style="width: 260px;"
- placeholder="请选择仓库名称"
- >
- <el-option
- v-for="(item, index) in warehouseOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="巡检日期起" prop="fInspectorBeginDatetime">
- <el-date-picker
- style="width: 260px;"
- v-model="form.fInspectorBeginDatetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="datetime"
- placeholder="选择日期时间">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="巡检日期止" prop="fInspectorEndDatetime">
- <el-date-picker
- style="width: 260px;"
- v-model="form.fInspectorEndDatetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="datetime"
- placeholder="选择日期时间">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="巡检人" prop="fInspectorId">
- <el-select
- v-model="form.fInspectorId"
- filterable
- style="width: 260px;"
- placeholder="请选择巡检人"
- >
- <el-option
- v-for="(item, index) in patrolInspection"
- :key="index.userId"
- :label="item.userName"
- :value="item.userId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="备注" prop="fRemark">
- <el-input v-model="form.remark" type="textarea" style="width: 260px;" placeholder="请输入内容" autosize/>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div style="width: 100%;margin: 10px auto">
- <el-button type="primary" size="mini" @click="inputDetails">录入明细</el-button>
- <el-button type="success" size="mini" @click="submitForm">保 存</el-button>
- </div>
- <div style="width: 100%;">
- <el-table
- :data="form.tWarehouseCheckItemsList"
- style="width: 100%">
- <el-table-column label="序号" type="index" width="50" fixed align="center"/>
- <el-table-column label="仓库名称" align="center" prop="fWarehouseFid">
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fWarehouseFid"
- filterable
- placeholder="请选择仓库名称"
- >
- <el-option
- v-for="(item, index) in warehouseOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="巡检人" align="center" prop="fInspectorId">
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fInspectorId"
- filterable
- placeholder="请选择巡检人"
- >
- <el-option
- v-for="(item, index) in patrolInspection"
- :key="index.userId"
- :label="item.userName"
- :value="item.userId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="计划日期" align="center" prop="fInspectionDatetime">
- <template slot-scope="scope">
- <el-date-picker
- style="width: 100%;"
- v-model="scope.row.fInspectionDatetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="datetime"
- placeholder="选择日期时间">
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column label="最新巡检日期" align="center" prop="fUpdateTime">
- <template slot-scope="scope">
- <el-date-picker
- style="width: 100%;"
- disabled
- v-model="scope.row.fUpdateTime"
- value-format="yyyy-MM-dd HH:mm:ss"
- type="datetime"
- placeholder="选择日期时间">
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column label="最新巡检人" align="center" prop="fUpdateBy">
- <template slot-scope="scope">
- <el-select
- disabled
- v-model="scope.row.fUpdateBy"
- filterable
- placeholder="最新巡检人"
- >
- <el-option
- v-for="(item, index) in patrolInspection"
- :key="index.userId"
- :label="item.userName"
- :value="item.userId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="巡检记录" align="center">
- <template slot-scope="scope" style="width: 100px;">
- <el-button
- size="mini"
- type="text"
- :disabled="!scope.row.fId"
- @click="pictureList(scope)"
- icon="el-icon-document"
- >详情
- </el-button>
- </template>
- </el-table-column>
- <!-- <el-table-column label="录入人" align="center" prop="createBy">-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-input v-model="scope.row.createBy" placeholder="请输入内容"></el-input>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column label="录入日期" align="center" prop="createTime">-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-date-picker-->
- <!-- style="width: 100%;"-->
- <!-- v-model="scope.row.createTime"-->
- <!-- value-format="yyyy-MM-dd"-->
- <!-- type="date"-->
- <!-- placeholder="选择日期">-->
- <!-- </el-date-picker>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column label="更新人" align="center" prop="updateBy">-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-input v-model="scope.row.updateBy" placeholder="请输入内容"></el-input>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column label="更新日期" align="center" prop="updateTime">-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-date-picker-->
- <!-- style="width: 100%;"-->
- <!-- v-model="scope.row.updateTime"-->
- <!-- value-format="yyyy-MM-dd"-->
- <!-- type="date"-->
- <!-- placeholder="选择日期">-->
- <!-- </el-date-picker>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column label="备注" align="center" prop="fRemark">
- <template slot-scope="scope">
- <el-input v-model="scope.row.fRemark" placeholder="请输入备注"></el-input>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
- <template slot-scope="scope" style="width: 100px;">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="singleItemDeletion(scope.$index,scope)"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div slot="footer" class="dialog-footer">
- </div>
- <el-dialog
- title="图片明细"
- :visible.sync="opentwo"
- append-to-body
- width="70%">
- <el-form ref="form" :model="twarehousecheckdetailList" label-width="80px"
- style="display:flex;flex-wrap: wrap;justify-content: space-between">
- <el-form-item label="仓库名称" prop="fWarehouseid">
- <el-select
- v-model="twarehousecheckdetailList.fWarehouseid"
- filterable
- disabled
- placeholder="请选择仓库名称"
- style="width: 200px;"
- >
- <el-option
- v-for="(item, index) in warehouseOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="巡检日期" prop="fCreateTime">
- <el-date-picker
- style="width: 200px;"
- disabled
- v-model="twarehousecheckdetailList.fCreateTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="巡检人" prop="fInspectorid">
- <el-select
- disabled
- v-model="twarehousecheckdetailList.fInspectorid"
- filterable
- placeholder="最新巡检人"
- >
- <el-option
- v-for="(item, index) in patrolInspection"
- :key="index.userId"
- :label="item.userName"
- :value="item.userId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="备注" prop="fRemark">
- <el-input style="width: 200px;" v-model="twarehousecheckdetailList.fRemark" type="textarea"
- placeholder="请输入内容" autosize/>
- </el-form-item>
- </el-form>
- <div style="margin-top: 20px;border: 1px solid #cccccc;padding: 5px;border-radius: 10px">
- <el-upload
- :headers="headers"
- :action="uploadImgUrl"
- :on-success="onSuccess"
- list-type="picture-card"
- :file-list="fileList"
- accept=".jpeg,.jpg,.png,.svg,.webp"
- :limit="100"
- :on-preview="handlePictureCardPreview"
- :on-remove="handleRemove">
- <i class="el-icon-plus"></i>
- </el-upload>
- <el-dialog :visible.sync="dVisible" append-to-body>
- <img width="100%" :src="dialogImageUrl" alt="">
- </el-dialog>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="closePicture">取 消</el-button>
- <el-button type="primary" @click="preservationtwo">保 存</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listCorps,
- deleteMasterTable,
- delLog,
- information,
- secondDelete,
- newlyAdded,
- savePicture,
- selectUserByRole,
- addOrModifyPictureList,
- currentLogin
- } from '@/api/warehouseCheck/index'
- import {listWarehousesss} from "@/api/basicdata/warehouse";
- import {getToken} from "@/utils/auth";
- export default {
- name: "Log",
- components: {},
- data() {
- return {
- tableHeight: '600',
- headers: {
- Authorization: "Bearer " + getToken(),
- },
- patrolInspection: [],
- uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
- warehouseOptions: [],
- fPlanneddate: [],
- fileList: [],
- dialogImageUrl: '',
- dVisible: false,
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- pictureEist: [],
- // 总条数
- total: 0,
- // 入出库状态表格数据
- logList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- opentwo: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- },
- // 表单参数
- form: {},
- formList: [],
- // 表单校验
- rules: {},
- twarehousecheckdetailList: {},
- picturefId: ''
- };
- },
- created() {
- let date = new Date();
- let year = parseInt(date.getFullYear())
- let month = parseInt(date.getMonth() + 1)
- let currentMonth = date.getMonth()
- let nextMonth = ++currentMonth
- let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
- let oneDay = 1000 * 60 * 60 * 24
- let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
- let day = lastTime.getDate()
- if (day < 10) {
- day = '0' + day
- }
- this.fPlanneddate = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
- currentLogin().then(res => {
- console.log(res)
- })
- selectUserByRole().then(res => {
- this.patrolInspection = res.rows
- console.log(res)
- })
- listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
- this.warehouseOptions = response.rows;
- });
- this.getList();
- },
- mounted() {
- this.$nextTick(() => {
- // 监听浏览器高度变化,改变表格高度
- window.onresize = () => {
- this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
- }
- })
- },
- methods: {
- // 获取当前月的第一天和最后一天
- getMonth() {
- let date = new Date();
- let year = parseInt(date.getFullYear())
- let month = parseInt(date.getMonth() + 1)
- let currentMonth = date.getMonth()
- let nextMonth = ++currentMonth
- let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1) // 下个月的第一天
- let oneDay = 1000 * 60 * 60 * 24
- let lastTime = new Date(nextMonthFirstDay - oneDay) // 下个月的第一天减去一天,就是上个月的最后一天
- let day = lastTime.getDate()
- if (day < 10) {
- day = '0' + day
- }
- this.queryParams.timeInterval = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
- },
- onSuccess(response, file, fileList) {
- console.log(fileList)
- this.pictureEist = fileList
- },
- handlePictureCardPreview(file) {
- this.dialogImageUrl = file.url;
- this.dVisible = true;
- },
- //移除图片
- handleRemove(file, fileList) {
- console.log(fileList);
- this.pictureEist = fileList
- },
- //录入新行
- inputDetails() {
- if (this.form.tWarehouseCheckItemsList === null) this.form.tWarehouseCheckItemsList = []
- this.form.tWarehouseCheckItemsList.push({
- fWarehousename: '',
- fWarehouseFid: this.form.fWarehouseFid,
- fLatestinspectorid: '',
- fInspectorId: this.form.fInspectorId,
- fPlanneddate: '',
- fLatestinspectdate: '',
- fInspectionrecord: '',
- updateTime: '',
- createBy: '',
- createTime: '',
- updateBy: '',
- remark: '',
- })
- },
- //关闭新增图片弹窗
- closePicture() {
- this.opentwo = false
- this.fileList = []
- },
- //图片保存
- preservationtwo() {
- this.twarehousecheckdetailList.fPhotoUrl = []
- for (let item in this.pictureEist) {
- if (this.pictureEist[item].response) {
- this.twarehousecheckdetailList.fPhotoUrl.push({
- url: this.pictureEist[item].response.url
- })
- } else {
- this.twarehousecheckdetailList.fPhotoUrl.push({
- url: this.pictureEist[item].url
- })
- }
- }
- this.twarehousecheckdetailList.fPhotoUrl = JSON.stringify(this.twarehousecheckdetailList.fPhotoUrl)
- if (!this.twarehousecheckdetailList.fId) {
- addOrModifyPictureList(this.twarehousecheckdetailList, 'post').then(res => {
- console.log(res)
- })
- } else {
- addOrModifyPictureList(this.twarehousecheckdetailList, 'put').then(res => {
- console.log(res)
- })
- }
- },
- pictureList(scope) {
- let data = {
- fItemFid: scope.row.fId
- }
- savePicture(data).then(res => {
- let data = res.rows
- if (data.length === 0) {
- this.twarehousecheckdetailList = {
- fCheckFid: scope.row.fCheckFid,
- fItemFid: scope.row.fId,
- fWarehouseid: scope.row.fWarehouseFid, //仓库名称
- fCreateTime: '',
- fInspectorid: '',
- fRemark: '',
- fPhotoUrl: []
- }
- } else {
- this.twarehousecheckdetailList = res.rows[0]
- this.twarehousecheckdetailList.fWarehouseid = scope.row.fWarehouseFid
- this.fileList = []
- for (let item in JSON.parse(res.rows[0].fPhotoUrl)) {
- this.fileList.push(JSON.parse(res.rows[0].fPhotoUrl)[item])
- }
- this.pictureEist = this.fileList
- }
- })
- this.opentwo = true
- },
- //查看明细
- viewDetails(row) {
- information(row.fId).then(res => {
- this.open = true
- if (res.data.twarehousecheckitemsVOList === null) res.data.twarehousecheckitemsVOList = []
- this.form = res.data
- })
- },
- //明细删除第二弹窗
- singleItemDeletion(index, scope) {
- let this_ = this
- if (scope.row.fId) {
- secondDelete(scope.row.fId).then(res => {
- this_.$message({
- showClose: true,
- message: '删除成功',
- type: 'success'
- });
- this_.viewDetails(this_.form)
- })
- } else {
- this_.form.tWarehouseCheckItemsList.splice(index, 1);
- }
- },
- //拆分计划日期
- planDateMethod() {
- if (this.fPlanneddate) {
- this.$set(this.queryParams, 'fBegintime', this.fPlanneddate[0])
- this.$set(this.queryParams, 'fEndtime', this.fPlanneddate[1])
- }
- },
- /** 查询入出库状态列表 */
- getList() {
- listCorps(this.queryParams).then(res => {
- if (res.code === 200) {
- this.logList = res.rows
- this.loading = false
- this.total = res.total
- // 根据浏览器高度设置初始高度
- this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
- // setInterval(() => {
- // this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
- // }, 300)
- }
- })
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.getList();
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- fId: null,
- fPid: null,
- fItmeid: null,
- fItmestatus: 0,
- fBillstatus: "0",
- createTime: null,
- createBy: null,
- updateBy: null,
- updateTime: null,
- remark: null
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.queryParams = {
- pageNum: 1,
- pageSize: 10,
- }
- this.fPlanneddate = []
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.fId)
- this.single = selection.length !== 1
- this.multiple = !selection.length
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.form.tWarehouseCheckItemsList = []
- this.title = "添加巡检详情";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const fId = row.fId || this.ids
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- newlyAdded(this.form).then(response => {
- this.msgSuccess("新增成功");
- this.viewDetails({fId: response.data})
- // this.open = false;
- // this.getList();
- });
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const fIds = row.fId || this.ids;
- this.$confirm('是否确认删除入出库状态编号为"' + fIds + '"的数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function () {
- return deleteMasterTable(fIds);
- }).then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- })
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$confirm('是否确认导出所有入出库状态数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function () {
- return exportLog(queryParams);
- }).then(response => {
- this.download(response.msg);
- })
- }
- }
- };
- </script>
|