| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {orderId: row.orderId}}) |
| | | break |
| | | } |
| | |
| | | |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = (isButtonDisabled) => { |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | checkboxConfig: { |
| | | labelField: 'name', |
| | | checkMethod: ({ row }) => { |
| | | return optionVal.value === '1' |
| | | } |
| | | }, |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {title: t('basicData.operate'), width: 110, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {field: 'orderId', title: t('order.orderId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | |
| | | ],//表头按钮 |
| | | data: null,//表格数据 |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | buttons: [ |
| | | {'code': 'transferOrder', 'name': t('workOrder.transferOrder'),status: 'primary'} |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | |
| | | } |
| | | |
| | | }) |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'transferOrder': { |
| | | const idList = [] |
| | | $grid.getCheckboxRecords().forEach(item => { |
| | | idList.push(item.orderId) |
| | | }) |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {orderId:idList.join(',')}}) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getFirst() |
| | |
| | | |
| | | /> |
| | | |
| | | <el-select :default-first-option="true" ref="getSelect" style="width: 130px" v-model="optionVal" class="m-2" |
| | | <el-select |
| | | :default-first-option="true" |
| | | ref="getSelect" style="width: 130px" |
| | | v-model="optionVal" |
| | | class="m-2" |
| | | @change="getWorkOrder" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | |
| | | </el-select> |
| | | |
| | | <el-button |
| | | @click="getWorkOrder(isButtonDisabled)" |
| | | @click="getWorkOrder" |
| | | :disabled="isButtonDisabled" |
| | | id="select" |
| | | type="primary" :icon="Search">{{$t('basicData.search')}} |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <!-- <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0" @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('workOrder.transferOrder')}}</el-button>--> |
| | | <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0" |
| | | @click="getTableRow(row,'edit')" |
| | | v-if="userStore.user.permissions.indexOf('SelectWorkOrder.edit') > -1" |
| | | link |
| | | type="primary" |
| | | size="small"> |
| | | {{$t('workOrder.transferOrder')}} |
| | | </el-button> |
| | | <!-- <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0"--> |
| | | <!-- @click="getTableRow(row,'edit')"--> |
| | | <!-- v-if="userStore.user.permissions.indexOf('SelectWorkOrder.edit') > -1"--> |
| | | <!-- link--> |
| | | <!-- type="primary"--> |
| | | <!-- size="small">--> |
| | | <!-- {{$t('workOrder.transferOrder')}}--> |
| | | <!-- </el-button>--> |
| | | |
| | | <!-- <el-button :class="{disable: optionVal== 1}" :disabled="optionVal == 1" @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>--> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |