Browse Source

2022-08-23 表格灵活性调整

master
Rui_Li 3 years ago
parent
commit
66021d0b00
  1. 194
      src/views/modules/purchasingManagement/searchRollInformation.vue
  2. 2
      src/views/modules/schedule/order_schedule_expand.vue
  3. 223
      src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue
  4. 1
      src/views/modules/shopOrder/shopOrder/common/tool_add_and_edit.vue
  5. 235
      src/views/modules/shopOrder/shopOrder/searchShopOrder.vue
  6. 22
      src/views/modules/yieldReport/order_transform_part.vue

194
src/views/modules/purchasingManagement/searchRollInformation.vue

@ -114,7 +114,7 @@
class="el-button el-button--primary el-button--medium"> class="el-button el-button--primary el-button--medium">
{{ buttons.download }} {{ buttons.download }}
</download-excel> </download-excel>
<el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand">
<el-dropdown trigger="click" style="margin-top: 3px; margin-left: 10px;" class="customer-dropdown" @command="handleCommand">
<el-button type="primary" @click="menuButtonFlag"> <el-button type="primary" @click="menuButtonFlag">
主菜单<i class="el-icon-arrow-down el-icon--right"></i> 主菜单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
@ -127,6 +127,8 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button @click="userSetting" style="margin-left: 10px;" type="primary">{{ buttons.settingTable }}</el-button>
<el-button v-if="showDefault" @click="saveColumnList()" type="primary">{{ buttons.defaultTable }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -165,11 +167,24 @@
</el-table> </el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
</div> </div>
</template> </template>
<script> <script>
import column from '@/views/modules/common/column';/*动态表头*/
/*动态表头*/
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js";
import { import {
searchRollInformation, searchRollInformation,
@ -189,7 +204,8 @@
//- //-
name: "searchRollInformation", name: "searchRollInformation",
components: { components: {
Chooselist
Chooselist,
column,/*动态列*/
}, },
watch: { watch: {
searchData: { searchData: {
@ -211,6 +227,8 @@
freezingBotton:false, freezingBotton:false,
notFreezingButton:false, notFreezingButton:false,
}, },
showDefault: false,
visible: false,
tagNo:'', tagNo:'',
// start // start
exportData: [], exportData: [],
@ -244,8 +262,19 @@
}, },
dataList:[], dataList:[],
dataListLoading: false, dataListLoading: false,
buttons:{
download:'导出',
buttons: {
settingLanguageList: '按语言设置',
edit: '编辑',
delete: '删除',
deleteList: '批量删除',
cz: '操作',
search: '查询',
download: '导出',
settingTable: '设置列表',
defaultTable: '设置默认配置',
list: "列表",
addList: '批量添加',
settingLanguage: "按控件设置"
}, },
columnList: [ columnList: [
{ {
@ -263,7 +292,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -281,7 +310,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -299,7 +328,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -317,7 +346,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -335,7 +364,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -353,7 +382,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -371,7 +400,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -389,7 +418,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -407,7 +436,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -425,7 +454,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -443,7 +472,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -461,7 +490,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 200 columnWidth: 200
}, },
{ {
@ -479,7 +508,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -497,7 +526,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 250 columnWidth: 250
}, },
{ {
@ -515,7 +544,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -533,7 +562,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -551,7 +580,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -569,7 +598,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -587,7 +616,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -605,7 +634,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -623,7 +652,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -641,7 +670,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -659,7 +688,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -677,7 +706,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -695,7 +724,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 50 columnWidth: 50
}, },
{ {
@ -713,7 +742,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -731,10 +760,26 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
} }
], ],
queryTable:{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6008Table",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6008Table",
status: true,
languageCode: this.$i18n.locale
},
// table
userColumnList: [],
} }
}, },
mounted() { mounted() {
@ -943,9 +988,94 @@
}); });
}, },
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6008Table",
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.columnList = data.rows;
} else {
this.getColumnList()
}
})
},
//
async saveColumnList() {
//
if (this.userColumnList) {
// user
await removerUser(this.queryTable)
}
//
await removerDefault(this.queryTable)
// table
let sumColumnList = this.columnList;//concat(this.columnList1);
sumColumnList = sumColumnList.map(item => {
return item = {
tableId: item.tableId,
tableName: item.tableName,
columnProp: item.columnProp,
columnLabel: item.columnLabel,
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: item.columnWidth,
format: item.format,
functionId: this.$route.meta.menuId,
sortLv: item.sortLv,
status: true,
fixed: item.fixed,
serialNumber: item.serialNumber,
columnType: item.columnType,
align: item.align
}
})
await saveTableDefaultList(sumColumnList)
// button label title
/* let buttons = this.buttonList.map(item => {
return item = {
functionId: this.$route.meta.menuId,
languageValue: item.languageValue,
objectId: item.objectId,
objectType: item.objectType,
tableId: item.tableId
}
})
await saveButtonList(buttons)*/
this.getFunctionButtonList()
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
}, },
created() { created() {
//
this.getTableUserColumn();
} }
} }
</script> </script>

