Explorar el Código

0.5部分需求

cz hace 1 año
padre
commit
0e79b33faa

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 716 - 108
src/components/process/SendFunds.vue


+ 45 - 22
src/components/product/SelectGoods.vue

@@ -2,6 +2,7 @@
   <div>
     <byTable
       ref="table"
+      :tableHeight="tableHeight"
       :source="sourceList.data"
       :pagination="sourceList.pagination"
       :config="config"
@@ -9,18 +10,28 @@
       highlight-current-row
       :selectConfig="selectConfig"
       :action-list="[]"
-      @get-list="getList">
+      @get-list="getList"
+    >
     </byTable>
     <div>
       <div>已选择货品</div>
       <div style="margin: 10px 0px">
-        <el-tag style="margin-right: 10px" type="info" closable v-for="(good, index) in goodList" :key="good.id" @close="handleRemove(index)">
+        <el-tag
+          style="margin-right: 10px; margin-bottom: 5px"
+          type="info"
+          closable
+          v-for="(good, index) in goodList"
+          :key="good.id"
+          @close="handleRemove(index)"
+        >
           {{ good.name }}
         </el-tag>
       </div>
       <div style="text-align: center">
         <el-button @click="handleCancel" size="large">取 消</el-button>
-        <el-button type="primary" @click="handleSubmit" size="large">确 定</el-button>
+        <el-button type="primary" @click="handleSubmit" size="large"
+          >确 定</el-button
+        >
       </div>
     </div>
   </div>
@@ -31,6 +42,14 @@ import { ElMessage } from "element-plus";
 import byTable from "@/components/byTable/index";
 import { computed, ref } from "vue";
 
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 455;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
 const loading = ref(false);
 const sourceList = ref({
   data: [],
@@ -149,26 +168,30 @@ const getList = async (req = {}) => {
     ...req,
   };
   loading.value = true;
-  proxy.post("/productInfo/page", sourceList.value.pagination).then((message) => {
-    sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-    const productIdList = message.rows.map((x) => x.id);
-    if (productIdList.length > 0) {
-      proxy.post("/fileInfo/getList", { businessIdList: productIdList }).then((fileObj) => {
-        for (let i = 0; i < sourceList.value.data.length; i++) {
-          const e = sourceList.value.data[i];
-          for (const key in fileObj) {
-            if (e.id === key) {
-              e.fileList = fileObj[key];
+  proxy
+    .post("/productInfo/page", sourceList.value.pagination)
+    .then((message) => {
+      sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+      const productIdList = message.rows.map((x) => x.id);
+      if (productIdList.length > 0) {
+        proxy
+          .post("/fileInfo/getList", { businessIdList: productIdList })
+          .then((fileObj) => {
+            for (let i = 0; i < sourceList.value.data.length; i++) {
+              const e = sourceList.value.data[i];
+              for (const key in fileObj) {
+                if (e.id === key) {
+                  e.fileList = fileObj[key];
+                }
+              }
             }
-          }
-        }
-      });
-    }
-  });
+          });
+      }
+    });
 };
 getList();
 // 接收父组件的传值

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 643 - 130
src/views/finance/fundManage/funds/index.vue


+ 135 - 53
src/views/product/material/index.vue

@@ -7,7 +7,8 @@
         :data="treeListData"
         v-model="sourceList.pagination.productClassifyId"
         @change="treeChange"
-        @changeTreeList="getTreeList">
+        @changeTreeList="getTreeList"
+      >
       </treeList>
     </div>
     <div class="content">
@@ -38,18 +39,35 @@
                 disabled: false,
               },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
-            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+            <img
+              :src="item.fileList[0].fileUrl"
+              class="pic"
+              @click="handleClickFile(item.fileList[0])"
+            />
           </div>
           <div v-else></div>
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading" destroy-on-close>
+    <el-dialog
+      :title="modalType == 'add' ? '添加' : '编辑'"
+      v-model="dialogVisible"
+      width="500"
+      v-loading="loading"
+      destroy-on-close
+    >
       <div class="public_height_dialog">
-        <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
+        <byForm
+          :formConfig="formConfig"
+          :formOption="formOption"
+          v-model="formData.data"
+          :rules="rules"
+          ref="byform"
+        >
           <template #productPic>
             <div>
               <el-upload
@@ -59,7 +77,8 @@
                 list-type="picture-card"
                 :on-remove="handleRemove"
                 :on-success="handleSuccess"
-                :before-upload="handleBeforeUpload">
+                :before-upload="handleBeforeUpload"
+              >
                 <el-icon><Plus /></el-icon>
               </el-upload>
             </div>
@@ -69,13 +88,34 @@
 
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm('byform')" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
-    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
+    <el-dialog
+      title="Excel导入"
+      v-model="openExcelDialog"
+      width="400"
+      v-loading="loading"
+    >
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button @click="openExcelDialog = false" size="large"
+          >取 消</el-button
+        >
+        <el-button
+          type="primary"
+          @click="submitExcel()"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
   </div>
@@ -110,7 +150,9 @@ const materialUnit = ref([]);
 const materialType = ref([]);
 const treeData = ref([]);
 let rules = ref({
-  productClassifyId: [{ required: true, message: "请选择物料分类", trigger: "change" }],
+  productClassifyId: [
+    { required: true, message: "请选择物料分类", trigger: "change" },
+  ],
   type: [{ required: true, message: "请选择物料类型", trigger: "change" }],
   name: [{ required: true, message: "请输入物料名称", trigger: "blur" }],
   unit: [{ required: true, message: "请选择单位", trigger: "change" }],
@@ -145,15 +187,21 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "图片",
+        prop: "unit",
+        slot: "pic",
+      },
+    },
+    {
+      attrs: {
         label: "物料名称",
         prop: "name",
       },
     },
     {
       attrs: {
-        label: "图片",
-        prop: "unit",
-        slot: "pic",
+        label: "规格型号",
+        prop: "spec",
       },
     },
     {
@@ -167,12 +215,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "规格型号",
-        prop: "spec",
-      },
-    },
-    {
-      attrs: {
         label: "物料备注",
         prop: "remark",
       },
@@ -180,12 +222,26 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "160",
+        align: "center",
+        fixed: "right",
       },
       renderHTML(row) {
         return [
           props.selectStatus
+            ? {}
+            : {
+                attrs: {
+                  label: "复制",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  getDtlOne(row);
+                },
+              },
+          props.selectStatus
             ? {
                 attrs: {
                   label: "选择",
@@ -218,11 +274,15 @@ const config = computed(() => {
                 },
                 el: "button",
                 click() {
-                  ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning",
-                  }).then(() => {
+                  ElMessageBox.confirm(
+                    "此操作将永久删除该数据, 是否继续?",
+                    "提示",
+                    {
+                      confirmButtonText: "确定",
+                      cancelButtonText: "取消",
+                      type: "warning",
+                    }
+                  ).then(() => {
                     proxy
                       .post("/productInfo/delete", {
                         id: row.id,
@@ -322,29 +382,33 @@ const generatePassword = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/productInfo/page", sourceList.value.pagination).then((message) => {
-    console.log(message);
-    sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
+  proxy
+    .post("/productInfo/page", sourceList.value.pagination)
+    .then((message) => {
+      console.log(message);
+      sourceList.value.data = message.rows.map((x) => ({ ...x, fileList: [] }));
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
 
-    const productIdList = message.rows.map((x) => x.id);
-    // 请求文件数据并回显
-    if (productIdList.length > 0) {
-      proxy.post("/fileInfo/getList", { businessIdList: productIdList }).then((fileObj) => {
-        for (let i = 0; i < sourceList.value.data.length; i++) {
-          const e = sourceList.value.data[i];
-          for (const key in fileObj) {
-            if (e.id === key) {
-              e.fileList = fileObj[key];
+      const productIdList = message.rows.map((x) => x.id);
+      // 请求文件数据并回显
+      if (productIdList.length > 0) {
+        proxy
+          .post("/fileInfo/getList", { businessIdList: productIdList })
+          .then((fileObj) => {
+            for (let i = 0; i < sourceList.value.data.length; i++) {
+              const e = sourceList.value.data[i];
+              for (const key in fileObj) {
+                if (e.id === key) {
+                  e.fileList = fileObj[key];
+                }
+              }
             }
-          }
-        }
-      });
-    }
-  });
+          });
+      }
+    });
 };
 const uploadData = ref({});
 const fileList = ref([]);
@@ -410,10 +474,12 @@ const submitForm = () => {
 };
 
 const getTreeList = () => {
-  proxy.post("/productClassify/tree", { parentId: "", name: "", definition: "2" }).then((message) => {
-    treeListData.value = message;
-    treeData.value = message;
-  });
+  proxy
+    .post("/productClassify/tree", { parentId: "", name: "", definition: "2" })
+    .then((message) => {
+      treeListData.value = message;
+      treeData.value = message;
+    });
 };
 
 const getDtl = (row) => {
@@ -427,6 +493,20 @@ const getDtl = (row) => {
     dialogVisible.value = true;
   });
 };
+
+const getDtlOne = (row) => {
+  modalType.value = "add";
+  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
+    fileList.value = [];
+    fileListCopy.value = [];
+    res.type = res.type + "";
+    res.definition = "2";
+    delete res.id;
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
 getTreeList();
 getList();
 const handleBeforeUpload = async (file) => {
@@ -449,7 +529,9 @@ const handleSuccess = (res, file, files) => {
 };
 
 const handleRemove = (file) => {
-  const index = fileListCopy.value.findIndex((x) => x.uid === file.uid || x.id === file.id);
+  const index = fileListCopy.value.findIndex(
+    (x) => x.uid === file.uid || x.id === file.id
+  );
   fileListCopy.value.splice(index, 1);
 };
 

+ 84 - 58
src/views/product/product/index.vue

@@ -19,7 +19,7 @@
         :loading="loading"
         highlight-current-row
         :selectConfig="selectConfig"
-        :statConfig='statConfig'
+        :statConfig="statConfig"
         :table-events="{
           //element talbe事件都能传
           select: select,
@@ -52,25 +52,25 @@
       </byTable>
     </div>
     <el-drawer v-model="retrievalModal" direction="rtl">
-			<template #header>
-				<h4>高级检索</h4>
-			</template>
-			<template #default>
-				<byForm
-					:formConfig="formConfig2"
-					:formOption="formOption"
-					v-model="sourceList.pagination"
-				>
-					<template #slot> 可自定义所需功能 </template>
-				</byForm>
-			</template>
-			<template #footer>
-				<div style="flex: auto">
-				<el-button @click="retrievalModal = false">取消</el-button>
-				<el-button type="primary" @click="getList">确认</el-button>
-				</div>
-			</template>
-		</el-drawer>
+      <template #header>
+        <h4>高级检索</h4>
+      </template>
+      <template #default>
+        <byForm
+          :formConfig="formConfig2"
+          :formOption="formOption"
+          v-model="sourceList.pagination"
+        >
+          <template #slot> 可自定义所需功能 </template>
+        </byForm>
+      </template>
+      <template #footer>
+        <div style="flex: auto">
+          <el-button @click="retrievalModal = false">取消</el-button>
+          <el-button type="primary" @click="getList">确认</el-button>
+        </div>
+      </template>
+    </el-drawer>
     <el-dialog
       :title="modalType == 'add' ? '添加' : '编辑'"
       v-model="dialogVisible"
@@ -160,11 +160,11 @@ const sourceList = ref({
     productClassifyId: "",
     keyword: "",
     definition: "1",
-    name:null,
-    customCode:null,
-    barCode:null,
-    englishName:null,
-    customsCode:null,
+    name: null,
+    customCode: null,
+    barCode: null,
+    englishName: null,
+    customsCode: null,
   },
 });
 const retrievalModal = ref(false);
@@ -207,15 +207,21 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "图片",
+        prop: "unit",
+        slot: "pic",
+      },
+    },
+    {
+      attrs: {
         label: "产品名称",
         prop: "name",
       },
     },
     {
       attrs: {
-        label: "图片",
-        prop: "unit",
-        slot: "pic",
+        label: "规格型号",
+        prop: "spec",
       },
     },
     {
@@ -229,28 +235,33 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "规格型号",
-        prop: "spec",
-      },
-    },
-    {
-      attrs: {
         label: "产品备注",
         prop: "remark",
       },
     },
-
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "160",
+        align: "center",
+        fixed: "right",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
           {
             attrs: {
+              label: "复制",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtlOne(row);
+            },
+          },
+          {
+            attrs: {
               label: "修改",
               type: "primary",
               text: true,
@@ -298,7 +309,7 @@ const config = computed(() => {
     },
   ];
 });
-let statConfig = ref([])
+let statConfig = ref([]);
 const uploadData = ref({});
 const fileList = ref([]);
 const fileListCopy = ref([]);
@@ -306,30 +317,31 @@ const fileListCopy = ref([]);
 let formData = reactive({
   data: {},
 });
-const getproductInfoStatistics = (()=>{
-  proxy.post('/productInfo/productInfoStatistics').then(res=>{
-    statConfig.value = [{
-			label: '产品类型统计',
-			data:[
-				{
-					label:'合计',
-					num:res.amount,
-					type:1,
-				},
-			],
-		},]
+const getproductInfoStatistics = () => {
+  proxy.post("/productInfo/productInfoStatistics").then((res) => {
+    statConfig.value = [
+      {
+        label: "产品类型统计",
+        data: [
+          {
+            label: "合计",
+            num: res.amount,
+            type: 1,
+          },
+        ],
+      },
+    ];
     for (let i = 0; i < res.typeList.length; i++) {
       const element = res.typeList[i];
       statConfig.value[0].data.push({
-        label:element.type,
-        num:element.count,
-        type:i+ 2
-      })
+        label: element.type,
+        num: element.count,
+        type: i + 2,
+      });
     }
-    
-  })
-}) 
-getproductInfoStatistics()
+  });
+};
+getproductInfoStatistics();
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
@@ -604,6 +616,20 @@ const getDtl = (row) => {
     dialogVisible.value = true;
   });
 };
+
+const getDtlOne = (row) => {
+  modalType.value = "add";
+  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
+    fileList.value = [];
+    fileListCopy.value = [];
+    res.type = res.type + ""; //type回显
+    res.definition = "1"; //产品
+    res.standardJson = JSON.parse(res.standardJson);
+    delete res.id;
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
 getTreeList();
 getList();
 const handleBeforeUpload = async (file) => {

+ 36 - 11
src/views/product/product/index2.vue

@@ -179,14 +179,20 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "图片",
+        slot: "pic",
+      },
+    },
+    {
+      attrs: {
         label: "产品名称",
         prop: "name",
       },
     },
     {
       attrs: {
-        label: "图片",
-        slot: "pic",
+        label: "规格型号",
+        prop: "spec",
       },
     },
     {
@@ -200,28 +206,33 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "规格型号",
-        prop: "spec",
-      },
-    },
-    {
-      attrs: {
         label: "产品备注",
         prop: "remark",
       },
     },
