yusheng пре 1 година
родитељ
комит
efef9d41c2

+ 70 - 0
src/BIZComponents/inventoryTableDetails.vue

@@ -9,6 +9,42 @@
       cache-key="systemRoleTable17"
       class="time-form"
     >
+      <template v-slot:technicalDrawings="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.technicalDrawings'"
+        >
+          <fileMain
+            v-model="scope.row.technicalDrawings"
+            type="view"
+          ></fileMain>
+        </el-form-item>
+      </template>
+      <template v-slot:customerReqFiles="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.customerReqFiles'"
+        >
+          <fileMain v-model="scope.row.customerReqFiles" type="view"></fileMain>
+        </el-form-item>
+      </template>
+      <template v-slot:industryArtFiles="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.industryArtFiles'"
+        >
+          <fileMain v-model="scope.row.industryArtFiles" type="view"></fileMain>
+        </el-form-item>
+      </template>
+      <template v-slot:otherFiles="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '. otherFiles'"
+        >
+          <fileMain v-model="scope.row.otherFiles" type="view"></fileMain>
+        </el-form-item>
+      </template>
+
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
         <div class="headbox">
@@ -28,6 +64,7 @@
 
   import fileMain from '@/components/addDoc/index.vue';
   import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
+  const dayjs = require('dayjs');
 
   export default {
     mixins: [dictMixins],
@@ -451,7 +488,38 @@
         });
         return comitDatasource;
       },
+      setDeliveryDays() {
+        console.log(this.form.datasource,'this.form.datasource')
+        this.form.datasource.forEach((item, i) => {
+          let guaranteePeriodUnitName = this.guaranteePeriodUnit(
+            item.guaranteePeriodUnitCode
+          );
 
+          this.$set(
+            this.form.datasource[i],
+            'guaranteePeriodDeadline',
+            guaranteePeriodUnitName != 'second'
+              ? this.setDay(item.guaranteePeriod, guaranteePeriodUnitName)
+              : ''
+          );
+          // }
+        });
+      },
+      guaranteePeriodUnit(code) {
+        return code == 3
+          ? 'day'
+          : code == 4
+          ? 'month'
+          : code == 5
+          ? 'year'
+          : 'second';
+      },
+      setDay(addDay, dateType = 'day') {
+        console.log(addDay)
+        return dayjs(this.contractStartDate || new Date())
+          .add(addDay, dateType)
+          .format('YYYY-MM-DD');
+      },
       //修改回显
       async putTableValue(data) {
         console.log(data, 'dasdas');
@@ -469,6 +537,8 @@
               data.discountTotalPrice ||
               data?.contractVO?.discountTotalPrice;
           }
+        this.setDeliveryDays();
+
           // this.supplierObj = await this.getSupplierObj(
           //   productList,
           //   'productId'

+ 10 - 3
src/views/bpm/handleTask/components/quotation/addDialog.vue

@@ -323,7 +323,7 @@
 </template>
 
 <script>
-  import { emailReg, numberReg } from 'ele-admin';
+  import { emailReg, numberReg,telReg } from 'ele-admin';
   import { acceptUnpackoptions } from '@/enum/dict';
   import inventoryTable from '@/BIZComponents/inventoryTable.vue';
 
@@ -387,6 +387,10 @@
         opportunityType: null
       };
       return {
+        opportunityTypeList: [
+          { label: '有', value: 1 },
+          { label: '无', value: 0 }
+        ],
         payWayOptions: [],
         delDetailIds: [],
         linkNameOptions: [],
@@ -421,7 +425,7 @@
           contactTel: [
             {
               required: true,
-              pattern: numberReg,
+              pattern: telReg,
               message: '请输入联系电话',
               trigger: 'blur'
             }
@@ -441,7 +445,7 @@
           quoteTel: [
             {
               required: true,
-              pattern: numberReg,
+              pattern: telReg,
               message: '请输入报价方联系电话',
               trigger: 'blur'
             }
@@ -497,6 +501,9 @@
             // if (data.askFile !== '') {
             //   this.$set(this.form, 'askFile', [data?.askFile]);
             // }
+            if (data.opportunityId) {
+              this.form.opportunityType = 1;
+            }
             this.$refs.inventoryTable &&
               this.$refs.inventoryTable.putTableValue(data);
             this.getLinkInfo(data.contactId);

+ 19 - 6
src/views/bpm/handleTask/components/saleOrder/accountstatement/saleForm.vue

@@ -115,18 +115,31 @@
 
     </el-row>
     <el-row>
+      <el-col :span="12">
+        <el-form-item
+        
+          prop="createUserName"
+          label="对账人">
+        
+          <el-input disabled v-model="dataForm.createUserName"
+                    ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item
+          prop="createTime"
+          label="对账时间">
+          <el-input disabled v-model="dataForm.createTime"
+                    ></el-input>
+        </el-form-item>
+      </el-col>
       <el-col :span="12">
         <el-form-item
           v-if="taskDefinitionKey=='uploadReceipt'"
           prop="repliedFiles"
           label="回执附件">
           <fileMain v-model="dataForm.repliedFiles" ></fileMain>
-<!--          <fileUpload-->
-<!--            v-model="dataForm.repliedFiles"-->
-<!--            module="main"-->
-<!--            :showLib="false"-->
-<!--            :limit="10"-->
-<!--          />-->
+
         </el-form-item>
       </el-col>
     </el-row>