Browse Source

部分需求更改

cz 1 year ago
parent
commit
a5151d2765

+ 1 - 1
src/components/headerBar/header-bar.vue

@@ -454,7 +454,7 @@ const handleTabChange = (val) => {
     nextTick(() => {
       proxy.$refs["appCode"].innerHTML = ""; //清除二维码方法一
       new QRCode(proxy.$refs["appCode"], {
-        text: "awawawawawawawawawawawawawawawawawaw",
+        text: "http://121.37.194.75:20011/download/sanfanApp.apk",
         width: 200,
         height: 200,
         colorDark: "#000000",

+ 25 - 23
src/directive/permission/hasPermi.js

@@ -1,28 +1,30 @@
  /**
- * v-hasPermi 操作权限处理
- * Copyright (c) 2019 ruoyi
- */
- 
-import useUserStore from '@/store/modules/user'
+  * v-hasPermi 操作权限处理
+  * Copyright (c) 2019 ruoyi
+  */
 
-export default {
-  mounted(el, binding, vnode) {
-    const { value } = binding
-    const all_permission = "*:*:*";
-    const permissions = useUserStore().permissions
+ import useUserStore from '@/store/modules/user'
 
-    if (value && value instanceof Array && value.length > 0) {
-      const permissionFlag = value
+ export default {
+   mounted(el, binding, vnode) {
+     const {
+       value
+     } = binding
+     const all_permission = "*:*:*";
+     const permissions = useUserStore().permissions
 
-      const hasPermissions = permissions.some(permission => {
-        return all_permission === permission || permissionFlag.includes(permission)
-      })
+     if (value && value instanceof Array && value.length > 0) {
+       const permissionFlag = value
 
-      if (!hasPermissions) {
-        el.parentNode && el.parentNode.removeChild(el)
-      }
-    } else {
-      throw new Error(`请设置操作权限标签值`)
-    }
-  }
-}
+       const hasPermissions = permissions.some(permission => {
+         return all_permission === permission || permissionFlag.includes(permission)
+       })
+
+       if (!hasPermissions) {
+         el.parentNode && el.parentNode.removeChild(el)
+       }
+     } else {
+       throw new Error(`请设置操作权限标签值`)
+     }
+   }
+ }

+ 7 - 12
src/layout/index.vue

@@ -70,23 +70,18 @@ const getAllDict = () => {
     .allDictMap()
     .then(() => {
       proxy
-        .get("/tenantDept/list", {
+        .post("/tenantUser/getUserCompanyList", {
           pageNum: 1,
           pageSize: 9999,
-          keyword: "",
-          tenantId: proxy.useUserStore().user.tenantId,
-          type: 0,
         })
         .then((res) => {
-          proxy.useUserStore().allDict["list_company_data"] = res.data.map(
-            (x) => ({
-              ...x,
-              label: x.deptName,
-              value: x.deptId,
-            })
-          );
+          proxy.useUserStore().allDict["list_company_data"] = res.map((x) => ({
+            ...x,
+            label: x.deptName,
+            value: x.deptId,
+          }));
           proxy.useUserStore().allDict["tree_company_data"] = proxy.handleTree(
-            res.data,
+            res,
             "deptId"
           );
         });

+ 21 - 9
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -386,9 +386,12 @@ const config = computed(() => {
     {
       attrs: {
         label: "销售价",
-        slot: "price",
+        prop: "price",
         width: 100,
       },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
     },
     // {
     //   attrs: {
@@ -589,15 +592,24 @@ const formConfig = computed(() => {
       },
     },
     {
-      type: "selectInput",
+      type: "number",
       prop: "price",
-      selectProp: "currency",
       label: "销售价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
       itemWidth: 50,
-      disabledSelect: true,
-      data: currencyData.value,
-      disabled: true,
     },
+    // {
+    //   type: "selectInput",
+    //   prop: "price",
+    //   selectProp: "currency",
+    //   label: "销售价",
+    //   itemWidth: 50,
+    //   disabledSelect: true,
+    //   data: currencyData.value,
+    //   disabled: true,
+    // },
     {
       type: "select",
       prop: "technologyId",
@@ -763,9 +775,9 @@ const openModal = () => {
     currency: "",
     prodFileList: [],
   };
-  if (currencyData.value && currencyData.value.length > 0) {
-    formData.data.currency = currencyData.value[0].dictKey;
-  }
+  // if (currencyData.value && currencyData.value.length > 0) {
+  //   formData.data.currency = currencyData.value[0].dictKey;
+  // }
 };
 
 const openExcel = () => {

+ 8 - 1
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -525,6 +525,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "业务公司",
+        prop: "ofCompanyName",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
         label: "工厂",
         prop: "companyName",
         width: 120,
@@ -579,7 +586,7 @@ const config = computed(() => {
       attrs: {
         label: "交期",
         slot: "deliveryTime",
-        width: 120,
+        width: 130,
       },
     },
     {

+ 9 - 6
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -73,10 +73,13 @@
                            @click="handleForeign(item)">转对外</el-button>
                 <el-button type="danger" text v-debounce v-if="item.status !=0 && item.status !=88"
                            @click="handleRepeal(item,'/saleQuotation/cancellation')">作废</el-button>
-                <el-button type="primary" text v-debounce @click="getConfirmDtl(item, false)">价格确认</el-button>
+                <span v-if="item.confirmStatus==0 && item.quotationStatus==2">
+                  <el-button type="primary" text v-debounce v-hasPermi="['quotation:price:confirm']"
+                             @click="getConfirmDtl(item, false)">价格确认</el-button>
+                </span>
               </span>
               <!-- <span v-if="item.status !=88">
-               v-if="item.confirmStatus==0"
+               
               </span> -->
             </div>
           </div>
@@ -616,12 +619,12 @@ const selectConfig = computed(() => {
       data: typeData.value,
     },
     {
-      label: "子公司报价状态",
+      label: "工厂报价状态",
       prop: "quotationStatus",
       data: quotationStatusData.value,
     },
     {
-      label: "报价子公司",
+      label: "报价工厂",
       prop: "companyId",
       data: companyData.value,
     },
@@ -672,7 +675,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "报价子公司",
+        label: "报价工厂",
         prop: "companyName",
         width: 100,
       },
@@ -686,7 +689,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "子公司报价状态",
+        label: "工厂报价状态",
         slot: "quotationStatus",
         width: 130,
       },

+ 3 - 3
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -497,7 +497,7 @@ const selectConfig = computed(() => {
       data: statusData.value,
     },
     {
-      label: "子公司报价状态",
+      label: "工厂报价状态",
       prop: "quotationStatus",
       data: quotationStatusData.value,
     },
@@ -530,7 +530,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "子公司报价状态",
+        label: "工厂报价状态",
         slot: "quotationStatus",
         width: 130,
       },
@@ -574,7 +574,7 @@ const config = computed(() => {
         return [
           row.quotationStatus < 2 &&
           row.status == 30 &&
-          proxy.isCurrentCompanyData(row.ofCompanyId)
+          proxy.isCurrentCompanyData(row.companyId)
             ? {
                 attrs: {
                   label: "报价",

+ 56 - 20
src/views/MES/processScheduling/index.vue

@@ -237,6 +237,21 @@ const isOverdueData = ref([
   },
 ]);
 
+const contractTypeData = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "常规订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "出口退税订单",
+  },
+]);
+
 const selectConfig = computed(() => [
   // {
   //   label: "工厂",
@@ -314,6 +329,23 @@ const config = ref([
   // },
   {
     attrs: {
+      label: "是否逾期",
+      slot: "isOverdue",
+      width: 80,
+    },
+  },
+  {
+    attrs: {
+      label: "订单类型",
+      prop: "contractType",
+      width: 100,
+    },
+    render(val) {
+      return proxy.dictKeyValue(val, contractTypeData.value);
+    },
+  },
+  {
+    attrs: {
       label: "工厂",
       prop: "companyName",
       width: 100,
@@ -402,13 +434,6 @@ const config = ref([
   },
   {
     attrs: {
-      label: "是否逾期",
-      slot: "isOverdue",
-      width: 80,
-    },
-  },
-  {
-    attrs: {
       label: "生产指示",
       slot: "prodTag",
       "min-width": 220,
@@ -519,7 +544,7 @@ const formConfig = computed(() => {
     {
       type: "slot",
       slotName: "addList",
-      label: "排程列表",
+      label: "排程明细",
       isShow: modalType.value == "add",
     },
   ];
@@ -659,6 +684,7 @@ const deleteRecord = () => {
         .then((res) => {
           proxy.msgTip("操作成功", 1);
           getList();
+          getRightData();
           dialogVisible.value = false;
         });
     })
@@ -667,19 +693,29 @@ const deleteRecord = () => {
 
 const submitForm = () => {
   formDom.value.handleSubmit((valid) => {
-    submitLoading.value = true;
-    proxy.post("/productionScheduling/" + modalType.value, formData.data).then(
-      (res) => {
-        proxy.msgTip("操作成功", 1);
-        dialogVisible.value = false;
-        submitLoading.value = false;
-        getList();
-        getRightData();
-      },
-      (err) => {
-        submitLoading.value = false;
+    if (modalType.value == "add") {
+      if (!(formData.data.list && formData.data.list.length > 0)) {
+        return proxy.msgTip("请添加排程明细", 2);
       }
-    );
+    }
+    submitLoading.value = true;
+    proxy
+      .post(
+        "/productionScheduling/" + modalType.value,
+        modalType.value == "add" ? formData.data.list : formData.data
+      )
+      .then(
+        (res) => {
+          proxy.msgTip("操作成功", 1);
+          dialogVisible.value = false;
+          submitLoading.value = false;
+          getList();
+          getRightData();
+        },
+        (err) => {
+          submitLoading.value = false;
+        }
+      );
   });
 };
 

+ 29 - 1
src/views/MES/productionOrder/index.vue

@@ -317,7 +317,20 @@ const isOverdueData = ref([
     value: "0",
   },
 ]);
-
+const contractTypeData = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "常规订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "出口退税订单",
+  },
+]);
 const selectConfig = computed(() => [
   // {
   //   label: "工厂",
@@ -328,6 +341,11 @@ const selectConfig = computed(() => [
   //   },
   // },
   {
+    label: "订单类型",
+    prop: "contractType",
+    data: contractTypeData.value,
+  },
+  {
     label: "生产状态",
     prop: "produceStatus",
     data: statusData.value,
@@ -365,6 +383,16 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "订单类型",
+        prop: "contractType",
+        width: 100,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, contractTypeData.value);
+      },
+    },
+    {
+      attrs: {
         label: "订单号",
         slot: "code",
         width: 150,

+ 28 - 3
src/views/MES/productionTask/index.vue

@@ -389,6 +389,21 @@ const isOverdueData = ref([
   },
 ]);
 
+const contractTypeData = ref([
+  {
+    dictKey: "3",
+    dictValue: "打样订单",
+  },
+  {
+    dictKey: "2",
+    dictValue: "常规订单",
+  },
+  {
+    dictKey: "1",
+    dictValue: "出口退税订单",
+  },
+]);
+
 const selectConfig = computed(() => [
   {
     label: "工厂",
@@ -424,6 +439,13 @@ const selectConfig = computed(() => [
 ]);
 const config = ref([
   {
+    type: "selection",
+    attrs: {
+      checkAtt: "isCheck",
+      width: 60,
+    },
+  },
+  {
     attrs: {
       label: "是否逾期",
       slot: "isOverdue",
@@ -432,10 +454,13 @@ const config = ref([
     },
   },
   {
-    type: "selection",
     attrs: {
-      checkAtt: "isCheck",
-      width: 60,
+      label: "订单类型",
+      prop: "contractType",
+      width: 100,
+    },
+    render(val) {
+      return proxy.dictKeyValue(val, contractTypeData.value);
     },
   },
   {

+ 38 - 14
src/views/product/material/index.vue

@@ -281,16 +281,22 @@ const config = computed(() => {
     {
       attrs: {
         label: "成本价",
-        slot: "costPrice",
+        prop: "costPrice",
         width: 100,
       },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
     },
     {
       attrs: {
         label: "销售价",
-        slot: "price",
+        prop: "price",
         width: 100,
       },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
     },
 
     {
@@ -469,23 +475,41 @@ const formConfig = computed(() => {
       itemWidth: 50,
     },
     {
-      type: "selectInput",
+      type: "number",
       prop: "costPrice",
-      selectProp: "costCurrency",
       label: "成本价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
       itemWidth: 50,
-      disabledSelect: true,
-      data: currencyData.value,
     },
+    // {
+    //   type: "selectInput",
+    //   prop: "costPrice",
+    //   selectProp: "costCurrency",
+    //   label: "成本价",
+    //   itemWidth: 50,
+    //   disabledSelect: true,
+    //   data: currencyData.value,
+    // },
     {
-      type: "selectInput",
+      type: "number",
       prop: "price",
-      selectProp: "currency",
       label: "销售价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
       itemWidth: 50,
-      disabledSelect: true,
-      data: currencyData.value,
     },
+    // {
+    //   type: "selectInput",
+    //   prop: "price",
+    //   selectProp: "currency",
+    //   label: "销售价",
+    //   itemWidth: 50,
+    //   disabledSelect: true,
+    //   data: currencyData.value,
+    // },
     {
       type: "slot",
       slotName: "size",
@@ -538,10 +562,10 @@ const openModal = () => {
     definition: "2",
     fileList: [],
   };
-  if (currencyData.value && currencyData.value.length > 0) {
-    formData.data.currency = currencyData.value[0].dictKey;
-    formData.data.costCurrency = currencyData.value[0].dictKey;
-  }
+  // if (currencyData.value && currencyData.value.length > 0) {
+  //   formData.data.currency = currencyData.value[0].dictKey;
+  //   formData.data.costCurrency = currencyData.value[0].dictKey;
+  // }
 };
 
 const submitForm = () => {