From 5244d65ef7e1f333495b59a6470b254bde7ec2ca Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期五, 15 九月 2023 17:16:51 +0800 Subject: [PATCH] update --- src/components/view/technical.vue | 395 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 196 insertions(+), 199 deletions(-) diff --git a/src/components/view/technical.vue b/src/components/view/technical.vue index 66ed8ff..8905596 100644 --- a/src/components/view/technical.vue +++ b/src/components/view/technical.vue @@ -1,119 +1,17 @@ - -<style scoped> - .technical{ - height: 100%; - width: 100%; - } - .technical .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; - } - - .technical .title { - margin-bottom: 10px; - padding: 0 20px; - } - -/* 鎼滅储澶撮儴鏍峰紡 */ -.search-header{ - background: #fff; - padding: 24px 32px; -} -.search-header .el-form-item{ - margin: 0px; - font-size: 14px; -} -.search-header .el-form-item:nth-child(1){ - margin-right: 48px; -} -.search-header .el-form-item:nth-child(2){ - margin-right: 24px; -} -/* 閲嶇疆鍜屾煡璇袱涓寜閽牱寮� */ -.search-header .el-form-item .el-button{ -width: 65px; -height: 32px; -box-sizing: border-box; -background: rgb(255, 255, 255); -border: 1px solid rgb(217, 217, 217); -border-radius:2px; -padding: 0; -font-size: 14px; -} -.search-header .el-form-item .el-button:nth-child(2){ -/* Rectangle 77 */ -background: rgb(0, 78, 162); -color: #fff; -} -/* 杈撳叆妗嗙殑鏍峰紡 */ -.search-header .el-form-item .el-input >>>.el-input__inner{ -width: 224px; -height: 32px ; -box-sizing: border-box; -background: rgb(255, 255, 255); -border: 1px solid rgb(217, 217, 217); -border-radius:2px; -} - - -/* 鎶�鏈枃浠惰〃鏍兼牱寮� */ -.technical-table{ - margin-top: 11px; - height: calc(100% - 140px); - background: #fff; - padding: 23px 21px ; - font-size: 14px; - box-sizing: border-box; - display: flex; - flex-direction: column; -} -/* .technical-table .el-table{ - overflow-y:scroll; -} */ -.technical-table .table-box { - flex: 1; - overflow-y: scroll; -} -.technical-table .el-pagination{ - margin-top: 23px; - display: flex; - justify-content: end; -} -.formtitle{ - display: block; - margin-bottom: 24px; - font-size: 16px; -} -.detail-model >>>.el-form-item__label{ - color: rgb(51, 51, 51); -} -.detail-model >>>.el-input__inner{ -width: 224px; -height: 32px; -box-sizing: border-box; -background: rgb(238, 238, 238); -border: 1px solid rgb(221, 221, 221); -border-radius:4px; -} -</style> - - <template> <div class="technical"> <div class="title"> <el-row> <el-col :span="12">鎶�鏈枃浠�</el-col> <el-col :span="12" style="text-align: right;"> - <el-button icon="el-icon-plus">鐢熸垚椤圭洰涔�</el-button> + <el-button icon="el-icon-plus">鐢熸垚椤圭洰涔�</el-button> </el-col> </el-row> </div> <div class="search-header"> <el-form v-model="searchData" :inline="true"> <el-form-item label="璁㈠崟鍙�:"> - <el-input v-model="searchData.id"></el-input> + <el-input v-model="searchData.id" ></el-input> </el-form-item> <el-form-item label="涓嬪崟鏃ユ湡:"> <el-date-picker @@ -123,16 +21,26 @@ placeholder="閫夋嫨鏃ユ湡"> </el-date-picker> </el-form-item> + <el-form-item label="浜у搧鍚嶇О:"> + <el-input v-model="searchData.name" ></el-input> + </el-form-item> + <el-form-item label="缂栧埗鐘舵��:" > + <el-select v-model="searchData.type" size="small" placeholder="鍏ㄩ儴" style="width: 250px;"> + <el-option label="寰呯紪鍒�" :value="0"></el-option> + <el-option label="宸茬紪鍒�" :value="1"></el-option> + </el-select> + </el-form-item> <el-form-item> - <el-button plain @click="resetBtn">閲� 缃�</el-button> - <el-button @click="searchTechnical">鏌� 璇�</el-button> + <el-button plain @click="resetBtn" style="margin-left: 12px;">閲� 缃�</el-button> + <el-button @click="searchTechnical">鏌� 璇�</el-button> </el-form-item> </el-form> </div> <div class="technical-table"> <div class="table-box"> <el-table - border style="width: 100%" + border + height="calc(90vh - 250px)" :data="technicalTable" > <el-table-column @@ -140,73 +48,58 @@ width="78"> </el-table-column> <el-table-column - prop="id" - label="璁㈠崟鍙�" - width="124"> + prop="order_number" + label="璁㈠崟鍙�"> + </el-table-column> + <el-table-column + prop="saleman" + label="涓氬姟鍛�"> </el-table-column> <el-table-column prop="proname" - label="宸ョ▼鍚嶇О" - width="160"> + label="瀹㈡埛鍚嶇О"> </el-table-column> <el-table-column - prop="code" - label="浜у搧缂栫爜" - width="168" - > - </el-table-column> - <el-table-column - prop="type" - label="浜у搧澶х被" - width="128"> + prop="name" + label="浜у搧鍚嶇О"> </el-table-column> <el-table-column prop="specifications" - label="瑙勬牸鍨嬪彿" - width="170"> + label="瑙勬牸鍨嬪彿"> </el-table-column> <el-table-column prop="unit" - label="鍗曚綅" - width="100"> + label="鍗曚綅"> </el-table-column> <el-table-column prop="number" - label="鏁伴噺" - width="118" - > + label="鏁伴噺"> </el-table-column> <el-table-column - prop="username" - label="涓嬪崟浜�" - width="114"> + prop="涓嬪崟鏃ユ湡" + label="涓嬪崟鏃ユ湡"> </el-table-column> <el-table-column - prop="createTime" - label="涓嬪崟鏃ユ湡" - width="153" - > + prop="浜よ揣鏃ユ湡" + label="浜よ揣鏃ユ湡"> </el-table-column> <el-table-column - prop="deliveryTime" - label="浜よ揣鏃ユ湡" - width="137"> - </el-table-column> - <el-table-column - prop="state" label="鐘舵��" width="85" > <template slot-scope="scope"> - {{scope.state==1?'寰呯紪鍒�':'宸茬紪鍒�'}} + <span :style="{'color': scope.row.type==0 ? 'red':'green'}"> + {{scope.row.type==0?'寰呯紪鍒�':'宸茬紪鍒�'}} + </span> </template> </el-table-column> <el-table-column label="鎿嶄綔" width="194"> <template slot-scope="scope"> - <el-button type="text" size="small" @click="showDetails(scope.row)">鏌ョ湅璇︽儏</el-button> - <el-button type="text" size="small">缂栬緫闄勪欢</el-button> + <!-- <el-button type="text" size="small" @click="showDetails(scope.row)">鏌ョ湅璇︽儏</el-button> + <el-button type="text" size="small">缂栬緫闄勪欢</el-button> --> + <el-button v-if="scope.row.type===0" type="text" size="small" @click="authorizedstrength(scope.row)">缂栧埗</el-button> </template> </el-table-column> </el-table> @@ -216,9 +109,9 @@ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" - :current-page="pageParams.pageNo" - :page-sizes="[100, 200, 300, 400]" - :page-size="pageParams.pageSize" + :current-page="pageParams.pageSize" + :page-sizes="[10, 20, 50, 100]" + :page-size="pageParams.countSize" layout="total, sizes, prev, pager, next, jumper" :total="pageParams.total"> </el-pagination> @@ -339,59 +232,17 @@ return { searchData:{ id:'', - date:'' + date:'', + name:'', + condition:'', }, - technicalTable: [{ - date: '2016-05-02', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-04', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-01', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - }, { - date: '2016-05-03', - name: '鐜嬪皬铏�', - address: '涓婃捣甯�' - } - ], + compiledata:{}, + technicalTable: [], showDetail: false, selectedRow: {}, pageParams:{ - pageNo:1, - pageSize:10, + pageSize:1, + countSize:10, total:0 } } @@ -400,33 +251,179 @@ this.getTechnicalTableData() }, methods: { + authorizedstrength(row) { + this.compiledata = row + this.compile() + }, + //缂栧埗 + compile() { + console.log(); + this.$axios.post(this.$api.url.compile,{ + id:this.compiledata.id + }).then( res =>{ + this.$message.success('缂栧埗瀹屾垚') + this.getTechnicalTableData() + }) + }, + async showDetails(row){ this.showDetail = true const res = await this.$axios.get(this.$api.url.selectOrderById,{params:{id:row.id}}) this.selectedRow = res.data console.log(this.selectedRow) }, + + async getTechnicalTableData() { - const res = await this.$axios.get(this.$api.url.selectAllOrder,{params:{pageSize:(this.pageParams.pageNo-1),countSize:this.pageParams.pageSize,...this.searchData}}) + const res = await this.$axios.get(this.$api.url.selectAllOrder,{ + params:{ + pageSize:(this.pageParams.pageSize), + countSize:this.pageParams.countSize,...this.searchData, + orderCode:this.searchData.id, + time:this.searchData.date, + name:this.searchData.name, + type:this.searchData.type, + } + }) this.technicalTable = res.data.row this.pageParams.total = res.data.total }, + + // 澶撮儴鏉′欢鏌ヨ-閲嶇疆 resetBtn() { this.searchData={} + this.getTechnicalTableData() }, // 澶撮儴鏉′欢鏌ヨ-鏌ヨ searchTechnical() { this.getTechnicalTableData() }, handleSizeChange(value){ - this.pageParams.pageSize = value + this.pageParams.countSize = value this.getTechnicalTableData() }, handleCurrentChange(value){ - this.pageParams.pageNo = value + this.pageParams.pageSize = value this.getTechnicalTableData() } }, } </script> + +<style scoped> + .technical{ + height: 100%; + width: 100%; + } + .el-form-item__label{ + padding: 0 60px 0; + } + .technical .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; + } + + .technical .title { + margin-bottom: 10px; + padding: 0 20px; + } + +/* 鎼滅储澶撮儴鏍峰紡 */ +.search-header{ + background: #fff; + padding: 24px 32px; +} + +.search-header .el-form-item__label{ + padding: 0 30px 0 0; +} +.search-header .el-form-item{ + margin: 0px; + font-size: 20px; +} +.search-header .el-form-item:nth-child(1){ + margin-right: 48px; +} +.search-header .el-form-item:nth-child(2){ + margin-right: 24px; +} +/* 閲嶇疆鍜屾煡璇袱涓寜閽牱寮� */ +.search-header .el-form-item .el-button{ +width: 65px; +height: 32px; +box-sizing: border-box; +background: rgb(255, 255, 255); +border: 1px solid rgb(217, 217, 217); +border-radius:2px; +padding: 0; +font-size: 14px; +} +.search-header .el-form-item .el-button:nth-child(2){ +/* Rectangle 77 */ +background: rgb(0, 78, 162); +color: #fff; +} +/* 杈撳叆妗嗙殑鏍峰紡 */ +.search-header .el-form-item .el-input >>>.el-input__inner{ +width: 224px; +height: 32px ; +box-sizing: border-box; +background: rgb(255, 255, 255); +border: 1px solid rgb(217, 217, 217); +border-radius:2px; +} + + +/* 鎶�鏈枃浠惰〃鏍兼牱寮� */ +.technical-table{ + margin-top: 11px; + /* height: calc(100% - 140px); */ + background: #fff; + padding: 23px 21px ; + font-size: 14px; + box-sizing: border-box; + display: flex; + flex-direction: column; +} +/* .technical-table .el-table{ + overflow-y:scroll; +} */ +.technical-table .table-box { + flex: 1; + overflow-y: scroll; +} +.technical-table .el-pagination{ + margin-top: 23px; + display: flex; + justify-content: end; +} +.formtitle{ + display: block; + margin-bottom: 24px; + font-size: 16px; +} +.detail-model >>>.el-form-item__label{ + color: rgb(51, 51, 51); +} +.detail-model >>>.el-input__inner{ +width: 224px; +height: 32px; +box-sizing: border-box; +background: rgb(238, 238, 238); +border: 1px solid rgb(221, 221, 221); +border-radius:4px; +} +</style> + +<style> + .technical .title *{ + font-size: 14px; + } + + .technical .search-header *{ + font-size: 14px; + } +</style> -- Gitblit v1.9.3