| | |
| | | return item; |
| | | }); |
| | | } |
| | | console.log(data); |
| | | // console.log(data); |
| | | // 根据id设置列表 |
| | | if(id==1002) { |
| | | this.setProjectManagerList(data); |
| | |
| | | }, |
| | | |
| | | mounted() { |
| | | console.log("FkData", this.FkData); |
| | | // console.log("FkData", this.FkData); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <a-form-model ref="formRef" :label-col="labelCol" :wrapper-col="wrapperCol"> |
| | | <!-- 产品名称 编号 版本 --> |
| | | <a-form-model-item label="产品名称:" prop="title"> |
| | | <a-select |
| | | v-model="id" |
| | | show-search |
| | | :filter-option="filterOption" |
| | | :disabled="!!prodData" |
| | | @change="prodChange" |
| | | > |
| | | <a-select-option |
| | | v-for="(prod, idx) in prodList" |
| | | :key="'prod_' + idx" |
| | | :value="prod.id" |
| | | >{{ prod.label }}</a-select-option |
| | | > |
| | | <a-select v-model="id" show-search :filter-option="filterOption" :disabled="!!prodData" @change="prodChange"> |
| | | <a-select-option v-for="(prod, idx) in prodList" :key="'prod_' + idx" :value="prod.id">{{ prod.label |
| | | }}</a-select-option> |
| | | </a-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item label="版本时间:" prop="versionTime"> |
| | |
| | | </a-form-model-item> |
| | | <!-- 指定人 --> |
| | | <a-form-model-item label="反馈给:" prop="title"> |
| | | <a-select |
| | | mode="multiple" |
| | | placeholder="请选择反馈接收人" |
| | | show-search |
| | | v-model="toUsers" |
| | | @change="handleChange" |
| | | > |
| | | <a-select-option |
| | | v-for="(user, idx) in userList" |
| | | :key="'user_' + idx" |
| | | :disabled="user.id == 25" |
| | | :value="user.id + '&&' + user.name" |
| | | > |
| | | <a-select mode="multiple" placeholder="请选择反馈接收人" show-search v-model="toUsers" @change="handleChange"> |
| | | <a-select-option v-for="(user, idx) in userList" :key="'user_' + idx" :disabled="user.id == 25" |
| | | :value="user.id + '&&' + user.name"> |
| | | {{ user.name }} |
| | | </a-select-option> |
| | | </a-select> |
| | |
| | | <a-row type="flex" class="row"> |
| | | <a-col flex="13.4em" class="label">附件</a-col> |
| | | <a-col :flex="1"> |
| | | <a-upload |
| | | class="upload" |
| | | :before-upload="beforeUpload" |
| | | @change="uploadChange" |
| | | > |
| | | <a-upload class="upload" multiple :before-upload="beforeUpload" @change="uploadChange"> |
| | | <a-button type="primary">选择文件</a-button> |
| | | </a-upload> |
| | | </a-col> |
| | | </a-row> |
| | | <!-- 问题描述 --> |
| | | <a-form-model-item label="问题描述:" prop="mailList"> |
| | | <yc-textarea |
| | | placeholder="请输入问题详情" |
| | | v-model="textDes" |
| | | show-word-limit |
| | | :maxLength="300" |
| | | :rows="6" |
| | | /> |
| | | <yc-textarea placeholder="请输入问题详情" v-model="textDes" show-word-limit :maxLength="300" :rows="6" /> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | <div class="footer"> |
| | |
| | | }, |
| | | uploadChange(data) { |
| | | const { file, fileList } = data; |
| | | if (fileList.length > 1) { |
| | | fileList.shift(); |
| | | } |
| | | // if (fileList.length > 1) { |
| | | // fileList.shift(); |
| | | // } |
| | | if (fileList.length) { |
| | | this.files = fileList[0].originFileObj; |
| | | // this.files = fileList[0].originFileObj; |
| | | this.files = fileList.map((v) => v.originFileObj); |
| | | } else { |
| | | this.files = null; |
| | | } |
| | |
| | | let list = []; |
| | | if (code && data) { |
| | | // console.log(data2); |
| | | list = data2.filter((v) => v.name != this.user.name); |
| | | if ('杨红兰' == this.user.name) { |
| | | list = data2; |
| | | } else { |
| | | list = data2.filter((v) => v.name != this.user.name); |
| | | } |
| | | } |
| | | // console.log(list, "====list"); |
| | | this.userList = list; |
| | |
| | | } |
| | | let data = { |
| | | content: textDes, |
| | | multipartFile: files, |
| | | multipartFile: files || [], |
| | | productId, |
| | | receiverIds, |
| | | receiverNames, |
| | |
| | | .row { |
| | | margin-bottom: 24px; |
| | | } |
| | | |
| | | .label { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | |
| | | color: rgba(0, 0, 0, 0.85); |
| | | // padding-right: 0.4em; |
| | | height: 32px; |
| | | |
| | | &::after { |
| | | content: ":"; |
| | | margin-left: 2px; |
| | | margin-right: 8px; |
| | | } |
| | | } |
| | | |
| | | .footer { |
| | | text-align: right; |
| | | .btn + .btn { |
| | | |
| | | .btn+.btn { |
| | | margin-left: 16px; |
| | | } |
| | | } |
| | | |
| | | .upload { |
| | | display: flex; |
| | | /deep/.ant-upload-list { |
| | | flex: 1; |
| | | position: relative; |
| | | & > div { |
| | | position: absolute; |
| | | left: 0; |
| | | right: 0; |
| | | } |
| | | width: 0; |
| | | } |
| | | } |
| | | </style> |
| | | }</style> |
| | |
| | | }) |
| | | } |
| | | /** |
| | | * 查询ECR记录 查全部 不分页 |
| | | * @returns |
| | | */ |
| | | export const getAllList = () => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "ecr/searchEcrInFeedback" |
| | | }) |
| | | } |
| | | /** |
| | | * 导入记录 |
| | | * @param {*} multipartFile |
| | | * @returns |
| | |
| | | } |
| | | /** |
| | | * 导出所有记录 |
| | | * 导出全部时 不传参, |
| | | * 导出部分时 ids是逗号分隔的id |
| | | * @returns |
| | | */ |
| | | export const exportExcel = () => { |
| | | export const exportExcel = (ids) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "ecr/exportExcel", |
| | | responseType: 'blob' |
| | | responseType: 'blob', |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | | /** |
| | | * 删除ECR记录 |
| | | * @returns |
| | | */ |
| | | export const deleteEcr = (number, filePath) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "ecr/deleteEcr", |
| | | params: { |
| | | number, filePath |
| | | } |
| | | }) |
| | | } |
| | |
| | | <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="{ |
| | | :row-selection="{ |
| | | fixed: true, |
| | | selectedRowKeys: selectedRowKeys, onChange: onSelectChange |
| | | }" :format-conditions="true" |
| | | :scroll="{ x: 400, y }" :pagination="{ |
| | | current: pageCurr, |
| | | pageSize: pageSize, |
| | | total: total, |
| | | showSizeChanger: true, |
| | | showLessItems: true, |
| | | showQuickJumper: true, |
| | | pageSizeOptions: ['10', '20', '50', '100'], |
| | | pageSizeOptions: ['10', '20', '50', '100', '500', '1000', '5000'], |
| | | showTotal: (total, range) => |
| | | `第 ${range[0]}-${range[1]} 条,总计 ${total} 条`, |
| | | onChange: onPageChange, |
| | |
| | | <a-space direction="vertical" slot="content"> |
| | | <a-button type="primary" @click="uploadFile">文件导入</a-button> |
| | | <a-button type="primary" @click="customForm">手动录入</a-button> |
| | | <a-button type="primary" @click="exportExcel">导出全部</a-button> |
| | | <a-button type="primary" @click="exportExcel()">导出全部</a-button> |
| | | <a-button type="primary" @click="exportExcel(selectedRowKeys)">导出所选</a-button> |
| | | </a-space> |
| | | <a-button>更多操作</a-button> |
| | | </a-popover> |
| | |
| | | {{ record.customCode == "" ? "是" : "否" }} |
| | | </template> |
| | | <template slot="action" slot-scope="{ record }"> |
| | | <a href="javascript:;" v-if="!!record.changeDescription" @click="viewChangeDescription(record)">变理原因</a> |
| | | <a-space> |
| | | <a href="javascript:;" v-if="!!record.changeDescription" @click="viewChangeDescription(record)">变理原因</a> |
| | | <a href="javascript:;" @click="deleteEcr(record)">删除</a> |
| | | </a-space> |
| | | </template> |
| | | </advance-table> |
| | | </a-card> |
| | |
| | | getList, |
| | | ecrImportByExcel, |
| | | ecrImport, |
| | | exportExcel |
| | | exportExcel, |
| | | deleteEcr |
| | | } from './apis'; |
| | | export default { |
| | | name: '', |
| | | |
| | | data() { |
| | | return { |
| | | selectedRowKeys: [], |
| | | info: { |
| | | number: '', |
| | | proposeDate: '', |
| | |
| | | } |
| | | this.dataSource = list; |
| | | this.total = total; |
| | | this.selectedRowKeys = []; |
| | | }); |
| | | }, |
| | | beforeUpload() { |
| | |
| | | const formData = new FormData(); |
| | | formData.append('multipartFile', this.file); |
| | | ecrImportByExcel(formData).then(res => { |
| | | let { code, data } = res.data; |
| | | let { code, data, msg } = res.data; |
| | | this.$layer.close(loading); |
| | | if (code && data) { |
| | | this.$message.success('导入成功'); |
| | | this.uploadVisible = false; |
| | | } else { |
| | | this.$message.error('导入失败'); |
| | | this.$message.error(msg); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.$layer.close(loading); |
| | | }); |
| | | }, |
| | | exportExcel() { |
| | | exportExcel().then(res => { |
| | | exportExcel(ids) { |
| | | console.log(ids, 'ids'); |
| | | if (undefined != ids) { |
| | | if (ids.length) { |
| | | ids = ids.join(','); |
| | | } else { |
| | | this.$message.error('请选择需要导出的记录'); |
| | | return false; |
| | | } |
| | | } |
| | | exportExcel(ids).then(res => { |
| | | // console.log(res, '===res') |
| | | let { headers, data, status } = res; |
| | | if (200 == status && data) { |
| | |
| | | let link = document.createElement("a"); |
| | | link.style.display = "none"; |
| | | link.href = url; |
| | | link.download = fileName; |
| | | link.download = decodeURI(fileName); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | |
| | | this.info.prod = value; |
| | | this.info.subCode = value.map(v => v.split("&&")[0]).join('/'); |
| | | this.info.subModel = value.map(v => v.split("&&")[1]).join('/'); |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectedRows) { |
| | | console.log('selectedRowKeys changed: ', selectedRowKeys, selectedRows); |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | }, |
| | | deleteEcr(record) { |
| | | let { |
| | | number, |
| | | excelFile |
| | | } = record; |
| | | let loading = this.$layer.loading(); |
| | | deleteEcr(number, excelFile).then((res) => { |
| | | let { code, data } = res.data; |
| | | if (code && data) { |
| | | this.$message.success('删除成功'); |
| | | this.$layer.close(loading); |
| | | this.getList(); |
| | | } else { |
| | | this.$message.error('删除失败'); |
| | | this.$layer.close(loading); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | } = data; |
| | | let loading = this.$layer.loading({ shade: true }); |
| | | const formData = new FormData(); |
| | | formData.append("multipartFile", multipartFile); |
| | | multipartFile.forEach((v) => { |
| | | formData.append("multipartFileList", v); |
| | | }); |
| | | formData.append( |
| | | "feedbackJson", |
| | | JSON.stringify({ |
| | |
| | | subVersion, |
| | | }) |
| | | ); |
| | | |
| | | submitFeedback(formData).then((res) => { |
| | | let { code, data } = res.data; |
| | | if (code && data) { |
| | |
| | | }); |
| | | }, |
| | | changeTotalCard(info) { |
| | | console.log(info.name, "nam"); |
| | | // console.log(info.name, "nam"); |
| | | this.cardName = ""; |
| | | this.$nextTick(() => { |
| | | this.cardName = info.name; |
| | |
| | | |
| | | /** |
| | | * 普通用户 取反馈列表 分页 |
| | | * @param flag 0未处理 1已完成 |
| | | * @param flags 用逗号分隔 |
| | | * pageCurr |
| | | * pageSize |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | export const getSenderStatus = (flag, pageCurr, pageSize) => { |
| | | export const getSenderStatus = (flags, pageCurr, pageSize) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "bomFeedbak/getSenderStatus", |
| | | params: { |
| | | flag, pageCurr, pageSize |
| | | flags, pageCurr, pageSize |
| | | } |
| | | }); |
| | | } |
| | | /** |
| | | * 管理者 获取反馈列表 分页 |
| | | * @param flag 0未处理 1已完成 |
| | | * @param flags 用逗号分隔 |
| | | * pageCurr |
| | | * pageSize |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | export const getRecevierStatus = (flag, pageCurr, pageSize) => { |
| | | export const getRecevierStatus = (flags, pageCurr, pageSize) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "bomFeedbak/getRecevierStatus", |
| | | params: { |
| | | flag, pageCurr, pageSize |
| | | flags, pageCurr, pageSize |
| | | } |
| | | }); |
| | | } |
| | | /** |
| | | * id, confirmStatus, replyContent |
| | | * 接收者确认反馈 |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | export const confirmFk = (id) => { |
| | | export const confirmFk = (id, confirmStatus, replyContent) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: "bomFeedbak/setconfirmFk", |
| | | params: { |
| | | id |
| | | method: "PUT", |
| | | url: "bomFeedbak/updateConfirmFeedback", |
| | | data: { |
| | | id, confirmStatus, replyContent |
| | | } |
| | | }); |
| | | } |
| | |
| | | }, |
| | | data |
| | | }); |
| | | } |
| | | /** |
| | | * 追加反馈接受者 只能选一个 |
| | | * @param {*} id |
| | | * @param {*} userId |
| | | * @param {*} username |
| | | * @returns |
| | | */ |
| | | export const dispatch = (id, userId, username) => { |
| | | return axios({ |
| | | method: "PUT", |
| | | url: "bomFeedbak/updateReceiverUserAppend", |
| | | params: { |
| | | id, userId, username |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 完结 关联ecr变更单号 |
| | | * @param {*} id |
| | | * @param {*} userId |
| | | * @param {*} username |
| | | * @returns |
| | | */ |
| | | export const updateEcrNumber = (id, ecrNumber) => { |
| | | return axios({ |
| | | method: "POST", |
| | | url: "bomFeedbak/updateEcrNumber", |
| | | params: { |
| | | id, ecrNumber |
| | | } |
| | | }); |
| | | } |
| | |
| | | <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: '100%', y }" |
| | | @search="onSearch" |
| | | @refresh="onRefresh" |
| | | @reset="onReset" |
| | | :format-conditions="true" |
| | | :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 |
| | |
| | | <a href="#">确认</a> |
| | | </a-popconfirm> --> |
| | | <a href="#" @click="showDetails(record)">详情</a> |
| | | <template v-if="canDispatch && '杨红兰' == record.receiverNames"> |
| | | <a-divider type="vertical"></a-divider> |
| | | <a href="#" @click="dispatch(record)">指派</a> |
| | | </template> |
| | | <template v-if="0 == record.confirmStatus && isReceiver"> |
| | | <a-divider type="vertical"></a-divider> |
| | | <a href="#" @click="showConfirm(record)">确认</a> |
| | | </template> |
| | | <template v-if="3 == record.confirmStatus && isReceiver"> |
| | | <a-divider type="vertical"></a-divider> |
| | | <a href="#" @click="showFinish(record)">完结</a> |
| | | </template> |
| | | </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" |
| | | :footer="false" |
| | | @cancel="detailsCancel" |
| | | > |
| | | <feedback-details |
| | | :fk-data="currFk" |
| | | @cancel="detailsCancel" |
| | | @ok="detailsOk" |
| | | ></feedback-details> |
| | | <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-option :value="2">不需要修改bom</a-select-option> |
| | | <a-select-option :value="3">需要修改bom</a-select-option> |
| | | </a-select> |
| | | </a-col> |
| | | </a-row> |
| | | <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" /> |
| | | </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"> |
| | | <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"> |
| | | {{ user.name }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-col> |
| | | </a-row> |
| | | </a-modal> |
| | | <!-- 完结 --> |
| | | <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"> |
| | | {{ ecr.number }} |
| | | </a-select-option> |
| | | </a-select> |
| | | </a-col> |
| | | </a-row> |
| | | </a-modal> |
| | | </page-toggle-transition> |
| | | </template> |
| | |
| | | <script> |
| | | import PageToggleTransition from "@/components/transition/PageToggleTransition"; |
| | | import AdvanceTable from "@/components/table/advance/AdvanceTable"; |
| | | import { mapState } from "vuex"; |
| | | import { mapGetters, mapState } from "vuex"; |
| | | import { |
| | | getSenderStatus, |
| | | getRecevierStatus, |
| | | confirmFk, |
| | | submitFeedback, |
| | | linkInfo, |
| | | dispatch, |
| | | updateEcrNumber |
| | | } from "@/pages/workplace/apis"; |
| | | import { getUserByRoleIds } from "@/pages/user/apis"; |
| | | import { getAllList } from '@/pages/resourceManage/ecr/apis'; |
| | | import DrawUpload from "@/pages/components/drawUpload/DrawUpload"; |
| | | import AuditForm from "@/pages/workplace/workForm/auditForm"; |
| | | import const_job_types from "@/assets/js/const/const_job_types"; |
| | | import getItemByKey from "@/assets/js/tools/getItemByKey"; |
| | | import ReplaceInfo from "../replaceInfo"; |
| | | import MaterialInfo from "../materialInfo"; |
| | | import FeedbackForm from "@/pages/resourceManage/components/feedbackForm.vue"; |
| | | import FeedbackDetails from "../../resourceManage/components/feedbackDetails.vue"; |
| | | import YcTextarea from "@/components/input/ycTextarea"; |
| | | 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: "创建人", |
| | |
| | | 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: 120, |
| | | width: 160, |
| | | scopedSlots: { customRender: "action" }, |
| | | }, |
| | | ]; |
| | |
| | | MaterialInfo, |
| | | FeedbackForm, |
| | | FeedbackDetails, |
| | | YcTextarea |
| | | }, |
| | | props: { |
| | | isShow: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | ecrList: [], |
| | | ecrNumber: '', |
| | | finishVisible: false, |
| | | toUsers: '', |
| | | userList: [], |
| | | dispatchId: '', |
| | | showReplyContent: false, |
| | | replyContent: '', |
| | | confirmStatus: undefined, |
| | | isConfirm: false, |
| | | currFk: null, |
| | | dispatchVisible: false, |
| | | detailsVisible: false, |
| | | feedBackVisible: false, |
| | | flag: 0, |
| | |
| | | }, |
| | | searchData() { |
| | | let getList = this.isReceiver ? getRecevierStatus : getSenderStatus; |
| | | getList(this.flag, this.page, this.pageSize).then((res) => { |
| | | let flags = []; |
| | | switch (this.flag) { |
| | | case 0: |
| | | flags = [0]; |
| | | break; |
| | | case 1: |
| | | flags = [3]; |
| | | break; |
| | | case 2: |
| | | flags = [2, 4]; |
| | | break; |
| | | } |
| | | getList(flags.join(','), this.page, this.pageSize).then((res) => { |
| | | let { code, data, data2 } = res.data; |
| | | let total = 0, |
| | | list = []; |
| | |
| | | } = data; |
| | | let loading = this.$layer.loading({ shade: true }); |
| | | const formData = new FormData(); |
| | | formData.append("multipartFile", multipartFile); |
| | | multipartFile.forEach((v) => { |
| | | formData.append("multipartFileList", v); |
| | | }); |
| | | formData.append( |
| | | "feedbackJson", |
| | | JSON.stringify({ |
| | |
| | | }, |
| | | confirmFk() { |
| | | let id = this.currFk.id; |
| | | confirmFk(id).then((res) => { |
| | | let { confirmStatus, replyContent } = this; |
| | | let loading = this.$layer.loading(); |
| | | confirmFk(id, confirmStatus, replyContent).then((res) => { |
| | | let { code, data, msg } = res.data; |
| | | if (code && data) { |
| | | this.$message.success("确认成功"); |
| | | this.detailsVisible = false; |
| | | this.$layer.close(loading); |
| | | this.flagChange(); |
| | | } else { |
| | | this.$message.warning(msg); |
| | | this.$layer.close(loading); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.isConfirm = true; |
| | | this.detailsVisible = true; |
| | | }, |
| | | showFinish(obj) { |
| | | this.currFk = obj; |
| | | this.ecrNumber = ''; |
| | | this.finishVisible = true; |
| | | }, |
| | | detailsCancel() { |
| | | this.detailsVisible = false; |
| | | this.initForm(); |
| | | }, |
| | | detailsOk() { |
| | | this.detailsVisible = false; |
| | | }, |
| | | initForm() { |
| | | this.replyContent = ''; |
| | | this.confirmStatus = undefined; |
| | | this.showReplyContent = false; |
| | | }, |
| | | confirmStatusChange(v) { |
| | | if (2 == v || 3 == v) { |
| | | this.showReplyContent = true; |
| | | } else { |
| | | this.showReplyContent = false; |
| | | } |
| | | }, |
| | | getRowClassName(record) { |
| | | if (this.canDispatch && '杨红兰' == record.receiverNames) { |
| | | return 'warning'; |
| | | } |
| | | return ''; |
| | | }, |
| | | dispatch(record) { |
| | | this.currFk = record; |
| | | this.dispatchId = record.id; |
| | | this.dispatchVisible = true; |
| | | }, |
| | | dispatchCancel() { |
| | | this.dispatchVisible = false; |
| | | }, |
| | | dispatchOk() { |
| | | let { |
| | | toUsers, |
| | | dispatchId |
| | | } = this; |
| | | if (!toUsers) { |
| | | this.$message.error('请选择要指派的用户'); |
| | | return false; |
| | | } |
| | | let [id, name] = toUsers.split('&&'); |
| | | let loading = this.$layer.loading(); |
| | | dispatch(dispatchId, id, name).then(res => { |
| | | let { code } = res.data; |
| | | if (code) { |
| | | this.$message.success('操作成功'); |
| | | this.$layer.close(loading); |
| | | this.dispatchVisible = false; |
| | | this.searchData(); |
| | | } else { |
| | | this.$message.error('操作失败'); |
| | | this.$layer.close(loading); |
| | | } |
| | | }); |
| | | }, |
| | | // 获取多个角色组的所有用户 |
| | | getUserByRoleIds() { |
| | | getUserByRoleIds("1001,1002,1003") |
| | | .then((res) => { |
| | | let { code, data, data2 } = res.data; |
| | | let list = []; |
| | | if (code && data) { |
| | | // console.log(data2); |
| | | list = data2.filter((v) => v.name != this.user.name); |
| | | } |
| | | // console.log(list, "====list"); |
| | | this.userList = list; |
| | | }) |
| | | .catch((err) => { |
| | | console.error(err); |
| | | }); |
| | | }, |
| | | getEcrList() { |
| | | getAllList().then(res => { |
| | | let { code, data, data2 } = res.data; |
| | | let list = []; |
| | | if (code && data) { |
| | | list = data2; |
| | | } |
| | | this.ecrList = list; |
| | | }); |
| | | }, |
| | | finishCancel() { |
| | | this.finishVisible = false; |
| | | }, |
| | | finishOk() { |
| | | let { ecrNumber, currFk } = this; |
| | | if (!ecrNumber) { |
| | | this.$message.error('请选择变更单号'); |
| | | return false; |
| | | } |
| | | let loading = this.$layer.loading(); |
| | | updateEcrNumber(currFk.id, ecrNumber).then(res => { |
| | | let { code, data } = res.data; |
| | | if (code && data) { |
| | | this.$layer.close(loading); |
| | | this.$message.success('操作成功'); |
| | | this.finishVisible = false; |
| | | this.searchData(); |
| | | } else { |
| | | this.$layer.close(loading); |
| | | this.$message.error('操作失败'); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState("setting", ["animate"]), |
| | | ...mapGetters("account", ["user"]), |
| | | workDetailTitle() { |
| | | return this.title; |
| | | }, |
| | | canDispatch() { |
| | | return 0 == this.flag && '杨红兰' == this.user.name; |
| | | }, |
| | | isReceiver() { |
| | | return this.type == "recevierFk"; |
| | |
| | | }, |
| | | mounted() { |
| | | this.searchData(); |
| | | this.getUserByRoleIds(); |
| | | this.getEcrList(); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .ml-20 { |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | .footer { |
| | | text-align: right; |
| | | .btn + .btn { |
| | | |
| | | .btn+.btn { |
| | | margin-left: 20px; |
| | | } |
| | | } |
| | | |
| | | .row { |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .label { |
| | | // display: flex; |
| | | // justify-content: flex-end; |
| | | // align-items: center; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | // padding-right: 0.4em; |
| | | height: 32px; |
| | | line-height: 32px; |
| | | text-align: right; |
| | | |
| | | &::after { |
| | | content: ":"; |
| | | margin-left: 2px; |
| | | margin-right: 8px; |
| | | } |
| | | } |
| | | |
| | | /deep/.warning>td { |
| | | background: #f7dea7; |
| | | } |
| | | |
| | | // /deep/.warning.warning.ant-table-row-hover > td, |
| | | // /deep/.warning.warning:hover > td { |
| | | // background: #f8c34f; |
| | | // } |
| | | </style> |