From e6b740a6e426aa4a12b66059c0330358900dae3e Mon Sep 17 00:00:00 2001 From: 李林 <z1292839451@163.com> Date: 星期三, 13 三月 2024 14:16:43 +0800 Subject: [PATCH] 功能调整 --- src/components/view/b2-standard.vue | 16 /dev/null | 526 ----------------------------------- src/components/do/b1-ins-order/add.vue | 35 ++ src/components/tool/excel.vue | 8 src/components/view/a5-capacity-scope.vue | 80 +++- src/components/view/b2-standard-template.vue | 5 static/js/menu.js | 2 src/components/view/b1-inspection-order.vue | 218 +++++++------ src/view/index.vue | 5 src/assets/api/controller.js | 1 10 files changed, 221 insertions(+), 675 deletions(-) diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js index a2791be..63d4c3d 100644 --- a/src/assets/api/controller.js +++ b/src/assets/api/controller.js @@ -140,4 +140,5 @@ addStandardTemplate: "/StandardTemplate/addStandardTemplate", //娣诲姞妫�楠屾ā鏉� upStandardTemplate: "/StandardTemplate/upStandardTemplate", //淇敼妫�楠屾ā鏉� delStandardTemplate: "/StandardTemplate/delStandardTemplate", //鍒犻櫎妫�楠屾ā鏉� + getStandardTemplate: "/StandardTemplate/getStandardTemplate", //鏌ヨ鍘熷璁板綍妯℃澘鏋氫妇 } diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue new file mode 100644 index 0000000..6ad3dac --- /dev/null +++ b/src/components/do/b1-ins-order/add.vue @@ -0,0 +1,35 @@ +<style scoped> + .ins_order_add{ + width: 100%; + height: 100%; + } + + .title { + height: 60px; + line-height: 60px; + } +</style> + +<template> + <div class="ins_order_add"> + <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="medium" type="primary" @click="">鎻愪氦</el-button> + <el-button size="medium" @click="">杩斿洖</el-button> + </el-col> + </el-row> + </div> + </div> +</template> + +<script> + export default{ + data() { + return{ + + } + } + } +</script> \ No newline at end of file diff --git a/src/components/tool/excel.vue b/src/components/tool/excel.vue index afc58d4..ece94a6 100644 --- a/src/components/tool/excel.vue +++ b/src/components/tool/excel.vue @@ -19,11 +19,11 @@ border-color: transparent; cursor: pointer; } - + #luckysheet .save:hover{ opacity: .8; } - + #luckysheet .save:active{ opacity: .7; } @@ -67,7 +67,7 @@ order: '0' }], enableAddRow: false, - row: 100, + row: 60, column: 26, enableAddBackTop: false, showtoolbarConfig: { @@ -94,4 +94,4 @@ } } } -</script> \ No newline at end of file +</script> diff --git a/src/components/view/a5-capacity-scope.vue b/src/components/view/a5-capacity-scope.vue index 662f3e2..fe60bf6 100644 --- a/src/components/view/a5-capacity-scope.vue +++ b/src/components/view/a5-capacity-scope.vue @@ -148,28 +148,6 @@ inspectionItemType: { select: [] }, - valueType: { - select: [] - }, - bsm:{ - select: [] - }, - inspectionValueType:{ - select:[] - }, - laboratory:{ - select:[] - }, - method:{select:[]}, - deviceGroup:{select:[]} - }, - selectField: { - inspectionItemType: { - select: [] - }, - valueType: { - select: [] - }, bsm:{ select: [] }, @@ -181,10 +159,34 @@ }, method:{select:[]}, deviceGroup:{select:[]}, - sample: {select:[]} + templateId:{ + select:[] + }, + sonLaboratory: {select:[]} }, - requiredAdd: ['inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','valueType','sample'], - requiredUp: ['inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','valueType','sample'] + selectField: { + inspectionItemType: { + select: [] + }, + bsm:{ + select: [] + }, + inspectionValueType:{ + select:[] + }, + laboratory:{ + select:[] + }, + templateId:{ + select:[] + }, + method:{select:[]}, + deviceGroup:{select:[]}, + sample: {select:[]}, + sonLaboratory: {select:[]} + }, + requiredAdd: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','sample'], + requiredUp: ['sonLaboratory','inspectionItem', 'manHour', 'inspectionItemType','inspectionItemSubclass','inspectionValueType','laboratory','unit','method','price','manDay','deviceGroup','checkoutNumber','sample'] }, testObjectData: { entity: { @@ -226,13 +228,15 @@ this.itemParameterEntityCopy = this.HaveJson(this.itemParameterData.entity) this.testObjectDataEntityCopy = this.HaveJson(this.testObjectData.entity) this.selectEnumByCategory() - this.selectEnumByCategoryForValue() + // this.selectEnumByCategoryForValue() this.selectEnumByCategoryForSpecial() this.selectEnumByCategoryForInspectionValueType() this.obtainItemParameterList() this.selectStandardMethods() this.selectEnumByCategoryForDevice() this.selectTestObjectByName() + this.getStandardTemplate() + this.selectEnumByCategoryForSLaboratory() this.getPower('0') }, methods: { @@ -287,7 +291,7 @@ }, selectEnumByCategoryForSpecial() { this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "鐗规畩鏍囪瘑" + category: "鏄惁" }).then(res => { this.itemParameterData.selectField.bsm.select = res.data this.itemParameterData.tagField.bsm.select = res.data @@ -307,6 +311,14 @@ }).then(res => { this.itemParameterData.selectField.deviceGroup.select = res.data this.itemParameterData.tagField.deviceGroup.select = res.data + }) + }, + selectEnumByCategoryForSLaboratory() { + this.$axios.post(this.$api.enums.selectEnumByCategory, { + category: "瀛愬疄楠屽" + }).then(res => { + this.itemParameterData.selectField.sonLaboratory.select = res.data + this.itemParameterData.tagField.sonLaboratory.select = res.data }) }, obtainItemParameterList() { @@ -347,6 +359,20 @@ this.itemParameterData.selectField.sample.select = data }) }, + getStandardTemplate() { + this.$axios.get(this.$api.StandardTemplate.getStandardTemplate).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id, + type: 'success' + }) + }) + this.itemParameterData.selectField.templateId.select = data + this.itemParameterData.tagField.templateId.select = data + }) + }, // 鏉冮檺鍒嗛厤 getPower(radio) { let power = JSON.parse(sessionStorage.getItem('power')) diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue index 2a45759..ac33c7d 100644 --- a/src/components/view/b1-inspection-order.vue +++ b/src/components/view/b1-inspection-order.vue @@ -69,117 +69,124 @@ </style> <template> - <div class="role_manage"> - <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="medium" type="primary" @click="playOrder">涓嬪崟</el-button> - </el-col> - </el-row> + <div class="inspection_order"> + <div style="width: 100%;height: 100%;" v-if="active == 0"> + <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="medium" type="primary" @click="playOrder">涓嬪崟</el-button> + </el-col> + </el-row> + </div> + <div class="search"> + <div class="search_thing"> + <div class="search_label">濮旀墭缂栧彿锛�</div> + <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="componentData.entity.deviceName" @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.specificationModel" @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"> + <ul class="tab"> + <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> + </ul> + <!-- 璇硶 瀛愮粍浠堕�氳繃 this.$emit +浼犲叆鏂规硶鍚� 璋冪敤鐖剁粍浠舵柟娉� 渚嬪 this.$emit锛坰electAllByOne锛� 灏遍渶鍦ㄧ埗缁勪欢澹版槑骞朵紶鍏� @selectAllByOne="selectAllByOne"--> + <ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData" + :key="upIndex" style="height: calc(100% - 44px)" @selectAllByOne="selectAllByOne" + @handleDataLook="handleDataLook" @download="download" @handleVerify="handleVerify" @handlEquash="handlEquash" + @handleIssued="handleIssued" /> + </div> + <!-- 瀹℃牳 --> + <el-dialog title="涓嬪崟瀹℃牳" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose"> + <p style="font-size:16px;color:#333333" v-if="!isPass">濮旀墭缂栧彿<span + style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚﹂�氳繃</p> + <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm" v-else> + <el-form-item label="璇疯緭鍏ユ牱鍝佸簱浣嶅彿锛�"> + <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input> + </el-form-item> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-row v-if="!isPass"> + <el-button @click="handleClose">閫� 鍥�</el-button> + <el-button type="primary" @click="submitForm" :loading="upLoad">閫� 杩�</el-button> + </el-row> + <el-row v-else> + <el-button @click="handleClose">杩� 鍥�</el-button> + <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> + </el-row> + </span> + </el-dialog> + <!-- 鎾ら攢 --> + <el-dialog title="涓嬪崟鎾ら攢" :visible.sync="quashDialogVisible" width="30%" :before-close="handleClose"> + <p style="font-size:16px;color:#333333" v-if="!isQuash">濮旀墭缂栧彿<span + style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚︽挙閿�</p> + <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm" v-else> + <el-form-item label="璇疯緭鍏ユ挙閿�鍘熷洜锛�"> + <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input> + </el-form-item> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-row v-if="!isQuash"> + <el-button @click="handleClose">鍙� 娑�</el-button> + <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> + </el-row> + <el-row v-else> + <el-button @click="handleClose">杩� 鍥�</el-button> + <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> + </el-row> + </span> + </el-dialog> + <!-- 涓嬪彂 --> + <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose"> + <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm"> + <el-form-item label="绾﹀畾鏃堕棿锛�"> + <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData.downTime" + type="date" size="small" placeholder="閫夋嫨鏃堕棿"> + </el-date-picker> + </el-form-item> + <el-form-item label="鎸囨淳浜哄憳锛�"> + <el-select v-model="formData.equipmentManager" placeholder="璇烽�夋嫨" size="small" style="width:100%"> + <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </el-form-item> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-row> + <el-button @click="handleClose">鍙� 娑�</el-button> + <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> + </el-row> + </span> + </el-dialog> + <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose"> + <div style="height: 70vh;overflow-y: auto;"> + <ValueTable ref="ValueTableDataLook" :url="$api.deviceScope.selectDeviceParameter" + :componentData="componentDataDataLook" :key="upIndex" /> + </div> + </el-dialog> </div> - <div class="search"> - <div class="search_thing"> - <div class="search_label">濮旀墭缂栧彿锛�</div> - <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="componentData.entity.deviceName" @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.specificationModel" @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 style="width: 100%;height: 100%;" v-if="active == 1"> + <Add/> </div> - <div class="table"> - <ul class="tab"> - <li v-for="(m,i) in tabList" :key="i" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> - </ul> - <!-- 璇硶 瀛愮粍浠堕�氳繃 this.$emit +浼犲叆鏂规硶鍚� 璋冪敤鐖剁粍浠舵柟娉� 渚嬪 this.$emit锛坰electAllByOne锛� 灏遍渶鍦ㄧ埗缁勪欢澹版槑骞朵紶鍏� @selectAllByOne="selectAllByOne"--> - <ValueTable ref="ValueTable" :url="$api.insOrder.selectInsOrderParameter" :componentData="componentData" - :key="upIndex" style="height: calc(100% - 44px)" @selectAllByOne="selectAllByOne" - @handleDataLook="handleDataLook" @download="download" @handleVerify="handleVerify" @handlEquash="handlEquash" - @handleIssued="handleIssued" /> - </div> - <!-- 瀹℃牳 --> - <el-dialog title="涓嬪崟瀹℃牳" :visible.sync="verifyDialogVisible" width="30%" :before-close="handleClose"> - <p style="font-size:16px;color:#333333" v-if="!isPass">濮旀墭缂栧彿<span - style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚﹂�氳繃</p> - <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm" v-else> - <el-form-item label="璇疯緭鍏ユ牱鍝佸簱浣嶅彿锛�"> - <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input> - </el-form-item> - </el-form> - <span slot="footer" class="dialog-footer"> - <el-row v-if="!isPass"> - <el-button @click="handleClose">閫� 鍥�</el-button> - <el-button type="primary" @click="submitForm" :loading="upLoad">閫� 杩�</el-button> - </el-row> - <el-row v-else> - <el-button @click="handleClose">杩� 鍥�</el-button> - <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> - </el-row> - </span> - </el-dialog> - <!-- 鎾ら攢 --> - <el-dialog title="涓嬪崟鎾ら攢" :visible.sync="quashDialogVisible" width="30%" :before-close="handleClose"> - <p style="font-size:16px;color:#333333" v-if="!isQuash">濮旀墭缂栧彿<span - style="color:#34BD66">ZTMS2023071001</span>鐨勪俊鎭槸鍚︽挙閿�</p> - <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm" v-else> - <el-form-item label="璇疯緭鍏ユ挙閿�鍘熷洜锛�"> - <el-input v-model="formData.specificationModel" size="small" style="width:60%"></el-input> - </el-form-item> - </el-form> - <span slot="footer" class="dialog-footer"> - <el-row v-if="!isQuash"> - <el-button @click="handleClose">鍙� 娑�</el-button> - <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> - </el-row> - <el-row v-else> - <el-button @click="handleClose">杩� 鍥�</el-button> - <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> - </el-row> - </span> - </el-dialog> - <!-- 涓嬪彂 --> - <el-dialog title="妫�楠屼笅鍙�" :visible.sync="issuedDialogVisible" width="30%" :before-close="handleClose"> - <el-form :label-position="labelPosition" :model="formData" label-width="150px" ref="ruleForm"> - <el-form-item label="绾﹀畾鏃堕棿锛�"> - <el-date-picker style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="formData.downTime" - type="date" size="small" placeholder="閫夋嫨鏃堕棿"> - </el-date-picker> - </el-form-item> - <el-form-item label="鎸囨淳浜哄憳锛�"> - <el-select v-model="formData.equipmentManager" placeholder="璇烽�夋嫨" size="small" style="width:100%"> - <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> - </el-option> - </el-select> - </el-form-item> - </el-form> - <span slot="footer" class="dialog-footer"> - <el-row> - <el-button @click="handleClose">鍙� 娑�</el-button> - <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> - </el-row> - </span> - </el-dialog> - <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="70%" :before-close="handleClose"> - <div style="height: 70vh;overflow-y: auto;"> - <ValueTable ref="ValueTableDataLook" :url="$api.deviceScope.selectDeviceParameter" - :componentData="componentDataDataLook" :key="upIndex" /> - </div> - </el-dialog> </div> </template> <script> import ValueTable from '../tool/value-table.vue' + import Add from '../do/b1-ins-order/add.vue' export default { components: { - ValueTable + ValueTable, + Add }, data() { return { @@ -313,6 +320,7 @@ }, ], tabIndex: 0, + active: 1 } }, mounted() { @@ -415,7 +423,9 @@ }) }, // 涓嬪崟 - playOrder() {}, + playOrder() { + this.active = 1 + }, handleTab(m, i) { this.tabIndex = i; this.componentData.entity.state = m.value @@ -423,4 +433,4 @@ } } } -</script> \ No newline at end of file +</script> diff --git a/src/components/view/b2-standard-template.vue b/src/components/view/b2-standard-template.vue index a01fe23..d6ca274 100644 --- a/src/components/view/b2-standard-template.vue +++ b/src/components/view/b2-standard-template.vue @@ -95,7 +95,7 @@ font: '缂栬緫', type: 'text', method: 'doDiy', - field: ['createUserName', 'updateUserName'] + field: ['createUserName', 'updateUserName','thing'] }, { id: 'delete', font: '鍒犻櫎', @@ -172,6 +172,7 @@ closed(){ this.loading = true let data = luckysheet.toJson() + console.log(data); this.$axios.post(this.$api.StandardTemplate.upStandardTemplate,{ id: this.row.id, thing: JSON.stringify(data), @@ -199,4 +200,4 @@ } } } -</script> \ No newline at end of file +</script> diff --git a/src/components/view/b2-standard.vue b/src/components/view/b2-standard.vue index 9a88a70..c203284 100644 --- a/src/components/view/b2-standard.vue +++ b/src/components/view/b2-standard.vue @@ -151,10 +151,10 @@ <el-table :data="productList" style="width: 100%;" height="100%" tooltip-effect="dark" stripe :fit="true" border @selection-change="handleSelectionChange"> <el-table-column type="selection" width="65"></el-table-column> - <el-table-column prop="inspectionItem" label="妫�楠岄」" show-overflow-tooltip></el-table-column> + <el-table-column prop="inspectionItem" label="妫�楠岄」" min-width="140" show-overflow-tooltip></el-table-column> <!-- <el-table-column prop="inspectionItemClassify" label="妫�楠岄」绫诲瀷" width="120" show-overflow-tooltip></el-table-column> --> - <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" show-overflow-tooltip></el-table-column> - <el-table-column prop="laboratory" label="瀹為獙瀹�" width="120" show-overflow-tooltip></el-table-column> + <el-table-column prop="inspectionItemSubclass" label="妫�楠岄」瀛愰」" min-width="140" show-overflow-tooltip></el-table-column> + <el-table-column prop="sonLaboratory" label="瀛愬疄楠屽" width="130" show-overflow-tooltip></el-table-column> <el-table-column prop="unit" label="璁¢噺鍗曚綅" width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="price" label="鍗曚环" width="100" show-overflow-tooltip></el-table-column> <el-table-column prop="manHour" label="宸ユ椂" width="80" show-overflow-tooltip></el-table-column> @@ -208,9 +208,7 @@ <span class="required-span">* </span>鏍峰搧鍚嶇О锛� </el-col> <el-col :span="16" :offset="1"> - <el-select v-model="addOb.sample" size="small" style="width: 100%;" clearable> - <el-option v-for="(a, ai) in sample" :key="ai" :value="a.value" :label="a.label"></el-option> - </el-select> + <el-input v-model="addOb.sample" placeholder="璇疯緭鍏ユ牱鍝佸悕绉�" clearable size="small"></el-input> </el-col> </el-row> <el-row style="line-height: 50px;"> @@ -335,7 +333,7 @@ this.selectEnumByCategoryForFactory() this.selectStandardTreeList() this.obtainItemParameterList() - this.selectEnumByCategoryForsampleType() + // this.selectEnumByCategoryForsampleType() this.selectTestObjectByName() this.selectStandardMethods() this.selectEnumByCategoryForDevice() @@ -448,7 +446,7 @@ }, selectEnumByCategoryForSpecial() { this.$axios.post(this.$api.enums.selectEnumByCategory, { - category: "鐗规畩鏍囪瘑" + category: "鏄惁" }).then(res => { this.componentData.tagField.bsm.select = res.data }) @@ -488,7 +486,7 @@ value: a.specimenName }) }) - this.sample = data + this.sampleType = data }) }, selectStandardMethods() { diff --git a/src/components/view/data-reporting.vue b/src/components/view/data-reporting.vue deleted file mode 100644 index effeab1..0000000 --- a/src/components/view/data-reporting.vue +++ /dev/null @@ -1,526 +0,0 @@ -<style scoped> - .title { - height: 60px; - line-height: 60px; - } - - .search { - background-color: #fff; - height: 80px; - display: flex; - align-items: center; - } - - .search_thing { - width: 350px; - display: flex; - align-items: center; - } - - .search_label { - width: 110px; - font-size: 14px; - text-align: right; - } - - .search_input { - width: calc(100% - 110px); - } - - .table { - margin-top: 10px; - background-color: #fff; - width: calc(100% - 40px); - height: calc(100% - 60px - 80px - 10px - 40px); - padding: 20px; - } - .el-radio-group{ - width: 100%; - } -</style> -<style> - .data_reporting .data_reporting_dia .el-dialog__body { - padding: 15px 0; - } - - .data_reporting .el-upload { - width: 100%; - } - - .data_reporting .el-upload-dragger { - width: 100%; - } -</style> - -<template> - <div class="data_reporting" v-loading="uploading"> - <div> - <el-row class="title"> - <el-col :span="12" style="padding-left: 20px;">鏁版嵁涓婃姤</el-col> - <el-col :span="12" style="text-align: right;padding-right: 8px;"> - <el-button size="medium" @click="chooseDia = true" v-if="inPower"> - <i class="el-icon-upload2" style="color: #3A7BFA;"></i> - <span style="color: #3A7BFA;">瀵煎叆</span> - </el-button> - <el-button size="medium" @click="$refs.ValueTable.openDownDia()" v-if="outPower"> - <i class="el-icon-download" style="color: #3A7BFA;"></i> - <span style="color: #3A7BFA;">瀵煎嚭</span> - </el-button> - <el-button size="medium" type="primary" @click="opeaAdd" v-if="addPower">鏂板</el-button> - <el-button size="medium" type="danger" @click="delNowAll" v-if="delAllPower">涓�閿垹闄�</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 size="small" v-model="componentData.entity.createTime" type="date" placeholder="閫夋嫨鏃ユ湡" - value-format="yyyy-MM-dd HH:mm:ss" :clearable="false" :editable="false" @change="refreshTable"></el-date-picker> - </div> - </div> - <div class="search_thing"> - <div class="search_label">鐧昏浜猴細</div> - <div class="search_input"> - <el-select size="small" style="width: 100%;" placeholder="鐧昏浜�" v-model="componentData.entity.registrant"> - <el-option :value="null" label="鍏ㄩ儴"></el-option> - <el-option v-for="(a, ai) in userNames" :key="ai" :label="a" :value="a"></el-option> - </el-select> - </div> - </div> - <div class="search_thing"> - <div class="search_label">椤圭洰锛�</div> - <div class="search_input"> - <el-select size="small" style="width: 100%;" placeholder="璇烽�夋嫨" v-model="componentData.entity.product"> - <el-option :value="null" label="鍏ㄩ儴"></el-option> - <el-option v-for="(a, ai) in product" :key="ai" :label="a.product" :value="a.product"></el-option> - </el-select> - </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.dataReporting.selectDataReportingList" - :delUrl="$api.dataReporting.delDataReporting" :componentData="componentData" :key="upIndex" @upRole="upRole" :downUrl="$api.dataReporting.downDataReportingFile"/> - </div> - <el-dialog title="涓婃姤淇敼" :visible.sync="upDia" width="700px" class="data_reporting_dia"> - <div class="body" v-if="upDia" style="max-height: 550px;overflow-y: auto;"> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">绯荤粺鏃ユ湡</el-col> - <el-col :span="7"> - <el-input v-model="upData.updateTime" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鐧昏浜�</el-col> - <el-col :span="7"> - <el-input v-model="upData.registrant" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">閮ㄩ棬</el-col> - <el-col :span="7"> - <el-input v-model="upData.department" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">璐︽埛鍚�</el-col> - <el-col :span="7"> - <el-input v-model="upData.name" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">娓犻亾</el-col> - <el-col :span="7"> - <el-input v-model="upData.channel" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">椤圭洰</el-col> - <el-col :span="7"> - <el-input v-model="upData.product" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">濮撳悕</el-col> - <el-col :span="7"> - <el-input v-model="upData.name2" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">浠g悊</el-col> - <el-col :span="7"> - <el-input v-model="upData.agent" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">灞曠幇閲�</el-col> - <el-col :span="7"> - <el-input v-model="upData.showNum" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鐐瑰嚮閲�</el-col> - <el-col :span="7"> - <el-input v-model="upData.click" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">璐︽埛娑堣垂</el-col> - <el-col :span="7"> - <el-input v-model="upData.accountConsumption" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">瀹㈡埛杩旂偣娑堣垂</el-col> - <el-col :span="7"> - <el-input v-model="upData.rebateConsumption" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">娑堣垂</el-col> - <el-col :span="7"> - <el-input v-model="upData.consumption" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鎶樺悗娑堣垂</el-col> - <el-col :span="7"> - <el-input v-model="upData.discountedConsumption" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">杩涚矇</el-col> - <el-col :span="7"> - <el-input v-model="upData.fansAdd" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">瀹為檯鎴愭湰</el-col> - <el-col :span="7"> - <el-input v-model="upData.actualCost" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鍒╂鼎</el-col> - <el-col :span="7"> - <el-input v-model="upData.profit" size="small" disabled></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鍛樺伐浠g悊杩旂偣</el-col> - <el-col :span="7"> - <el-input v-model="upData.agentRebate" size="small" disabled></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鍐呴儴鎴愭湰</el-col> - <el-col :span="7"> - <el-input v-model="upData.internalCosts" size="small"></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">瀹㈡埛鎴愭湰</el-col> - <el-col :span="7"> - <el-input v-model="upData.customerCosts" size="small"></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">瀹㈡埛杩旂偣</el-col> - <el-col :span="7"> - <el-input v-model="upData.customerRebate" size="small"></el-input> - </el-col> - <el-col :span="4" style="text-align: right;padding-right: 8px;">鍋氳繘鏉�</el-col> - <el-col :span="7"> - <el-input v-model="upData.remark" size="small"></el-input> - </el-col> - </el-row> - <el-row style="line-height: 50px;"> - <el-col :span="4" style="text-align: right;padding-right: 8px;">寰俊鍙�</el-col> - <el-col :span="7"> - <el-input v-model="upData.vxCard" size="small"></el-input> - </el-col> - </el-row> - </div> - <span slot="footer" class="dialog-footer" style="margin-right: 18px;"> - <el-button type="primary" @click="saveUpData" :loading="upLoad">纭� 瀹�</el-button> - <el-button @click="upDia = false">鍙� 娑�</el-button> - </span> - </el-dialog> - <el-dialog title="鏁版嵁瀵煎叆" :visible.sync="uploadDia" width="500px"> - <div style="margin: 0 auto;"> - <el-upload ref="upload" drag :action="javaApi + $api.dataReporting.inputCsv" :headers="token" - :file-list="fileList" name="file" :auto-upload="false" accept=".csv" :limit="1" :on-change="beforeUpload" - :on-success="onSuccess" :on-error="onError" :data="{param: componentData.uploadStr}"> - <i class="el-icon-upload"></i> - <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> - </el-upload> - </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="uploadDia = false">鍙� 娑�</el-button> - <el-button type="primary" @click="submitUpload()">涓� 浼�</el-button> - </span> - </el-dialog> - <el-dialog title="璇烽�夋嫨鏁版嵁涓婃姤鐨勫井淇″彿" :visible.sync="chooseDia" width="500px"> - <div class="body" v-if="chooseDia" style="max-height: 550px;overflow-y: auto;padding: 5px 0;"> - <el-radio-group v-model="vx"> - <el-col :span="8" v-for="(a, ai) in vxs" :key="ai" style="margin-bottom: 5px;"> - <el-radio border size="small" :label="a.vx">{{a.vx}}</el-radio> - </el-col> - </el-radio-group> - </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="chooseDia = false">鍙栨秷</el-button> - <el-button type="primary" @click="openUpload()">涓嬩竴姝�</el-button> - </span> - </el-dialog> - </div> -</template> - -<script> - import ValueTable from '../tool/value-table.vue' - export default { - components: { - ValueTable - }, - data() { - return { - componentData: { - entity: { - createTime: null, - registrant: null, - product: null, - orderBy: { - field: 'id', - order: 'asc' - } - }, - isIndex: true, - showSelect: false, - select: true, - do: [{ - id: 'update', - font: '缂栬緫', - type: 'text', - method: 'upRole', - field: ['createUserName', 'updateUserName', 'registrant', 'department', 'consumption', - 'rebateConsumption', 'discountedConsumption', 'profit', 'remark', 'actualCost', 'fansAdd', 'agentRebate' - ] - }, { - id: 'delete', - font: '鍒犻櫎', - type: 'text', - method: 'doDiy' - }], - tagField: {}, - selectField: { - vxCard: { - select: [] - } - }, - requiredAdd:['name2','agent','channel','product','showNum','click','accountConsumption','vxCard'], - countFleid: ['fansAdd'], - uploadStr: "" - }, - entityCopy: {}, - upIndex: 0, - addDia: false, - upDia: false, - upLoad: false, - upData: {}, - product: [], - uploadDia: false, - fileList: [], - uploading: false, - addPower: true, - token: null, - inPower: true, - outPower: true, - delAllPower: true, - userNames: [], - vxs: [], - chooseDia: false, - vx: null - } - }, - created() { - var today = new Date(); - var yesterday = new Date(today); - yesterday.setDate(today.getDate() - 1); - var yyyy = yesterday.getFullYear(); - var mm = yesterday.getMonth() + 1; - var dd = yesterday.getDate() - if (dd < 10) { - dd = "0" + dd; - } - if (mm < 10) { - mm = "0" + mm; - } - this.componentData.entity.createTime = this.HaveJson(`${yyyy}-${mm}-${dd} 00:00:00`) - }, - mounted() { - this.entityCopy = this.HaveJson(this.componentData.entity) - this.selectProductEnumList() - this.getPower() - this.token = { - 'token': sessionStorage.getItem('token') - } - this.selectDataReportingForCreateUserNames() - this.selectVxs() - }, - methods: { - refreshTable() { - this.$refs['ValueTable'].selectList() - this.selectDataReportingForCreateUserNames() - this.selectVxs() - }, - refresh() { - this.componentData.entity = this.HaveJson(this.entityCopy) - this.upIndex++ - this.selectDataReportingForCreateUserNames() - }, - upRole(row) { - this.upData = this.HaveJson(row) - this.upDia = true - }, - saveUpData() { - this.upLoad = true - delete this.upData.createTime - delete this.upData.updateTime - delete this.upData.createUser - delete this.upData.updateUser - this.$axios.post(this.$api.dataReporting.upDataReporting, this.upData, { - headers: { - 'Content-Type': 'application/json' - } - }).then(res => { - this.upLoad = false - if (res.code == 201) { - return - } - this.$message.success('淇敼鎴愬姛') - this.upDia = false - this.refreshTable() - }) - }, - selectProductEnumList() { - this.$axios.get(this.$api.enums.selectProductEnumList).then(res => { - this.product = res.data - }) - }, - // 鏉冮檺鍒嗛厤 - getPower() { - let power = JSON.parse(sessionStorage.getItem('power')) - let up = false - let del = false - let add = false - let inPower = false - let outPower = false - let delAllPower = false - for (var i = 0; i < power.length; i++) { - if (power[i].menuMethod == 'upDataReporting') { - up = true - } - if (power[i].menuMethod == 'delDataReporting') { - del = true - } - if (power[i].menuMethod == 'addDataReporting') { - add = true - } - if (power[i].menuMethod == 'inputCsv') { - inPower = true - } - if (power[i].menuMethod == 'downDataReportingFile') { - outPower = true - } - if (power[i].menuMethod == 'deleteAllData') { - delAllPower = true - } - } - if (!del) { - this.componentData.do.splice(1, 1) - } - if (!up) { - this.componentData.do.splice(0, 1) - } - this.addPower = add - this.inPower = inPower - this.outPower = outPower - this.delAllPower = delAllPower - }, - openUpload() { - if(this.vx == null || this.vx == undefined) { - this.$message.error('璇烽�夋嫨鏁版嵁涓婃姤鐨勫井淇″彿') - return - } - this.componentData.uploadStr = this.vx - this.uploadDia = true - }, - beforeUpload(file, fileList) { - if (file.raw.type != 'text/csv') { - this.$message.error('涓婁紶鏂囦欢鏍煎紡涓嶆纭�'); - this.$refs.upload.clearFiles() - return false; - } - }, - submitUpload() { - if (this.$refs.upload.uploadFiles.length == 0) { - this.$message.error('鏈�夋嫨鏂囦欢') - return - } - this.uploading = true - this.$refs.upload.submit(); - this.uploadDia = false - }, - onSuccess(response, file, fileList) { - this.$refs.upload.clearFiles() - this.uploadDia = false - this.uploading = false - this.chooseDia = false - if(response.code==201){ - this.$message.error(response.message) - return - } - this.$message.success('涓婁紶鎴愬姛') - this.refreshTable() - }, - onError(err, file, fileList) { - this.$message.error('涓婁紶澶辫触') - this.$refs.upload.clearFiles() - this.uploading = false - }, - opeaAdd() { - this.$refs.ValueTable.openAddDia(this.$api.dataReporting.addDataReporting); - }, - delNowAll(){ - this.$confirm('鏄惁鍒犻櫎 '+this.componentData.entity.createTime.split(' ')[0]+' 鏁版嵁鏃堕棿鐨勫叏閮ㄦ暟鎹�?', "璀﹀憡", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "error" - }).then(() => { - this.uploading = true - this.$axios.post(this.$api.dataReporting.deleteAllData, { - date: this.componentData.entity.createTime.split(' ')[0] - }).then(res => { - this.uploading = false - if (res.code === 201) { - return - } - this.$message.success('鍒犻櫎鎴愬姛') - this.refreshTable() - }) - }).catch(() => {}) - }, - selectDataReportingForCreateUserNames(){ - this.$axios.post(this.$api.dataReporting.selectDataReportingForCreateUserNames,{ - time: this.componentData.entity.createTime - }).then(res => { - this.userNames = res.data - }) - }, - selectVxs(){ - this.$axios.get(this.$api.dataReporting.selectVxs,{ - params:{ - time: this.componentData.entity.createTime - } - }).then(res => { - if (res.code === 201) { - return - } - this.vxs = res.data - var str = [] - res.data.forEach(a => { - str.push({ - label: a.vx, - value: a.vx - }) - }) - this.componentData.selectField.vxCard.select = str - }) - } - } - } -</script> diff --git a/src/view/index.vue b/src/view/index.vue index f151c85..e8dffa6 100644 --- a/src/view/index.vue +++ b/src/view/index.vue @@ -163,7 +163,7 @@ .tag>.el-icon-s-unfold, .el-icon-s-fold, - .el-icon-delete { + .tag>.el-icon-delete { font-size: 16px; cursor: pointer; margin: 0 8px; @@ -325,7 +325,8 @@ <el-col :span="24"> <el-card :body-style="{padding: '6px'}"> <ul> - <li style="color: red;" @click="removeTab(activeIndex)"><i class="el-icon-close"></i>鍏抽棴</li> + <li @click="removeTab(activeIndex)"><i class="el-icon-close"></i>鍏抽棴</li> + <li @click="allDel"><i class="el-icon-delete"></i>鍏抽棴鎵�鏈�</li> <el-divider></el-divider> <li @click="refreshTable"><i class="el-icon-refresh"></i>鍒锋柊</li> </ul> diff --git a/static/js/menu.js b/static/js/menu.js index 9eed660..8655e11 100644 --- a/static/js/menu.js +++ b/static/js/menu.js @@ -18,7 +18,7 @@ v: "妫�楠屼笅鍗�", i: "font icon-erjidaohang", u: "b1-inspection-order", - p: "" + p: "selectInsOrderParameter" }, { v: "妫�楠屼换鍔�", i: "font icon-erjidaohang", -- Gitblit v1.9.3