| | |
| | | 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' |
| | | //语言获取 |
| | |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.orderDetail.productName}`).then((res) => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let state = optionVal.value |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.productionId}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | location.reload(); |
| | | //location.reload(); |
| | | router.push({path: '/main/workOrder/SelectWorkOrder', query: {startTime:startTime,endTime:endTime,state:state,random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | function padLeftZero(str) { |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | |
| | | //定义时间 |
| | |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | //获取3天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | //第一次加载获取近3天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let state = optionVal.value |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${state}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | //筛选时查询 |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | |
| | | , width: 130 |
| | | }, |
| | | {field: 'order.batch', title: t('order.batch'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'orderDetail.productName', title: t('order.product'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'orderDetail.computeArea', title: t('order.area'), showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.quantity', title: t('order.quantity'), width: 70}, |
| | | {field: 'orderDetail.computeGrossArea', title: t('order.trueGrossArea'),}, |
| | | {field: 'orderDetail.perimeter', title: t('workOrder.perimeter'), showOverflow: "ellipsis"}, |
| | | {field: 'orderDetail.bendRadius', title: t('order.trueGrossArea'),}, |
| | | {field: 'orderDetail.processingNote', title: t('order.processingNote'),} |
| | | {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: '创建人',}, |
| | | ],//表头按钮 |
| | | data: null,//表格数据 |
| | | toolbarConfig: { |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <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== 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> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |