From 7682660aa0ff7f6df5c480c5d34d3ca805949a1c Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 10 四月 2024 15:21:04 +0800 Subject: [PATCH] 修改生丝定价标准和车间管理list字段 --- src/views/systemSetting/dataDictionary/index.vue | 12 src/views/employeeSalary/apprenticeshipManage/components/addDialog.vue | 190 +++++++++++++++++++++ src/views/systemSetting/silkPriceStandard/components/addDialog.vue | 14 src/views/systemSetting/workshopManage/components/addDialog.vue | 28 +- src/views/systemSetting/silkPriceStandard/index.vue | 24 +- src/views/employeeSalary/apprenticeshipManage/index.vue | 158 ++++++++++++++++ src/views/systemSetting/workshopManage/index.vue | 113 ++++++------ 7 files changed, 437 insertions(+), 102 deletions(-) diff --git a/src/views/employeeSalary/apprenticeshipManage/components/addDialog.vue b/src/views/employeeSalary/apprenticeshipManage/components/addDialog.vue new file mode 100644 index 0000000..9404393 --- /dev/null +++ b/src/views/employeeSalary/apprenticeshipManage/components/addDialog.vue @@ -0,0 +1,190 @@ +<template> + <div class="add_wordshop"> + <el-dialog + :title="editConfig.dialogTitle+'杞﹂棿绠$悊'" + :visible.sync="editConfig.visible" + width="30%" + :before-close="handleClose"> + <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" ref="ruleForm" > + <el-form-item prop="workshopNumber" label="杞﹂棿" style="width: 100%;" > + <el-select + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" v-model="editConfig.infomitton.workshopNumber" placeholder="璇烽�夋嫨杞﹂棿"> + <el-option + v-for="item in workshopList" + :key="item.ID" + :label="item.name" + :value="item.ID"> + </el-option> + </el-select> + </el-form-item> + + <el-form-item label="缁勫埆" style="width: 100%;" + prop="groupNumber" > + <!-- <el-input-number + v-model="form.workshopNumber" + placeholder="璇疯緭鍏ョ粍鍒�" + :controls="false" + style="width: 100%; margin-right: 5px;text-align:left;" + ></el-input-number> --> + <el-input + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" + v-model="editConfig.infomitton.groupNumber" + :rows="4" + style="resize: none !important;" + placeholder="璇疯緭鍏ョ粍鍒�" + > + </el-input> + </el-form-item> + + <el-form-item label="寮�濮嬭溅鍙�" style="width: 100%;" > + <el-input + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" + v-model="editConfig.infomitton.startCarNumber" + :rows="4" + style="resize: none !important;" + placeholder="璇疯緭鍏ュ紑濮嬭溅鍙�" + > + </el-input> + </el-form-item> + <el-form-item label="缁撴潫杞﹀彿" style="width: 100%;" > + <el-input + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" + v-model="editConfig.infomitton.endCarNumber" + :rows="4" + style="resize: none !important;" + placeholder="璇疯緭鍏ョ粨鏉熻溅鍙�" + > + </el-input> + </el-form-item> + <el-form-item label="鍗婅溅鏍囧織" style="width: 100%;" > + <el-select + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" v-model="editConfig.infomitton.carFlag" placeholder="璇烽�夋嫨鍗婅溅鏍囧織"> + <el-option + v-for="item in carFlagList" + :key="item.id" + :label="item.name" + :value="item.id"> + </el-option> + </el-select> + </el-form-item> + <el-form-item label="澶囨敞" style="width: 100%;" > + <el-input + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" + v-model="editConfig.infomitton.notes" + type="textarea" + :rows="4" + style="resize: none !important;" + placeholder="" + > + </el-input> + </el-form-item> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="editConfig.visible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="commitForm('ruleForm')">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +// import {} from "@/api/systemSetting/workshopManage" +export default { + props: { + editDiaConfig:{ + type: Object, + default: () => { + return { + visible: false, + dialogTitle:"娣诲姞", + isReadonly:true, + infomitton: { + }, + } + } + } + }, + data() { + return { + editConfig:this.editDiaConfig, + form: { + workshopNumber:null, + groupNumber:null, + startCarNumber:null, + endCarNumber:null, + carFlag:null, + notes:null + }, + workshopList:[], + carFlagList:[ + ], + rules: { + workshopNumber: [ + { required: true, message: '璇烽�夋嫨杞﹂棿', trigger: 'change' } + ], + groupNumber: [ + { required: true, message: '璇峰~鍐欑粍鍒�', trigger: 'change' } + ] + }, + }; + }, + computed: { + }, + created() { + }, + mounted() { + + }, + watch: { + + }, + methods: { + handleClose(done) { + done(); + }, + setParams(){ + let params={ + workshopNumber:this.editConfig.infomitton.workshopNumber+'', + groupNumber:Number(this.editConfig.infomitton.groupNumber), + startCarNumber:Number(this.editConfig.infomitton.startCarNumber), + endCarNumber:Number(this.editConfig.infomitton.endCarNumber), + carFlag:Number(this.editConfig.infomitton.carFlag), + notes:this.editConfig.infomitton.notes, + // id:Number(this.editConfig.infomitton.workshopId), + } + return params + }, + async commitForm(formName){ + this.$refs[formName].validate((valid) => { + if (valid) { + console.log("鏍¢獙閫氳繃") + } else { + console.log('error submit!!'); + return false; + } + }); + + + } + }, + components: { + + }, +}; +</script> + +<style scoped lang="scss"> +::v-deep .el-form-item__content{ + width: 70% !important; +} +::v-deep{ + .el-form{ + .el-input__inner { + text-align: left; + } + } + .el-select{ + width: 100%; + } +} +</style> diff --git a/src/views/employeeSalary/apprenticeshipManage/index.vue b/src/views/employeeSalary/apprenticeshipManage/index.vue index 758bce3..0b5d8a4 100644 --- a/src/views/employeeSalary/apprenticeshipManage/index.vue +++ b/src/views/employeeSalary/apprenticeshipManage/index.vue @@ -1,21 +1,167 @@ <template> - <div class="container"></div> + <div class="container"> + <div class="filter-card"> + <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> + <template slot="leftButton"> + <el-button size="small" type="primary" @click="addBtnClick" >鏂板</el-button> + <el-button size="small" type="primary" @click="refreshClick">鍒锋柊</el-button> + <el-button size="small" type="primary" @click="printClick">鎵撳嵃</el-button> + </template> + </CommonSearch> + </div> + <div class="body-card"> + <div class="list-view"> + <TableCommonView + :table-list="tableList" + @selTableCol="selTableCol" + @handleShow="handleShow" + @tableRowClick="tableRowClick" + > + <template slot="tableButton"> + <el-table-column label="鎿嶄綔" width="180"> + <template slot-scope="scope"> + <el-button @click.stop="handleClick(scope.row, '鏌ョ湅')" type="text" size="small">鏌ョ湅</el-button> + <el-button @click.stop="handleClick(scope.row, '淇敼')" type="text" size="small">淇敼</el-button> + <el-button @click.stop="handleClick(scope.row, '鍒犻櫎')" type="text" size="small">鍒犻櫎</el-button> + + </template> + </el-table-column> + </template> + </TableCommonView> + </div> + <AddDialog + :editDiaConfig="editConfig" + /> + <div class="btn-pager"> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> + </div> + </div> + </div> </template> <script> +import AddDialog from "@/views/systemSetting/workshopManage/components/addDialog.vue" + export default { name: "apprenticeshipManage", props: {}, - components: {}, + components: {AddDialog}, mixins: [], computed: {}, data() { - return {} + return { + tableList: {}, + showCol: ["杞﹂棿", "缁勫埆", "寮�濮嬭溅鍙�", "缁撴潫杞﹀彿", "鍗婅溅鏍囧織", "澶囨敞"], + tableColumn: [ + // { label: "杞﹂棿", prop: "workshopNumber",iconRight:"el-icon-setting"}, + { label: "杞﹂棿", prop: "workshopNumber",}, + { label: "缁勫埆", prop: "groupNumber", }, + { label: "寮�濮嬭溅鍙�", prop: "startCarNumber" }, + { label: "缁撴潫杞﹀彿", prop: "endCarNumber" }, + { label: "鍗婅溅鏍囧織", prop: "carFlag",isCallMethod: true, getCallMethod: this.getStatusCarFlag }, + { label: "澶囨敞", prop: "notes", }, + ], + editConfig:{ + visible:false, + infomitton:{ + TabsIndex:0, + workshopId:null, + } + }, + } }, - created() {}, - methods: {} + created() { + this.setTable() + }, + methods: { + setTable() { + // top 鏄庣粏鍗曞垪琛� + this.tableList = { + selectIndex: true, + tableInfomation: [], + allcol: [], + showcol: this.showCol, + tableColumn: this.setColumnVisible(this.showCol, this.tableColumn) + } + this.setTableList(this.tableList) + }, + setColumnVisible(showCol, tableColumn) { + return tableColumn.map((ele) => { + return { + ...ele, + isShowColumn: showCol.includes(ele.label) + } + }) + }, + setTableList(tableList) { + tableList.allcol = tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) + this.searchOptions = [] + for (let i = 0; i < tableList.tableColumn.length; i++) { + const label = tableList.tableColumn[i].label + const value = tableList.tableColumn[i].prop + this.searchOptions.push({ value: value, label: label }) + } + }, + selTableCol(val) { + this.showcol = val + this.tableList.tableColumn = this.setColumnVisible(val, this.tableColumn) + }, + // 鏂板 + addBtnClick() { + this.editConfig.infomitton={} + this.editConfig.dialogTitle="鏂板" + this.editConfig.visible=true + }, + } } </script> <!-- Add "scoped" attribute to limit CSS to this component only --> -<style lang="scss" scoped></style> +<style lang="scss" scoped> + +.container { + height: 100%; + .filter-card { + margin: 20px 30px; + height: 80px; + display: flex; + align-items: center; + padding: 0 20px 0 20px; + border-radius: 4px; + background-color: #fff; + } + .body-card { + margin: 0 30px; + background-color: #fff; + padding: 10px 15px; + height: calc(100% - 180px); + border-radius: 4px; + .edit-save { + display: flex; + align-items: center; + margin-bottom: 10px; + .edit-save-icon { + font-size: 24px; + color: #5582f3; + cursor: pointer; + } + .edit-sace-label { + margin-left: 10px; + font-size: 14px; + color: #000000d8; + } + } + } +} +.list-view { + height: calc(100% - 60px); + overflow: hidden; +} +.btn-pager { + display: flex; + margin-top: 10px; + .page { + margin-left: auto; + } +} +</style> diff --git a/src/views/systemSetting/dataDictionary/index.vue b/src/views/systemSetting/dataDictionary/index.vue index 9c1b9da..5a6c444 100644 --- a/src/views/systemSetting/dataDictionary/index.vue +++ b/src/views/systemSetting/dataDictionary/index.vue @@ -247,12 +247,8 @@ }) }, rowClick(row,type){ - if(type==="鏌ョ湅"){ - this.editConfig.dialogTitle="鏌ョ湅" - this.editConfig.visible=true - this.editConfig.infomitton={...row,TabsIndex:this.TabsIndex} - }else if(type==="淇敼"){ - this.editConfig.dialogTitle="淇敼" + if(type!=="鍒犻櫎"){ + this.editConfig.dialogTitle=type this.editConfig.visible=true this.editConfig.infomitton={...row,TabsIndex:this.TabsIndex} }else if(type==="鍒犻櫎"){ @@ -270,7 +266,9 @@ }); } }) - }) + }).catch(() => { + console.log("鍙栨秷鍒犻櫎") + }); } } } diff --git a/src/views/systemSetting/silkPriceStandard/components/addDialog.vue b/src/views/systemSetting/silkPriceStandard/components/addDialog.vue index 0f76dbd..5e4ca50 100644 --- a/src/views/systemSetting/silkPriceStandard/components/addDialog.vue +++ b/src/views/systemSetting/silkPriceStandard/components/addDialog.vue @@ -4,10 +4,10 @@ :before-close="handleClose"> <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" ref="ruleForm"> - <el-form-item prop="marketNumber" label="搴勫彛" style="width: 100%;"> - <el-select :disabled="this.editConfig.dialogTitle === '鏌ョ湅'" v-model="editConfig.infomitton.marketNumber" + <el-form-item prop="market" label="搴勫彛" style="width: 100%;"> + <el-select :disabled="this.editConfig.dialogTitle === '鏌ョ湅'" v-model="editConfig.infomitton.market" value-key="ID" placeholder="璇烽�夋嫨搴勫彛"> - <el-option v-for="item in shanguchiList" :key="item.ID" :label="item.name" :value="item.ID"> + <el-option v-for="item in shanguchiList" :key="item.name" :label="item.name" :value="item"> </el-option> </el-select> </el-form-item> @@ -84,7 +84,7 @@ ], classList: [], rules: { - marketNumber: [ + market: [ { required: true, message: '璇烽�夋嫨搴勫彛', trigger: 'change' } ], rawSilkGrade: [ @@ -121,7 +121,8 @@ }, setParams() { let params = { - marketNumber: this.editConfig.infomitton.marketNumber + '', + marketId: this.editConfig.infomitton.market.ID, + marketName: this.editConfig.infomitton.market.name, unit: this.editConfig.infomitton.unit, payStandard: Number(this.editConfig.infomitton.payStandard), rawSilkGrade: this.editConfig.infomitton.rawSilkGrade, @@ -134,6 +135,7 @@ this.$refs[formName].validate((valid) => { if (valid) { let params = this.setParams() + console.log(this.editConfig.infomitton.market,params,"鐪嬮偅") if (this.editConfig.dialogTitle === "鏂板") { savePriceStandard(params).then((res) => { if (res && res.code === 200) { @@ -147,7 +149,7 @@ }) } else if (this.editConfig.dialogTitle === "淇敼") { this.editConfig.infomitton.workshopNumber = this.editConfig.infomitton.workshopNumber + "" - savePriceStandard(this.editConfig.infomitton).then((res) => { + savePriceStandard({...params,id:this.editConfig.infomitton.ID}).then((res) => { if (res && res.code === 200) { this.editConfig.visible = false this.$message({ diff --git a/src/views/systemSetting/silkPriceStandard/index.vue b/src/views/systemSetting/silkPriceStandard/index.vue index d6957a9..31693d2 100644 --- a/src/views/systemSetting/silkPriceStandard/index.vue +++ b/src/views/systemSetting/silkPriceStandard/index.vue @@ -54,7 +54,7 @@ tableList: {}, showCol: ["搴勫彛", "鐢熶笣绛夌骇", "钖叕鏍囧噯", "鍗曚綅", "澶囨敞"], tableColumn: [ - { label: "搴勫彛", prop: "marketNumber",}, + { label: "搴勫彛", prop: "marketName",}, { label: "鐢熶笣绛夌骇", prop: "rawSilkGrade", }, { label: "钖叕鏍囧噯", prop: "payStandard" }, { label: "鍗曚綅", prop: "unit" }, @@ -86,9 +86,9 @@ }, // 鏂板 addBtnClick() { + this.editConfig.infomitton={} this.editConfig.dialogTitle="鏂板" this.editConfig.visible=true - this.editConfig.infomitton={} }, // 淇濆瓨 saveBtnClick(){ @@ -157,16 +157,18 @@ }) }, handleClick(row,type){ - if(type==="鏌ョ湅"){ - this.editConfig.infomitton=row - this.editConfig.dialogTitle=type - this.editConfig.visible=true - }else if(type==="淇敼"){ - this.editConfig.infomitton=row + if(type!=="鍒犻櫎"){ + this.editConfig.infomitton={ + ...row, + market:{ + ID:row.marketId, + name:row.marketName, + } + } this.editConfig.dialogTitle=type this.editConfig.visible=true }else if(type==="鍒犻櫎"){ - this.$confirm(`纭鍒犻櫎${row.name}鍚�?`, '鎻愮ず', { + this.$confirm(`纭鍒犻櫎鍚�?`, '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' @@ -180,7 +182,9 @@ }); } }) - }) + }).catch(() => { + console.log("鍙栨秷鍒犻櫎") + }); } } } diff --git a/src/views/systemSetting/workshopManage/components/addDialog.vue b/src/views/systemSetting/workshopManage/components/addDialog.vue index 06bebec..3f12c07 100644 --- a/src/views/systemSetting/workshopManage/components/addDialog.vue +++ b/src/views/systemSetting/workshopManage/components/addDialog.vue @@ -6,14 +6,14 @@ width="30%" :before-close="handleClose"> <el-form :inline="true" label-width="20%" style="width: 100%;" :model="editConfig.infomitton" :rules="rules" ref="ruleForm" > - <el-form-item prop="workshopNumber" label="杞﹂棿" style="width: 100%;" > + <el-form-item prop="workshop" label="杞﹂棿" style="width: 100%;" > <el-select - :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" v-model="editConfig.infomitton.workshopNumber" placeholder="璇烽�夋嫨杞﹂棿"> + :disabled="this.editConfig.dialogTitle==='鏌ョ湅'" v-model="editConfig.infomitton.workshop" value-key="name" placeholder="璇烽�夋嫨杞﹂棿"> <el-option v-for="item in workshopList" :key="item.ID" :label="item.name" - :value="item.ID"> + :value="item"> </el-option> </el-select> </el-form-item> @@ -21,7 +21,7 @@ <el-form-item label="缁勫埆" style="width: 100%;" prop="groupNumber" > <!-- <el-input-number - v-model="form.workshopNumber" + v-model="form.workshop" placeholder="璇疯緭鍏ョ粍鍒�" :controls="false" style="width: 100%; margin-right: 5px;text-align:left;" @@ -107,14 +107,6 @@ data() { return { editConfig:this.editDiaConfig, - form: { - workshopNumber:null, - groupNumber:null, - startCarNumber:null, - endCarNumber:null, - carFlag:null, - notes:null - }, workshopList:[], carFlagList:[ {id:1,name:"宸﹀崐杞�"}, @@ -122,7 +114,7 @@ {id:3,name:"鍏ㄨ溅缁撴潫"}, ], rules: { - workshopNumber: [ + workshop: [ { required: true, message: '璇烽�夋嫨杞﹂棿', trigger: 'change' } ], groupNumber: [ @@ -155,13 +147,13 @@ }, setParams(){ let params={ - workshopNumber:this.editConfig.infomitton.workshopNumber+'', + workshopNumber:this.editConfig.infomitton.workshop.ID+"", + workshopName:this.editConfig.infomitton.workshop.name, groupNumber:Number(this.editConfig.infomitton.groupNumber), startCarNumber:Number(this.editConfig.infomitton.startCarNumber), endCarNumber:Number(this.editConfig.infomitton.endCarNumber), carFlag:Number(this.editConfig.infomitton.carFlag), notes:this.editConfig.infomitton.notes, - // id:Number(this.editConfig.infomitton.workshopId), } return params }, @@ -181,8 +173,10 @@ } }) }else if(this.editConfig.dialogTitle==="淇敼"){ - this.editConfig.infomitton.workshopNumber=this.editConfig.infomitton.workshopNumber+"" - saveWorkshopManage(this.editConfig.infomitton).then((res)=>{ + saveWorkshopManage({ + ...params, + id:this.editConfig.infomitton.ID + }).then((res)=>{ if(res&&res.code===200){ this.editConfig.visible=false this.$message({ diff --git a/src/views/systemSetting/workshopManage/index.vue b/src/views/systemSetting/workshopManage/index.vue index 80fd301..1f1d1dc 100644 --- a/src/views/systemSetting/workshopManage/index.vue +++ b/src/views/systemSetting/workshopManage/index.vue @@ -1,9 +1,10 @@ <template> <div class="silkStandardSetting-container"> <div class="filter-card"> - <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> + <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" + @searchClick="onFilterSearch"> <template slot="leftButton"> - <el-button size="small" type="primary" @click="addBtnClick" >鏂板</el-button> + <el-button size="small" type="primary" @click="addBtnClick">鏂板</el-button> <el-button size="small" type="primary" @click="refreshClick">鍒锋柊</el-button> <el-button size="small" type="primary" @click="printClick">鎵撳嵃</el-button> </template> @@ -11,19 +12,15 @@ </div> <div class="body-card"> <div class="list-view"> - <TableCommonView - :table-list="tableList" - @selTableCol="selTableCol" - @handleShow="handleShow" - @tableRowClick="tableRowClick" - > + <TableCommonView :table-list="tableList" @selTableCol="selTableCol" @handleShow="handleShow" + @tableRowClick="tableRowClick"> <template slot="tableButton"> <el-table-column label="鎿嶄綔" width="180"> <template slot-scope="scope"> <el-button @click.stop="handleClick(scope.row, '鏌ョ湅')" type="text" size="small">鏌ョ湅</el-button> <el-button @click.stop="handleClick(scope.row, '淇敼')" type="text" size="small">淇敼</el-button> <el-button @click.stop="handleClick(scope.row, '鍒犻櫎')" type="text" size="small">鍒犻櫎</el-button> - + </template> </el-table-column> </template> @@ -33,28 +30,21 @@ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> </div> </div> - <AddWorkshop - ref="bomTypeDialog" - @handleConfirmSave="handleConfirmSave" - :workList="workList" - title="娣诲姞鑺傜偣绫诲瀷" - /> - <AddDataDictionaries - :editDiaConfig="editConfig" - /> + <AddWorkshop ref="bomTypeDialog" @handleConfirmSave="handleConfirmSave" :workList="workList" title="娣诲姞鑺傜偣绫诲瀷" /> + <AddDataDictionaries :editDiaConfig="editConfig" /> </div> </template> <script> import AddDataDictionaries from "@/views/systemSetting/workshopManage/components/addDialog.vue" -import { getWorkshopManageList,deleteWorkshopManage } from "@/api/systemSetting/workshopManage" +import { getWorkshopManageList, deleteWorkshopManage } from "@/api/systemSetting/workshopManage" import TableCommonView from '@/components/makepager/TableCommonView.vue' import AddWorkshop from '@/views/systemSetting/workshopManage/components/addWorkshop.vue' import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { name: "workshopManage", props: {}, - components: { TableCommonView,AddWorkshop,AddDataDictionaries }, + components: { TableCommonView, AddWorkshop, AddDataDictionaries }, mixins: [pageMixin], computed: {}, data() { @@ -63,11 +53,11 @@ showCol: ["杞﹂棿", "缁勫埆", "寮�濮嬭溅鍙�", "缁撴潫杞﹀彿", "鍗婅溅鏍囧織", "澶囨敞"], tableColumn: [ // { label: "杞﹂棿", prop: "workshopNumber",iconRight:"el-icon-setting"}, - { label: "杞﹂棿", prop: "workshopNumber",}, + { label: "杞﹂棿", prop: "workshopName", }, { label: "缁勫埆", prop: "groupNumber", }, { label: "寮�濮嬭溅鍙�", prop: "startCarNumber" }, { label: "缁撴潫杞﹀彿", prop: "endCarNumber" }, - { label: "鍗婅溅鏍囧織", prop: "carFlag",isCallMethod: true, getCallMethod: this.getStatusCarFlag }, + { label: "鍗婅溅鏍囧織", prop: "carFlag", isCallMethod: true, getCallMethod: this.getStatusCarFlag }, { label: "澶囨敞", prop: "notes", }, ], // 绫诲瀷 @@ -75,11 +65,11 @@ getDataParams: { keyWord: '', }, - editConfig:{ - visible:false, - infomitton:{ - TabsIndex:0, - workshopId:null, + editConfig: { + visible: false, + infomitton: { + TabsIndex: 0, + workshopId: null, } }, } @@ -122,22 +112,22 @@ this.tableList.tableColumn = this.setColumnVisible(val, this.tableColumn) }, // 琛ㄦ牸琛岀偣鍑� - tableRowClick(row){ - console.log(row,"row") + tableRowClick(row) { + console.log(row, "row") }, // 鎼滅储 onFilterSearch(searchText) { - this.getDataParams.keyWord=searchText, - this.getData() + this.getDataParams.keyWord = searchText, + this.getData() }, // 鏂板 addBtnClick() { - this.editConfig.infomitton={} - this.editConfig.dialogTitle="鏂板" - this.editConfig.visible=true + this.editConfig.infomitton = {} + this.editConfig.dialogTitle = "鏂板" + this.editConfig.visible = true }, // 淇濆瓨 - saveBtnClick(){ + saveBtnClick() { }, // 鍒锋柊 @@ -145,15 +135,15 @@ this.getDataParams.keyWord = "" this.pagerOptions.currPage = 1 this.pagerOptions.pageSize = 15 - this.$refs.searchRef.searchInput="" + this.$refs.searchRef.searchInput = "" this.getData() }, // 鎵撳嵃 - printClick() {}, + printClick() { }, // 鍒犻櫎 - delBtnClick(){}, + delBtnClick() { }, // 缁勫埆 - handleShow(){ + handleShow() { this.$refs.bomTypeDialog.editDialogVisible = true; }, handleGetBomKindDictList() { @@ -192,26 +182,27 @@ return "--"; } }, - handleClick(row,type){ - if(type==="鏌ョ湅"){ - this.editConfig.infomitton=row - this.editConfig.infomitton.workshopId=row.ID - this.editConfig.infomitton.workshopNumber=Number(this.editConfig.infomitton.workshopNumber) - this.editConfig.dialogTitle=type - this.editConfig.visible=true - }else if(type==="淇敼"){ - this.editConfig.infomitton=row - this.editConfig.infomitton.workshopId=row.ID - this.editConfig.dialogTitle=type - this.editConfig.visible=true - }else if(type==="鍒犻櫎"){ - this.$confirm(`纭鍒犻櫎${row.name}鍚�?`, '鎻愮ず', { + handleClick(row, type) { + if (type !== "鍒犻櫎") { + this.editConfig.infomitton = { + ...row, + workshop:{ + ID:row.workshopNumber, + name:row.workshopName + } + } + this.editConfig.infomitton.workshopId = row.ID + this.editConfig.infomitton.workshopNumber = Number(this.editConfig.infomitton.workshopNumber) + this.editConfig.dialogTitle = type + this.editConfig.visible = true + } else if (type === "鍒犻櫎") { + this.$confirm(`纭鍒犻櫎鍚�?`, '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteWorkshopManage({id:row.ID}).then((res)=>{ - if(res&&res.code===200){ + deleteWorkshopManage({ id: row.ID }).then((res) => { + if (res && res.code === 200) { this.getData() this.$message({ type: 'success', @@ -219,7 +210,9 @@ }); } }) - }) + }).catch(() => { + console.log("鍙栨秷鍒犻櫎") + }); } } } @@ -230,6 +223,7 @@ <style lang="scss" scoped> .silkStandardSetting-container { height: 100%; + .filter-card { margin: 20px 30px; height: 80px; @@ -239,21 +233,25 @@ border-radius: 4px; background-color: #fff; } + .body-card { margin: 0 30px; background-color: #fff; padding: 10px 15px; height: calc(100% - 180px); border-radius: 4px; + .edit-save { display: flex; align-items: center; margin-bottom: 10px; + .edit-save-icon { font-size: 24px; color: #5582f3; cursor: pointer; } + .edit-sace-label { margin-left: 10px; font-size: 14px; @@ -262,13 +260,16 @@ } } } + .list-view { height: calc(100% - 60px); overflow: hidden; } + .btn-pager { display: flex; margin-top: 10px; + .page { margin-left: auto; } -- Gitblit v1.8.0