Browse Source

提交相关代码

Lijy 2 ngày trước cách đây
mục cha
commit
e523f67923

+ 13 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/contract/components/customContract.vue

@@ -278,14 +278,14 @@
             </el-select>
           </el-form-item>
           <el-form-item label="合同印花税缴纳状态">
-            <el-select v-model="contractForm.stampDutyStatus" :disabled="contractForm.status == 0 || !permissions.contractStampDuty" placeholder="请选择"
+            <el-select v-model="contractForm.stampDutyStatus" :disabled="!permissions.contractStampDuty" placeholder="请选择"
               @change="stampDutyStatusChange()">
               <el-option v-for="item in stampDutyStatusList" :key="item.id" :label="item.label" :value="item.id"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="合同印花税缴纳时间">
             <el-date-picker v-model="contractForm.stampDutyTime" value-format="yyyy-MM-dd" type="date"
-              placeholder="选择缴纳日期" :disabled="contractForm.status == 0 || [0, 1].includes(contractForm.stampDutyStatus) || !permissions.contractStampDuty"
+              placeholder="选择缴纳日期" :disabled="[0, 1].includes(contractForm.stampDutyStatus) || !permissions.contractStampDuty"
               :clearable="false" @change="stampDutyTimeChange()"></el-date-picker>
           </el-form-item>
           <el-form-item :label="$t('bei-zhu')">
@@ -331,7 +331,7 @@
               </el-table-column>
               <el-table-column prop="stampDutyTime" label="印花税缴纳时间" width="150">
                   <template slot-scope="scope">
-                      <div><el-date-picker type="date" v-model="scope.row.stampDutyTime" style="width:140px;" :placeholder="$t('optiondate')" value-format="yyyy-MM-dd" size="small" :disabled="!permissions.contractStampDuty || contractForm.isAmountFixed"></el-date-picker></div>
+                      <div><el-date-picker type="date" v-model="scope.row.stampDutyTime" style="width:140px;" :placeholder="$t('optiondate')" value-format="yyyy-MM-dd" size="small" :disabled="!permissions.contractStampDuty || contractForm.isAmountFixed || (!contractForm.isAmountFixed && [0, 1].includes(contractForm.stampDutyStatus))"></el-date-picker></div>
                   </template>
                 </el-table-column>
               <el-table-column width="80" fixed="right">
@@ -1148,6 +1148,14 @@ export default {
       if ([0, 1].includes(val)) {
         this.contractForm.stampDutyTime = ''
       }
+      if(!this.contractForm.isAmountFixed && [2, 3].includes(this.contractForm.stampDutyStatus)) {
+        this.contractPaymentList = (this.contractPaymentList || []).map(item => {
+          return {
+            ...item,
+            stampDutyTime: ''
+          }
+        })
+      }
     },
     newlyAdd() {
       this.dialogTitle = this.$t('add')
@@ -1354,7 +1362,7 @@ export default {
             }
             totalPayment += parseFloat(this.contractPaymentList[i].payedAmount);
           }
-          if (totalPayment > parseFloat(this.contractForm.amounts)) {
+          if ((totalPayment > parseFloat(this.contractForm.amounts)) && this.contractForm.isAmountFixed) {
             this.$message({
               message: this.$t('zong-hui-kuan-jinebu-de-da-yu-he-tong-jin-e'),
               type: 'error'
@@ -1651,7 +1659,7 @@ export default {
 
     stampDutyTimeChange() {
       const { id, isAmountFixed } = this.contractForm
-      if (id && !isAmountFixed) {
+      if (id && !isAmountFixed && this.contractForm.status != 0) {
         this.getStampDutyTimeNullList(id)
       }
     },