| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <template>
- <div class="ele-body">
- <el-card shadow="never" v-loading="loading">
- <order-search @search="reload" ref="searchRef"> </order-search>
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
-
- >
-
-
- <!-- 操作列 -->
- <template v-slot:toolbar>
- <el-button type="success" @click="open()">新建</el-button>
- </template>
- <template v-slot:action="{ row }">
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-truck"
- v-if="row.status == 0"
- @click="open(row)"
- >
- 编辑
- </el-link>
- <el-popconfirm
- class="ele-action"
- title="确定要删除吗?"
- v-if="row.status == 0"
- @confirm="remove(row)"
- >
- <template v-slot:reference>
- <el-link type="danger" :underline="false" icon="el-icon-delete">
- 删除
- </el-link>
- </template>
- </el-popconfirm>
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-edit"
- @click="detail(row)"
- >
- 处置
- </el-link>
- </template>
- </ele-pro-table>
- </el-card>
- <Create ref="create" @refresh="reload" />
- </div>
- </template>
-
- <script>
- import OrderSearch from './components/order-search.vue';
- import dictMixins from '@/mixins/dictMixins';
- import { unacceptedProductStatus } from '@/utils/util';
- import Create from './components/create';
-
- import { getList,deleteUnacceptedProduct } from '@/api/unacceptedProduct/index';
- export default {
- components: {
- OrderSearch,
- Create
- },
- mixins: [dictMixins],
- data() {
- return {
- visible: false,
- loading: false,
- releasParams: {
- teamId: '',
- id: ''
- },
-
- current: null
- };
- },
- computed: {
- // 表格列配置
- columns() {
- return [
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'code',
- label: '编码',
- align: 'center'
- },
- {
- prop: 'unqualifiedSourceCode',
- label: '来源编码',
- align: 'center'
- },
- {
- prop: 'batchNo',
- label: '批次号',
- align: 'center'
- },
- {
- prop: 'unqualifiedQuantity',
- label: '数量',
- align: 'center'
- },
- {
- prop: 'produceRoutingName',
- label: '工艺路线',
- align: 'center'
- },
- {
- prop: 'produceTaskName',
- label: '工序',
- align: 'center'
- },
-
- {
- prop: 'createTime',
- label: '创建时间',
- align: 'center'
- },
- {
- prop: 'reviewerName',
- label: '创建人',
- align: 'center'
- },
- // {
- // prop: 'slottingType',
- // label: '状态',
- // align: 'center',
- // slot: 'SlottingType'
- // },
- {
- prop: 'status',
- label: '状态',
- align: 'center',
- formatter: (row, column, cellValue) => {
- return unacceptedProductStatus(cellValue);
- }
- },
-
- {
- columnKey: 'action',
- label: '操作',
- width: 240,
- align: 'center',
- resizable: false,
- fixed: 'right',
- slot: 'action',
- showOverflowTooltip: true
- }
- ];
- }
- },
- created() {
- },
- filters: {
-
- },
- methods: {
- //处置
- detail(row) {
- this.$router.push({
- path: '/unacceptedProduct/detailList',
- query: {
- id: row.id
- }
- });
- },
- /* 表格数据源 */
- datasource({ page, limit, where }) {
- return getList({
- pageNum: page,
- size: limit,
- ...where
- });
- },
- open(row) {
- this.$refs.create.open(row?JSON.parse(JSON.stringify(row)):'');
- },
- remove(row) {
- deleteUnacceptedProduct(row.id).then((res) => {
- this.$message.success('删除'+res);
- this.reload();
- });
- },
- // // 下达
- // toRelease(row) {
- // this.current = row;
- // this.visible = true;
- // },
- // // 下达
- // confirm(row) {
- // this.$confirm('确认下发选中的任务吗?', '提示', {
- // confirmButtonText: '确定',
- // cancleButtonText: '取消',
- // type: 'warning'
- // })
- // .then(async () => {
- // const res = await issuedPutMeshWorkOrder({
- // id: [row.id],
- // status: 1
- // });
- // this.$message.success('任务下发成功!');
- // this.reload();
- // })
- // .catch(() => {});
- // },
- /* 刷新表格 */
- reload(where) {
- this.$nextTick(() => {
- this.$refs.table.reload({ page: 1, where });
- });
- }
- }
- };
- </script>
-
- <style lang="scss" scoped></style>
|