| | |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import BasicTable from '@/components/sd/product/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | let router = useRouter() |
| | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let state = optionVal.value |
| | | console.log(startTime, endTime, state) |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.productionId}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | //location.reload(); |
| | | router.push({path: '/main/workOrder/SelectWorkOrder', query: {startTime:startTime,endTime:endTime,state:state,random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | router.push({path: '/main/workOrder/SelectWorkOrder', query: {startTime:startTime,endTime:endTime,state:state,random:Math.random()}}) |
| | | } else { |
| | | |
| | | ElMessage.warning(t('workOrder.deleteNo')) |
| | | |
| | | } |
| | | }) |
| | | break |
| | | } |
| | |
| | | , width: 130 |
| | | }, |
| | | {field: 'order.batch', title: t('order.batch'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'order.project', title: '项目名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'order.orderType', title: '订单类型', showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.grossArea', title: '面积', width: 70}, |
| | | {field: 'orderDetail.quantity', title: '数量',}, |
| | | {field: 'order.creator', title: '创建人',}, |
| | | {field: 'order.project', title: t('order.project'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'order.orderType', title: t('order.orderType'), showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.grossArea', title: t('order.grossArea'), width: 70}, |
| | | {field: 'orderDetail.quantity', title: t('order.quantity'),}, |
| | | {field: 'order.creator', title: t('order.creator'),}, |
| | | ],//表头按钮 |
| | | data: null,//表格数据 |
| | | toolbarConfig: { |
| | |
| | | custom: true |
| | | }, |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '', ''] |
| | | return [ |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["orderDetail.grossArea",'orderDetail.quantity'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <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== 1}" :disabled="optionVal == 1" @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>--> |
| | | <!-- <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== 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')"> |
| | | <template #reference> |
| | | <el-button :class="{disable: optionVal== 1}" :disabled="optionVal == 1" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |