asd26269546 vor 1 Jahr
Ursprung
Commit
e417538983

+ 2 - 2
src/components/byForm/index.vue

@@ -170,9 +170,9 @@
             :disabled="i.disabled ? i.disabled : false"
             :style="i.style">
           </el-cascader>
-          <div class="form-title" v-else-if="i.type == 'title'">
+          <!-- <div class="form-title" v-else-if="i.type == 'title'">
             {{ i.title }}
-          </div>
+          </div> -->
           <slot :name="i.slotName" v-else-if="i.type == 'slot'"> {{ i.slotName }}插槽占位符 </slot>
           <div class="upload" v-else-if="i.type == 'upload'">
             <el-upload

+ 24 - 27
src/views/finance/fundManage/accountStatement/index.vue

@@ -471,6 +471,9 @@ const config = computed(() => {
 });
 let transferMoneyModal = ref(false);
 const openTransferMoney = () => {
+  formData2.data = {
+    transactionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
+  };
   transferMoneyModal.value = true;
 };
 const formData2 = reactive({
@@ -497,14 +500,21 @@ const transferMoneyConfig = computed(() => {
 			selectPlaceholder: '币种',
 			selectProp: 'currency',
       fn: (value) => {
-        if (value != '') {
-          if (value.indexOf('.') > -1) {
-              formData2.data.amount = value.slice(0, value.indexOf('.') + 3)
-          } else { 
-            formData2.data.amount = value
+        //判断value的类型
+        if(isNaN(value)){
+          
+          formData2.data.inCurrency = formData2.data.currency
+          formData2.data.commissionCurrency = formData2.data.currency
+        }else{
+          if (value != '') {
+            if (value.indexOf('.') > -1) {
+                formData2.data.amount = value.slice(0, value.indexOf('.') + 3)
+            } else { 
+              formData2.data.amount = value
+            }
           }
-      }
-        formData2.data.inAmount = formData2.data.amount
+          formData2.data.inAmount = formData2.data.amount
+        }
       },
 		},
     
@@ -693,18 +703,18 @@ const formConfig = computed(() => {
           label: "合同到账",
         }
       : {},
-      {
+    {
       type: "radio",
       prop: "isTransaction",
       label: "是否往来",
       data: [
         {
           label: "是",
-          value: "1",
+          value: 1,
         },
         {
           label: "否",
-          value: "0",
+          value: 0,
         },
       ],
       fn: (val) => {
@@ -717,23 +727,7 @@ const formConfig = computed(() => {
       prop: "transactionDeptId",
       label: "往来单位",
       data: [],
-      isShow: formData.data.isTransaction == "1",
-      isLoad: {
-        //链接
-        url: "transactionDepartment/list?pageNum=1&pageSize=999",
-        method: "get",
-        //返回数据的路径默认返回data
-        resUrl: "data",
-        //参数
-        req: {},
-        //返回数据的key
-        labelKey: "name",
-        //返回数据的value
-        labelVal: "id",
-      },
-      fn: (val) => {
-        console.log(formConfig.value)
-      },
+      isShow: formData.data.isTransaction == 1,
     },
     {
       type: "title",
@@ -780,6 +774,8 @@ const getTransactionDepartment = () => {
           value: item.id,
         };
       });
+      formConfig.value[7].data = transactionDepartmentData.value
+      console.log(formConfig.value[7])
     });
 };
 getTransactionDepartment()
@@ -1036,6 +1032,7 @@ const update = (row) => {
   proxy.post("/accountRunningWater/detail", { id: row.id }).then((res) => {
     formData.data = res;
     loadingDialog.value = false;
+    getTransactionDepartment()
   });
   dialogVisible.value = true;
 };

+ 18 - 7
src/views/finance/fundManage/flow/index.vue

@@ -451,14 +451,21 @@ const transferMoneyConfig = computed(() => {
 			selectPlaceholder: '币种',
 			selectProp: 'currency',
       fn: (value) => {
-        if (value != '') {
-          if (value.indexOf('.') > -1) {
-              formData2.data.amount = value.slice(0, value.indexOf('.') + 3)
-          } else { 
-            formData2.data.amount = value
+        //判断value的类型
+        if(isNaN(value)){
+          
+          formData2.data.inCurrency = formData2.data.currency
+          formData2.data.commissionCurrency = formData2.data.currency
+        }else{
+          if (value != '') {
+            if (value.indexOf('.') > -1) {
+                formData2.data.amount = value.slice(0, value.indexOf('.') + 3)
+            } else { 
+              formData2.data.amount = value
+            }
           }
-      }
-        formData2.data.inAmount = formData2.data.amount
+          formData2.data.inAmount = formData2.data.amount
+        }
       },
 		},
     
@@ -703,6 +710,8 @@ const getTransactionDepartment = () => {
           value: item.id,
         };
       });
+      formConfig.value[7].data = transactionDepartmentData.value
+      formConfig.value = {...formConfig.value}
     });
 };
 getTransactionDepartment()
@@ -758,7 +767,9 @@ const update = (row) => {
   proxy.post("/accountRunningWater/detail", { id: row.id }).then((res) => {
     formData.data = res;
     loadingDialog.value = false;
+    getTransactionDepartment()
   });
+  
   dialogVisible.value = true;
 };
 const deriveExcel = () => {

+ 194 - 38
src/views/salesMange/saleContract/middle/index.vue

@@ -1,13 +1,31 @@
 <template>
   <div class="tenant">
+    <div class="isSet-box">
+      <el-radio-group v-model="sourceList.pagination.isSet" size="large" @change="getList">
+        <el-radio-button label="1">未创建</el-radio-button>
+        <el-radio-button label="2">已创建</el-radio-button>
+      </el-radio-group>
+    </div>
     <div class="content">
       <byTable
         :source="sourceList.data"
         :pagination="sourceList.pagination"
-        :config="config"
+        :config="sourceList.pagination.isSet == '1' ? config : config2"
         :loading="loading"
         :selectConfig="selectConfig"
         highlight-current-row
+        :action-list="[
+					{
+						text: '生成中间合同',
+						plain: true,
+						type: 'warning',
+						action: () => openModal('add'),
+					},
+				]"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
         @get-list="getList">
         <template #code="{ item }">
           <div style="width: 100%">
@@ -22,14 +40,14 @@
         </template>
         <template #sellCorporationName="{ item }">
           <div>
-            <span v-if="item.sellCorporationName">{{ item.sellCorporationName }}</span>
-            <span v-else>{{ item.oldSellCorporationName }}</span>
+            <span v-if="item.sellCorporationName">{{ item.buyCorporationName}}</span>
+            <span v-else>{{ item.buyCorporationName }}</span>
           </div>
         </template>
         <template #buyCorporationName="{ item }">
           <div>
-            <span v-if="item.buyCorporationName">{{ item.buyCorporationName }}</span>
-            <span v-else>{{ item.oldBuyCorporationName }}</span>
+            <span v-if="item.buyCorporationName">{{ item.sellCorporationName }}</span>
+            <span v-else>{{ item.sellCorporationName }}</span>
           </div>
         </template>
       </byTable>
@@ -42,11 +60,12 @@
             {{ printDetails.sellCorporationNameEn }}
           </div>
           <div style="text-align: center">
-            {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }}
+            {{ printDetails.buyDetailedAddress }}
+            <!-- {{ printDetails.sellDetailedAddress }},{{ printDetails.sellCityName }},{{ printDetails.sellProvinceName }},{{ printDetails.sellCountryName }} -->
           </div>
           <div style="font-size: 14px; color: #409eff; text-align: center; padding-top: 16px">PROFORMA INVOICE</div>
           <div style="padding-top: 8px">
-            <div>PI NO. : {{ printDetails.contractCode }}</div>
+            <div>PI NO. : {{ printDetails.code }}</div>
             <div>PI DATE: {{ printDetails.createTimeEn }}</div>
           </div>
           <div style="border: 1px solid black; display: flex">
@@ -125,8 +144,9 @@
             <div class="contentRow" style="width: 100px; text-align: center">UNIT PRICE</div>
             <div class="contentRow" style="width: 100px; text-align: center">TOTAL PRICE</div>
           </div>
-          <div v-if="printDetails.productInfoList && printDetails.productInfoList.length > 0">
-            <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.productInfoList" :key="item.productId">
+          
+          <div v-if="printDetails.contractMap.contractProductList && printDetails.contractMap.contractProductList.length > 0">
+            <div class="baseRow" style="display: flex" v-for="(item, index) in printDetails.contractMap.contractProductList" :key="item.productId">
               <div class="contentRow" style="width: 50px; text-align: center">
                 {{ index + 1 }}
               </div>
@@ -137,10 +157,10 @@
                 {{ dictValueLabel(item.productUnit, productUnit) }}
               </div>
               <div class="contentRow" style="width: 100px; text-align: center">
-                {{ item.productQuantity }}
+                {{ item.quantity }}
               </div>
               <div class="contentRow" style="width: 100px; text-align: center">
-                {{ item.productPrice }}
+                {{ item.price }}
               </div>
               <div class="contentRow" style="width: 100px; text-align: center">
                 {{ item.amount }}
@@ -151,7 +171,7 @@
             <div class="contentRow" style="width: calc(100% - 400px); text-align: center">SUBTOTAL:</div>
             <div class="contentRow" style="width: 100px; text-align: center"></div>
             <div class="contentRow" style="width: 100px; text-align: center">
-              {{ statistics("productQuantity", 0) }}
+              {{ statistics("quantity", 0) }}
             </div>
             <div class="contentRow" style="width: 100px; text-align: center"></div>
             <div class="contentRow" style="width: 100px; text-align: center">
@@ -257,7 +277,7 @@
 <script setup>
 import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
-import { ElMessage } from "element-plus";
+import { ElMessage,ElMessageBox } from "element-plus";
 import byForm from "@/components/byForm/index";
 
 const { proxy } = getCurrentInstance();
@@ -274,6 +294,7 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
+    isSet: "1",
   },
 });
 const loading = ref(false);
