| | |
| | | storage: true |
| | | }, |
| | | sortConfig: { |
| | | multiple: true |
| | | multiple: true, |
| | | chronological: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | buttons: [{ |
| | | |
| | | }], |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | |
| | | |
| | | }) |
| | | const gridEventsRight = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGridLeft.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'sorting': { |
| | | request.post(`/processCard/selectSortingCard/${orderId}/${productionId}/${flashback.value}/${optionVal.value}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | maxProcseeId = res.data.maxFlowCard[0].process_id |
| | | orderOtherMoney.value = res.data.orderOtherMoney |
| | | |
| | | //已有的不添加 |
| | | const dynamicFields = orderOtherMoney.value.map(item => item.column) |
| | | gridOptions.columns = gridOptions.columns.filter(col => !dynamicFields.includes(col.field)) |
| | | |
| | | // 添加新的动态列 |
| | | orderOtherMoney.value.forEach(item => { |
| | | let column = { |
| | | field: `${item.column}`, |
| | | width: 100, |
| | | title: item.alias, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, |
| | | sortable: true |
| | | } |
| | | |
| | | gridOptions.columns.push(column) |
| | | |
| | | }) |
| | | produceList = res.data.data |
| | | produceList.forEach(item => { |
| | | |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | return; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | formSubmit () { |
| | | let form = gridOptions.formConfig.data |
| | | form.orderId =orderId |
| | |
| | | @checkbox-all="handleCheckboxChange" |
| | | @checkbox-range-end="handleCheckboxChange" |
| | | > |
| | | |
| | | <!-- 自定义 toolbar_buttons 插槽 --> |
| | | <template #toolbar_buttons="{ $grid }"> |
| | | |
| | | |
| | | <!-- 手动写出所有按钮 --> |
| | | |
| | | <el-select |
| | | :default-first-option="true" |
| | | ref="getSelect" style="width: 80px" |
| | | v-model="optionVal" |
| | | class="m-2" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-button |
| | | type="primary" |
| | | style="margin-right:8px;width: 50px" |
| | | @click="$grid.dispatchEvent('toolbar-button-click', { code: 'sorting' })" |
| | | > |
| | | {{ t('processCard.sorting') }} |
| | | </el-button> |
| | | |
| | | <el-checkbox |
| | | :model-value="flashback === 0" |
| | | @change="onFlashbackChange" |
| | | > |
| | | {{ t('processCard.flashback') }} |
| | | </el-checkbox> |
| | | |
| | | |
| | | </template> |
| | | |
| | | |
| | | |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |