2024-05-14 11:00:04 +00:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container">
|
2024-05-17 08:40:59 +00:00
|
|
|
|
<el-form ref="form" size="mini" :model="form" label-width="80px">
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="扫描单号" prop="billCode" label-width="80px">
|
|
|
|
|
|
<span slot="label">
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<span style="color: red">{{$t('扫描单号')}}</span>
|
2024-05-29 00:48:35 +00:00
|
|
|
|
</span>
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-input v-model="form.billCode" clearable="" placeholder="单号输入后按回车" @keyup.enter.native="handleScanInput" >
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<i slot="suffix" class="iconfont"></i>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-06-22 08:58:25 +00:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item :label="$t('问题类型')" prop="problemType" label-width="80px">
|
|
|
|
|
|
<span slot="label">
|
|
|
|
|
|
<span style="color: red">{{$t('问题类型')}}</span>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<ProblemTypePicker v-model="form.problemId" @onChange="onproblemTypeSelect" ></ProblemTypePicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
2024-05-29 00:48:35 +00:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
2024-06-26 10:16:42 +00:00
|
|
|
|
<el-form-item :label="$t('通知网点')" prop="notifySiteCode" label-width="80px">
|
|
|
|
|
|
<EmisSiteSimplePicker v-model="form.notifySiteCode" @onChange="onScanSiteSelect" ></EmisSiteSimplePicker>
|
|
|
|
|
|
<!-- <el-select v-model="form.notifySiteCode" @change="onScanSiteSelect">
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-option v-for="item in notifySiteDataSource" :key="item.notifySiteCode" :value="item.notifySiteCode" :label="item.notifySiteName" ></el-option>
|
2024-06-26 10:16:42 +00:00
|
|
|
|
</el-select> -->
|
2024-05-29 00:48:35 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-06-22 08:58:25 +00:00
|
|
|
|
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="问题原因" prop="remark" label-width="80px">
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<span slot="label">
|
|
|
|
|
|
<span style="color: red">{{$t('问题原因')}}</span>
|
|
|
|
|
|
</span>
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="form.remark"
|
2024-06-14 06:41:02 +00:00
|
|
|
|
type="textarea"
|
2024-06-22 08:58:25 +00:00
|
|
|
|
rows="3"
|
2024-05-29 00:48:35 +00:00
|
|
|
|
:placeholder="$t('请输入')"
|
|
|
|
|
|
clearable
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item label="问题图片" prop="xxx" label-width="80px">
|
|
|
|
|
|
<ImageUpload v-model="form.picUrl" @input="handleInput" :isShowTip="false" ></ImageUpload>
|
2024-06-06 17:04:22 +00:00
|
|
|
|
</el-form-item>
|
2024-05-29 00:48:35 +00:00
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
2024-05-14 11:00:04 +00:00
|
|
|
|
</el-form>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<xd-table v-loading="loading"
|
2024-06-24 01:22:55 +00:00
|
|
|
|
border
|
2024-05-14 11:00:04 +00:00
|
|
|
|
size="small"
|
2024-06-23 07:22:16 +00:00
|
|
|
|
storageName="problemEntry_main"
|
2024-05-17 08:40:59 +00:00
|
|
|
|
:data="emisWaybillList"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
:showSearch.sync="showSearch"
|
|
|
|
|
|
:total="total"
|
2024-05-17 10:07:40 +00:00
|
|
|
|
:queryParams="queryParams"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div slot="toolbar">
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon=""
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
@click="handleRegister"
|
|
|
|
|
|
>登记</el-button>
|
|
|
|
|
|
</el-col>
|
2024-05-14 11:00:04 +00:00
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="multiple"
|
2024-05-17 08:40:59 +00:00
|
|
|
|
@click="handleUpload"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
v-hasPermi="['emis:emisTmsScanRecord:add']"
|
|
|
|
|
|
>上传</el-button>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
plain
|
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
|
v-hasPermi="['emis:emisTmsScanRecord:remove']"
|
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
|
</el-col>
|
2024-07-02 06:42:33 +00:00
|
|
|
|
<!-- <el-col :span="1.5">
|
2024-05-14 11:00:04 +00:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
size="mini"
|
2024-05-17 08:40:59 +00:00
|
|
|
|
@click="handleUpload"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
v-hasPermi="['emis:emisTmsScanRecord:add']"
|
|
|
|
|
|
>下载导入模版</el-button>
|
2024-07-02 06:42:33 +00:00
|
|
|
|
</el-col> -->
|
|
|
|
|
|
<!-- <el-col :span="1.5">
|
2024-05-14 11:00:04 +00:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
size="mini"
|
2024-05-17 08:40:59 +00:00
|
|
|
|
@click="handleUpload"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
v-hasPermi="['emis:emisTmsScanRecord:add']"
|
|
|
|
|
|
>导入</el-button>
|
2024-07-02 06:42:33 +00:00
|
|
|
|
</el-col> -->
|
2024-05-14 11:00:04 +00:00
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
size="mini"
|
2024-05-17 10:07:40 +00:00
|
|
|
|
@click="handleBatchRegister"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
>批量登记</el-button>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
plain
|
|
|
|
|
|
size="mini"
|
2024-05-17 08:40:59 +00:00
|
|
|
|
@click="handleBatchModify"
|
2024-05-14 11:00:04 +00:00
|
|
|
|
>批量修改</el-button>
|
|
|
|
|
|
</el-col>
|
2024-05-29 00:48:35 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</div>
|
2024-05-14 11:00:04 +00:00
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="170" />
|
|
|
|
|
|
<el-table-column :label="$t('状态')" align="center" prop="currentStatus" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('通知网点')" align="center" prop="notifySiteName" min-width="170" />
|
|
|
|
|
|
<el-table-column :label="$t('登记网点')" align="center" prop="scanSite" min-width="170" />
|
|
|
|
|
|
<el-table-column :label="$t('登记日期')" align="center" prop="scanDate" min-width="170">
|
2024-05-14 11:00:04 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<span>{{ parseTime(scope.row.scanDate) }}</span>
|
|
|
|
|
|
</template>
|
2024-05-14 11:00:04 +00:00
|
|
|
|
</el-table-column>
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-table-column :label="$t('问题件类型')" align="center" prop="problemTypeName" min-width="100" />
|
|
|
|
|
|
<el-table-column :label="$t('登记人')" align="center" prop="scanMan" min-width="150" />
|
2024-05-17 08:40:59 +00:00
|
|
|
|
<el-table-column :label="$t('图片路径')" align="center" prop="picUrl" min-width="100">
|
2024-06-22 08:58:25 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<ImagePreview height="50px" v-for="pic in (scope.row.picUrl||'').split(',')" :key="pic" :src="pic" ></ImagePreview>
|
2024-05-17 08:40:59 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-table-column :label="$t('问题件原因')" align="center" prop="remark" min-width="170">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="ellipsis">{{scope.row.remark}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-05-17 08:40:59 +00:00
|
|
|
|
<el-table-column :label="$t('数据来源')" align="center" prop="dataFrom" min-width="100" />
|
2024-06-05 12:31:20 +00:00
|
|
|
|
<el-table-column :label="$t('所属业务员')" align="center" prop="marketMan" min-width="170" />
|
2024-05-17 08:40:59 +00:00
|
|
|
|
<el-table-column :label="$t('业务员编号')" align="center" prop="marketManCode" min-width="100" />
|
2024-05-14 11:00:04 +00:00
|
|
|
|
</xd-table>
|
|
|
|
|
|
<!-- 添加或修改问题件对话框 -->
|
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
|
|
|
|
|
<el-row :gutter="0">
|
|
|
|
|
|
<el-form ref="form" :model="form" size="mini" label-width="80px">
|
|
|
|
|
|
<!-- <el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px"> -->
|
|
|
|
|
|
<el-col :span="24">
|
2024-05-17 08:40:59 +00:00
|
|
|
|
<el-form-item :label="$t('通知网点')" prop="notifySite" label-width="80px">
|
|
|
|
|
|
<EmisSiteSimplePicker v-model="form.modifyNotifySite" @onChange="onModifyScanSiteSelect" ></EmisSiteSimplePicker>
|
2024-05-14 11:00:04 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
2024-05-17 10:07:40 +00:00
|
|
|
|
<el-dialog :title="titleBatch" :visible.sync="openBatch" width="50%" v-dialogDrag :close-on-click-modal="false" append-to-body>
|
|
|
|
|
|
<el-form ref="formBatch" :model="formBatch" size="mini" label-width="60px">
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item :label="$t('运单号')" prop="billCode">
|
|
|
|
|
|
<el-input v-model="formBatch.billCode" type="textarea" :rows="8" placeholder="运单号" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer" style="text-align:center">
|
|
|
|
|
|
<el-button type="primary" @click="submitFormBatch">确 定</el-button>
|
|
|
|
|
|
<el-button @click="cancelBatch">取 消</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
2024-05-14 11:00:04 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-05-17 10:07:40 +00:00
|
|
|
|
import { addEmisWaybillProblemInfo,listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
2024-05-17 08:40:59 +00:00
|
|
|
|
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
2024-06-02 09:59:42 +00:00
|
|
|
|
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
2024-06-22 08:58:25 +00:00
|
|
|
|
import { getWaybillDetail} from "@/api/emis/emisWaybill";
|
|
|
|
|
|
|
2024-06-02 09:59:42 +00:00
|
|
|
|
// import { getWaybillDetail } from "@/api/emis/emisWaybill";
|
2024-05-14 11:00:04 +00:00
|
|
|
|
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
|
|
|
|
|
import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue';
|
2024-06-19 11:24:45 +00:00
|
|
|
|
import { parseTime } from "@/utils/custom";
|
2024-05-14 11:00:04 +00:00
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: "ProblemEntry",
|
2024-05-17 08:40:59 +00:00
|
|
|
|
components: { EmisSiteSimplePicker, ProblemTypePicker },
|
2024-05-14 11:00:04 +00:00
|
|
|
|
dicts: ['emis_question_type'],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
// 遮罩层
|
2024-05-17 08:40:59 +00:00
|
|
|
|
loading: false,
|
2024-05-14 11:00:04 +00:00
|
|
|
|
// 选中数组
|
|
|
|
|
|
ids: [],
|
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
|
single: true,
|
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
|
multiple: true,
|
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
|
showSearch: true,
|
|
|
|
|
|
// 创建时间搜索
|
|
|
|
|
|
dateTimeRange:[],
|
|
|
|
|
|
// 总条数
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
// 问题件表格数据
|
2024-05-17 08:40:59 +00:00
|
|
|
|
emisWaybillList: [],
|
2024-05-17 10:07:40 +00:00
|
|
|
|
|
2024-06-05 12:31:20 +00:00
|
|
|
|
notifySiteDataSource:[],
|
|
|
|
|
|
|
2024-05-14 11:00:04 +00:00
|
|
|
|
title: "",
|
|
|
|
|
|
open: false,
|
2024-05-17 10:07:40 +00:00
|
|
|
|
titleBatch:"",
|
|
|
|
|
|
openBatch:false,
|
|
|
|
|
|
|
2024-05-17 08:40:59 +00:00
|
|
|
|
problemId:null,
|
|
|
|
|
|
problemType:null,
|
2024-05-14 11:00:04 +00:00
|
|
|
|
openForm: false,
|
|
|
|
|
|
titleForm: "",
|
2024-06-05 12:31:20 +00:00
|
|
|
|
tempRecord:{},
|
2024-05-14 11:00:04 +00:00
|
|
|
|
titleEmisWaybillProblemInfo: "",
|
|
|
|
|
|
openEmisWaybillProblemInfo: false,
|
|
|
|
|
|
// 显示编辑框更多
|
|
|
|
|
|
moreInputVisible: false,
|
|
|
|
|
|
|
|
|
|
|
|
// 弹出展示层
|
|
|
|
|
|
currentId:null,
|
|
|
|
|
|
id:null,
|
|
|
|
|
|
titleView:"",
|
|
|
|
|
|
openView: false,
|
|
|
|
|
|
// 备注时间范围
|
|
|
|
|
|
daterangeRegisterDate: [],
|
|
|
|
|
|
// 备注时间范围
|
|
|
|
|
|
daterangeCreateTime: [],
|
|
|
|
|
|
// 备注时间范围
|
|
|
|
|
|
daterangeUpdateTime: [],
|
|
|
|
|
|
// 表单参数
|
|
|
|
|
|
form: {},
|
2024-05-17 10:07:40 +00:00
|
|
|
|
formBatch:{},
|
2024-05-17 08:40:59 +00:00
|
|
|
|
dataMap:[],
|
2024-05-17 10:07:40 +00:00
|
|
|
|
queryParams:{}
|
2024-05-14 11:00:04 +00:00
|
|
|
|
// 表单校验
|
|
|
|
|
|
// rules: {
|
|
|
|
|
|
// id: [
|
|
|
|
|
|
// { required: true, message: "id不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
|
|
|
|
|
// }
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
created() {
|
2024-05-17 08:40:59 +00:00
|
|
|
|
// this.getList();
|
|
|
|
|
|
this.form.scanSiteCode=this.$store.getters.ownerSiteCode;
|
|
|
|
|
|
this.form.scanSite=this.$store.getters.ownerSiteName;
|
|
|
|
|
|
this.form.scanMan=this.$store.getters.empName;
|
|
|
|
|
|
this.form.scanManCode=this.$store.getters.empCode;
|
|
|
|
|
|
this.form.recordMan=this.$store.getters.empName;
|
|
|
|
|
|
this.form.recordManCode=this.$store.getters.empCode;
|
|
|
|
|
|
this.form.dispatchOrSendManCode=this.$store.getters.empCode;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
|
cancel() {
|
|
|
|
|
|
this.open = false;
|
2024-05-17 08:40:59 +00:00
|
|
|
|
this.modifyNotifySite=null;
|
|
|
|
|
|
this.modifyNotifySiteName=null;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
2024-05-17 10:07:40 +00:00
|
|
|
|
cancelBatch() {
|
|
|
|
|
|
this.openBatch = false;
|
|
|
|
|
|
this.formBatch={};
|
|
|
|
|
|
},
|
2024-05-14 11:00:04 +00:00
|
|
|
|
// 多选框选中数据
|
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
},
|
|
|
|
|
|
onScanSiteSelect(item){
|
2024-06-26 10:16:42 +00:00
|
|
|
|
debugger
|
2024-05-17 10:07:40 +00:00
|
|
|
|
if(!item){
|
2024-06-05 12:31:20 +00:00
|
|
|
|
this.form.notifySiteCode = null;
|
|
|
|
|
|
this.form.notifySiteName = null;
|
2024-05-17 10:07:40 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-06-26 10:16:42 +00:00
|
|
|
|
this.form.notifySiteCode=item.siteCode;
|
|
|
|
|
|
this.form.notifySiteName=item.siteName;
|
|
|
|
|
|
// this.notifySiteDataSource.forEach(nItem => {
|
|
|
|
|
|
// if(nItem.notifySiteCode == item){
|
|
|
|
|
|
// this.form.notifySiteName=nItem.notifySiteName;
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// })
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
|
|
|
|
|
onproblemTypeSelect(item){
|
2024-05-17 08:40:59 +00:00
|
|
|
|
// debugger;
|
2024-05-17 10:07:40 +00:00
|
|
|
|
if(!item){
|
|
|
|
|
|
this.form.problemType = null;
|
|
|
|
|
|
this.form.problemId = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-05-17 08:40:59 +00:00
|
|
|
|
this.form.problemType = item.typeName;
|
|
|
|
|
|
this.form.problemId=item.id;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
|
|
|
|
|
handleInput(item){
|
2024-05-17 08:40:59 +00:00
|
|
|
|
this.form.picUrl = item;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
2024-05-29 00:48:35 +00:00
|
|
|
|
onModifyScanSiteSelect(item){
|
2024-05-17 10:07:40 +00:00
|
|
|
|
if(!item){
|
|
|
|
|
|
this.form.modifyNotifySite = null;
|
|
|
|
|
|
this.form.modifyNotifySiteName = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-05-17 08:40:59 +00:00
|
|
|
|
this.form.modifyNotifySite=item && item.siteCode;
|
|
|
|
|
|
this.form.modifyNotifySiteName=item && item.siteName;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
2024-05-17 10:07:40 +00:00
|
|
|
|
handleBatchRegister(){
|
2024-06-05 12:31:20 +00:00
|
|
|
|
// if(this.form.notifySite==null || this.form.notifySite==''){
|
|
|
|
|
|
// this.$message.error("请选择通知网点");
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
2024-05-17 10:07:40 +00:00
|
|
|
|
if(this.form.problemType==null || this.form.problemType==''){
|
|
|
|
|
|
this.$message.error("请选择问题类型");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-06-05 12:31:20 +00:00
|
|
|
|
if(this.form.remark==null || this.form.remark==''){
|
|
|
|
|
|
this.$message.error("请填写问题原因");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-05-17 10:07:40 +00:00
|
|
|
|
this.formBatch = {
|
|
|
|
|
|
billCode: null,
|
|
|
|
|
|
}
|
|
|
|
|
|
this.titleBatch="批量登记";
|
|
|
|
|
|
this.openBatch=true;
|
|
|
|
|
|
},
|
2024-05-17 08:40:59 +00:00
|
|
|
|
handleBatchModify(){
|
|
|
|
|
|
if(this.ids !=null && this.ids.length>0){
|
|
|
|
|
|
this.open=true;
|
|
|
|
|
|
this.title="请选择通知网点"
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.$message.error("请先选择数据")
|
|
|
|
|
|
}
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
2024-06-22 08:58:25 +00:00
|
|
|
|
async handleScanInput(){
|
2024-05-17 08:40:59 +00:00
|
|
|
|
if(this.form.billCode==null || this.form.billCode==''){
|
|
|
|
|
|
this.$message.error("输入单号后回车");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-06-05 12:31:20 +00:00
|
|
|
|
// this.getWaybill(this.form.billCode)
|
2024-06-22 08:58:25 +00:00
|
|
|
|
// this.loading = true;
|
|
|
|
|
|
|
2024-07-10 22:40:54 +00:00
|
|
|
|
|
2024-07-03 08:21:21 +00:00
|
|
|
|
for(let i = 0; i < this.emisWaybillList.length; i++){
|
|
|
|
|
|
if(this.emisWaybillList[i].billCode == this.form.billCode && this.emisWaybillList[i].problemId == this.form.problemId){
|
|
|
|
|
|
this.$message.error("重复扫描");
|
|
|
|
|
|
this.form.billCode = "";
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-22 08:58:25 +00:00
|
|
|
|
let res=await getWaybillDetail(this.form.billCode);
|
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
|
if(res.code != 200){
|
|
|
|
|
|
this.$message.error(res.msg);
|
2024-05-17 08:40:59 +00:00
|
|
|
|
return;
|
2024-06-22 08:58:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let scanDate = new Date();
|
|
|
|
|
|
let rsItem = res.data;
|
|
|
|
|
|
console.log(rsItem);
|
|
|
|
|
|
this.tempRecord =Object.assign({}, rsItem)
|
|
|
|
|
|
// tempRecord.notifySite = tempRecord.sendSiteCode;
|
|
|
|
|
|
// tempRecord.notifySiteName = tempRecord.sendSiteName;
|
|
|
|
|
|
this.tempRecord.scanSiteCode=this.form.scanSiteCode;
|
|
|
|
|
|
this.tempRecord.scanSite=this.form.scanSite;
|
|
|
|
|
|
this.tempRecord.scanDate=scanDate;
|
|
|
|
|
|
this.tempRecord.scanMan=this.form.scanMan;
|
|
|
|
|
|
this.tempRecord.scanManCode=this.form.scanManCode;
|
|
|
|
|
|
this.tempRecord.dataFrom="PC";
|
|
|
|
|
|
this.notifySiteDataSource=[
|
|
|
|
|
|
{
|
|
|
|
|
|
notifySiteCode:this.tempRecord.sendSiteCode,
|
|
|
|
|
|
notifySiteName:this.tempRecord.sendSiteName,
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
notifySiteCode:this.tempRecord.dispatchUnderlingSiteCode,
|
|
|
|
|
|
notifySiteName:this.tempRecord.dispatchUnderlingSiteName,
|
2024-05-17 08:40:59 +00:00
|
|
|
|
}
|
2024-06-22 08:58:25 +00:00
|
|
|
|
]
|
|
|
|
|
|
if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){
|
|
|
|
|
|
this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode;
|
|
|
|
|
|
this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName;
|
|
|
|
|
|
}
|
|
|
|
|
|
else{
|
|
|
|
|
|
this.form.notifySiteCode = this.tempRecord.sendSiteCode;
|
|
|
|
|
|
this.form.notifySiteName = this.tempRecord.sendSiteName;
|
2024-06-26 10:16:42 +00:00
|
|
|
|
console.log(this.form.notifySiteCode)
|
2024-06-22 08:58:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-26 10:16:42 +00:00
|
|
|
|
this.form = {...this.form};
|
|
|
|
|
|
|
2024-06-22 08:58:25 +00:00
|
|
|
|
// listEmisWaybill({billCode:this.form.billCode}).then(response => {
|
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
|
// let scanDate = new Date();
|
|
|
|
|
|
// if(response.code != 200){
|
|
|
|
|
|
// this.$message.error(response.msg);
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// let rows = response.rows;
|
|
|
|
|
|
// if(!rows || rows.length == 0){
|
|
|
|
|
|
// this.$message.error("未查到单号");
|
|
|
|
|
|
// this.form.billCode=null;
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if(rows.length>0) {
|
|
|
|
|
|
// let rsItem = rows[0];
|
|
|
|
|
|
// console.log(rsItem);
|
|
|
|
|
|
// this.tempRecord =Object.assign({}, rsItem)
|
|
|
|
|
|
// // tempRecord.notifySite = tempRecord.sendSiteCode;
|
|
|
|
|
|
// // tempRecord.notifySiteName = tempRecord.sendSiteName;
|
|
|
|
|
|
// this.tempRecord.scanSiteCode=this.form.scanSiteCode;
|
|
|
|
|
|
// this.tempRecord.scanSite=this.form.scanSite;
|
|
|
|
|
|
// this.tempRecord.scanDate=scanDate;
|
|
|
|
|
|
// this.tempRecord.scanMan=this.form.scanMan;
|
|
|
|
|
|
// this.tempRecord.scanManCode=this.form.scanManCode;
|
|
|
|
|
|
// this.tempRecord.dataFrom="PC";
|
|
|
|
|
|
// this.notifySiteDataSource=[
|
|
|
|
|
|
// {
|
|
|
|
|
|
// notifySiteCode:this.tempRecord.sendSiteCode,
|
|
|
|
|
|
// notifySiteName:this.tempRecord.sendSiteName,
|
|
|
|
|
|
// },
|
|
|
|
|
|
// {
|
|
|
|
|
|
// notifySiteCode:this.tempRecord.dispatchUnderlingSiteCode,
|
|
|
|
|
|
// notifySiteName:this.tempRecord.dispatchUnderlingSiteName,
|
|
|
|
|
|
// }
|
|
|
|
|
|
// ]
|
|
|
|
|
|
// if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){
|
|
|
|
|
|
// this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode;
|
|
|
|
|
|
// this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// // else if(this.tempRecord.dispatchUnderlingSiteCode == this.$store.getters.ownerSiteCode){
|
|
|
|
|
|
// // this.form.notifySiteCode = this.tempRecord.sendSiteCode;
|
|
|
|
|
|
// // this.form.notifySiteName = this.tempRecord.sendSiteName;
|
|
|
|
|
|
// // }
|
|
|
|
|
|
// else{
|
|
|
|
|
|
// this.form.notifySiteCode = this.tempRecord.sendSiteCode;
|
|
|
|
|
|
// this.form.notifySiteName = this.tempRecord.sendSiteName;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// // this.billInputDisabled = true;
|
|
|
|
|
|
// // this.emisWaybillList.push(tempRecord);
|
|
|
|
|
|
// // this.dataMap[this.form.billCode]=tempRecord;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// // this.form.billCode=null;
|
|
|
|
|
|
// })
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
2024-06-05 12:31:20 +00:00
|
|
|
|
handleRegister(){
|
|
|
|
|
|
if(this.form.notifySiteCode==null || this.form.notifySiteCode==''){
|
|
|
|
|
|
this.$message.error("请选择通知网点");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.form.problemType==null || this.form.problemType==''){
|
|
|
|
|
|
this.$message.error("请选择问题类型");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.form.remark==null || this.form.remark==''){
|
|
|
|
|
|
this.$message.error("请填写问题原因");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.tempRecord.notifySiteCode = this.form.notifySiteCode;
|
|
|
|
|
|
this.tempRecord.notifySiteName = this.form.notifySiteName;
|
|
|
|
|
|
this.tempRecord.problemTypeName=this.form.problemType;
|
|
|
|
|
|
this.tempRecord.problemType = this.form.problemType;
|
|
|
|
|
|
this.tempRecord.problemId = this.form.problemId;
|
|
|
|
|
|
this.tempRecord.remark = this.form.remark;
|
|
|
|
|
|
this.tempRecord.picUrl=this.form.picUrl;
|
2024-07-10 22:40:54 +00:00
|
|
|
|
|
|
|
|
|
|
// 清除重复的数据
|
|
|
|
|
|
let newList = [];
|
|
|
|
|
|
this.emisWaybillList.forEach(item=>{
|
|
|
|
|
|
if(item.billCode != this.tempRecord.billCode ){
|
|
|
|
|
|
newList.push(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
newList.push(this.tempRecord);
|
|
|
|
|
|
this.emisWaybillList=newList;
|
|
|
|
|
|
// this.emisWaybillList.push(this.tempRecord);
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 12:31:20 +00:00
|
|
|
|
this.dataMap[this.form.billCode]=this.tempRecord;
|
|
|
|
|
|
|
|
|
|
|
|
//清理数据
|
|
|
|
|
|
this.form.notifySiteCode="";
|
|
|
|
|
|
this.form.notifySiteName="";
|
|
|
|
|
|
this.tempRecord=null;
|
|
|
|
|
|
this.form.billCode=null;
|
|
|
|
|
|
this.notifySiteDataSource=[];
|
|
|
|
|
|
console.log(this.emisWaybillList)
|
|
|
|
|
|
},
|
|
|
|
|
|
// getWaybill(billCode){
|
|
|
|
|
|
// this.loading = true;
|
|
|
|
|
|
// listEmisWaybill({billCode:billCode}).then(response => {
|
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
|
// let scanDate = new Date();
|
|
|
|
|
|
// if(response.code != 200){
|
|
|
|
|
|
// this.$message.error(response.msg);
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// let rows = response.rows;
|
|
|
|
|
|
// if(!rows || rows.length == 0){
|
|
|
|
|
|
// this.$message.error("未查到单号");
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// for (let index = 0; index < rows.length; index++) {
|
|
|
|
|
|
// let rsItem = rows[index];
|
|
|
|
|
|
// console.log(rsItem);
|
|
|
|
|
|
// let record =Object.assign({}, rsItem)
|
|
|
|
|
|
// record.notifySiteCode = recs;
|
|
|
|
|
|
// record.notifySiteName = record.sendSiteName;
|
|
|
|
|
|
// record.scanSiteCode=this.form.scanSiteCode;
|
|
|
|
|
|
// record.scanSite=this.form.scanSite;
|
|
|
|
|
|
// record.scanDate=scanDate;
|
|
|
|
|
|
// record.problemType=this.form.problemType;
|
|
|
|
|
|
// record.problemId=this.form.problemId;
|
|
|
|
|
|
// record.scanMan=this.form.scanMan;
|
|
|
|
|
|
// record.scanManCode=this.form.scanManCode;
|
|
|
|
|
|
// record.picUrl=this.form.picUrl;
|
|
|
|
|
|
// record.remark=this.form.remark;
|
|
|
|
|
|
// record.dataFrom="PC";
|
|
|
|
|
|
// this.emisWaybillList.push(record);
|
|
|
|
|
|
// this.dataMap[this.form.billCode]=record;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// this.form.billCode=null;
|
|
|
|
|
|
// })
|
|
|
|
|
|
// },
|
2024-05-17 08:40:59 +00:00
|
|
|
|
handleUpload(){
|
|
|
|
|
|
let scanData=[];
|
2024-06-05 12:31:20 +00:00
|
|
|
|
// let problemInfoList=[];
|
2024-05-17 08:40:59 +00:00
|
|
|
|
this.emisWaybillList.forEach(item=>{
|
2024-06-05 12:31:20 +00:00
|
|
|
|
// item.currentStatus="已上传";
|
2024-05-17 08:40:59 +00:00
|
|
|
|
if(this.ids.indexOf(item.id) > -1){
|
|
|
|
|
|
scanData.push(
|
|
|
|
|
|
{
|
|
|
|
|
|
billCode:item.billCode,
|
2024-06-05 12:31:20 +00:00
|
|
|
|
problemType:item.problemId,
|
|
|
|
|
|
notifySite:item.notifySiteCode,
|
2024-05-17 08:40:59 +00:00
|
|
|
|
picUrl:item.picUrl,
|
|
|
|
|
|
remark:item.remark,
|
|
|
|
|
|
scanWeight:item.scanWeight,
|
2024-06-19 11:24:45 +00:00
|
|
|
|
scanDate:parseTime(item.scanDate || new Date())
|
2024-05-17 08:40:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
)
|
2024-06-05 12:31:20 +00:00
|
|
|
|
// problemInfoList.push({
|
|
|
|
|
|
// billCode: item.billCode,
|
|
|
|
|
|
// problemType: item.problemType,
|
|
|
|
|
|
// problemTitle: null,
|
|
|
|
|
|
// problemCause: item.remark,
|
|
|
|
|
|
// sendSite: item.sendSiteName,
|
|
|
|
|
|
// sendSiteCode: item.sendSiteCode,
|
|
|
|
|
|
// registerManCode: item.registerManCode,
|
|
|
|
|
|
// registerManDept: null,
|
|
|
|
|
|
// registerSiteCode: item.registerSiteCode,
|
|
|
|
|
|
// registerDate: item.registerDate,
|
|
|
|
|
|
// registerSaveDate: null,
|
|
|
|
|
|
// dataFrom: item.dataFrom,
|
|
|
|
|
|
// status: null,//item.waybillStatus,//????????是否正确
|
|
|
|
|
|
// isSendSiteRegister: null,
|
|
|
|
|
|
// // blReversion: false,//????????是否正确
|
|
|
|
|
|
// blReversion: null,
|
|
|
|
|
|
// reversionStr: null,
|
|
|
|
|
|
// reversionMan: null,
|
|
|
|
|
|
// reversionManCode: null,
|
|
|
|
|
|
// reversionDate: null,
|
|
|
|
|
|
// blCheckok: null,
|
|
|
|
|
|
// blSee: null,
|
|
|
|
|
|
// filePath: item.picUrl,
|
|
|
|
|
|
// modifySiteCode: null,
|
|
|
|
|
|
// delFlag: item.delFlag,//????????是否正确
|
|
|
|
|
|
// remark: item.remark,//????????是否正确
|
|
|
|
|
|
// })
|
2024-05-17 08:40:59 +00:00
|
|
|
|
}
|
2024-05-14 11:00:04 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
2024-05-17 08:40:59 +00:00
|
|
|
|
let scanProblemInfo = {
|
|
|
|
|
|
scanType:"-1",
|
|
|
|
|
|
opType:2,
|
|
|
|
|
|
scanData:scanData
|
|
|
|
|
|
};
|
2024-05-14 11:00:04 +00:00
|
|
|
|
|
2024-06-05 12:31:20 +00:00
|
|
|
|
let newList = [];
|
|
|
|
|
|
|
2024-05-17 08:40:59 +00:00
|
|
|
|
doScan(scanProblemInfo).then(response => {
|
|
|
|
|
|
let scanRstItem = response.data.scanResult[0];
|
|
|
|
|
|
console.log(scanRstItem);
|
|
|
|
|
|
if(scanRstItem.result != 'success'){
|
|
|
|
|
|
this.$modal.msgError(scanRstItem.message);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-06-05 12:31:20 +00:00
|
|
|
|
this.emisWaybillList.forEach(item=>{
|
|
|
|
|
|
if(this.ids.indexOf(item.id) > -1){
|
|
|
|
|
|
item.currentStatus="已上传";
|
2024-06-03 12:13:13 +00:00
|
|
|
|
}
|
2024-06-05 12:31:20 +00:00
|
|
|
|
newList.push(item);
|
2024-06-03 12:13:13 +00:00
|
|
|
|
})
|
2024-06-05 12:31:20 +00:00
|
|
|
|
this.emisWaybillList = newList;
|
|
|
|
|
|
this.$modal.msgSuccess(scanRstItem.message);
|
|
|
|
|
|
});
|
|
|
|
|
|
// problemInfoList.forEach(item => {
|
|
|
|
|
|
// addEmisWaybillProblemInfo(item).then(response => {
|
|
|
|
|
|
// // debugger;
|
|
|
|
|
|
// if(response.code != "200"){
|
|
|
|
|
|
// this.$modal.msgError(response.msg);
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// this.$modal.msgSuccess(response.msg);
|
|
|
|
|
|
// })
|
|
|
|
|
|
// })
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
|
submitForm() {
|
2024-05-17 08:40:59 +00:00
|
|
|
|
let newList = [];
|
|
|
|
|
|
for(let i = 0; i< this.emisWaybillList.length;i++){
|
|
|
|
|
|
let waybill = {...this.emisWaybillList[i]};
|
|
|
|
|
|
if(this.ids.indexOf(waybill.id) > -1){
|
2024-06-05 12:31:20 +00:00
|
|
|
|
waybill.notifySiteCode=this.form.modifyNotifySite;
|
2024-05-17 08:40:59 +00:00
|
|
|
|
waybill.notifySiteName=this.form.modifyNotifySiteName;
|
|
|
|
|
|
newList.push(waybill);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
newList.push(waybill);
|
2024-05-14 11:00:04 +00:00
|
|
|
|
}
|
2024-05-17 08:40:59 +00:00
|
|
|
|
}
|
2024-05-17 10:07:40 +00:00
|
|
|
|
this.emisWaybillList = newList;
|
2024-05-17 08:40:59 +00:00
|
|
|
|
this.open = false;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
2024-06-05 12:31:20 +00:00
|
|
|
|
async submitFormBatch(){
|
2024-05-17 10:07:40 +00:00
|
|
|
|
if(this.formBatch.billCode==null || this.formBatch.billCode==''){
|
|
|
|
|
|
this.$message.error("输入单号后回车");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-05-29 00:48:35 +00:00
|
|
|
|
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
|
2024-06-05 12:31:20 +00:00
|
|
|
|
// bcList.forEach(code => {
|
|
|
|
|
|
// this.getWaybill(code)
|
|
|
|
|
|
// });
|
|
|
|
|
|
this.loading = true;
|
|
|
|
|
|
for(let bc=0;bc<bcList.length;bc++){
|
2024-07-03 08:21:21 +00:00
|
|
|
|
// for(let i = 0; i < this.emisWaybillList.length; i++){
|
|
|
|
|
|
// if(this.emisWaybillList[i].billCode == this.form.billCode && this.emisWaybillList[i].problemId == this.form.problemId){
|
|
|
|
|
|
// this.$message.error("重复扫描");
|
|
|
|
|
|
// this.form.billCode = "";
|
|
|
|
|
|
// return;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
2024-07-18 07:40:30 +00:00
|
|
|
|
let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc].trim() && item.problemId == this.form.problemId));
|
2024-07-03 08:21:21 +00:00
|
|
|
|
if(exitlist.length > 0){
|
2024-07-18 07:40:30 +00:00
|
|
|
|
this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在");
|
2024-07-03 08:21:21 +00:00
|
|
|
|
continue;
|
|
|
|
|
|
}else{
|
2024-07-18 07:40:30 +00:00
|
|
|
|
await this.addToList(bcList[bc].trim());
|
2024-07-03 08:21:21 +00:00
|
|
|
|
}
|
2024-06-05 12:31:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
this.loading = false;
|
2024-05-17 10:07:40 +00:00
|
|
|
|
this.openBatch=false;
|
|
|
|
|
|
},
|
2024-06-05 12:31:20 +00:00
|
|
|
|
async addToList(billCode){
|
|
|
|
|
|
let response = await listEmisWaybill({billCode:billCode})
|
|
|
|
|
|
if(!response || response.code != 200){
|
|
|
|
|
|
this.$message.error(response && response.msg || '未知错误');
|
|
|
|
|
|
}
|
|
|
|
|
|
let scanDate = new Date();
|
|
|
|
|
|
if(response.code != 200){
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
let rows = response.rows;
|
|
|
|
|
|
if(!rows || rows.length == 0){
|
|
|
|
|
|
this.$message.error("未查到单号: " + billCode);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
for (let index = 0; index < rows.length; index++) {
|
|
|
|
|
|
let rsItem = rows[index];
|
|
|
|
|
|
console.log(rsItem);
|
|
|
|
|
|
let record =Object.assign({}, rsItem)
|
2024-07-22 09:58:35 +00:00
|
|
|
|
// record.notifySiteCode = record.sendSiteCode;
|
|
|
|
|
|
// record.notifySiteName = record.sendSiteName;
|
|
|
|
|
|
|
|
|
|
|
|
if(record.sendSiteCode == this.$store.getters.ownerSiteCode){
|
|
|
|
|
|
record.notifySiteCode = record.dispatchUnderlingSiteCode;
|
|
|
|
|
|
record.notifySiteName = record.dispatchUnderlingSiteName;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
record.notifySiteCode = record.sendSiteCode;
|
|
|
|
|
|
record.notifySiteName = record.sendSiteName;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-06-05 12:31:20 +00:00
|
|
|
|
record.scanSiteCode=this.form.scanSiteCode;
|
|
|
|
|
|
record.scanSite=this.form.scanSite;
|
|
|
|
|
|
record.scanDate=scanDate;
|
|
|
|
|
|
record.problemTypeName=this.form.problemType;
|
|
|
|
|
|
record.problemType=this.form.problemType;
|
|
|
|
|
|
record.problemId=this.form.problemId;
|
|
|
|
|
|
record.scanMan=this.form.scanMan;
|
|
|
|
|
|
record.scanManCode=this.form.scanManCode;
|
|
|
|
|
|
record.picUrl=this.form.picUrl;
|
|
|
|
|
|
record.remark=this.form.remark;
|
|
|
|
|
|
record.dataFrom="PC";
|
|
|
|
|
|
this.emisWaybillList.push(record);
|
|
|
|
|
|
this.dataMap[this.form.billCode]=record;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-05-14 11:00:04 +00:00
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
|
handleDelete(row) {
|
2024-05-17 08:40:59 +00:00
|
|
|
|
let ids = [];
|
|
|
|
|
|
let newList =[];
|
|
|
|
|
|
this.emisWaybillList.forEach(item=>{
|
|
|
|
|
|
if(this.ids.indexOf(item.id) == -1){
|
|
|
|
|
|
newList.push(item);
|
|
|
|
|
|
ids.push(item.id)
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.dataMap[item.billCode]=null;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.ids = ids;
|
|
|
|
|
|
this.emisWaybillList = newList;
|
2024-05-14 11:00:04 +00:00
|
|
|
|
},
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
|
handleExport() {
|
|
|
|
|
|
const loadingInstance = this.$loading({
|
|
|
|
|
|
text: '正在导出...'
|
|
|
|
|
|
})
|
2024-05-17 08:40:59 +00:00
|
|
|
|
var qParam = {};
|
2024-05-14 11:00:04 +00:00
|
|
|
|
qParam.pageNum=1;
|
|
|
|
|
|
qParam.pageSize=5000;
|
|
|
|
|
|
|
|
|
|
|
|
listEmisWaybillProblemInfo(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
|
|
|
|
|
this.downloadLoading = false
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
const curList = response.rows
|
|
|
|
|
|
import('@/vendor/Export2Excel').then(excel => {
|
|
|
|
|
|
const tHeader = ['id','运单号','问题类型:','问题件标题','问题件原因','发送站点','发送站点代码','登记人代码','登记人所在部门','登记站点代码','登记时间','登记保存时间','数据来源','状态','是否寄件网点发起','是否回复','回复内容','回复人','回复人代码','回复日期','是否检查','是否查看','文件路径','创建站点代码','修改站点代码','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','备注',];
|
|
|
|
|
|
const filterVal = ['id','billCode','problemType','problemTitle','problemCause','sendSite','sendSiteCode','registerManCode','registerManDept','registerSiteCode','registerDate','registerSaveDate','dataFrom','status','isSendSiteRegister','blReversion','reversionStr','reversionMan','reversionManCode','reversionDate','blCheckok','blSee','filePath','createSiteCode','modifySiteCode','delFlag','createBy','createTime','updateBy','updateTime','remark',];
|
|
|
|
|
|
const data = this.formatJson(filterVal, curList, response.rows)
|
|
|
|
|
|
excel.export_json_to_excel({
|
|
|
|
|
|
header: tHeader,
|
|
|
|
|
|
data,
|
|
|
|
|
|
filename: '问题件',
|
|
|
|
|
|
autoWidth: true
|
|
|
|
|
|
})
|
|
|
|
|
|
loadingInstance.close()
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
formatJson(filterVal, jsonData, resData) {
|
|
|
|
|
|
let index = 0
|
|
|
|
|
|
return jsonData.map(v => filterVal.map(j => {
|
|
|
|
|
|
if (j === 'index') {
|
|
|
|
|
|
return ++index
|
|
|
|
|
|
}
|
|
|
|
|
|
if (j === 'status') {
|
|
|
|
|
|
var statusStr='xxx'
|
|
|
|
|
|
if(v[j] == 10){
|
|
|
|
|
|
statusStr='xxx'
|
|
|
|
|
|
}
|
|
|
|
|
|
return statusStr;
|
|
|
|
|
|
}
|
|
|
|
|
|
return v[j]
|
|
|
|
|
|
}))
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 时间搜索响应函数 */
|
|
|
|
|
|
dateTimeChange(value){
|
|
|
|
|
|
this.dateTimeRange=value;
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.el-divider{
|
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
background: 0 0;
|
|
|
|
|
|
border-top: 1px solid #E6EBF5;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-divider__text {
|
|
|
|
|
|
color: #0955ee;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2024-05-17 08:40:59 +00:00
|
|
|
|
.ellipsis {
|
|
|
|
|
|
width:200px;
|
|
|
|
|
|
overflow: hidden; /* 确保超出容器的内容被裁剪 */
|
|
|
|
|
|
white-space: nowrap; /* 确保文本在一行内显示 */
|
|
|
|
|
|
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
|
|
|
|
}
|
2024-06-06 08:36:55 +00:00
|
|
|
|
</style>
|