qymljy 1 год назад
Родитель
Сommit
588fbf0b00

+ 116 - 84
src/HDrpManagement/collectionRule/components/add.vue

@@ -6,47 +6,18 @@
         <el-form :model="form" :rules="rules" ref="form" label-width="140px" label-position="right" size="mini">
           <el-col :span="24">
             <el-form-item label="立账节点" prop="accountingnodes">
-              <div>
-                <div style="float: left;margin-bottom: 10px">
-                  <el-checkbox v-model="form.accountingnodes.ordercheck.isused" true-label="1" false-label="0">订单审核</el-checkbox>
-                  <span style="margin-left: 50px">后置天数:</span>
-                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.ordercheck.days" placeholder="请输入" ></el-input>
-                  <span style="margin-left: 5px">天</span>
-                  <span style="margin-left: 50px">立账额度:</span>
+              <div style="max-height: 450px;overflow: auto">
+                <div>
+                  <el-checkbox v-model="auditIsUsed" true-label="1" false-label="0" @change="isUsedChange('审核')">订单审核</el-checkbox>
+                  <setInfo ref="audit" :isUsed="auditIsUsed"></setInfo>
                 </div>
-                <div style="float: left;margin-bottom: 10px">
-                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.ordercheck.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorOrder }"  @change="checkAmountrate(form.accountingnodes.ordercheck.amountrate,'订单审核')"></el-input>
-                  <span style="margin-left: 5px">%</span>
-                  <p v-if="isErrorOrder" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
+                <div>
+                  <el-checkbox v-model="shipmentIsUsed" true-label="1" false-label="0" @change="isUsedChange('出货')">订单出货</el-checkbox>
+                  <setInfo ref="shipment" :isUsed="shipmentIsUsed"></setInfo>
                 </div>
-              </div>
-              <div>
-                <div style="float: left;margin-bottom: 10px">
-                  <el-checkbox v-model="form.accountingnodes.logisticscheck.isused" true-label="1" false-label="0">订单出货</el-checkbox>
-                  <span style="margin-left: 50px">后置天数:</span>
-                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.logisticscheck.days" placeholder="请输入"></el-input>
-                  <span style="margin-left: 5px">天</span>
-                  <span style="margin-left: 50px">立账额度:</span>
-                </div>
-                <div style="float: left;margin-bottom: 10px">
-                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.logisticscheck.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorLogistics }"  @change="checkAmountrate(form.accountingnodes.logisticscheck.amountrate,'订单出货')"></el-input>
-                  <span style="margin-left: 5px">%</span>
-                  <p v-if="isErrorLogistics" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
-                </div>
-
-              </div>
-              <div>
-                <div style="float: left">
-                  <el-checkbox v-model="form.accountingnodes.invoiceapplycheck.isused" true-label="1" false-label="0">订单开票</el-checkbox>
-                  <span style="margin-left: 50px">后置天数:</span>
-                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.invoiceapplycheck.days" placeholder="请输入"></el-input>
-                  <span style="margin-left: 5px">天</span>
-                  <span style="margin-left: 50px">立账额度:</span>
-                </div>
-                <div style="float: left">
-                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.invoiceapplycheck.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorInvoiceapply }"  @change="checkAmountrate(form.accountingnodes.invoiceapplycheck.amountrate,'订单开票')"></el-input>
-                  <span style="margin-left: 5px">%</span>
-                  <p v-if="isErrorInvoiceapply" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
+                <div>
+                  <el-checkbox v-model="invoiceIsUsed" true-label="1" false-label="0" @change="isUsedChange('开票')">订单开票</el-checkbox>
+                  <setInfo ref="invoice" :isUsed="invoiceIsUsed"></setInfo>
                 </div>
               </div>
             </el-form-item>
@@ -65,15 +36,17 @@
       </el-row>
       <div class="dialog-footer">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" :disabled="form.accountingnodes.ordercheck.isused == '0' && form.accountingnodes.logisticscheck.isused == '0' && form.accountingnodes.invoiceapplycheck.isused == '0' && form.remarks == ''">确 定</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" :disabled="auditIsUsed == '0' && shipmentIsUsed == '0' && invoiceIsUsed == '0' && form.remarks == ''">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
