From a25fbe37f64f0250a8e27e83ebc68314e301d047 Mon Sep 17 00:00:00 2001 From: he wei <858544502@qq.com> Date: 星期五, 01 十二月 2023 14:05:11 +0800 Subject: [PATCH] U 反馈列表添加料号 详情等修改 --- src/pages/workplace/feedbackList/feedbackList.vue | 218 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 159 insertions(+), 59 deletions(-) diff --git a/src/pages/workplace/feedbackList/feedbackList.vue b/src/pages/workplace/feedbackList/feedbackList.vue index 8105ce8..786cbac 100644 --- a/src/pages/workplace/feedbackList/feedbackList.vue +++ b/src/pages/workplace/feedbackList/feedbackList.vue @@ -1,10 +1,23 @@ <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, @@ -15,15 +28,26 @@ `绗� ${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 @@ -49,19 +73,39 @@ </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">涓嶉渶瑕佷慨鏀筨om</a-select-option> <a-select-option :value="3">闇�瑕佷慨鏀筨om</a-select-option> </a-select> @@ -70,24 +114,48 @@ <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> @@ -95,14 +163,30 @@ </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> @@ -122,10 +206,10 @@ 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"; @@ -135,69 +219,88 @@ 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" }, @@ -213,7 +316,7 @@ MaterialInfo, FeedbackForm, FeedbackDetails, - YcTextarea + YcTextarea, }, props: { isShow: { @@ -238,13 +341,13 @@ data() { return { ecrList: [], - ecrNumber: '', + ecrNumber: "", finishVisible: false, - toUsers: '', + toUsers: "", userList: [], - dispatchId: '', + dispatchId: "", showReplyContent: false, - replyContent: '', + replyContent: "", confirmStatus: undefined, isConfirm: false, currFk: null, @@ -310,7 +413,7 @@ 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 = []; @@ -404,7 +507,7 @@ }, showFinish(obj) { this.currFk = obj; - this.ecrNumber = ''; + this.ecrNumber = ""; this.finishVisible = true; }, detailsCancel() { @@ -415,7 +518,7 @@ this.detailsVisible = false; }, initForm() { - this.replyContent = ''; + this.replyContent = ""; this.confirmStatus = undefined; this.showReplyContent = false; }, @@ -427,10 +530,10 @@ } }, getRowClassName(record) { - if (this.canDispatch && '鏉ㄧ孩鍏�' == record.receiverNames) { - return 'warning'; + if (this.canDispatch && "鏉ㄧ孩鍏�" == record.receiverNames) { + return "warning"; } - return ''; + return ""; }, dispatch(record) { this.currFk = record; @@ -441,25 +544,22 @@ 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); } }); @@ -482,7 +582,7 @@ }); }, getEcrList() { - getAllList().then(res => { + getAllList().then((res) => { let { code, data, data2 } = res.data; let list = []; if (code && data) { @@ -497,23 +597,23 @@ 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"]), @@ -522,7 +622,7 @@ return this.title; }, canDispatch() { - return 0 == this.flag && '鏉ㄧ孩鍏�' == this.user.name; + return 0 == this.flag && "鏉ㄧ孩鍏�" == this.user.name; }, isReceiver() { return this.type == "recevierFk"; @@ -549,7 +649,7 @@ .footer { text-align: right; - .btn+.btn { + .btn + .btn { margin-left: 20px; } } @@ -575,7 +675,7 @@ } } -/deep/.warning>td { +/deep/.warning > td { background: #f7dea7; } -- Gitblit v1.9.1