| | |
| | | "scripts": { |
| | | "serve": "vue-cli-service serve --mode dev", |
| | | "build": "vue-cli-service build", |
| | | "dev": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve --mode dev", |
| | | "build2": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build", |
| | | "lint": "vue-cli-service lint", |
| | | "predeploy": "yarn build", |
| | | "deploy": "gh-pages -d dist -b pages -r https://gitee.com/iczer/vue-antd-admin.git", |
| | |
| | | <a-col :span="6" class="label">相关附件</a-col> |
| | | <a-col :span="18"> |
| | | <div class="content"> |
| | | <a-button |
| | | <a-table |
| | | ref="aTable" |
| | | size="small" |
| | | :scroll="{ y: 300 }" |
| | | bordered |
| | | :columns="columns" |
| | | :data-source="dataSource" |
| | | :pagination="false" |
| | | rowKey="url" |
| | | > |
| | | <template slot="action" slot-scope="text, record"> |
| | | <a v-if="viewable(record.type)" @click="view(record)">预览</a> |
| | | <a-divider |
| | | v-if="viewable(record.type)" |
| | | type="vertical" |
| | | ></a-divider> |
| | | <a :href="record.url" :download="record.fileName">下载</a> |
| | | </template> |
| | | </a-table> |
| | | <!-- <a-button |
| | | v-if="FkData.file && viewable" |
| | | class="btn" |
| | | type="primary" |
| | |
| | | <a-button v-if="FkData.file" class="btn" @click="download" |
| | | >下载</a-button |
| | | > |
| | | <span v-else>无</span> |
| | | <span v-else>无</span> --> |
| | | </div> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: "文件名称", |
| | | dataIndex: "fileName", |
| | | align: "center", |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "文件后辍", |
| | | dataIndex: "type", |
| | | align: "center", |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: "操作", |
| | | dataIndex: "operation", |
| | | key: "operation", |
| | | align: "center", |
| | | width: 270, |
| | | scopedSlots: { customRender: "action" }, |
| | | }, |
| | | ], |
| | | // dataSource: [], |
| | | gutter: 16, |
| | | webUrl: getWebUrl(), |
| | | previewVisible: false, |
| | |
| | | }, |
| | | components: {}, |
| | | computed: { |
| | | fileType() { |
| | | let path = this.FkData.file; |
| | | return path ? this.getFileType(path) : undefined; |
| | | dataSource() { |
| | | return this.FkData.attachFiles.map((v) => { |
| | | let { type, name } = this.getFileTypeAndName(v); |
| | | let url = this.webUrl + v; |
| | | return { |
| | | fileName: name, |
| | | type, |
| | | url, |
| | | url1: v, |
| | | }; |
| | | }); |
| | | }, |
| | | viewable() { |
| | | return ["bmp", "jpg", "jpeg", "png", "pdf", "doc", "docx", "dwg"].some( |
| | | (v) => v == this.fileType |
| | | ); |
| | | }, |
| | | // fileType() { |
| | | // let path = this.FkData.file; |
| | | // return path ? this.getFileType(path) : undefined; |
| | | // }, |
| | | }, |
| | | methods: { |
| | | getFileType(path) { |
| | | viewable(fileType) { |
| | | return ["bmp", "jpg", "jpeg", "png", "pdf", "doc", "docx", "dwg"].some( |
| | | (v) => v == fileType |
| | | ); |
| | | }, |
| | | getFileTypeAndName(path) { |
| | | let reg = /(.*\\+)*(.*)$/; |
| | | let fileName = path.match(reg)[2]; |
| | | let arr = fileName.split("."); |
| | | return arr.length ? arr[arr.length - 1].toLowerCase() : ""; |
| | | return { |
| | | type: arr.length ? arr[arr.length - 1].toLowerCase() : "", |
| | | name: fileName, |
| | | }; |
| | | }, |
| | | view() { |
| | | let { |
| | | fileType, |
| | | FkData: { file }, |
| | | } = this; |
| | | switch (fileType) { |
| | | view(record) { |
| | | let { type, url, url1 } = record; |
| | | switch (type) { |
| | | // 图片 |
| | | case "bmp": |
| | | case "jpg": |
| | | case "jpeg": |
| | | case "png": |
| | | this.imgUrl = this.webUrl + file; |
| | | this.imgUrl = url; |
| | | this.previewVisible = true; |
| | | break; |
| | | case "pdf": |
| | | window.open(this.webUrl + file); |
| | | window.open(url); |
| | | break; |
| | | case "doc": |
| | | case "docx": |
| | | case "dwg": |
| | | this.dwgReview(file); |
| | | this.dwgReview(url1); |
| | | break; |
| | | default: |
| | | this.$message.warn("该类型文件暂不支持预览"); |
| | |
| | | this.$layer.close(loading); |
| | | }); |
| | | }, |
| | | download() { |
| | | let reg = /(.*\\+)*(.*)$/; |
| | | let fileName = this.FkData.file.match(reg)[2]; |
| | | |
| | | downLoadFileByFilePath(this.FkData.file, '', '', 0, 11).then((res) => { |
| | | let { headers, data, status } = res; |
| | | if (200 == status && data) { |
| | | let url = window.URL.createObjectURL(data); |
| | | // const matchRes = /filename=(.*)/.exec(headers["content-disposition"]); |
| | | // const fileName = matchRes ? matchRes[1].trim() : "未知文件名.zip"; |
| | | let link = document.createElement("a"); |
| | | link.style.display = "none"; |
| | | link.href = url; |
| | | link.download = fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | } else { |
| | | this.$message.error("下载失败"); |
| | | } |
| | | }); |
| | | }, |
| | | // download(record) { |
| | | // let { url, fileName } = record; |
| | | // // let link = document.createElement("a"); |
| | | // // link.style.display = "none"; |
| | | // // link.href = url; |
| | | // // link.download = fileName; |
| | | // // document.body.appendChild(link); |
| | | // // link.click(); |
| | | // // document.body.removeChild(link); |
| | | // }, |
| | | handleCancel() { |
| | | this.previewVisible = false; |
| | | }, |
| | |
| | | <template> |
| | | <page-toggle-transition v-if="isShow" :disabled="animate.disabled" :animate="animate.name" |
| | | :direction="animate.direction"> |
| | | <page-toggle-transition |
| | | v-if="isShow" |
| | | :disabled="animate.disabled" |
| | | :animate="animate.name" |
| | | :direction="animate.direction" |
| | | > |
| | | <div class="page-content"> |
| | | <advance-table :data-source="dataSource" :columns="columns" :loading="loading" row-key="id" :scroll="{ x: 2000, y }" |
| | | @search="onSearch" @refresh="onRefresh" @reset="onReset" :format-conditions="true" |
| | | :row-class-name="getRowClassName" :pagination="{ |
| | | <advance-table |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | row-key="id" |
| | | :scroll="{ x: 2000, y }" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :row-class-name="getRowClassName" |
| | | :pagination="{ |
| | | current: page, |
| | | pageSize: pageSize, |
| | | total: total, |
| | |
| | | `第 ${range[0]}-${range[1]} 条,总计 ${total} 条`, |
| | | onChange: onPageChange, |
| | | onShowSizeChange: onSizeChange, |
| | | }"> |
| | | }" |
| | | > |
| | | <template slot="title"> |
| | | <div class="title">问题反馈</div> |
| | | <a-radio-group v-model="flag" @change="flagChange" button-style="solid"> |
| | | <a-radio-group |
| | | v-model="flag" |
| | | @change="flagChange" |
| | | button-style="solid" |
| | | > |
| | | <a-radio-button :value="0">未处理</a-radio-button> |
| | | <a-radio-button :value="1">已确认</a-radio-button> |
| | | <a-radio-button :value="2">已完结</a-radio-button> |
| | | </a-radio-group> |
| | | <a-button class="ml-20" type="primary" icon="plus" @click="showFeedback">反馈问题</a-button> |
| | | <a-button |
| | | class="ml-20" |
| | | type="primary" |
| | | icon="plus" |
| | | @click="showFeedback" |
| | | >反馈问题</a-button |
| | | > |
| | | </template> |
| | | <template slot="action" slot-scope="{ record }"> |
| | | <!-- <a-popconfirm |
| | |
| | | </template> |
| | | </advance-table> |
| | | </div> |
| | | <a-modal :visible="feedBackVisible" :width="800" title="问题反馈" :destroyOnClose="true" :footer="false" |
| | | @cancel="feedbackCancel"> |
| | | <a-modal |
| | | :visible="feedBackVisible" |
| | | :width="800" |
| | | title="问题反馈" |
| | | :destroyOnClose="true" |
| | | :footer="false" |
| | | @cancel="feedbackCancel" |
| | | > |
| | | <feedback-form @cancel="feedbackCancel" @ok="feedbackOk"></feedback-form> |
| | | </a-modal> |
| | | <a-modal :visible="detailsVisible" :width="800" title="问题反馈详情" :destroyOnClose="true" :maskClosable="false" |
| | | :footer="false" @cancel="detailsCancel"> |
| | | <a-modal |
| | | :visible="detailsVisible" |
| | | :width="800" |
| | | title="问题反馈详情" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | :footer="false" |
| | | @cancel="detailsCancel" |
| | | > |
| | | <feedback-details :fk-data="currFk"></feedback-details> |
| | | <template v-if="isConfirm"> |
| | | <a-row class="row" :gutter="16"> |
| | | <a-col :span="6" class="label">处理类型</a-col> |
| | | <a-col :span="18"> |
| | | <a-select v-model="confirmStatus" placeholder="请选择处理类型" @change="confirmStatusChange" style="width: 100%"> |
| | | <a-select-option :disabled="user.name == '杨红兰'" :value="1">与我无关</a-select-option> |
| | | <a-select |
| | | v-model="confirmStatus" |
| | | placeholder="请选择处理类型" |
| | | @change="confirmStatusChange" |
| | | style="width: 100%" |
| | | > |
| | | <a-select-option :disabled="user.name == '杨红兰'" :value="1" |
| | | >与我无关</a-select-option |
| | | > |
| | | <a-select-option :value="2">不需要修改bom</a-select-option> |
| | | <a-select-option :value="3">需要修改bom</a-select-option> |
| | | </a-select> |
| | |
| | | <a-row class="row" v-if="showReplyContent" :gutter="16"> |
| | | <a-col :span="6" class="label">回复内容</a-col> |
| | | <a-col :span="18"> |
| | | <yc-textarea placeholder="请输入回复内容" v-model="replyContent" show-word-limit :maxLength="300" :rows="6" /> |
| | | <yc-textarea |
| | | placeholder="请输入回复内容" |
| | | v-model="replyContent" |
| | | show-word-limit |
| | | :maxLength="300" |
| | | :rows="6" |
| | | /> |
| | | </a-col> |
| | | </a-row> |
| | | </template> |
| | | <div class="footer"> |
| | | <a-button class="btn" @click="detailsCancel">关闭</a-button> |
| | | <a-button class="btn" v-if="isConfirm" @click="confirmFk" type="primary">确认</a-button> |
| | | <a-button class="btn" v-if="isConfirm" @click="confirmFk" type="primary" |
| | | >确认</a-button |
| | | > |
| | | </div> |
| | | </a-modal> |
| | | <!-- 指派 --> |
| | | <a-modal :visible="dispatchVisible" :width="600" title="指派" :destroyOnClose="true" :maskClosable="false" |
| | | @cancel="dispatchCancel" @ok="dispatchOk"> |
| | | <a-modal |
| | | :visible="dispatchVisible" |
| | | :width="600" |
| | | title="指派" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="dispatchCancel" |
| | | @ok="dispatchOk" |
| | | > |
| | | <feedback-details :fk-data="currFk"></feedback-details> |
| | | <a-row class="row" :gutter="16"> |
| | | <a-col :span="6" class="label">指派给</a-col> |
| | | <a-col :span="18"> |
| | | <a-select placeholder="请选择反馈接收人" show-search v-model="toUsers" style="width: 100%"> |
| | | <a-select-option v-for="(user, idx) in userList" :key="'user_' + idx" :value="user.id + '&&' + user.name"> |
| | | <a-select |
| | | placeholder="请选择反馈接收人" |
| | | show-search |
| | | v-model="toUsers" |
| | | style="width: 100%" |
| | | > |
| | | <a-select-option |
| | | v-for="(user, idx) in userList" |
| | | :key="'user_' + idx" |
| | | :value="user.id + '&&' + user.name" |
| | | > |
| | | {{ user.name }} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | </a-row> |
| | | </a-modal> |
| | | <!-- 完结 --> |
| | | <a-modal :visible="finishVisible" :width="600" title="关联变更单号" :destroyOnClose="true" :maskClosable="false" |
| | | @cancel="finishCancel" @ok="finishOk"> |
| | | <a-modal |
| | | :visible="finishVisible" |
| | | :width="600" |
| | | title="关联变更单号" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | @cancel="finishCancel" |
| | | @ok="finishOk" |
| | | > |
| | | <feedback-details :fk-data="currFk"></feedback-details> |
| | | <a-row class="row" :gutter="16"> |
| | | <a-col :span="6" class="label">变更单号</a-col> |
| | | <a-col :span="18"> |
| | | <a-select placeholder="请选择变更单号" show-search v-model="ecrNumber" style="width: 100%"> |
| | | <a-select-option v-for="(ecr, idx) in ecrList" :key="'ecr_' + idx" :value="ecr.number"> |
| | | <a-select |
| | | placeholder="请选择变更单号" |
| | | show-search |
| | | v-model="ecrNumber" |
| | | style="width: 100%" |
| | | > |
| | | <a-select-option |
| | | v-for="(ecr, idx) in ecrList" |
| | | :key="'ecr_' + idx" |
| | | :value="ecr.number" |
| | | > |
| | | {{ ecr.number }} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | confirmFk, |
| | | submitFeedback, |
| | | dispatch, |
| | | updateEcrNumber |
| | | updateEcrNumber, |
| | | } from "@/pages/workplace/apis"; |
| | | import { getUserByRoleIds } from "@/pages/user/apis"; |
| | | import { getAllList } from '@/pages/resourceManage/ecr/apis'; |
| | | import { getAllList } from "@/pages/resourceManage/ecr/apis"; |
| | | import DrawUpload from "@/pages/components/drawUpload/DrawUpload"; |
| | | import AuditForm from "@/pages/workplace/workForm/auditForm"; |
| | | import ReplaceInfo from "../replaceInfo"; |
| | |
| | | import YcTextarea from "@/components/input/ycTextarea"; |
| | | const columns = [ |
| | | { |
| | | title: "料号", |
| | | dataIndex: "parentCode", |
| | | align: "center", |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "产品名称", |
| | | dataIndex: "parentName", |
| | | align: "center", |
| | | width: 120 |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "产品型号", |
| | | dataIndex: "parentModel", |
| | | align: "center", |
| | | width: 300 |
| | | noSearch: true, |
| | | width: 300, |
| | | }, |
| | | { |
| | | title: "定制单号", |
| | | dataIndex: "customCode", |
| | | align: "center", |
| | | width: 120 |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "版本时间", |
| | | dataIndex: "versionTime", |
| | | align: "center", |
| | | width: 120 |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "创建人", |
| | | dataIndex: "senderName", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "创建时间", |
| | | dataIndex: "createTime", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "反馈接收人", |
| | | dataIndex: "receiverNames", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "确认人", |
| | | dataIndex: "confirmUserName", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "回复内容", |
| | | dataIndex: "replyContent", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "回复时间", |
| | | dataIndex: "replyTime", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "变更单流水号", |
| | | dataIndex: "ecrNumber", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "操作", |
| | | dataIndex: "operation", |
| | | key: "operation", |
| | | align: "center", |
| | | noSearch: true, |
| | | fixed: "right", |
| | | width: 160, |
| | | scopedSlots: { customRender: "action" }, |
| | |
| | | MaterialInfo, |
| | | FeedbackForm, |
| | | FeedbackDetails, |
| | | YcTextarea |
| | | YcTextarea, |
| | | }, |
| | | props: { |
| | | isShow: { |
| | |
| | | data() { |
| | | return { |
| | | ecrList: [], |
| | | ecrNumber: '', |
| | | ecrNumber: "", |
| | | finishVisible: false, |
| | | toUsers: '', |
| | | toUsers: "", |
| | | userList: [], |
| | | dispatchId: '', |
| | | dispatchId: "", |
| | | showReplyContent: false, |
| | | replyContent: '', |
| | | replyContent: "", |
| | | confirmStatus: undefined, |
| | | isConfirm: false, |
| | | currFk: null, |
| | |
| | | flags = [2, 4]; |
| | | break; |
| | | } |
| | | getList(flags.join(','), this.page, this.pageSize).then((res) => { |
| | | getList(flags.join(","), this.page, this.pageSize).then((res) => { |
| | | let { code, data, data2 } = res.data; |
| | | let total = 0, |
| | | list = []; |
| | |
| | | }, |
| | | showFinish(obj) { |
| | | this.currFk = obj; |
| | | this.ecrNumber = ''; |
| | | this.ecrNumber = ""; |
| | | this.finishVisible = true; |
| | | }, |
| | | detailsCancel() { |
| | |
| | | this.detailsVisible = false; |
| | | }, |
| | | initForm() { |
| | | this.replyContent = ''; |
| | | this.replyContent = ""; |
| | | this.confirmStatus = undefined; |
| | | this.showReplyContent = false; |
| | | }, |
| | |
| | | } |
| | | }, |
| | | getRowClassName(record) { |
| | | if (this.canDispatch && '杨红兰' == record.receiverNames) { |
| | | return 'warning'; |
| | | if (this.canDispatch && "杨红兰" == record.receiverNames) { |
| | | return "warning"; |
| | | } |
| | | return ''; |
| | | return ""; |
| | | }, |
| | | dispatch(record) { |
| | | this.currFk = record; |
| | |
| | | this.dispatchVisible = false; |
| | | }, |
| | | dispatchOk() { |
| | | let { |
| | | toUsers, |
| | | dispatchId |
| | | } = this; |
| | | let { toUsers, dispatchId } = this; |
| | | if (!toUsers) { |
| | | this.$message.error('请选择要指派的用户'); |
| | | this.$message.error("请选择要指派的用户"); |
| | | return false; |
| | | } |
| | | let [id, name] = toUsers.split('&&'); |
| | | let [id, name] = toUsers.split("&&"); |
| | | let loading = this.$layer.loading(); |
| | | dispatch(dispatchId, id, name).then(res => { |
| | | dispatch(dispatchId, id, name).then((res) => { |
| | | let { code } = res.data; |
| | | if (code) { |
| | | this.$message.success('操作成功'); |
| | | this.$message.success("操作成功"); |
| | | this.$layer.close(loading); |
| | | this.dispatchVisible = false; |
| | | this.searchData(); |
| | | } else { |
| | | this.$message.error('操作失败'); |
| | | this.$message.error("操作失败"); |
| | | this.$layer.close(loading); |
| | | } |
| | | }); |
| | |
| | | }); |
| | | }, |
| | | getEcrList() { |
| | | getAllList().then(res => { |
| | | getAllList().then((res) => { |
| | | let { code, data, data2 } = res.data; |
| | | let list = []; |
| | | if (code && data) { |
| | |
| | | finishOk() { |
| | | let { ecrNumber, currFk } = this; |
| | | if (!ecrNumber) { |
| | | this.$message.error('请选择变更单号'); |
| | | this.$message.error("请选择变更单号"); |
| | | return false; |
| | | } |
| | | let loading = this.$layer.loading(); |
| | | updateEcrNumber(currFk.id, ecrNumber).then(res => { |
| | | updateEcrNumber(currFk.id, ecrNumber).then((res) => { |
| | | let { code, data } = res.data; |
| | | if (code && data) { |
| | | this.$layer.close(loading); |
| | | this.$message.success('操作成功'); |
| | | this.$message.success("操作成功"); |
| | | this.finishVisible = false; |
| | | this.searchData(); |
| | | } else { |
| | | this.$layer.close(loading); |
| | | this.$message.error('操作失败'); |
| | | this.$message.error("操作失败"); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapState("setting", ["animate"]), |
| | |
| | | return this.title; |
| | | }, |
| | | canDispatch() { |
| | | return 0 == this.flag && '杨红兰' == this.user.name; |
| | | return 0 == this.flag && "杨红兰" == this.user.name; |
| | | }, |
| | | isReceiver() { |
| | | return this.type == "recevierFk"; |
| | |
| | | .footer { |
| | | text-align: right; |
| | | |
| | | .btn+.btn { |
| | | .btn + .btn { |
| | | margin-left: 20px; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /deep/.warning>td { |
| | | /deep/.warning > td { |
| | | background: #f7dea7; |
| | | } |
| | | |
| | |
| | | <script> |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import {mapGetters} from "vuex"; |
| | | import { mapGetters } from "vuex"; |
| | | import moment from "moment"; |
| | | import {getUserList} from "@/pages/permission/apis"; |
| | | import {bomFeedbackListPage} from "@/pages/workplace/apis"; |
| | | import {ExportFile} from "@/assets/exportFile"; |
| | | import { getUserList } from "@/pages/permission/apis"; |
| | | import { bomFeedbackListPage } from "@/pages/workplace/apis"; |
| | | import { ExportFile } from "@/assets/exportFile"; |
| | | |
| | | import FeedbackDetails from "@/pages/resourceManage/components/feedbackDetails.vue"; |
| | | export default { |
| | | name: "workplaceList", |
| | | components: { |
| | | AdvanceTable, |
| | | }, |
| | | data() { |
| | | let startTime = moment().add(-30, 'day').format("YYYY-MM-DD"); |
| | | let endTime = moment().format("YYYY-MM-DD"); |
| | | const columns = [ |
| | | { |
| | | title: "产品名称", |
| | | dataIndex: "parentName", |
| | | align: "center", |
| | | width: 120 |
| | | }, |
| | | { |
| | | title: "产品型号", |
| | | dataIndex: "parentModel", |
| | | align: "center", |
| | | width: 300 |
| | | }, |
| | | { |
| | | title: "定制单号", |
| | | dataIndex: "customCode", |
| | | align: "center", |
| | | width: 120 |
| | | }, |
| | | { |
| | | title: "版本时间", |
| | | dataIndex: "versionTime", |
| | | align: "center", |
| | | width: 120 |
| | | }, |
| | | { |
| | | title: "创建人", |
| | | dataIndex: "senderName", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "创建时间", |
| | | dataIndex: "createTime", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "反馈接收人", |
| | | dataIndex: "receiverNames", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "确认人", |
| | | dataIndex: "confirmUserName", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "回复内容", |
| | | dataIndex: "replyContent", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "回复时间", |
| | | dataIndex: "replyTime", |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "变更单流水号", |
| | | dataIndex: "ecrNumber", |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // title: "操作", |
| | | // dataIndex: "operation", |
| | | // key: "operation", |
| | | // align: "center", |
| | | // fixed: "right", |
| | | // width: 160, |
| | | // scopedSlots: { customRender: "action" }, |
| | | // }, |
| | | ]; |
| | | return { |
| | | y: 400, |
| | | update: -1, |
| | | spinning: false, |
| | | loading: false, |
| | | pageCurr: 1, |
| | | pageSize: 20, |
| | | total: 0, |
| | | columns, |
| | | dataSource: [], |
| | | createTimeRange: [startTime, endTime], |
| | | userName: -1, |
| | | userList: [ |
| | | { |
| | | id: -1, |
| | | name: "所有人" |
| | | } |
| | | ], |
| | | state: -1, |
| | | stateList: [ |
| | | { |
| | | label: "全部状态", |
| | | value: -1, |
| | | }, |
| | | { |
| | | label: "未处理", |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: "已确认", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: "已完结", |
| | | value: 124, |
| | | } |
| | | ], |
| | | } |
| | | }, |
| | | watch: { |
| | | update(n) { |
| | | if (-1 != n && !this._inactive) { |
| | | this.$nextTick(() => { |
| | | const table = this.$refs.table; |
| | | const header = document.querySelectorAll( |
| | | ".doc-center-table .ant-table-header" |
| | | )[0].clientHeight; |
| | | const bar = document.querySelectorAll(".header-bar")[0].clientHeight; |
| | | if (table.fullScreen) { |
| | | this.y = table.$el.clientHeight - bar - header - 64; |
| | | } else { |
| | | const wraper = this.$refs.wraper.clientHeight; |
| | | const card = document.querySelectorAll(".ant-card-body")[0]; |
| | | const { paddingBottom, paddingTop } = getComputedStyle(card, null); |
| | | const h = |
| | | wraper - |
| | | header - |
| | | 64 - |
| | | bar - |
| | | parseInt(paddingBottom) - |
| | | parseInt(paddingTop); |
| | | console.log(h, "h",wraper, header, bar ); |
| | | this.y = h; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | affixed() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | }, |
| | | methods: { |
| | | resize() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | activeFN() { |
| | | this.resize(); |
| | | }, |
| | | async getUserList() { |
| | | try{ |
| | | let res = await getUserList(); |
| | | let rs = res.data; |
| | | if(rs.code === 1 && rs.data) { |
| | | this.userList = rs.data2; |
| | | } |
| | | this.userList.unshift({ |
| | | id: -1, |
| | | name: "所有人" |
| | | }); |
| | | }catch (e) { |
| | | this.userList.unshift({ |
| | | id: -1, |
| | | name: "全部" |
| | | }); |
| | | console.log(e); |
| | | } |
| | | }, |
| | | getSearchParams() { |
| | | let startTime = moment(this.createTimeRange[0]).format("YYYY-MM-DD")+" 00:00:00"; |
| | | let endTime = moment(this.createTimeRange[1]).format("YYYY-MM-DD")+" 23:59:59"; |
| | | let confirmStatus = this.state; |
| | | let senderId = this.userName; |
| | | return { |
| | | confirmStatus, |
| | | startTime, |
| | | endTime, |
| | | senderId |
| | | }; |
| | | }, |
| | | rowClassFn(record) { |
| | | let classList = []; |
| | | if (record.enabled == -1) { |
| | | classList.push("locked"); |
| | | } |
| | | return classList; |
| | | }, |
| | | async searchData(isExportFile) { |
| | | // 判断是否导出全部 === 不能删除,防止isExPortFile={} |
| | | isExportFile = isExportFile === true; |
| | | name: "workplaceList", |
| | | components: { |
| | | AdvanceTable, |
| | | FeedbackDetails, |
| | | }, |
| | | data() { |
| | | let startTime = moment().add(-30, "day").format("YYYY-MM-DD"); |
| | | let endTime = moment().format("YYYY-MM-DD"); |
| | | const columns = [ |
| | | { |
| | | title: "料号", |
| | | dataIndex: "parentCode", |
| | | align: "center", |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "产品名称", |
| | | dataIndex: "parentName", |
| | | align: "center", |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "产品型号", |
| | | dataIndex: "parentModel", |
| | | align: "center", |
| | | noSearch: true, |
| | | width: 300, |
| | | }, |
| | | { |
| | | title: "定制单号", |
| | | dataIndex: "customCode", |
| | | align: "center", |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "版本时间", |
| | | dataIndex: "versionTime", |
| | | align: "center", |
| | | noSearch: true, |
| | | width: 120, |
| | | }, |
| | | { |
| | | title: "创建人", |
| | | dataIndex: "senderName", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "创建时间", |
| | | dataIndex: "createTime", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "反馈接收人", |
| | | dataIndex: "receiverNames", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "确认人", |
| | | dataIndex: "confirmUserName", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "回复内容", |
| | | dataIndex: "replyContent", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "回复时间", |
| | | dataIndex: "replyTime", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "变更单流水号", |
| | | dataIndex: "ecrNumber", |
| | | align: "center", |
| | | noSearch: true, |
| | | }, |
| | | { |
| | | title: "操作", |
| | | dataIndex: "operation", |
| | | key: "operation", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 160, |
| | | scopedSlots: { customRender: "action" }, |
| | | }, |
| | | ]; |
| | | return { |
| | | detailsVisible: false, |
| | | currFk: null, |
| | | parentCode: '', |
| | | y: 400, |
| | | update: -1, |
| | | spinning: false, |
| | | loading: false, |
| | | pageCurr: 1, |
| | | pageSize: 20, |
| | | total: 0, |
| | | columns, |
| | | dataSource: [], |
| | | createTimeRange: [startTime, endTime], |
| | | userName: -1, |
| | | userList: [ |
| | | { |
| | | id: -1, |
| | | name: "所有人", |
| | | }, |
| | | ], |
| | | state: -1, |
| | | stateList: [ |
| | | { |
| | | label: "全部状态", |
| | | value: -1, |
| | | }, |
| | | { |
| | | label: "未处理", |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: "已确认", |
| | | value: 3, |
| | | }, |
| | | { |
| | | label: "已完结", |
| | | value: 124, |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | watch: { |
| | | update(n) { |
| | | if (-1 != n && !this._inactive) { |
| | | this.$nextTick(() => { |
| | | const table = this.$refs.table; |
| | | const header = document.querySelectorAll( |
| | | ".doc-center-table .ant-table-header" |
| | | )[0].clientHeight; |
| | | const bar = document.querySelectorAll(".header-bar")[0].clientHeight; |
| | | if (table.fullScreen) { |
| | | this.y = table.$el.clientHeight - bar - header - 64; |
| | | } else { |
| | | const wraper = this.$refs.wraper.clientHeight; |
| | | const card = document.querySelectorAll(".ant-card-body")[0]; |
| | | const { paddingBottom, paddingTop } = getComputedStyle(card, null); |
| | | const h = |
| | | wraper - |
| | | header - |
| | | 64 - |
| | | bar - |
| | | parseInt(paddingBottom) - |
| | | parseInt(paddingTop); |
| | | console.log(h, "h", wraper, header, bar); |
| | | this.y = h; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | affixed() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | }, |
| | | methods: { |
| | | detailsCancel() { |
| | | this.detailsVisible = false; |
| | | }, |
| | | showDetails(obj) { |
| | | this.currFk = obj; |
| | | this.detailsVisible = true; |
| | | }, |
| | | resize() { |
| | | setTimeout(() => { |
| | | this.update = Math.random(); |
| | | }, 200); |
| | | }, |
| | | activeFN() { |
| | | this.resize(); |
| | | }, |
| | | async getUserList() { |
| | | try { |
| | | let res = await getUserList(); |
| | | let rs = res.data; |
| | | if (rs.code === 1 && rs.data) { |
| | | this.userList = rs.data2; |
| | | } |
| | | this.userList.unshift({ |
| | | id: -1, |
| | | name: "所有人", |
| | | }); |
| | | } catch (e) { |
| | | this.userList.unshift({ |
| | | id: -1, |
| | | name: "全部", |
| | | }); |
| | | console.log(e); |
| | | } |
| | | }, |
| | | getSearchParams() { |
| | | let startTime = |
| | | moment(this.createTimeRange[0]).format("YYYY-MM-DD") + " 00:00:00"; |
| | | let endTime = |
| | | moment(this.createTimeRange[1]).format("YYYY-MM-DD") + " 23:59:59"; |
| | | let confirmStatus = this.state; |
| | | let senderId = this.userName; |
| | | let parentCode = this.parentCode; |
| | | return { |
| | | confirmStatus, |
| | | startTime, |
| | | endTime, |
| | | senderId, |
| | | parentCode |
| | | }; |
| | | }, |
| | | rowClassFn(record) { |
| | | let classList = []; |
| | | if (record.enabled == -1) { |
| | | classList.push("locked"); |
| | | } |
| | | return classList; |
| | | }, |
| | | async searchData(isExportFile) { |
| | | // 判断是否导出全部 === 不能删除,防止isExPortFile={} |
| | | isExportFile = isExportFile === true; |
| | | |
| | | if (-1 == this.update) { |
| | | this.update = Math.random(); |
| | | } |
| | | let params = this.getSearchParams(); |
| | | let pageCurr = isExportFile?1:this.pageCurr; |
| | | let pageSize = isExportFile?this.total:this.pageSize; |
| | | try { |
| | | let res = await bomFeedbackListPage(params, pageCurr, pageSize); |
| | | let rs = res.data; |
| | | let list = []; |
| | | let total = 0; |
| | | if(rs.code === 1) { |
| | | list = rs.data.list; |
| | | total = rs.data.total; |
| | | } |
| | | if(isExportFile) { |
| | | this.exportExcel(list); |
| | | }else { |
| | | this.dataSource = list; |
| | | this.total = total; |
| | | } |
| | | }catch (e) { |
| | | this.dataSource = []; |
| | | this.total = 0; |
| | | console.log(e); |
| | | } |
| | | |
| | | }, |
| | | onSearch(conditions, searchOptions) { |
| | | this.pageCurr = 1; |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | onPageChange(page, pageSize) { |
| | | this.pageCurr = page; |
| | | this.pageSize = pageSize; |
| | | this.searchData(); |
| | | }, |
| | | onSizeChange(current, size) { |
| | | this.pageCurr = 1; |
| | | this.pageSize = size; |
| | | this.searchData(); |
| | | }, |
| | | onRefresh(conditions) { |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | onReset(conditions) { |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | exportExcel(list) { |
| | | ExportFile(this.columns, list, "反馈总表"); |
| | | }, |
| | | exportCurrPage() { |
| | | this.exportExcel(this.dataSource); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters("setting", ["affixed"]), |
| | | }, |
| | | mounted() { |
| | | this.getUserList(); |
| | | this.searchData(); |
| | | window.addEventListener("resize", this.resize); |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("resize", this.resize); |
| | | }, |
| | | } |
| | | if (-1 == this.update) { |
| | | this.update = Math.random(); |
| | | } |
| | | let params = this.getSearchParams(); |
| | | let pageCurr = isExportFile ? 1 : this.pageCurr; |
| | | let pageSize = isExportFile ? this.total : this.pageSize; |
| | | try { |
| | | let res = await bomFeedbackListPage(params, pageCurr, pageSize); |
| | | let rs = res.data; |
| | | let list = []; |
| | | let total = 0; |
| | | if (rs.code === 1) { |
| | | list = rs.data.list; |
| | | total = rs.data.total; |
| | | } |
| | | if (isExportFile) { |
| | | this.exportExcel(list); |
| | | } else { |
| | | this.dataSource = list; |
| | | this.total = total; |
| | | } |
| | | } catch (e) { |
| | | this.dataSource = []; |
| | | this.total = 0; |
| | | console.log(e); |
| | | } |
| | | }, |
| | | onSearch(conditions, searchOptions) { |
| | | this.pageCurr = 1; |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | onPageChange(page, pageSize) { |
| | | this.pageCurr = page; |
| | | this.pageSize = pageSize; |
| | | this.searchData(); |
| | | }, |
| | | onSizeChange(current, size) { |
| | | this.pageCurr = 1; |
| | | this.pageSize = size; |
| | | this.searchData(); |
| | | }, |
| | | onRefresh(conditions) { |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | onReset(conditions) { |
| | | this.conditions = conditions; |
| | | this.searchData(); |
| | | }, |
| | | exportExcel(list) { |
| | | ExportFile(this.columns, list, "反馈总表"); |
| | | }, |
| | | exportCurrPage() { |
| | | this.exportExcel(this.dataSource); |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters("setting", ["affixed"]), |
| | | }, |
| | | mounted() { |
| | | this.getUserList(); |
| | | this.searchData(); |
| | | window.addEventListener("resize", this.resize); |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("resize", this.resize); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main"> |
| | | <div class="inner" ref="wraper"> |
| | | <a-spin class="" :spinning="spinning" tip="拼命加载中..."> |
| | | <a-card> |
| | | <advance-table |
| | | ref="table" |
| | | class="doc-center-table" |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="" |
| | | row-key="id" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :scroll="{ x: 400, y }" |
| | | :pagination="{ |
| | | <div class="main"> |
| | | <div class="inner" ref="wraper"> |
| | | <a-spin class="" :spinning="spinning" tip="拼命加载中..."> |
| | | <a-card> |
| | | <advance-table |
| | | ref="table" |
| | | class="doc-center-table" |
| | | :data-source="dataSource" |
| | | :columns="columns" |
| | | :loading="loading" |
| | | title="" |
| | | row-key="id" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :scroll="{ x: 400, y }" |
| | | :pagination="{ |
| | | current: pageCurr, |
| | | pageSize: pageSize, |
| | | total: total, |
| | |
| | | onChange: onPageChange, |
| | | onShowSizeChange: onSizeChange, |
| | | }" |
| | | :rowClassName="rowClassFn"> |
| | | <template slot="title"> |
| | | <a-space class="operator"> |
| | | <span class="title">问题反馈总表</span> |
| | | <div class="filter-container"> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">创建人:</span> |
| | | <div class="filter-content"> |
| | | <a-select style="width: 180px" v-model="userName" @change="searchData"> |
| | | <a-select-option |
| | | v-for="(item, key) in userList" :key="'key'+key" |
| | | :value="item.id">{{item.name}}</a-select-option> |
| | | </a-select> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">创建时间:</span> |
| | | <div class="filter-content"> |
| | | <a-range-picker v-model="createTimeRange" @change="searchData"/> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">问题反馈状态:</span> |
| | | <div class="filter-content"> |
| | | <a-select style="width: 180px" v-model="state" @change="searchData"> |
| | | <a-select-option |
| | | v-for="(item, key) in stateList" :key="'key'+key" |
| | | :value="item.value">{{item.label}}</a-select-option> |
| | | </a-select> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <a-popover title="" trigger="hover"> |
| | | <a-space direction="vertical" slot="content"> |
| | | <a-button type="primary" @click="exportCurrPage()">导出当前</a-button> |
| | | <a-button type="primary" @click="searchData(true)">导出全部</a-button> |
| | | </a-space> |
| | | <a-button>更多操作</a-button> |
| | | </a-popover> |
| | | </div> |
| | | </div> |
| | | </a-space> |
| | | </template> |
| | | </advance-table> |
| | | </a-card> |
| | | </a-spin> |
| | | </div> |
| | | </div> |
| | | :rowClassName="rowClassFn" |
| | | > |
| | | <template slot="title"> |
| | | <a-space class="operator"> |
| | | <span class="title">问题反馈总表</span> |
| | | <div class="filter-container"> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">料号: </span> |
| | | <div class="filter-content"> |
| | | <a-input |
| | | style="width: 180px" |
| | | v-model="parentCode" |
| | | @input="searchData" |
| | | ></a-input> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">创建人:</span> |
| | | <div class="filter-content"> |
| | | <a-select |
| | | style="width: 180px" |
| | | v-model="userName" |
| | | @change="searchData" |
| | | > |
| | | <a-select-option |
| | | v-for="(item, key) in userList" |
| | | :key="'key' + key" |
| | | :value="item.id" |
| | | >{{ item.name }}</a-select-option |
| | | > |
| | | </a-select> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">创建时间:</span> |
| | | <div class="filter-content"> |
| | | <a-range-picker |
| | | v-model="createTimeRange" |
| | | @change="searchData" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <span class="filter-label">问题反馈状态:</span> |
| | | <div class="filter-content"> |
| | | <a-select |
| | | style="width: 180px" |
| | | v-model="state" |
| | | @change="searchData" |
| | | > |
| | | <a-select-option |
| | | v-for="(item, key) in stateList" |
| | | :key="'key' + key" |
| | | :value="item.value" |
| | | >{{ item.label }}</a-select-option |
| | | > |
| | | </a-select> |
| | | </div> |
| | | </div> |
| | | <div class="filter-item"> |
| | | <a-popover title="" trigger="hover"> |
| | | <a-space direction="vertical" slot="content"> |
| | | <a-button type="primary" @click="exportCurrPage()" |
| | | >导出当前</a-button |
| | | > |
| | | <a-button type="primary" @click="searchData(true)" |
| | | >导出全部</a-button |
| | | > |
| | | </a-space> |
| | | <a-button>更多操作</a-button> |
| | | </a-popover> |
| | | </div> |
| | | </div> |
| | | </a-space> |
| | | </template> |
| | | <template slot="action" slot-scope="{ record }"> |
| | | <a href="#" @click="showDetails(record)">详情</a> |
| | | </template> |
| | | </advance-table> |
| | | </a-card> |
| | | </a-spin> |
| | | </div> |
| | | <a-modal |
| | | :visible="detailsVisible" |
| | | :width="800" |
| | | title="问题反馈详情" |
| | | :destroyOnClose="true" |
| | | :maskClosable="false" |
| | | :footer="false" |
| | | @cancel="detailsCancel" |
| | | > |
| | | <feedback-details :fk-data="currFk"></feedback-details> |
| | | <div class="footer"> |
| | | <a-button class="btn" @click="detailsCancel">关闭</a-button> |
| | | </div> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped lang="less"> |
| | | .main { |
| | | height: 100%; |
| | | position: relative; |
| | | height: 100%; |
| | | position: relative; |
| | | |
| | | .inner { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | } |
| | | .inner { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | } |
| | | } |
| | | .filter-container { |
| | | font-size: 14px; |
| | | font-weight: normal; |
| | | margin-left: 16px; |
| | | .filter-item { |
| | | display: inline-block; |
| | | margin-right: 16px; |
| | | .filter-content { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | font-size: 14px; |
| | | font-weight: normal; |
| | | margin-left: 16px; |
| | | .filter-item { |
| | | display: inline-block; |
| | | margin-right: 16px; |
| | | .filter-content { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | } |
| | | .footer { |
| | | text-align: right; |
| | | } |
| | | </style> |