From aa5806c27f2e9af6600a2fce871ebe6a28cc183b Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期三, 01 五月 2024 10:14:31 +0800 Subject: [PATCH] 费用统计增加时间段搜索;检验单增加搜索条件 --- src/components/view/b2-standard.vue | 1 src/components/do/b1-ins-order/add.vue | 6 src/components/tool/value-table.vue | 4 src/components/view/a5-capacity-scope.vue | 4 src/components/view/b1-inspection-order.vue | 19 +- src/components/view/b1-expenses.vue | 405 ++++++++++++++++++++++++++----------------------- 6 files changed, 232 insertions(+), 207 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index 87de2ad..6aa10a5 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -286,13 +286,13 @@ </el-select> </template> </el-table-column> - <el-table-column prop="unit" label="鍗曚綅" align="center" min-width="100"> + <!-- <el-table-column prop="unit" label="鍗曚綅" align="center" min-width="100"> <template slot-scope="scope"> <el-select v-model="scope.row.unit" clearable size="small" style="width: 100%;" :disabled="active>1"> <el-option v-for="(a, i) in units" :key="i" :label="a.label" :value="a.value"></el-option> </el-select> </template> - </el-table-column> + </el-table-column> --> <!-- <el-table-column prop="isLeave" label="鏄惁鐣欐牱" align="center" min-width="100"> <template slot-scope="scope"> <el-select v-model="scope.row.isLeave" size="small" :disabled="active>1"> @@ -718,8 +718,6 @@ this.$message.error('璇疯緭鍏ユ牱鍝佸瀷鍙�') } else if (!this.sampleList.every(m => m.standardMethodListId)) { this.$message.error('璇烽�夋嫨妫�楠屾爣鍑�') - } else if (!this.sampleList.every(m => m.unit)) { - this.$message.error('璇疯緭鍏ユ牱鍝佺殑鍗曚綅') } else { this.saveLoad = true this.$axios.post(this.$api.insOrder.addInsOrder, { diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue index 5785a9d..097a84d 100644 --- a/src/components/tool/value-table.vue +++ b/src/components/tool/value-table.vue @@ -156,7 +156,7 @@ :total="total"> </el-pagination> </div> - <el-dialog title="缂栬緫" :visible.sync="upDia" :width="data.row==1?'500px':500+data.row * 200 + 'px'" append-to-body> + <el-dialog title="缂栬緫" :visible.sync="upDia" :width="data.row==1?'500px':540+data.row * 200 + 'px'" append-to-body> <div class="body" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;"> <div v-if="data.row > 1"> <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;"> @@ -225,7 +225,7 @@ <el-button type="primary" @click="saveUpData" :loading="upLoad">纭� 瀹�</el-button> </span> </el-dialog> - <el-dialog title="鏂板" :visible.sync="addDia" :width="data.row==1?'500px':500+data.row * 200 + 'px'" append-to-body> + <el-dialog title="鏂板" :visible.sync="addDia" :width="data.row==1?'500px':540+data.row * 200 + 'px'" append-to-body> <div class="body" v-if="addDia" style="max-height: 550px;overflow-y: auto;padding: 5px 10px 5px 0;"> <div v-if="data.row > 1"> <div v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;"> diff --git a/src/components/view/a5-capacity-scope.vue b/src/components/view/a5-capacity-scope.vue index 9cd06e3..779a102 100644 --- a/src/components/view/a5-capacity-scope.vue +++ b/src/components/view/a5-capacity-scope.vue @@ -229,10 +229,10 @@ } }, requiredAdd: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType', - 'unit', 'method', 'price', 'manDay' + 'unit', 'method', 'price', 'manDay', 'templateId' ], requiredUp: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType', - 'unit', 'method', 'price', 'manDay' + 'unit', 'method', 'price', 'manDay', 'templateId' ] }, testObjectData: { diff --git a/src/components/view/b1-expenses.vue b/src/components/view/b1-expenses.vue index fd35c90..be06f02 100644 --- a/src/components/view/b1-expenses.vue +++ b/src/components/view/b1-expenses.vue @@ -1,236 +1,261 @@ <style scoped> - .title { - height: 60px; - line-height: 60px; - } + .title { + height: 60px; + line-height: 60px; + } - .search { - background-color: #fff; - height: 80px; - display: flex; - align-items: center; - } + .search { + background-color: #fff; + height: 80px; + display: flex; + align-items: center; + } - .search_thing { - display: flex; - align-items: center; - height: 50px; - } + .search_thing { + display: flex; + align-items: center; + height: 50px; + } - .search_label { - width: 120px; - font-size: 14px; - text-align: right; - } + .search_label { + width: 120px; + font-size: 14px; + text-align: right; + } - .search_input { - width: calc(100% - 120px); - } + .search_input { + width: calc(100% - 120px); + } - .table { - margin-top: 10px; - background-color: #fff; - width: calc(100% - 40px); - height: calc(100% - 60px - 80px - 10px - 40px); - padding: 20px; - } + .table { + margin-top: 10px; + background-color: #fff; + width: calc(100% - 40px); + height: calc(100% - 60px - 80px - 10px - 40px); + padding: 20px; + } - .el-form-item { - margin-bottom: 16px; - } + .el-form-item { + margin-bottom: 16px; + } - >>>.el-table tbody tr:hover > td { - background-color: transparent !important; + >>>.el-table tbody tr:hover>td { + background-color: transparent !important; } </style> <template> - <div class="inspection_order"> - <div style="width: 100%;height: 100%;"> - <div> - <el-row class="title"> - <el-col :span="12" style="padding-left: 20px;">璐圭敤缁熻</el-col> + <div class="inspection_order"> + <div style="width: 100%;height: 100%;"> + <div> + <el-row class="title"> + <el-col :span="12" style="padding-left: 20px;">璐圭敤缁熻</el-col> <el-col :span="12" style="text-align: right;"> - <el-button size="small" type="primary">OA鎺ㄩ��</el-button> - </el-col> - </el-row> - </div> - <div class="search"> + <el-button size="small" type="primary">OA鎺ㄩ��</el-button> + </el-col> + </el-row> + </div> + <div class="search"> <div class="search_thing"> - <div class="search_label">鏃堕棿鑼冨洿锛�</div> - <div class="search_input"> - <el-date-picker - v-model="dates" - type="datetimerange" - range-separator="鑷�" - format="yyyy-MM-dd HH:mm:ss" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - size="small"> + <div class="search_label">鏃堕棿鑼冨洿锛�</div> + <div class="search_input"> + <el-date-picker v-model="dates" type="daterange" range-separator="鑷�" format="yyyy-MM-dd" + value-format="yyyy-MM-dd" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" size="small" + @change="datesChange" :key="index2"> </el-date-picker> </div> - </div> - <div class="search_thing"> - <div class="search_label">濮旀墭浜猴細</div> - <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.name" @keyup.enter.native="refreshTable()"></el-input></div> - </div> - <div class="search_thing" style="padding-left: 30px;"> - <el-button size="small" @click="refresh()">閲� 缃�</el-button> - <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> - </div> - </div> - <div class="table"> - <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" - :key="upIndex" @handleWeave="handleWeave"/> - </div> - </div> + </div> + <div class="search_thing"> + <div class="search_label">濮旀墭浜猴細</div> + <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="componentData.entity.name" @keyup.enter.native="refreshTable()"></el-input></div> + </div> + <div class="search_thing" style="padding-left: 30px;"> + <el-button size="small" @click="refresh()">閲� 缃�</el-button> + <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> + </div> + </div> + <div class="table"> + <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" :key="upIndex" + @handleWeave="handleWeave" /> + </div> + </div> <el-dialog title="鍦ㄧ嚎缂栧埗" :visible.sync="claimVisible" width="70%" :modal-append-to-body="false"> - <Word style="height:70vh" v-if="claimVisible" ref="Word"/> - <span slot="footer" class="dialog-footer"> - <el-button @click="claimVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button> - </span> - </el-dialog> - </div> + <Word style="height:70vh" v-if="claimVisible" ref="Word" /> + <span slot="footer" class="dialog-footer"> + <el-button @click="claimVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="confirmClaim">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </template> <script> - import ValueTable from '../tool/value-table.vue' + import ValueTable from '../tool/value-table.vue' import Word from '../tool/word.vue' - export default { - components: { - ValueTable, + export default { + components: { + ValueTable, Word, - }, - data() { - return { - componentData: { - entity: { - name: null, - orderBy: { - field: 'id,ins_sample_id', - order: 'asc' - } - }, - isIndex: true, - showSelect: false, - select: false, - highlight:false, - do: [], - linkEvent:{}, - spanConfig:{ + }, + data() { + return { + componentData: { + entity: { + name: null, + dates: null, + orderBy: { + field: 'id,ins_sample_id', + order: 'asc' + } + }, + init: false, + isIndex: true, + showSelect: false, + select: false, + highlight: false, + do: [], + linkEvent: {}, + spanConfig: { //鍚堝苟琛� - rows:[ - { - name:'createTime', - index:1 + rows: [{ + name: 'createTime', + index: 1 }, { - name:'entrustCode', - index:2 + name: 'entrustCode', + index: 2 }, { - name:'company', - index:8 + name: 'company', + index: 8 }, { - name:'name', - index:9 + name: 'name', + index: 9 }, ], // 鐗规畩鐨勫悎骞惰锛屾牴鎹甿ain鍜宺ows鐨刵ame鏉ュ悎骞� - special:{ - main:'insSampleId', - rows:[ - { - name:'sample', - index:3 + special: { + main: 'insSampleId', + rows: [{ + name: 'sample', + index: 3 }, { - name:'model', - index:4 + name: 'model', + index: 4 }, { - name:'num', - index:5 + name: 'num', + index: 5 }, { - name:'price', - index:6 + name: 'price', + index: 6 }, ] } }, - tagField: { - type: { - select: [{ - value: 0, - type: 'success', - label: '鏅��' - }, { - value: 1, - type: 'warning', - label: '浼樺厛' - }, { - value: 2, - type: 'danger', - label: '绱ф��' - }] - }, - createUser: { - select: [] - } - }, - selectField: {}, - requiredAdd: [], - requiredUp: [] - }, - entityCopy: {}, - upIndex: 0, - claimVisible:false, - dates: [] - } - }, - mounted() { - this.entityCopy = this.HaveJson(this.componentData.entity) - this.getPower() - }, - methods: { - refreshTable() { - this.$refs['ValueTable'].selectList() - }, - refresh() { - this.componentData.entity = this.HaveJson(this.entityCopy) - this.upIndex++ - }, - handleWeave(){ + tagField: { + type: { + select: [{ + value: 0, + type: 'success', + label: '鏅��' + }, { + value: 1, + type: 'warning', + label: '浼樺厛' + }, { + value: 2, + type: 'danger', + label: '绱ф��' + }] + }, + createUser: { + select: [] + } + }, + selectField: {}, + requiredAdd: [], + requiredUp: [] + }, + entityCopy: {}, + upIndex: 0, + claimVisible: false, + dates: [], + index2: 0 + } + }, + mounted() { + this.getDates() + this.refreshTable() + this.entityCopy = this.HaveJson(this.componentData.entity) + this.getPower() + }, + methods: { + getDates(){ + //褰撳墠鏈堢涓�澶� + var y = new Date().getFullYear(); //鑾峰彇骞翠唤 + var m = new Date().getMonth() + 1; //鑾峰彇鏈堜唤 + var d = "01"; + m = m < 10 ? "0" + m : m; //鏈堜唤琛� 0 + let startDate = [y, m, d].join("-"); + //褰撳墠鏈堟渶鍚庝竴澶� + var y = new Date().getFullYear(); //鑾峰彇骞翠唤 + var m = new Date().getMonth() + 1; //鑾峰彇鏈堜唤 + var d = new Date(y, m, 0).getDate(); //鑾峰彇褰撴湀鏈�鍚庝竴鏃� + m = m < 10 ? "0" + m : m; //鏈堜唤琛� 0 + d = d < 10 ? "0" + d : d; //鏃ユ暟琛� 0 + let endDate = [y, m, d].join("-"); + this.dates = [startDate, endDate] + this.index2++ + this.componentData.entity.dates = `["${startDate}","${endDate}"]` + }, + refreshTable() { + this.$refs['ValueTable'].selectList() + }, + refresh() { + this.componentData.entity = this.HaveJson(this.entityCopy) + this.componentData.init = true + this.getDates() + this.upIndex++ + }, + handleWeave() { this.claimVisible = true; }, - // 鏉冮檺鍒嗛厤 - getPower(radio) { - let power = JSON.parse(sessionStorage.getItem('power')) - let up = false - let del = false - let add = false - for (var i = 0; i < power.length; i++) { - if (power[i].menuMethod == 'upInsOrder') { - up = true - } - if (power[i].menuMethod == 'addInsOrder') { - add = true - } - } - if (!up) { - this.componentData.do.splice(4, 1) - } - }, - handleClose() { - this.upLoad = false; - }, - confirmClaim(){ - console.log(11111111111,this.$refs.Word.getValue()) + // 鏉冮檺鍒嗛厤 + getPower(radio) { + let power = JSON.parse(sessionStorage.getItem('power')) + let up = false + let del = false + let add = false + for (var i = 0; i < power.length; i++) { + if (power[i].menuMethod == 'upInsOrder') { + up = true + } + if (power[i].menuMethod == 'addInsOrder') { + add = true + } + } + if (!up) { + this.componentData.do.splice(4, 1) + } + }, + handleClose() { + this.upLoad = false; + }, + confirmClaim() { + console.log(11111111111, this.$refs.Word.getValue()) + }, + datesChange(val){ + if(val == null){ + return + } + this.componentData.entity.dates = JSON.stringify(val) + this.$refs['ValueTable'].selectList() } - } - } + } + } </script> diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 98df458..66e038b 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -92,23 +92,23 @@ v-model="componentData.entity.sampleType" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing"> + <div class="search_label">鏍峰搧鍨嬪彿锛�</div> + <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="componentData.entity.sampleModel" @keyup.enter.native="refreshTable()"></el-input></div> + </div> + <div class="search_thing"> <div class="search_label">鏍峰搧缂栧彿锛�</div> <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.sampleType" @keyup.enter.native="refreshTable()"></el-input></div> - </div> - <div class="search_thing"> - <div class="search_label">鏍峰搧鍨嬪彿锛�</div> - <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.sampleType" @keyup.enter.native="refreshTable()"></el-input></div> + v-model="componentData.entity.sampleCode" @keyup.enter.native="refreshTable()"></el-input></div> </div> <div class="search_thing"> <div class="search_label">涓嬪崟鏃堕棿锛�</div> <div class="search_input"> <el-date-picker style="width:100%" v-model="componentData.entity.createTime" - type="datetime" + type="date" size="small" format="yyyy-MM-dd" - value-format="yyyy-MM-dd" + value-format="yyyy-MM-dd HH:mm:ss" clearable placeholder="閫夋嫨鏃ユ湡"> </el-date-picker> @@ -242,6 +242,9 @@ entity: { entrustCode: null, sampleType: null, + sampleName: null, + sampleModel: null, + sampleCode: null, state: 0, orderBy: { field: 'id', diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 093d106..20262ee 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -201,7 +201,6 @@ <el-table-column prop="price" label="鍗曚环(鍏�)" width="90" show-overflow-tooltip></el-table-column> <el-table-column prop="manHour" label="宸ユ椂(H)" width="90" show-overflow-tooltip></el-table-column> <el-table-column prop="manHourGroup" label="宸ユ椂鍒嗙粍" width="100" show-overflow-tooltip></el-table-column> - <el-table-column prop="deviceGroup" label="璁惧缁�" width="120" show-overflow-tooltip></el-table-column> <el-table-column prop="section" label="鍖洪棿" width="120" show-overflow-tooltip></el-table-column> </el-table> </el-row> -- Gitblit v1.9.3