From abba64c23543cd806ed8864a9a976408618a5f45 Mon Sep 17 00:00:00 2001 From: XiaoRuby <3114200645@qq.com> Date: 星期日, 24 九月 2023 23:15:54 +0800 Subject: [PATCH] 9-24 加班 --- src/components/view/Processingproducts.vue | 639 +++++++++++++++++++++++---------------------------------- 1 files changed, 257 insertions(+), 382 deletions(-) diff --git a/src/components/view/Processingproducts.vue b/src/components/view/Processingproducts.vue index 4530c83..24828f7 100644 --- a/src/components/view/Processingproducts.vue +++ b/src/components/view/Processingproducts.vue @@ -1,410 +1,285 @@ <template> - <div class="unqualifiedBox"> - <el-row> - <el-col :span="12" style="line-height: 32px;">涓嶅悎鏍煎搧澶勭疆</el-col> - <el-col :span="12" style="text-align: right;"> - <el-button icon="el-icon-download" size="mini" @click="() => {}" - >瀵煎嚭</el-button - > - </el-col> - </el-row> - <div style="margin-top: 10px;"> - <el-card shadow="hover" class="margin-30" style="height: 80px;"> - <div class="choose"> - <span>浜у搧鍚嶇О锛�</span> - <el-input - size="small" - v-model="search.productName" - style="width: 13vw;margin-right: 5px;" - placeholder="璇疯緭鍏�" - clearable - ></el-input> - <span>瑙勬牸鍨嬪彿锛�</span> - <el-input - size="small" - v-model="search.specificationModel" - style="width: 13vw;margin-right: 5px;" - placeholder="璇疯緭鍏�" - clearable - ></el-input> - <span>浜у搧澶х被锛�</span> - <el-select - v-model="search.productCategories" - size="small" - placeholder="璇烽�夋嫨" - style="width: 13vw;margin-right: 5px;" - > - <el-option label="鍘熸潗鏂�" :value="0"></el-option> - <el-option label="鎴愬搧" :value="1"></el-option> - <el-option label="鍗婃垚鍝�" :value="2"></el-option> - </el-select> - <span>鐘舵�侊細</span> - <el-select - v-model="search.state" - size="small" - placeholder="璇烽�夋嫨" - style="width: 13vw;margin-right: 5px;" - > - <el-option label="杩斾慨涓�" :value="1"></el-option> - <el-option label="寰呭鐞�" :value="0"></el-option> - </el-select> - <el-button size="mini" @click="clean()"><span>閲� 缃�</span></el-button> - <el-button - size="mini" - type="primary" - style="background: #004EA2;" - @click=" - unqualifiedTable = []; - getDetailInfo(); - " - ><span>鏌� 璇�</span></el-button - > - </div> - </el-card> - </div> - <div class="tableno" style="height:300px"> - <el-card shadow="hover" class="margin-30"> - <el-table - :data="unqualifiedTable" - border - ref="multipleTable" - tooltip-effect="dark" - height="calc(100vh - 340px)" - style="width: 100%" - > - <el-table-column type="selection" min-width="50"> </el-table-column> - <el-table-column type="index" label="搴忓彿" width="60"> - <template slot-scope="scope"> - {{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }} - </template> - </el-table-column> - <el-table-column prop="dateArrival" label="浜у搧澶х被"> - <template slot-scope="scope"> - <span v-if="scope.row.type == 0">鍘熸潗鏂�</span> - <span v-if="scope.row.type == 1">鎴愬搧</span> - <span v-if="scope.row.type == 2">鍗婃垚鍝�</span> - </template> - </el-table-column> - <el-table-column - prop="productName" - label="浜у搧鍚嶇О" - min-width="90" - show-overflow-tooltip - > - </el-table-column> - <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿"> - </el-table-column> - <el-table-column prop="number" label="涓嶅悎鏍煎搧鏁伴噺"> - </el-table-column> - <el-table-column label="鐜板儚鎻忚堪" min-width="150"> - <template slot-scope="scope"> - <el-input - size="small" - v-model="scope.row.description" - @blur="outOfFocusDescription(scope)" - ></el-input> - </template> - </el-table-column> - <el-table-column label="澶勭疆鎰忚"> - <template slot-scope="scope"> - <el-button type="text" @click="showDisposalOpinions(scope)" - >鏌ョ湅澶勭疆鎰忚</el-button - > - </template> - </el-table-column> - <el-table-column prop="user_name" label="鐢宠浜�"> </el-table-column> - <el-table-column prop="date" label="鏃ユ湡"> </el-table-column> - <el-table-column prop="deal_state" label="鐘舵��"> - <template slot-scope="scope"> - <span style="color:#34BD66;" v-if="scope.row.deal_state == 1" - >宸插鐞�</span - > - <span style="color:#E84738;" v-else-if="scope.row.deal_state == 0" - >寰呭鐞�</span - > - </template> - </el-table-column> - <el-table-column label="鎿嶄綔" width="130"> - <template slot-scope="scope"> - <div style="display: flex;"> - <el-button type="text" siae="small" size="mini">闄勪欢</el-button> - <el-button - type="text" - siae="small" - size="mini" - style=" color:87, 138, 193 ;" - @click="clickEditorialOpinion(scope)" - >缂栬緫鎰忚</el-button - > - </div> - </template> - </el-table-column> - </el-table> - <el-col - style="height: 50px;display: flex;align-items: center;justify-content: right;" - > - <el-pagination - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :current-page="search.pageSize" - :page-sizes="[10, 15, 20, 30, 50]" - :page-size="search.countSize" - layout="total, sizes, prev, pager, next, jumper" - :total="total" - > - </el-pagination> - </el-col> - </el-card> - </div> - <el-dialog title="鎻愮ず" :visible.sync="dialogVisible" width="30%"> - <el-form label-width="130px" style="height: 500px; overflow: auto ;"> - <el-empty - v-if="updateEditList.length == 0" - :image-size="200" - ></el-empty> - <div v-for="item in updateEditList" :key="item.$index"> - <el-form-item - :label=" - item.type == 0 - ? '鎶�鏈儴澶勭疆鎰忚锛�' - : item.type == 1 - ? '鐢熶骇閮ㄥ缃剰瑙侊細' - : item.type == 2 - ? '璐ㄩ噺閮ㄥ缃剰瑙侊細' - : '鎬荤粡鍔炲缃剰瑙侊細' - " - > - <el-input - type="textarea" - :rows="2" - placeholder="璇疯緭鍏ュ唴瀹�" - v-model="item.tell" - > - </el-input> - </el-form-item> - <el-row v-if="isShow == true"> - <el-col :span="12"> - <el-form-item label="濉啓浜猴細" v-if="isShow == true"> - {{ item.name }} - </el-form-item> + <div class="unqualifiedBox"> + <el-row> + <el-col :span="12" style="line-height: 32px;">涓嶅悎鏍煎搧澶勭疆</el-col> + <el-col :span="12" style="text-align: right;"> + <el-button icon="el-icon-download" size="mini" @click="() => { }">瀵煎嚭</el-button> </el-col> - <el-col :span="12"> - <el-form-item label="濉啓鏃ユ湡锛�" v-if="isShow == true"> - {{ item.fillDate }} - </el-form-item> - </el-col> - </el-row> - <el-form-item label="澶勭疆鏂瑰紡锛�"> - <el-radio-group v-model="item.way"> - <el-radio :label="0">杩斿伐</el-radio> - <el-radio :label="1">杩斾慨</el-radio> - <el-radio :label="2">璁╂鎺ユ敹</el-radio> - <el-radio :label="3">鎷掓敹</el-radio> - <el-radio :label="4">闄嶇骇浣跨敤</el-radio> - <el-radio :label="5">鎶ュ簾</el-radio> - </el-radio-group> - </el-form-item> - <el-divider v-if="item.type != 3"></el-divider> + </el-row> + <div style="margin-top: 1em;"> + <el-card shadow="hover" style="height: 6em; display: flex;align-items: center;"> + <div class="choose"> + <span>浜у搧鍚嶇О锛�</span> + <el-input size="small" v-model="search.productName" style="width: 13vw;margin-right: 5px;" placeholder="璇疯緭鍏�" clearable></el-input> + <span>瑙勬牸鍨嬪彿锛�</span> + <el-input size="small" v-model="search.specificationModel" style="width: 13vw;margin-right: 5px;" placeholder="璇疯緭鍏�" clearable></el-input> + <span>浜у搧澶х被锛�</span> + <el-select v-model="search.productCategories" size="small" placeholder="璇烽�夋嫨" style="width: 13vw;margin-right: 5px;"> + <el-option label="鍘熸潗鏂�" :value="0"></el-option> + <el-option label="鍗婃垚鍝�" :value="1"></el-option> + <el-option label="鍦ㄥ埗鍝�" :value="2"></el-option> + </el-select> + <span>鐘舵�侊細</span> + <el-select v-model="search.state" size="small" placeholder="璇烽�夋嫨" style="width: 13vw;margin-right: 5px;"> + <el-option label="杩斾慨涓�" :value="1"></el-option> + <el-option label="寰呭鐞�" :value="0"></el-option> + </el-select> + <el-button size="mini" @click="clean()"><span>閲� 缃�</span></el-button> + <el-button size="mini" type="primary" style="background: #004EA2;" @click="unqualifiedTable = [];getDetailInfo();"><span>鏌� 璇�</span></el-button> + </div> + </el-card> </div> - </el-form> - <span slot="footer" class="dialog-footer"> - <el-button @click="dialogVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="updateEditDevided()">纭� 瀹�</el-button> - </span> - </el-dialog> - </div> + <div class="tableno" style="height:300px"> + <el-card shadow="hover"> + <el-table :data="unqualifiedTable" border tooltip-effect="dark" height="calc(100vh - 340px)" style="width: 100%" :header-cell-style="{height: '50px'}"> + <el-table-column type="index" label="搴忓彿" width="60"> + <template slot-scope="scope"> + {{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }} + </template> + </el-table-column> + <el-table-column prop="dateArrival" label="浜у搧澶х被" min-width="100"> + <template slot-scope="scope"> + <span v-if="scope.row.type == 0">鍘熸潗鏂�</span> + <span v-if="scope.row.type == 1">鍗婃垚鍝�</span> + <span v-if="scope.row.type == 2">鍦ㄥ埗鍝�</span> + </template> + </el-table-column> + <el-table-column prop="productName" label="浜у搧鍚嶇О" min-width="100" show-overflow-tooltip> + </el-table-column> + <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" min-width="100"> + </el-table-column> + <el-table-column prop="number" label="涓嶅悎鏍煎搧鏁伴噺" min-width="150"> + </el-table-column> + <el-table-column label="鐜板儚鎻忚堪" min-width="150"> + <template slot-scope="scope"> + <el-input size="small" v-model="scope.row.description" @blur="outOfFocusDescription(scope)"></el-input> + </template> + </el-table-column> + <el-table-column label="澶勭疆鎰忚" min-width="100"> + 1232 + </el-table-column> + <el-table-column prop="user_name" label="鐢宠浜�" min-width="80"> </el-table-column> + <el-table-column prop="date" label="鏃ユ湡" min-width="150"> </el-table-column> + <el-table-column prop="deal_state" label="鐘舵��"> + <template slot-scope="scope"> + <span style="color:#34BD66;" v-if="scope.row.deal_state == 1">宸插鐞�</span> + <span style="color:#E84738;" v-else-if="scope.row.deal_state == 0">寰呭鐞�</span> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" min-width="130" fixed="right"> + <template slot-scope="scope"> + <div style="display: flex;"> + <el-button type="text" siae="small" size="mini">闄勪欢</el-button> + <el-button type="text" siae="small" size="mini" style=" color:87, 138, 193 ;" @click="clickEditorialOpinion(scope)">缂栬緫鎰忚</el-button> + </div> + </template> + </el-table-column> + </el-table> + <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;"> + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="search.pageSize" :page-sizes="[10, 15, 20, 30, 50]" :page-size="search.countSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> + </el-pagination> + </el-col> + </el-card> + </div> + <el-dialog title="鏈�缁堝缃剰瑙�" :visible.sync="dialogVisible" width="30%"> + <el-form label-width="120px"> + <div> + <el-form-item label="鏈�缁堝缃剰瑙侊細"> + <el-input type="textarea" :rows="3" placeholder="璇疯緭鍏ュ唴瀹�" v-model="clickEditOpinion.opinion_tell" /> + </el-form-item> + <el-form-item label="澶勭疆鏂瑰紡锛�"> + <el-radio-group v-model="clickEditOpinion.way"> + <el-radio :label="3">鎺ユ敹</el-radio> + <el-radio v-if="clickEditOpinion.type == 0" :label="2">璁╂鎺ユ敹</el-radio> + <el-radio v-if="clickEditOpinion.type !== 0" :label="4">闄嶇骇浣跨敤</el-radio> + <el-radio v-if="clickEditOpinion.type == 0" :label="7">鎹㈣揣</el-radio> + <el-radio v-if="clickEditOpinion.type == 0" :label="6">閫�璐�</el-radio> + <el-radio :label="1">杩斿伐杩斾慨</el-radio> + <el-radio v-if="clickEditOpinion.type !== 0" :label="5">鎶ュ簾</el-radio> + </el-radio-group> + </el-form-item> + </div> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="updateEditDevided()">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </template> <script> import { watch } from "vue"; export default { - data() { - return { - isShow: false, - search: { - countSize: 10, // 鏉℃暟/椤� - pageSize: 1, // 璧峰椤� - productCategories: "", // 浜у搧澶х被 - productName: "", // 浜у搧鍚嶇О - specificationModel: "", // 瑙勬牸鍨嬪彿 - state: "" // 鐘舵�� - }, - unqualifiedTable: [], // 椤甸潰琛ㄦ牸鏁版嵁 - total: 0, // 鎬绘潯鏁� - dialogVisible: false, // 鏄剧ず寮瑰嚭妗� - updateEditList: [] - }; - }, - mounted() { - this.getDetailInfo(); - }, - methods: { - // 鍒嗛〉 - handleSizeChange(val) { - this.search.countSize = val; - this.getDetailInfo(); + data() { + return { + isShow: false, + search: { + countSize: 10, // 鏉℃暟/椤� + pageSize: 1, // 璧峰椤� + productCategories: "", // 浜у搧澶х被 + productName: "", // 浜у搧鍚嶇О + specificationModel: "", // 瑙勬牸鍨嬪彿 + state: "", // 鐘舵�� + }, + unqualifiedTable: [], // 椤甸潰琛ㄦ牸鏁版嵁 + total: 0, // 鎬绘潯鏁� + dialogVisible: false, // 鏄剧ず寮瑰嚭妗� + clickEditOpinion: "", // 鐐瑰嚮缂栬緫鎰忚涓存椂瀛樺偍璇ヨ鏁版嵁 + }; }, - // 鍒嗛〉 - handleCurrentChange(val) { - this.search.pageSize = val; - this.getDetailInfo(); + mounted() { + this.getDetailInfo(); }, - // 鍒嗛〉琛ㄦ牸鏁版嵁 - getDetailInfo() { - this.axios - .get(this.$api.url.getTable, { - params: this.search - }) - .then(res => { - this.unqualifiedTable = res.data.row; - this.total = res.data.total; - }); + methods: { + // 鍒嗛〉 + handleSizeChange(val) { + this.search.countSize = val; + this.getDetailInfo(); + }, + // 鍒嗛〉 + handleCurrentChange(val) { + this.search.pageSize = val; + this.getDetailInfo(); + }, + // 鍒嗛〉琛ㄦ牸鏁版嵁 + getDetailInfo() { + this.axios + .get(this.$api.url.getTable, { + params: this.search, + }) + .then((res) => { + this.unqualifiedTable = res.data.row; + this.total = res.data.total; + }); + }, + // 閲嶇疆鎸夐挳 + clean() { + this.search = { + countSize: 10, // 鏉℃暟/椤� + pageSize: 1, // 璧峰椤� + productCategories: "", // 浜у搧澶х被 + productName: "", // 浜у搧鍚嶇О + specificationModel: "", // 瑙勬牸鍨嬪彿 + state: "", // 鐘舵�� + }; + this.getDetailInfo(); + }, + // 鐐瑰嚮缂栬緫鎰忚 + clickEditorialOpinion(scope) { + this.dialogVisible = true; + this.clickEditOpinion = scope.row; + }, + // 澶卞幓鐜板儚鎻忚堪鐒︾偣瑙﹀彂 + outOfFocusDescription(scope) { + this.axios + .get(this.$api.url.descriptionUpdate, { + params: { + rawUnacceptedId: scope.row.id, + tell: scope.row.description, + }, + }) + .then((res) => { + this.$message({ + message: res.message, + type: "success", + }); + }); + }, + // 鐐瑰嚮纭畾鎸夐挳 + updateEditDevided() { + console.log(`output->this.clickEditOpinion`, this.clickEditOpinion); + this.axios + .post(this.$api.url.editDisposalOpinion, { + opinionTell: this.clickEditOpinion.opinion_tell, + rawUnacceptedId: this.clickEditOpinion.id, + way: this.clickEditOpinion.way, + type: this.clickEditOpinion.type, + }) + .then((res) => { + this.dialogVisible = false; + this.$message({ + message: res.message, + type: "success", + }); + }); + }, }, - // 閲嶇疆鎸夐挳 - clean() { - this.search = { - countSize: 10, // 鏉℃暟/椤� - pageSize: 1, // 璧峰椤� - productCategories: "", // 浜у搧澶х被 - productName: "", // 浜у搧鍚嶇О - specificationModel: "", // 瑙勬牸鍨嬪彿 - state: "" // 鐘舵�� - }; - this.getDetailInfo(); + watch: { + dialogVisible: { + handler(newVal, oldVal) { + if (newVal == false) { + this.isShow = false; + } + }, + }, }, - // 鐐瑰嚮鏌ョ湅澶勭疆鎰忚 - showDisposalOpinions(scope) { - this.isShow = true; - this.dialogVisible = true; - this.$axios - .get(this.$api.url.viewEditorial, { - params: { - rawUnacceptedId: scope.row.id - } - }) - .then(res => { - this.updateEditList = res.data; - this.getDetailInfo(); - }); - }, - // 鐐瑰嚮缂栬緫鎰忚 - clickEditorialOpinion(scope) { - this.dialogVisible = true; - this.axios - .get(this.$api.url.clickEditing, { - params: { rawUnacceptedId: scope.row.id } - }) - .then(res => { - this.updateEditList = res.data; - }); - }, - // 澶卞幓鐜板儚鎻忚堪鐒︾偣瑙﹀彂 - outOfFocusDescription(scope) { - this.axios - .get(this.$api.url.descriptionUpdate, { - params: { - rawUnacceptedId: scope.row.id, - tell: scope.row.description - } - }) - .then(res => { - this.$message({ - message: res.message, - type: "success" - }); - }); - }, - // 鐐瑰嚮纭畾鎸夐挳 - updateEditDevided() { - this.$axios - .post( - this.$api.url.addOpinion, - { opinion: this.updateEditList }, - { - headers: { "Content-Type": "application/json" } - } - ) - .then(res => { - console.log(`output->res`, res); - this.dialogVisible = false; - this.getDetailInfo(); - }); - } - }, - watch: { - dialogVisible: { - handler(newVal, oldVal) { - if (newVal == false) { - this.isShow = false; - } - } - } - } }; </script> <style scoped> .main_div { - padding-top: 15px; -} -.el-radio__label { - font-size: 16px; -} -.el-radio { - margin-right: 60px; - margin-top: 10px; -} -.el-form-item { - margin-bottom: 6px; - font-size: 16px; -} -.unqualifiedBox { - width: 100%; - max-height: 100%; - display: flex; - flex-direction: column; - /* overflow-y: scroll; */ -} -.unqualifiedBox .title .el-button { - height: 32px; - border: 1px solid rgba(190, 190, 190, 0.44); - box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); - padding: 0 12px; -} -/deep/ .el-table__cell { - padding: 5px 0; -} -.unqualifiedBox .title { - margin-bottom: 10px; - padding: 0 20px; -} -<!-- /* 鏉′欢鏌ヨ澶撮儴鏍峰紡 */ --> - .choose { - padding: 21px 24px; - display: flex; - align-items: center; - background-color: #fff; - border-bottom: 3px solid rgb(245, 247, 251); + padding-top: 15px; } +.el-radio__label { + font-size: 16px; +} + +.el-radio { + margin-right: 60px; + margin-top: 10px; +} + +.el-form-item { + margin-bottom: 6px; + font-size: 16px; +} + +.unqualifiedBox { + width: 100%; + max-height: 100%; + display: flex; + flex-direction: column; +} + +.unqualifiedBox .title .el-button { + height: 32px; + border: 1px solid rgba(190, 190, 190, 0.44); + box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); + padding: 0 12px; +} + +/deep/ .el-table__cell { + padding: 5px 0; +} + +.unqualifiedBox .title { + margin-bottom: 10px; + padding: 0 20px; +} + +/* 鏉′欢鏌ヨ澶撮儴鏍峰紡 */ .choose { - font-size: 14px; + display: flex; + align-items: center; + background-color: #fff; + border-bottom: 3px solid rgb(245, 247, 251); + font-size: 14px; } .choose .el-button { - height: 32px; - border: 1px solid rgba(190, 190, 190, 0.44); - box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); - padding: 0 12px; + height: 32px; + border: 1px solid rgba(190, 190, 190, 0.44); + box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41); + padding: 0 12px; } -<!-- /* 涓嶅悎鏍艰〃鏍兼牱寮� */ - .unqualifiedTable { - flex: 1; - background: #fff; - margin-top: 11px; - padding: 23px 21px; +.choose span { + /* span鍐呭寮哄埗涓嶆崲琛� */ + white-space: nowrap; } + .tableno { - margin-top: 10px; + margin-top: 10px; } </style> -- Gitblit v1.9.3