2
src/views/modules/schedule/order_schedule_expand.vue

@ -1120,7 +1120,7 @@ export default {
// //
this.getShopOrderList(); this.getShopOrderList();
// //
this.get
this.getTableUserColumn();
}, },
/*利用监听器处理大小写*/ /*利用监听器处理大小写*/

223
src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue

@ -86,6 +86,8 @@
class="el-button el-button--primary el-button--medium"> class="el-button el-button--primary el-button--medium">
{{ buttons.download }} {{ buttons.download }}
</download-excel> </download-excel>
<el-button @click="userSetting" style="margin-left: 28px;" type="primary">{{ buttons.settingTable }}</el-button>
<el-button v-if="showDefault" @click="saveColumnList()" type="primary">{{ buttons.defaultTable }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -117,11 +119,26 @@
</el-table> </el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
</div> </div>
</template> </template>
<script> <script>
import Chooselist from '@/views/modules/common/Chooselist'
import Chooselist from '@/views/modules/common/Chooselist';
import column from '@/views/modules/common/column';/*动态表头*/
/*动态表头*/
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js";
import { import {
searchProductionDispatchList, searchProductionDispatchList,
cancelScheduleWithScheduleQuery, cancelScheduleWithScheduleQuery,
@ -144,6 +161,8 @@
data() { data() {
return { return {
tagNo:'', tagNo:'',
showDefault: false,
visible: false,
// start // start
exportData: [], exportData: [],
exportName: "生产派工单"+this.dayjs().format('YYYYMMDDHHmmss'), exportName: "生产派工单"+this.dayjs().format('YYYYMMDDHHmmss'),
@ -184,8 +203,19 @@
}, },
dataList:[], dataList:[],
dataListLoading: false, dataListLoading: false,
buttons:{
download:'导出',
buttons: {
settingLanguageList: '按语言设置',
edit: '编辑',
delete: '删除',
deleteList: '批量删除',
cz: '操作',
search: '查询',
download: '导出',
settingTable: '设置列表',
defaultTable: '设置默认配置',
list: "列表",
addList: '批量添加',
settingLanguage: "按控件设置"
}, },
columnList: [ columnList: [
{ {
@ -203,7 +233,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -221,7 +251,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -239,7 +269,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -257,7 +287,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -275,7 +305,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -293,7 +323,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -311,7 +341,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -329,7 +359,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -347,7 +377,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -365,7 +395,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -383,7 +413,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -401,7 +431,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -419,7 +449,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -437,7 +467,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -455,7 +485,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -473,7 +503,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -491,7 +521,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -509,7 +539,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -527,7 +557,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -545,7 +575,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -563,7 +593,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -581,7 +611,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -599,7 +629,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -617,7 +647,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -635,7 +665,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -653,7 +683,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -671,7 +701,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -689,7 +719,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -707,7 +737,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -725,7 +755,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -743,7 +773,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -761,7 +791,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -779,7 +809,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -797,7 +827,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -815,7 +845,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -833,7 +863,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 60 columnWidth: 60
}, },
{ {
@ -851,7 +881,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -869,7 +899,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -887,7 +917,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -905,14 +935,31 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
} }
], ],
queryTable:{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6023Table",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6023Table",
status: true,
languageCode: this.$i18n.locale
},
// table
userColumnList: [],
} }
}, },
components: { components: {
Chooselist
Chooselist,
column,/*动态列*/
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
@ -1045,9 +1092,97 @@
}); });
}, },
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6023Table",
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.columnList = data.rows;
} else {
this.getColumnList()
}
})
},
//
async saveColumnList() {
//
if (this.userColumnList) {
// user
await removerUser(this.queryTable)
}
//
await removerDefault(this.queryTable)
// table
let sumColumnList = this.columnList;//concat(this.columnList1);
sumColumnList = sumColumnList.map(item => {
return item = {
tableId: item.tableId,
tableName: item.tableName,
columnProp: item.columnProp,
columnLabel: item.columnLabel,
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: item.columnWidth,
format: item.format,
functionId: this.$route.meta.menuId,
sortLv: item.sortLv,
status: true,
fixed: item.fixed,
serialNumber: item.serialNumber,
columnType: item.columnType,
align: item.align
}
})
await saveTableDefaultList(sumColumnList)
// button label title
/* let buttons = this.buttonList.map(item => {
return item = {
functionId: this.$route.meta.menuId,
languageValue: item.languageValue,
objectId: item.objectId,
objectType: item.objectType,
tableId: item.tableId
}
})
await saveButtonList(buttons)*/
this.getFunctionButtonList()
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
}, },
created() { created() {
//
this.getTableUserColumn();
} }
} }
</script> </script>

1
src/views/modules/shopOrder/shopOrder/common/tool_add_and_edit.vue

@ -198,7 +198,6 @@
this.selectRow.createdBy = this.username; this.selectRow.createdBy = this.username;
insertShopOrderToolData(this.selectRow).then(({data}) => { insertShopOrderToolData(this.selectRow).then(({data}) => {
if (data.code == 200) { if (data.code == 200) {
debugger;
this.$message.success(data.msg); this.$message.success(data.msg);
// //
this.closeDialog(); this.closeDialog();

235
src/views/modules/shopOrder/shopOrder/searchShopOrder.vue

@ -110,6 +110,8 @@
class="el-button el-button--primary el-button--medium"> class="el-button el-button--primary el-button--medium">
{{ buttons.download }} {{ buttons.download }}
</download-excel> </download-excel>
<el-button @click="userSetting" style="margin-left: 10px;" type="primary">{{ buttons.settingTable }}</el-button>
<el-button v-if="showDefault" @click="saveColumnList()" type="primary">{{ buttons.defaultTable }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -143,11 +145,25 @@
</el-form> </el-form>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
</div> </div>
</template> </template>
<script> <script>
import Chooselist from '@/views/modules/common/Chooselist'
import Chooselist from '@/views/modules/common/Chooselist';
import column from '@/views/modules/common/column';/*动态表头*/
/*动态表头*/
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js";
import { import {
searchShopOrder searchShopOrder
} from "@/api/shopOrder/shopOrder.js" } from "@/api/shopOrder/shopOrder.js"
@ -156,11 +172,14 @@
//- //-
name: "searchShopOrder", name: "searchShopOrder",
components: { components: {
Chooselist
Chooselist,
column,/*动态列*/
}, },
data() { data() {
return { return {
tagNo:'', tagNo:'',
showDefault: false,
visible: false,
// start // start
exportData: [], exportData: [],
exportName: "查询生产订单"+this.dayjs().format('YYYYMMDDHHmmss'), exportName: "查询生产订单"+this.dayjs().format('YYYYMMDDHHmmss'),
@ -198,8 +217,19 @@
}, },
dataList:[], dataList:[],
dataListLoading: false, dataListLoading: false,
buttons:{
download:'导出',
buttons: {
settingLanguageList: '按语言设置',
edit: '编辑',
delete: '删除',
deleteList: '批量删除',
cz: '操作',
search: '查询',
download: '导出',
settingTable: '设置列表',
defaultTable: '设置默认配置',
list: "列表",
addList: '批量添加',
settingLanguage: "按控件设置"
}, },
columnList: [ columnList: [
{ {
@ -217,7 +247,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -235,7 +265,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -253,7 +283,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -271,7 +301,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -289,7 +319,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -307,7 +337,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -325,7 +355,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -343,7 +373,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 60 columnWidth: 60
}, },
{ {
@ -361,7 +391,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 60 columnWidth: 60
}, },
{ {
@ -379,7 +409,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -397,7 +427,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -415,7 +445,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -433,7 +463,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -451,7 +481,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 60 columnWidth: 60
}, },
{ {
@ -469,7 +499,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -487,7 +517,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -505,7 +535,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -523,7 +553,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -541,7 +571,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 60 columnWidth: 60
}, },
{ {
@ -559,7 +589,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -577,7 +607,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -595,7 +625,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -613,7 +643,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 60 columnWidth: 60
}, },
{ {
@ -631,7 +661,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -649,7 +679,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -667,7 +697,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -685,7 +715,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -703,7 +733,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -721,7 +751,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -739,7 +769,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -757,7 +787,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 150 columnWidth: 150
}, },
{ {
@ -775,7 +805,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -793,7 +823,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -811,7 +841,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -829,7 +859,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -847,7 +877,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -865,7 +895,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -883,7 +913,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -901,7 +931,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -919,7 +949,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -937,7 +967,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -955,7 +985,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -973,7 +1003,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -991,7 +1021,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 80 columnWidth: 80
}, },
{ {
@ -1009,7 +1039,7 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
}, },
{ {
@ -1027,10 +1057,26 @@
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 160 columnWidth: 160
} }
], ],
queryTable:{
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6028Table",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6028Table",
status: true,
languageCode: this.$i18n.locale
},
// table
userColumnList: [],
} }
}, },
watch: { watch: {
@ -1151,9 +1197,96 @@
return s return s
}, },
// end // end
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "6028Table",
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.columnList = data.rows;
} else {
this.getColumnList()
}
})
},
//
async saveColumnList() {
//
if (this.userColumnList) {
// user
await removerUser(this.queryTable)
}
//
await removerDefault(this.queryTable)
// table
let sumColumnList = this.columnList;//concat(this.columnList1);
sumColumnList = sumColumnList.map(item => {
return item = {
tableId: item.tableId,
tableName: item.tableName,
columnProp: item.columnProp,
columnLabel: item.columnLabel,
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: item.columnWidth,
format: item.format,
functionId: this.$route.meta.menuId,
sortLv: item.sortLv,
status: true,
fixed: item.fixed,
serialNumber: item.serialNumber,
columnType: item.columnType,
align: item.align
}
})
await saveTableDefaultList(sumColumnList)
// button label title
/* let buttons = this.buttonList.map(item => {
return item = {
functionId: this.$route.meta.menuId,
languageValue: item.languageValue,
objectId: item.objectId,
objectType: item.objectType,
tableId: item.tableId
}
})
await saveButtonList(buttons)*/
this.getFunctionButtonList()
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
}, },
created() { created() {
//
this.getTableUserColumn();
} }
} }
</script> </script>

22
src/views/modules/yieldReport/order_transform_part.vue

@ -144,7 +144,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -162,7 +162,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -180,7 +180,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -198,7 +198,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 70 columnWidth: 70
}, },
{ {
@ -216,7 +216,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 70 columnWidth: 70
}, },
{ {
@ -234,7 +234,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -252,7 +252,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 300 columnWidth: 300
}, },
{ {
@ -270,7 +270,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 100 columnWidth: 100
}, },
{ {
@ -288,7 +288,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 70 columnWidth: 70
}, },
{ {
@ -306,7 +306,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 120 columnWidth: 120
}, },
{ {
@ -324,7 +324,7 @@ export default {
columnSortable: false, columnSortable: false,
sortLv: 0, sortLv: 0,
status: true, status: true,
fixed: false,
fixed: '',
columnWidth: 70 columnWidth: 70
}, },
], ],

Loading…
Cancel
Save