diff --git a/src/api/base/groupTeam.js b/src/api/base/groupTeam.js index 32d752aa..040368e6 100644 --- a/src/api/base/groupTeam.js +++ b/src/api/base/groupTeam.js @@ -59,6 +59,15 @@ export function listEnabled() { }) } +// 获得可用的排班列表(根据车间筛选) +export function listEnabledByRoom(query) { + return request({ + url: '/base/group-team/listEnabledByRoom', + method: 'get', + params: query + }) +} + // 获得班组组员信息分页 export function groupTeamPage(query) { return request({ diff --git a/src/utils/dict.js b/src/utils/dict.js index 9c500f2e..17c0aef2 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -96,6 +96,7 @@ export const DICT_TYPE = { TIME_DIM: 'time_dim', TABLE_NAME: 'table_name', METHOD: 'method', + PUSH: 'push', // ============== ORDER - 订单模块 ============= ORDER_STATUS: 'order_status', @@ -109,7 +110,10 @@ export const DICT_TYPE = { FAULT_LEVEL: 'fault-level', // ============== ENVIRONMENTAL - 环保模块 ============= - ENVIRONMENT_CHECK_UNIT: 'environment_check_unit' + ENVIRONMENT_CHECK_UNIT: 'environment_check_unit', + + // ============== GROUP - 班组模块 ============= + WORK_SHOP: 'workshop' } /** diff --git a/src/views/energy/base/energyType/components/energyTypeAdd.vue b/src/views/energy/base/energyType/components/energyTypeAdd.vue index 0e9a9342..434f06f3 100644 --- a/src/views/energy/base/energyType/components/energyTypeAdd.vue +++ b/src/views/energy/base/energyType/components/energyTypeAdd.vue @@ -93,7 +93,12 @@ - + + + + + + @@ -149,7 +154,8 @@ export default { code: '', nuit: '', pricingMethod: 2, - leaderName: '' + leaderName: '', + push: false }, isEdit: false, //是否是编辑 rules: { @@ -178,18 +184,24 @@ export default { this.form.id = id getEnergyType( id ).then((res) => { if (res.code === 0) { - this.form = res.data + this.form.name = res.data.name + this.form.code = res.data.code + this.form.nuit = res.data.nuit + this.form.pricingMethod = res.data.pricingMethod + this.form.leaderName = res.data.leaderName + this.form.push = res.data.push ? true : false switch(this.form.pricingMethod) { case 0: - this.tableData1 = this.form.segPriceList + this.tableData1 = this.form.segPriceList || [] break; case 1: - this.tableData2 = this.form.usedPriceList + this.tableData2 = this.form.usedPriceList || [] break; default: } } }) + console.log(this.form) } else { this.isEdit = false this.form.id = '' @@ -288,6 +300,7 @@ export default { return false } } + console.log(this.form) if (this.isEdit) { // 编辑 updateEnergyType({ @@ -300,7 +313,8 @@ export default { dim: this.form.pricingMethod === 1 ? this.form.dim: '', singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '', segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [], - usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [] + usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [], + push:this.form.push ? 1 : 0 }).then((res) => { if (res.code === 0) { this.$modal.msgSuccess("操作成功"); @@ -317,7 +331,8 @@ export default { dim: this.form.pricingMethod === 1 ? this.form.dim: '', singlePrice: this.form.pricingMethod === 2 ? this.form.singlePrice : '', segPriceList: this.form.pricingMethod === 0 ? this.tableData1: [], - usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [] + usedPriceList: this.form.pricingMethod === 1 ? this.tableData2: [], + push:this.form.push ? 1 : 0 }).then((res) => { if (res.code === 0) { this.$modal.msgSuccess("操作成功"); diff --git a/src/views/energy/base/energyType/index.vue b/src/views/energy/base/energyType/index.vue index 57fa05f1..5b387ebc 100644 --- a/src/views/energy/base/energyType/index.vue +++ b/src/views/energy/base/energyType/index.vue @@ -52,7 +52,8 @@ const tableProps = [ { prop: 'code', label: '类型编码', - showOverflowtooltip: true + showOverflowtooltip: true, + minWidth: 150 }, { prop: 'name', @@ -67,6 +68,11 @@ const tableProps = [ prop: 'pricingMethod', label: '计价方式' }, + { + prop: 'push', + label: '是否推送', + filter: publicFormatter('push') + }, { prop: 'price', label: '价格(元)', diff --git a/src/views/group/base/groupClasses/components/groupClassAdd.vue b/src/views/group/base/groupClasses/components/groupClassAdd.vue index 628bf6b4..5cf0c00d 100644 --- a/src/views/group/base/groupClasses/components/groupClassAdd.vue +++ b/src/views/group/base/groupClasses/components/groupClassAdd.vue @@ -1,18 +1,30 @@ + \ No newline at end of file diff --git a/src/views/group/base/groupTeamScheduling/index.vue b/src/views/group/base/groupTeamScheduling/index.vue index 54800965..184c6d8e 100644 --- a/src/views/group/base/groupTeamScheduling/index.vue +++ b/src/views/group/base/groupTeamScheduling/index.vue @@ -1,5 +1,6 @@