+import setInfo from "@/HDrpManagement/collectionRule/components/setInfo";
 export default {
   name: "add",
+  components:{setInfo},
   data(){
     var NumberSize = (rule, value, callback) => {
       if (+value >= 0 && +value <= 100) {
@@ -84,30 +57,17 @@ export default {
     }
     return {
       dialogFormVisible:false,
+      auditIsUsed:0,
+      shipmentIsUsed:0,
+      invoiceIsUsed:0,
+      auditList:[],
+      shipmentList:[],
+      invoiceList:[],
       form:{
         "sa_receivableruleid":0,
-        "days":"",
-        "amountrate":'',
-        "point":"",
         "remarks":"",
         "isdefault":1,
-        "accountingnodes": {
-          "ordercheck": {//订单审核
-            "days": "",//后置天数
-            "amountrate": "",//立账额度
-            "isused": "0"//是否勾选
-          },
-          "logisticscheck": {//订单出货
-            "days": "",
-            "amountrate": "",
-            "isused": "0"
-          },
-          "invoiceapplycheck": {//订单开票
-            "days": "",
-            "amountrate": "",
-            "isused": "0"
-          }
-        }
+        "accountingnodes": []
       },
       rules:{
         point:[
@@ -152,36 +112,108 @@ export default {
         }
       }
     },
-    onSubmit(){
-      console.log(this.form)
-      const order = this.form.accountingnodes.ordercheck.isused == '1'?this.form.accountingnodes.ordercheck.amountrate:0
-      const logistics = this.form.accountingnodes.logisticscheck.isused == '1'?this.form.accountingnodes.logisticscheck.amountrate:0
-      const invoiceapply = this.form.accountingnodes.invoiceapplycheck.isused == '1'?this.form.accountingnodes.invoiceapplycheck.amountrate:0
-      console.log(order + logistics + invoiceapply)
-      if (parseFloat(order) + parseFloat(logistics) + parseFloat(invoiceapply) !== 100 ){
-        this.$message.error('已选节点立账额度合计需等于100%');
+    async onSubmit(){
+      if (this.auditIsUsed == '1') {
+        this.auditList = this.$refs.audit.list.map(item=>{
+          return {
+            "days":item.days,
+            "amountrate":(item.amountrate/100).toFixed(4),
+            "isused":"1",
+            "point":"订单审核"
+          }
+        })
       }else {
-        this.$refs['form'].validate(async (valid) => {
-          if (!valid) return false
-          /*this.form.amountrate = (this.form.amountrate /100).toFixed(4)*/
-          this.form.accountingnodes.ordercheck.amountrate = (this.form.accountingnodes.ordercheck.amountrate/100).toFixed(4)
-          this.form.accountingnodes.logisticscheck.amountrate = (this.form.accountingnodes.logisticscheck.amountrate/100).toFixed(4)
-          this.form.accountingnodes.invoiceapplycheck.amountrate = (this.form.accountingnodes.invoiceapplycheck.amountrate/100).toFixed(4)
-          const res = await this.$api.requested({
-            "id": "20230110095903",
-            "content": this.form
-          })
-          this.tool.showMessage(res,()=>{
-            this.$emit('onSuccess')
-            this.$refs['form'].resetFields();
-            this.dialogFormVisible = false
-          })
+        this.auditList = []
+      }
+      if (this.shipmentIsUsed == '1') {
+        this.shipmentList = this.$refs.shipment.list.map(item=>{
+          return {
+            "days":item.days,
+            "amountrate":(item.amountrate/100).toFixed(4),
+            "isused":"1",
+            "point":"订单出货"
+          }
         })
+      }else {
+        this.shipmentList = []
+      }
+      if (this.invoiceIsUsed == '1') {
+        this.invoiceList = this.$refs.invoice.list.map(item=>{
+          return {
+            "days":item.days,
+            "amountrate":(item.amountrate/100).toFixed(4),
+            "isused":"1",
+            "point":"订单出货"
+          }
+        })
+      }else {
+        this.invoiceList = []
+      }
+      let newArr = this.auditList.concat(this.shipmentList.concat(this.invoiceList))
+      let allAmountrate = parseFloat(0)
+      newArr.forEach(item=>{
+        allAmountrate = parseFloat(allAmountrate) + parseFloat(item.amountrate)
+      })
+      if (allAmountrate !== 1){
+        this.$message({
+          message: '已选节点立账额度合计需等于100%',
+          center: true,
+          type: 'error',
+          offset:260
+        });
+      }else {
+        this.form.accountingnodes = newArr
+        const res = await this.$api.requested({
+          "id": "20230110095903",
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.onClose()
+          this.dialogFormVisible = false
+        })
+      }
+    },
+    isUsedChange(value){
+      if (value === '订单'){
+        if (this.auditIsUsed !== 1){
+          this.$refs.audit.list = [{
+            days:'',
+            amountrate:'',
+          }]
+        }
+      }else if (value === '出货'){
+        this.$refs.shipment.list = [{
+          days:'',
+          amountrate:'',
+        }]
+      }else if (value === '开票'){
+        this.$refs.invoice.list = [{
+          days:'',
+          amountrate:'',
+        }]
       }
-
     },
     onClose(){
       this.$refs['form'].resetFields();
+      this.auditIsUsed = 0
+      this.invoiceIsUsed = 0
+      this.shipmentIsUsed = 0
+      this.auditList = []
+      this.shipmentList = []
+      this.invoiceList = []
+      this.$refs.invoice.list = [{
+        days:'',
+        amountrate:'',
+      }]
+      this.$refs.audit.list = [{
+        days:'',
+        amountrate:'',
+      }]
+      this.$refs.shipment.list = [{
+        days:'',
+        amountrate:'',
+      }]
       this.dialogFormVisible = false
     }
   }

+ 207 - 0
src/HDrpManagement/collectionRule/components/addCopy1.vue

@@ -0,0 +1,207 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-dialog title="新建收款条件" append-to-body :visible.sync="dialogFormVisible" width="800px" @close="onClose">
+      <el-row :gutter="20">
+        <el-form :model="form" :rules="rules" ref="form" label-width="140px" label-position="right" size="mini">
+          <el-col :span="24">
+            <el-form-item label="立账节点" prop="accountingnodes">
+              <div>
+                <div style="float: left;margin-bottom: 10px">
+                  <el-checkbox v-model="form.accountingnodes.ordercheck.isused" true-label="1" false-label="0">订单审核</el-checkbox>
+                  <span style="margin-left: 50px">后置天数:</span>
+                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.ordercheck.days" placeholder="请输入" ></el-input>
+                  <span style="margin-left: 5px">天</span>
+                  <span style="margin-left: 50px">立账额度:</span>
+                </div>
+                <div style="float: left;margin-bottom: 10px">
+                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.ordercheck.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorOrder }"  @change="checkAmountrate(form.accountingnodes.ordercheck.amountrate,'订单审核')"></el-input>
+                  <span style="margin-left: 5px">%</span>
+                  <p v-if="isErrorOrder" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
+                </div>
+              </div>
+              <div>
+                <div style="float: left;margin-bottom: 10px">
+                  <el-checkbox v-model="form.accountingnodes.logisticscheck.isused" true-label="1" false-label="0">订单出货</el-checkbox>
+                  <span style="margin-left: 50px">后置天数:</span>
+                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.logisticscheck.days" placeholder="请输入"></el-input>
+                  <span style="margin-left: 5px">天</span>
+                  <span style="margin-left: 50px">立账额度:</span>
+                </div>
+                <div style="float: left;margin-bottom: 10px">
+                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.logisticscheck.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorLogistics }"  @change="checkAmountrate(form.accountingnodes.logisticscheck.amountrate,'订单出货')"></el-input>
+                  <span style="margin-left: 5px">%</span>
+                  <p v-if="isErrorLogistics" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
+                </div>
+
+              </div>
+              <div>
+                <div style="float: left">
+                  <el-checkbox v-model="form.accountingnodes.invoiceapplycheck.isused" true-label="1" false-label="0">订单开票</el-checkbox>
+                  <span style="margin-left: 50px">后置天数:</span>
+                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.invoiceapplycheck.days" placeholder="请输入"></el-input>
+                  <span style="margin-left: 5px">天</span>
+                  <span style="margin-left: 50px">立账额度:</span>
+                </div>
+                <div style="float: left">
+                  <el-input type="number" style="width: 100px" v-model="form.accountingnodes.invoiceapplycheck.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorInvoiceapply }"  @change="checkAmountrate(form.accountingnodes.invoiceapplycheck.amountrate,'订单开票')"></el-input>
+                  <span style="margin-left: 5px">%</span>
+                  <p v-if="isErrorInvoiceapply" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
+                </div>
+              </div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="描述" prop="remarks">
+              <el-input type="textarea" v-model="form.remarks" placeholder="请输入描述"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="是否默认条件" prop="isdefault">
+              <el-checkbox :true-label="1" :false-label="0" v-model="form.isdefault"></el-checkbox>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" :disabled="form.accountingnodes.ordercheck.isused == '0' && form.accountingnodes.logisticscheck.isused == '0' && form.accountingnodes.invoiceapplycheck.isused == '0' && form.remarks == ''">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  data(){
+    var NumberSize = (rule, value, callback) => {
+      if (+value >= 0 && +value <= 100) {
+        callback()
+      } else {
+        return callback(new Error('额度比率范围(0-100)'));
+      }
+    }
+    return {
+      dialogFormVisible:false,
+      form:{
+        "sa_receivableruleid":0,
+        "days":"",
+        "amountrate":'',
+        "point":"",
+        "remarks":"",
+        "isdefault":1,
+        "accountingnodes": {
+          "ordercheck": {//订单审核
+            "days": "",//后置天数
+            "amountrate": "",//立账额度
+            "isused": "0"//是否勾选
+          },
+          "logisticscheck": {//订单出货
+            "days": "",
+            "amountrate": "",
+            "isused": "0"
+          },
+          "invoiceapplycheck": {//订单开票
+            "days": "",
+            "amountrate": "",
+            "isused": "0"
+          }
+        }
+      },
+      rules:{
+        point:[
+          { required: false, message: '请选择账期依据', trigger: 'change'},
+        ],
+        amountrate:[
+          { required: false, message: '请输入立账额度比率', trigger: 'blur'},
+          { validator: NumberSize , trigger:'blur'}
+        ],
+        days:[
+          { required: false, message: '请输入后置天数', trigger: 'blur'}
+        ],
+        isdefault:[
+          { required: false, message: '请选择是否默认条件', trigger: 'blur'}
+        ],
+        remarks:[
+          { required: false, message: '请输入描述', trigger: 'blur'}
+        ],
+      },
+      isErrorOrder: false,
+      isErrorLogistics:false,
+      isErrorInvoiceapply:false
+    }
+  },
+  methods:{
+    checkAmountrate(val,key){
+      if (val > 100 || val < 0){
+        if (key === '订单审核'){
+          this.isErrorOrder = true
+        }else if (key === '订单出货'){
+          this.isErrorLogistics = true
+        }else {
+          this.isErrorInvoiceapply = true
+        }
+      }else {
+        if (key === '订单审核'){
+          this.isErrorOrder = false
+        }else if (key === '订单出货'){
+          this.isErrorLogistics = false
+        }else {
+          this.isErrorInvoiceapply = false
+        }
+      }
+    },
+    onSubmit(){
+      console.log(this.form)
+      const order = this.form.accountingnodes.ordercheck.isused == '1'?this.form.accountingnodes.ordercheck.amountrate:0
+      const logistics = this.form.accountingnodes.logisticscheck.isused == '1'?this.form.accountingnodes.logisticscheck.amountrate:0
+      const invoiceapply = this.form.accountingnodes.invoiceapplycheck.isused == '1'?this.form.accountingnodes.invoiceapplycheck.amountrate:0
+      console.log(order + logistics + invoiceapply)
+      if (parseFloat(order) + parseFloat(logistics) + parseFloat(invoiceapply) !== 100 ){
+        this.$message.error('已选节点立账额度合计需等于100%');
+      }else {
+        this.$refs['form'].validate(async (valid) => {
+          if (!valid) return false
+          /*this.form.amountrate = (this.form.amountrate /100).toFixed(4)*/
+          this.form.accountingnodes.ordercheck.amountrate = (this.form.accountingnodes.ordercheck.amountrate/100).toFixed(4)
+          this.form.accountingnodes.logisticscheck.amountrate = (this.form.accountingnodes.logisticscheck.amountrate/100).toFixed(4)
+          this.form.accountingnodes.invoiceapplycheck.amountrate = (this.form.accountingnodes.invoiceapplycheck.amountrate/100).toFixed(4)
+          const res = await this.$api.requested({
+            "id": "20230110095903",
+            "content": this.form
+          })
+          this.tool.showMessage(res,()=>{
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.dialogFormVisible = false
+          })
+        })
+      }
+
+    },
+    onClose(){
+      this.$refs['form'].resetFields();
+      this.dialogFormVisible = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+.dialog-footer {
+  margin-top: 0;
+}
+.el-select {
+  width: 100% !important;
+}
+
+</style>
+<style>
+  .is-error .el-input__inner {
+    border-color: red;
+  }
+  .error-message {
+    color: red;
+  }
+</style>

+ 52 - 0
src/HDrpManagement/collectionRule/components/setInfo.vue

@@ -0,0 +1,52 @@
+<template>
+  <div v-if="isUsed == 1">
+    <div  v-for="(item,index) in list" :key="index" style="margin-bottom: 5px">
+      <span style="margin-left: 10px">后置天数:</span>
+      <el-input type="number" style="width: 100px" v-model="item.days" placeholder="请输入"></el-input>
+      <span style="margin-left: 5px">天</span>
+      <span style="margin-left: 50px">立账额度:</span>
+      <el-input type="number" style="width: 100px" v-model="item.amountrate" placeholder="请输入" :class="{ 'is-error': isErrorInvoiceapply }"  @change="checkAmountrate()"></el-input>
+      <span style="margin-left: 5px">%</span>
+      <!--    <i class="el-icon-plus" size="mini" style="margin-left: 10px;color: #3874f6"></i>-->
+      <el-button v-if="index === list.length -1" type="text" icon="el-icon-plus" style="margin-left: 10px" @click="addList"></el-button>
+      <el-button v-if="list.length !== 1" type="text" icon="el-icon-delete" style="margin-left: 10px;color: red;" @click="delList(index)"></el-button>
+      <p v-if="isErrorInvoiceapply" style="color: red;font-size: 12px">立账额度范围(0-100)</p>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "setInfo",
+  props:['isUsed'],
+  data(){
+    return {
+      days:'',
+      amountrate:'',
+      isErrorInvoiceapply:false,
+      list:[
+        {
+          days:'',
+          amountrate:'',
+        },
+      ]
+    }
+  },
+  methods:{
+    checkAmountrate(){},
+    addList(){
+      this.list.push({
+        days:'',
+        amountrate:'',
+      })
+    },
+    delList(index){
+      this.list.splice(index,1)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
src/HDrpManagement/collectionRule/modules/table.vue

@@ -3,8 +3,8 @@
   <div>
     <el-table
         height="calc(100vh - 330px)"
-    :data="tableData"
-    style="width: 100%">
+        :data="tableData"
+        style="width: 100%">
       <el-table-column
         prop="ruleno"
         label="收款条件编号"

+ 92 - 10
src/HDrpManagement/collectionRule/modules/tableCopy.vue

@@ -3,8 +3,8 @@
   <div>
     <el-table
         height="calc(100vh - 330px)"
-    :data="tableData"
-    style="width: 100%">
+        :data="tableData"
+        style="width: 100%">
       <el-table-column
         prop="ruleno"
         label="收款条件编号"
@@ -24,8 +24,14 @@
             label="订单审核"
             width="100">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '订单审核'" style="color: red">是</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.ordercheck.isused == '1'" style="color: red">是</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
+
+<!--              <div v-if="scope.row.point == '订单审核'" style="color: red">是</div>
+              <div v-else>&#45;&#45;</div>-->
             </template>
           </el-table-column>
           <el-table-column
@@ -33,8 +39,13 @@
             label="立账额度"
             width="100">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '订单审核'">{{scope.row.amountrate * 100}}%</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.ordercheck.amountrate">{{scope.row.accountingnodes.ordercheck.amountrate}}%</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
+<!--              <div v-if="scope.row.point == '订单审核'">{{scope.row.amountrate * 100}}%</div>
+              <div v-else>&#45;&#45;</div>-->
             </template>
           </el-table-column>
           <el-table-column
@@ -42,8 +53,13 @@
             label="后置天数"
             width="100">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '订单审核'">{{scope.row.days}}</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.ordercheck.days">{{scope.row.accountingnodes.ordercheck.days}}</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
+<!--              <div v-if="scope.row.point == '订单审核'">{{scope.row.days}}</div>
+              <div v-else>&#45;&#45;</div>-->
             </template>
           </el-table-column>
         </el-table-column>
@@ -55,7 +71,22 @@
             label="销售出库审核"
             width="120">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '销售出库审核'" style="color: red">是</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.logisticscheck.isused == '1'" style="color: red">是</div>
+                <div v-else>--</div>
+              </div>
+              <div v-else>--</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+              prop="amountrate"
+              label="立账额度"
+              width="100">
+            <template slot-scope="scope">
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.logisticscheck.amountrate">{{scope.row.accountingnodes.logisticscheck.amountrate}}%</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
             </template>
           </el-table-column>
@@ -64,7 +95,10 @@
             label="后置天数"
             width="100">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '销售出库审核'">{{scope.row.days}}</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.logisticscheck.days">{{scope.row.accountingnodes.logisticscheck.days}}</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
             </template>
           </el-table-column>
@@ -77,7 +111,22 @@
             label="发票审核"
             width="100">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '发票审核'" style="color: red">是</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.invoiceapplycheck.isused == '1'" style="color: red">是</div>
+                <div v-else>--</div>
+              </div>
+              <div v-else>--</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+              prop="amountrate"
+              label="立账额度"
+              width="100">
+            <template slot-scope="scope">
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.invoiceapplycheck.amountrate">{{scope.row.accountingnodes.invoiceapplycheck.amountrate}}%</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
             </template>
           </el-table-column>
@@ -86,7 +135,10 @@
             label="后置天数"
             width="100">
             <template slot-scope="scope">
-              <div v-if="scope.row.point == '发票审核'">{{scope.row.days}}</div>
+              <div v-if="scope.row.accountingnodes">
+                <div v-if="scope.row.accountingnodes.invoiceapplycheck.days">{{scope.row.accountingnodes.invoiceapplycheck.days}}</div>
+                <div v-else>--</div>
+              </div>
               <div v-else>--</div>
             </template>
           </el-table-column>
@@ -106,7 +158,9 @@
        label="操作"
        width="150px">
        <template slot-scope="scope">
-         <el-button type="text" size="mini" @click="goDetail(scope.row)">详 情</el-button>
+<!--         <el-button type="text" size="mini" @click="goDetail(scope.row)">详 情</el-button>-->
+         <edit :data="scope.row" class="inline-16" @onSuccess="onSuccess"></edit>
+         <el-button :disabled="scope.row.isdefault === 1" size="mini" v-if="tool.checkAuth($route.name,'delete')" type="text" @click="onDel(scope.row.sa_receivableruleid)">删 除</el-button>
        </template>
       </el-table-column>
   </el-table>
@@ -114,17 +168,45 @@
 </template>
 
 <script>
+import edit from '../components/edit'
 export default {
   props:['tableData'],
   data () {
     return {
     }
   },
+  components:{edit},
   methods: {
     goDetail (data) {
       let query = {id:data.sa_receivableruleid,rowindex:data.rowindex}
       this.$router.push({path:'/collectionRuleDetail',query:query})
       this.$store.dispatch('changeDetailDrawer',true)
+    },
+    onDel(id){
+      this.$confirm('确定删除该收款条件吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        closeOnClickModal:false,
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "id":20230110100203,
+          "content":{
+            "sa_receivableruleids":[id]
+          }
+        })
+        this.tool.showMessage(res,()=>{
+         this.$emit('onSuccess')
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    onSuccess(){
+      this.$emit('onSuccess')
     }
   }
 }