From c0bc2331e9abb2ae003c8dc0ab4524d6101493a1 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期一, 25 九月 2023 09:12:51 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/view/Processingproducts.vue | 427 ++++++++++++++++++++++++++++++++-------------------- 1 files changed, 260 insertions(+), 167 deletions(-) diff --git a/src/components/view/Processingproducts.vue b/src/components/view/Processingproducts.vue index 19630f9..24828f7 100644 --- a/src/components/view/Processingproducts.vue +++ b/src/components/view/Processingproducts.vue @@ -1,192 +1,285 @@ <template> - <div> - <div class="article-main" style="overflow: hidden;"> - <el-row> + <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-button icon="el-icon-download" size="mini" @click="() => { }">瀵煎嚭</el-button> </el-col> - </el-row> - <div> - - <div style="margin-top: 10px;"> - <el-card shadow="hover" class="margin-30"> - <el-form ref="form" :model="searchform" label-width="80px"> - <el-row :gutter="25"> - <el-col :span="7" > - <el-form-item label="浜у搧鍚嶇О:"> - <el-input v-model="searchform.name" placeholder="璇疯緭鍏�"></el-input> - </el-form-item> - </el-col> - <el-col :span="7" > - <el-form-item label="瑙勬牸鍨嬪彿:"> - <el-input v-model="searchform.stude" placeholder="璇疯緭鍏�"></el-input> - </el-form-item> - </el-col> - <el-col :span="5"> - <el-button size="default" @click="">閲嶇疆</el-button> - <el-button type="primary" size="default" style="background:0, 78, 162 ;" @click="getDetailInfo">鏌ヨ</el-button> - - </el-col> - </el-row> - </el-form> - </el-card> + </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> - - <div style="margin-top: 30px;"> - <el-card shadow="hover" class="margin-30"> - <el-table - ref="multipleTable" - :data="tableData" - tooltip-effect="dark" - style="width: 100%" - @selection-change="handleSelectionChange"> - <el-table-column - type="selection" - width="55"> - </el-table-column> - <el-table-column - label="鏃ユ湡" - width="120"> - <template slot-scope="scope">{{ scope.row.date }}</template> - </el-table-column> - <el-table-column - prop="name" - label="濮撳悕" - width="120"> - </el-table-column> - <el-table-column - prop="address" - label="鍦板潃" - show-overflow-tooltip> - </el-table-column> - </el-table> - </el-card> - <el-col style="height: 50px;display: flex;align-items: center;justify-content: right;"> - <el-pagination - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :current-page="4" - :page-sizes="[1,10, 20, 30, 50]" - :page-size="4" - layout="total, sizes, prev, pager, next, jumper" - :total="countSize"> - </el-pagination> - </el-col> - </div> - </div> + </el-card> </div> - </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 { - searchform:{ - name:'', - stude:'' - }, - tableData: [ - { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - }, { - date: '2016-05-02', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - }, { - date: '2016-05-04', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - }, { - date: '2016-05-01', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - }, { - date: '2016-05-08', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - }, { - date: '2016-05-06', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - }, { - date: '2016-05-07', - name: '鐜嬪皬铏�', - address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1518 寮�' - } - ], - pageSize:3, - countSize:1, - currentPage:2, - multipleSelection:'' - } + return { + isShow: false, + search: { + countSize: 10, // 鏉℃暟/椤� + pageSize: 1, // 璧峰椤� + productCategories: "", // 浜у搧澶х被 + productName: "", // 浜у搧鍚嶇О + specificationModel: "", // 瑙勬牸鍨嬪彿 + state: "", // 鐘舵�� + }, + unqualifiedTable: [], // 椤甸潰琛ㄦ牸鏁版嵁 + total: 0, // 鎬绘潯鏁� + dialogVisible: false, // 鏄剧ず寮瑰嚭妗� + clickEditOpinion: "", // 鐐瑰嚮缂栬緫鎰忚涓存椂瀛樺偍璇ヨ鏁版嵁 + }; }, - created(){ - // this.getDetailInfo() + mounted() { + this.getDetailInfo(); }, - methods:{ - handleSelectionChange(val) { - // console.log(val); - // this.multipleSelection = val; - }, + methods: { + // 鍒嗛〉 handleSizeChange(val) { - console.log(val); - // this.pageSize = 1 - // this.countSize= val - // this.getDetailInfo() + this.search.countSize = val; + this.getDetailInfo(); }, + // 鍒嗛〉 handleCurrentChange(val) { - // this.pageSize = val - // this.getDetailInfo() + this.search.pageSize = val; + this.getDetailInfo(); }, + // 鍒嗛〉琛ㄦ牸鏁版嵁 getDetailInfo() { - let aa = [0,5] - aa.map(el =>{ - console.log(el); - }) - console.log(this.searchform.name); - console.log(this.searchform.stude); - // this.tableData - // this.axios.get(this.$api.url.gettable,{ - // params:{pageNo:10, - // pageSize:1, - // productName:this.searchform.name, - // specificationsModels:this.searchform.stude - // }, - // }).then(res=>{ - // console.log(res); - // this.tableData = res.data.row - // }) - } -}} - // methods:{ - // toggleSelection(rows) { - // if (rows) { - // rows.forEach(row => { - // this.$refs.multipleTable.toggleRowSelection(row); - // }); - // } else { - // this.$refs.multipleTable.clearSelection(); - // } - // }, - - // } - // } - - + 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", + }); + }); + }, + }, + watch: { + dialogVisible: { + handler(newVal, oldVal) { + if (newVal == false) { + this.isShow = false; + } + }, + }, + }, +}; </script> + <style scoped> -.card-2{ - display: flex; - margin-top: 30px; +.main_div { + padding-top: 15px; } -.ssss{ +.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 { + 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; +} +.choose span { + /* span鍐呭寮哄埗涓嶆崲琛� */ + white-space: nowrap; +} + +.tableno { + margin-top: 10px; } </style> -- Gitblit v1.9.3