-
     {
       attrs: {
         label: "操作",
-        width: "200",
-        align: "right",
+        width: "160",
+        align: "center",
+        fixed: "right",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
           {
             attrs: {
+              label: "复制",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtlOne(row);
+            },
+          },
+          {
+            attrs: {
               label: "修改",
               type: "primary",
               text: true,
@@ -477,6 +488,20 @@ const getDtl = (row) => {
     dialogVisible.value = true;
   });
 };
+const getDtlOne = (row) => {
+  modalType.value = "add";
+  proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
+    fileList.value = [];
+    fileListCopy.value = [];
+    res.type = res.type + ""; //type回显
+    res.definition = "1"; //产品
+    res.standardJson = JSON.parse(res.standardJson);
+    delete res.id;
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
 getTreeList();
 getList();
 const handleBeforeUpload = async (file) => {

+ 21 - 8
src/views/salesMange/saleContract/contract/index.vue

@@ -31,9 +31,15 @@
             <span>{{ moneyFormat(item.amount, 2) }}</span>
           </div>
         </template>
+        <template #amountCNY="{ item }">
+          <div>
+            <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
+            <span>{{ moneyFormat(item.amountCNY, 2) }}</span>
+          </div>
+        </template>
         <template #sumClaimMoney="{ item }">
           <div>
-            <span style="padding-right: 4px">{{ item.currency }}</span>
+            <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
             <span>{{ moneyFormat(item.sumClaimMoney, 2) }}</span>
           </div>
         </template>
@@ -545,25 +551,32 @@ const config = computed(() => {
         return proxy.dictValueLabel(type, customerList.value);
       },
     },
+    // {
+    //   attrs: {
+    //     label: "版本号",
+    //     prop: "version",
+    //     width: 80,
+    //   },
+    // },
     {
       attrs: {
-        label: "版本号",
-        prop: "version",
-        width: 80,
+        label: "合同金额",
+        slot: "amount",
+        width: 120,
       },
     },
     {
       attrs: {
-        label: "合同金额",
-        slot: "amount",
+        label: "合同金额(CNY)",
+        slot: "amountCNY",
         width: 120,
       },
     },
     {
       attrs: {
-        label: "已到账金额",
+        label: "已到账金额(CNY)",
         slot: "sumClaimMoney",
-        width: 120,
+        width: 140,
       },
     },
     {

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio