|
@ -3,10 +3,10 @@ |
|
|
<div> |
|
|
<div> |
|
|
<el-form :inline="true" class="demo-form-inline"> |
|
|
<el-form :inline="true" class="demo-form-inline"> |
|
|
<el-form-item label="取码单编号:"> |
|
|
<el-form-item label="取码单编号:"> |
|
|
123123123 |
|
|
{{num}} |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="时间:"> |
|
|
<el-form-item label="时间:"> |
|
|
2021-05-01 |
|
|
{{theGetTime}} |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数:{{AllData.sendTotal}}</span> |
|
|
<span class="font-size-16 line-height-2em color-error" style="margin-right:20px;">发码总数:{{AllData.sendTotal}}</span> |
|
@ -23,9 +23,9 @@ |
|
|
> |
|
|
> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
:prop="'params.' + scope.$index + '.describe'" |
|
|
:prop="'params.' + scope.$index + '.summary'" |
|
|
:rules="paramsForm.paramsRules.describe"> |
|
|
:rules="paramsForm.paramsRules.summary"> |
|
|
<el-input v-model="scope.row.describe" size="small"></el-input> |
|
|
<el-input v-model="scope.row.summary" size="small"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -34,11 +34,10 @@ |
|
|
> |
|
|
> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
:prop="'params.' + scope.$index + '.company'" |
|
|
:prop="'params.' + scope.$index + '.whitelist_id'" |
|
|
:rules="paramsForm.paramsRules.company"> |
|
|
:rules="paramsForm.paramsRules.whitelist_id"> |
|
|
<el-select v-model="scope.row.company" placeholder="请选择印刷公司" size="small"> |
|
|
<el-select v-model="scope.row.whitelist_id" placeholder="请选择印刷公司" size="small"> |
|
|
<el-option label="公司一" value="1"></el-option> |
|
|
<el-option v-for="(item,index) in whiteList" :key="index" :label="item.companyName" :value="item.id"></el-option> |
|
|
<el-option label="公司二" value="2"></el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
@ -48,9 +47,9 @@ |
|
|
> |
|
|
> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-form-item |
|
|
<el-form-item |
|
|
:prop="'params.' + scope.$index + '.number'" |
|
|
:prop="'params.' + scope.$index + '.fetch_count'" |
|
|
:rules="paramsForm.paramsRules.number"> |
|
|
:rules="paramsForm.paramsRules.fetch_count"> |
|
|
<el-input v-model.number="scope.row.number" size="small"></el-input> |
|
|
<el-input v-model.number="scope.row.fetch_count" size="small"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
@ -76,6 +75,7 @@ |
|
|
import { |
|
|
import { |
|
|
addFetchList |
|
|
addFetchList |
|
|
} from "@/api/get" |
|
|
} from "@/api/get" |
|
|
|
|
|
import { getWhitelist } from "@/api/user" |
|
|
export default { |
|
|
export default { |
|
|
name: "addGet", |
|
|
name: "addGet", |
|
|
data() { |
|
|
data() { |
|
@ -86,35 +86,64 @@ export default { |
|
|
getTotal:'40000万', |
|
|
getTotal:'40000万', |
|
|
otherTotal:'50000万', |
|
|
otherTotal:'50000万', |
|
|
}, |
|
|
}, |
|
|
|
|
|
id:this.$route.query.id || "", |
|
|
|
|
|
num:'FMD_'+new Date().getTime(), |
|
|
|
|
|
theGetTime:new Date().toLocaleDateString() + ' ' + new Date().toTimeString().split(" ")[0], |
|
|
paramsForm:{ |
|
|
paramsForm:{ |
|
|
params: [ |
|
|
params: [], |
|
|
{describe:'aaa',number:123,company:'公司1'} |
|
|
|
|
|
], |
|
|
|
|
|
paramsRules:{ |
|
|
paramsRules:{ |
|
|
company:[ |
|
|
whitelist_id:[ |
|
|
{required: true, message: '请选择公司', trigger: 'change'} |
|
|
{required: true, message: '请选择公司', trigger: 'change'} |
|
|
], |
|
|
], |
|
|
number:[ |
|
|
fetch_count:[ |
|
|
{required: true,type:'number', message: '请输入取码数量', trigger: 'blur'} |
|
|
{required: true,type:'number', message: '请输入取码数量', trigger: 'blur'} |
|
|
], |
|
|
], |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
//表格数据 |
|
|
whiteList:[] |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
this.getCompanyList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getCompanyList(){ |
|
|
|
|
|
const params = { |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 1000, |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getWhitelist(params).then(res => { |
|
|
|
|
|
this.whiteList = res.data.list |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
addRowData(){ |
|
|
addRowData(){ |
|
|
this.paramsForm.params.push({describe:'',number:'',company:''}) |
|
|
this.paramsForm.params.push({summary:'',fetch_count:'',whitelist_id:''}) |
|
|
}, |
|
|
}, |
|
|
deleteData(index){ |
|
|
deleteData(index){ |
|
|
this.paramsForm.params.splice(index,1) |
|
|
this.paramsForm.params.splice(index,1) |
|
|
}, |
|
|
}, |
|
|
|
|
|
addFetch(){ |
|
|
|
|
|
const params = { |
|
|
|
|
|
fetch_time:this.theGetTime, |
|
|
|
|
|
fetch_id:this.num, |
|
|
|
|
|
list:this.paramsForm.params |
|
|
|
|
|
} |
|
|
|
|
|
addFetchList(params).then(res => { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: res.msg, |
|
|
|
|
|
type: res.code == 200 ? 'success' : 'error' |
|
|
|
|
|
}); |
|
|
|
|
|
this.$router.go(-1); |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
//form提交检验 |
|
|
//form提交检验 |
|
|
submitForm(formName) { |
|
|
submitForm(formName) { |
|
|
this.$refs[formName].validate((valid) => { |
|
|
this.$refs[formName].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
|
|
|
this.addFetch() |
|
|
} else { |
|
|
} else { |
|
|
console.log('error submit!!'); |
|
|
console.log('error submit!!'); |
|
|
return false; |
|
|
return false; |
|
|