lxf 1 жил өмнө
parent
commit
c5d2704ec9

+ 28 - 0
src/utils/flowStatus.js

@@ -0,0 +1,28 @@
+export function flowStatus(arr) {
+  let list = [
+    {
+      dictKey: 0,
+      dictValue: "未发起",
+    },
+    {
+      dictKey: 1,
+      dictValue: "进行中",
+    },
+    {
+      dictKey: 2,
+      dictValue: "已通过",
+    },
+    {
+      dictKey: 3,
+      dictValue: "已驳回",
+    },
+    {
+      dictKey: 4,
+      dictValue: "已作废",
+    },
+  ];
+  if (arr) {
+    list = list.concat(arr);
+  }
+  return list;
+}

+ 3 - 24
src/views/group/oa/loan-sheet/index.vue

@@ -28,30 +28,9 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { flowStatus } from "/src/utils/flowStatus";
 
 const { proxy } = getCurrentInstance();
-const flowStatus = ref([
-  {
-    dictKey: "-1",
-    dictValue: "草稿",
-  },
-  {
-    dictKey: "0",
-    dictValue: "未发起",
-  },
-  {
-    dictKey: "1",
-    dictValue: "进行中",
-  },
-  {
-    dictKey: "2",
-    dictValue: "已通过",
-  },
-  {
-    dictKey: "3",
-    dictValue: "已驳回",
-  },
-]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -75,7 +54,7 @@ const searchConfig = computed(() => {
     {
       type: "select",
       prop: "flowStatus",
-      data: flowStatus.value,
+      data: flowStatus(),
       label: "流程状态",
     },
     {
@@ -116,7 +95,7 @@ const config = computed(() => {
         width: 160,
       },
       render(val) {
-        return proxy.dictKeyValue(val, flowStatus.value);
+        return proxy.dictKeyValue(val, flowStatus());
       },
     },
     {

+ 5 - 30
src/views/group/oa/subscribe/index.vue

@@ -28,34 +28,9 @@
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import { flowStatus } from "/src/utils/flowStatus";
 
 const { proxy } = getCurrentInstance();
-const flowStatus = ref([
-  {
-    dictKey: "0",
-    dictValue: "未发起",
-  },
-  {
-    dictKey: "1",
-    dictValue: "进行中",
-  },
-  {
-    dictKey: "2",
-    dictValue: "已通过",
-  },
-  {
-    dictKey: "3",
-    dictValue: "已驳回",
-  },
-  {
-    dictKey: "4",
-    dictValue: "已作废",
-  },
-  {
-    dictKey: "10",
-    dictValue: "已采购",
-  },
-]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -79,7 +54,7 @@ const searchConfig = computed(() => {
     {
       type: "select",
       prop: "flowStatus",
-      data: flowStatus.value,
+      data: flowStatus([{ dictKey: 10, dictValue: "已采购" }]),
       label: "流程状态",
     },
     {
@@ -120,7 +95,7 @@ const config = computed(() => {
         width: 160,
       },
       render(val) {
-        return proxy.dictKeyValue(val, flowStatus.value);
+        return proxy.dictKeyValue(val, flowStatus([{ dictKey: 10, dictValue: "已采购" }]));
       },
     },
     {
@@ -194,7 +169,7 @@ const clickCode = (item) => {
     query: {
       flowKey: "apply_buy",
       flowName: "申购流程",
-      processType: '20',
+      processType: "20",
       id: item.id,
       flowId: item.flowId,
       random: proxy.random(),
@@ -207,7 +182,7 @@ const clickUpdate = (item) => {
     query: {
       flowKey: "apply_buy",
       flowName: "申购流程",
-      processType: '40',
+      processType: "40",
       id: item.id,
       random: proxy.random(),
     },

+ 28 - 27
src/views/group/order/management/index.vue

@@ -71,6 +71,13 @@
         <el-button type="primary" @click="submitChangeTaxRate()" size="large" v-preReClick>确 定</el-button>
       </template>
     </el-dialog>
+
+    <el-dialog title="售后类型" v-if="openAfterSale" v-model="openAfterSale" width="50%">
+      <template #footer>
+        <el-button type="primary" @click="applyForAfterSale(1)" size="large">退 货</el-button>
+        <el-button @click="applyForAfterSale(2)" size="large">换 货</el-button>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
@@ -78,6 +85,7 @@
 import byTable from "/src/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { copyText } from "vue3-clipboard";
+import { flowStatus } from "/src/utils/flowStatus";
 
 const { proxy } = getCurrentInstance();
 const props = defineProps({
@@ -85,28 +93,6 @@ const props = defineProps({
   departmentId: String,
 });
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
-const flowStatus = ref([
-  {
-    dictKey: 0,
-    dictValue: "未发起",
-  },
-  {
-    dictKey: 1,
-    dictValue: "进行中",
-  },
-  {
-    dictKey: 2,
-    dictValue: "已通过",
-  },
-  {
-    dictKey: 3,
-    dictValue: "已驳回",
-  },
-  {
-    dictKey: 4,
-    dictValue: "已作废",
-  },
-]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -195,7 +181,7 @@ const config = computed(() => {
         width: 120,
       },
       render(val) {
-        return proxy.dictKeyValue(val, flowStatus.value);
+        return proxy.dictKeyValue(val, flowStatus());
       },
     },
     {
@@ -367,7 +353,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 120,
+        width: 150,
         align: "center",
         fixed: "right",
       },
@@ -385,7 +371,18 @@ const config = computed(() => {
                   clickSelect(row);
                 },
               }
-            : row.status && row.status != 0
+            : {
+                attrs: {
+                  label: "售后",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickAfterSale(row);
+                },
+              },
+          !props.selectStatus && row.status && row.status != 0
             ? {
                 attrs: {
                   label: "税率",
@@ -398,7 +395,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          (row.status == 0 || row.status == 10 || row.status == 20) && !props.selectStatus
+          !props.selectStatus && (row.status == 0 || row.status == 10 || row.status == 20)
             ? {
                 attrs: {
                   label: "删除",
@@ -411,7 +408,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.status == 30 && !props.selectStatus
+          !props.selectStatus && row.status == 30
             ? {
                 attrs: {
                   label: "删除",
@@ -630,6 +627,10 @@ const clickCopyWLNCode = () => {
     });
   });
 };
+
+const clickAfterSale = (row) => {
+  console.log(row);
+};
 </script>
 
 <style lang="scss" scoped>

+ 3 - 20
src/views/group/purchase/contract/index.vue

@@ -248,27 +248,10 @@
 <script setup>
 import byTable from "/src/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
+import { flowStatus } from "/src/utils/flowStatus";
 
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
-const flowStatus = ref([
-  {
-    dictKey: 0,
-    dictValue: "未发起",
-  },
-  {
-    dictKey: 1,
-    dictValue: "进行中",
-  },
-  {
-    dictKey: 2,
-    dictValue: "已通过",
-  },
-  {
-    dictKey: 3,
-    dictValue: "已驳回",
-  },
-]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -317,7 +300,7 @@ const searchConfigTwo = computed(() => {
     {
       type: "select",
       prop: "flowStatus",
-      data: flowStatus.value,
+      data: flowStatus(),
       label: "流程状态",
     },
     {
@@ -413,7 +396,7 @@ const configTwo = computed(() => {
         width: 100,
       },
       render(val) {
-        return proxy.dictKeyValue(val, flowStatus.value);
+        return proxy.dictKeyValue(val, flowStatus());
       },
     },
     {