@@ -291,7 +312,17 @@ const selectConfig = computed(() => {
     },
   ];
 });
-const config = computed(() => {
+
+const selection = ref({
+  data: [],
+});
+
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+  console.log(_selection);
+};
+
+const config2 = computed(() => {
   return [
     {
       attrs: {
@@ -310,7 +341,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "销售方",
-        slot: "sellCorporationName",
+        prop: "sellCorporationName",
         "min-width": 200,
       },
     },
@@ -323,14 +354,14 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "最近操作人",
+        label: "创建人",
         prop: "opUserName",
         width: 180,
       },
     },
     {
       attrs: {
-        label: "最近操作时间",
+        label: "创建时间",
         prop: "updateTime",
         width: 180,
       },
@@ -343,30 +374,131 @@ const config = computed(() => {
         fixed: "right",
       },
       renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "编辑",
-              type: "primary",
-              text: true,
+        if(sourceList.value.pagination.isSet == '2') {
+          return [
+            {
+              attrs: {
+                label: "删除",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
+                proxy
+                  .post("/intermediateContract/del", {
+                    id: row.id,
+                  })
+                  .then(() => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+              },
             },
-            el: "button",
-            click() {
-              clickUpdate(row);
+            {
+              attrs: {
+                label: "打印",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                clickPrint(row);
+              },
             },
-          },
+          ];
+        } else{
+          return [
+            {
+              attrs: {
+                label: "生成中间合同",
+                type: "primary",
+                text: true,
+              },
+              el: "button",
+              click() {
+                clickUpdate(row);
+              },
+            },
+          ];
+        }
+        
+      },
+    },
+  ];
+});
+
+const config = computed(() => {
+  return [
+    {
+      type: "selection",
+      attrs: {
+        label: "多选",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "合同编码",
+        slot: "code",
+        width: 220,
+      },
+    },
+    {
+      attrs: {
+        label: "合同金额",
+        slot: "amount",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "归属公司",
+        slot: "sellCorporationName",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "客户名称",
+        slot: "buyCorporationName",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
           {
             attrs: {
-              label: "打印",
+              label: "生成中间合同",
               type: "primary",
               text: true,
             },
             el: "button",
             click() {
-              clickPrint(row);
+              clickUpdate(row);
             },
           },
         ];
+        
       },
     },
   ];
@@ -432,12 +564,23 @@ const getList = async (req) => {
 getDict();
 getList();
 const openPrint = ref(false);
-const printDetails = ref({});
+const printDetails = ref({
+  contractMap:{
+    contractProductList:[],
+    contract:{},
+  },
+});
 const clickPrint = (row) => {
-  printDetails.value = {};
+  printDetails.value = {
+    contractMap:{
+      contractProductList:[],
+      contract:{},
+    },
+  };
   openPrint.value = true;
-  proxy.post("/intermediateContract/getPrintInfo", { documentsId: row.documentsId }).then((res) => {
-    printDetails.value = res;
+  proxy.post("/intermediateContract/getPrintInfo", { id: row.id }).then((res) => {
+    printDetails.value = {...res,...res.contractMap.contract};
+    console.log(printDetails.value.contractMap.contractProductList);
   });
 };
 const clickDownload = () => {
@@ -445,8 +588,8 @@ const clickDownload = () => {
 };
 const statistics = (label, index) => {
   let num = 0;
-  if (printDetails.value.productInfoList && printDetails.value.productInfoList.length > 0) {
-    printDetails.value.productInfoList.map((item) => {
+  if (printDetails.value.contractMap.contractProductList && printDetails.value.contractMap.contractProductList.length > 0) {
+    printDetails.value.contractMap.contractProductList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
       }
@@ -456,8 +599,8 @@ const statistics = (label, index) => {
 };
 const statisticsTwo = (label, index) => {
   let num = 0;
-  if (printDetails.value.contractProjectList && printDetails.value.contractProjectList.length > 0) {
-    printDetails.value.contractProjectList.map((item) => {
+  if (printDetails.value.contractMap.contractProductList && printDetails.value.contractMap.contractProductList.length > 0) {
+    printDetails.value.contractMap.contractProductList.map((item) => {
       if (item[label]) {
         num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
       }
@@ -547,10 +690,23 @@ const rules = ref({
   buyContactName: [{ required: true, message: "请输入采购联系人", trigger: "blur" }],
   buyContactNumber: [{ required: true, message: "请输入采购联系电话", trigger: "blur" }],
 });
+const openModal = (type) => {
+  getPerson();
+  formData.data = {
+    documentsIds: selection.value.data.map((item) => item.id).join(","),
+    sellCorporationId: "",
+    sellContactName: "",
+    sellContactNumber: "",
+    buyCorporationId: "",
+    buyContactName: "",
+    buyContactNumber: "",
+  };
+  openUpdate.value = true;
+};
 const clickUpdate = (row) => {
   getPerson();
   formData.data = {
-    documentsId: row.documentsId,
+    documentsIds: row.id,
     sellCorporationId: "",
     sellContactName: "",
     sellContactNumber: "",

+ 15 - 2
src/views/system/addressConfig/index.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="addressConfig"  v-loading="loading">
+    <el-button type="primary" style="margin-bottom:20px;"  @click="addAddress({},'null')">新增国家</el-button>
     <el-table
       :data="tableData"
       style="width: 100%"
@@ -14,7 +15,7 @@
         <template #default="scope">
             <el-button size="small" @click="addAddress(scope.row,'add')">
               新增
-            </el-button>
+            </el-button> 
             <el-button size="small" @click="addAddress(scope.row,'edit')"
             >修改</el-button>
             <el-button
@@ -204,9 +205,20 @@ const modalType = ref('add');
 const loadingDialog = ref(false);
 
 const addAddress = (row,type) => {
-  console.log(row)
   
   modalType.value = type;
+  if(type == 'null') {
+    formData.data = {
+      parentName:'无',
+      parentId:0,
+      name:undefined,
+      chineseName:undefined,
+      address:undefined,
+      levelCode:1,
+    }
+    dialogVisible.value = true;
+    return
+  }
   if(type == 'edit') {
     formData.data = {
       ...row,
@@ -277,6 +289,7 @@ const submit = ref(null);
 const submitForm = () => {
   submit.value.handleSubmit(() => {
     loadingDialog.value = true;
+    if(modalType.value == 'null') modalType.value = 'add'
     proxy.post("/customizeArea/" + modalType.value, formData.data).then(
       () => {
         ElMessage({