|
|
@@ -51,7 +51,9 @@
|
|
|
<tableTemplate :checkbox="true" ref="orderRow" :param="orderRow.param" :layout="orderRow.tablecols" height="calc(100vh - 295px)" :custom="true" :width="true" @selectionChange="orderRowSelect">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'amount'">
|
|
|
- <el-input v-model="scope.column.data.amount" autocomplete="off" placeholder="请输入" @change="orderRowChange(scope.column.data)"></el-input>
|
|
|
+ <el-form-item prop="amountRules">
|
|
|
+ <el-input v-model="scope.column.data.amount" autocomplete="off" placeholder="请输入" ></el-input>
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname === 'intoaccountdate'">
|
|
|
<el-date-picker
|
|
|
@@ -86,6 +88,10 @@ export default {
|
|
|
name: "add",
|
|
|
components:{tableTemplate},
|
|
|
data(){
|
|
|
+ var validateAmount = (rule, value, callback) =>{
|
|
|
+ console.log(rule,'rule')
|
|
|
+ console.log(value,'value')
|
|
|
+ }
|
|
|
return {
|
|
|
dialogVisible:false,
|
|
|
enterprisename:'',
|
|
|
@@ -145,15 +151,33 @@ export default {
|
|
|
sa_orderid:[
|
|
|
{ required: true, message: '请选择订单', trigger: 'change'},
|
|
|
],
|
|
|
- orderRow:[
|
|
|
+ /*orderRow:[
|
|
|
{ required: true, message: '请选择订单行', trigger: 'change'},
|
|
|
+ ],*/
|
|
|
+ amountRules: [
|
|
|
+ { required: true, validator: validateAmount,message: '姓名不能为空', trigger: 'blur' },
|
|
|
+ // 其他校验规则
|
|
|
],
|
|
|
},
|
|
|
orderInfo:[],
|
|
|
- loading:false
|
|
|
+ loading:false,
|
|
|
+ inputValidations: {}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ validateInput(index,data) {
|
|
|
+ console.log(index,'1111')
|
|
|
+ console.log(data,'2222')
|
|
|
+ /*const inputValue = this.tableData[index].value;*/
|
|
|
+ // 校验规则示例:非空校验
|
|
|
+ if (index > data) {
|
|
|
+ console.log('大于')
|
|
|
+ this.$set(this.inputValidations, `input_${index}`, false);
|
|
|
+ } else {
|
|
|
+ console.log('小于')
|
|
|
+ this.$set(this.inputValidations, `input_${index}`, true);
|
|
|
+ }
|
|
|
+ },
|
|
|
addShow(){
|
|
|
},
|
|
|
/*可选客户*/
|