123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <el-card class="box-card">
- <byTable
- :source="sourceList.data"
- :pagination="sourceList.pagination"
- :config="config"
- :loading="loading"
- :searchConfig="searchConfig"
- highlight-current-row
- @get-list="getList"
- @clickReset="clickReset">
- </byTable>
- </el-card>
- </template>
- <script setup name="Draft-design-management">
- import byTable from "/src/components/byTable/index";
- const { proxy } = getCurrentInstance();
- const statusList = ref([
- {
- dictKey: 0,
- dictValue: "待制作",
- },
- {
- dictKey: 1,
- dictValue: "待确认",
- },
- {
- dictKey: 2,
- dictValue: "已驳回",
- },
- {
- dictKey: 3,
- dictValue: "已确认",
- },
- ]);
- const sourceList = ref({
- data: [],
- pagination: {
- total: 0,
- pageNum: 1,
- pageSize: 10,
- status: "",
- },
- });
- const loading = ref(false);
- const searchConfig = computed(() => {
- return [
- {
- type: "select",
- prop: "status",
- label: "图稿状态",
- data: statusList.value,
- },
- ];
- });
- const config = computed(() => {
- return [
- {
- attrs: {
- label: "订单号",
- prop: "orderCode",
- },
- },
- {
- attrs: {
- label: "图稿状态",
- prop: "status",
- },
- render(val) {
- return proxy.dictKeyValue(val, statusList.value);
- },
- },
- {
- attrs: {
- label: "SKU品号",
- prop: "skuSpecCode",
- },
- },
- {
- attrs: {
- label: "主材品号",
- prop: "bomSpecCode",
- },
- },
- {
- attrs: {
- label: "下单时间",
- prop: "orderCreateTime",
- },
- },
- {
- attrs: {
- label: "图稿确认时间",
- prop: "artworkConfirmTime",
- },
- },
- {
- attrs: {
- label: "操作",
- width: 120,
- align: "center",
- fixed: "right",
- },
- renderHTML(row) {
- return [
- {
- attrs: {
- label: "详情",
- type: "primary",
- text: true,
- },
- el: "button",
- click() {
- clickDetail(row);
- },
- },
- ];
- },
- },
- ];
- });
- const getList = async (req, status) => {
- if (status) {
- sourceList.value.pagination = {
- pageNum: sourceList.value.pagination.pageNum,
- pageSize: sourceList.value.pagination.pageSize,
- };
- } else {
- sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
- }
- loading.value = true;
- proxy.post("/orderSkuArtworkMake/page", sourceList.value.pagination).then((res) => {
- sourceList.value.data = res.rows;
- sourceList.value.pagination.total = res.total;
- setTimeout(() => {
- loading.value = false;
- }, 200);
- });
- };
- getList();
- const clickReset = () => {
- getList("", true);
- };
- const clickDetail = (row) => {
- proxy.$router.replace({
- path: "/draft-design-drawing",
- query: {
- id: row.id,
- random: proxy.random(),
- },
- });
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep(.el-input-number .el-input__inner) {
- text-align: left;
- }
- </style>
|