Commit c27319a3 by liuxin

单据表格调整

parent a04d7647
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<!-- =================已交单据====================== --> <!-- =================已交单据====================== -->
<c-col :span="24"> <c-col :span="24">
<el-button slot="reference" style="float:right" @click="addDocgrdDataStore">添加</el-button> <el-button style="margin-bottom:5px;float:right" @click="addDocgrdDataStore" type="primary">新增单据</el-button>
</c-col> </c-col>
<c-col :span="24"> <c-col :span="24">
<!-- :list="model.bdtp.docgrdm.docgrd" --> <!-- :list="model.bdtp.docgrdm.docgrd" -->
...@@ -178,8 +178,8 @@ ...@@ -178,8 +178,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="state" label="状态" width="auto"> <el-table-column prop="state" label="状态" width="auto">
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="det" width="100px" fixed="right"> <el-table-column label="操作" prop="det" width="170px" fixed="right">
<template slot="header"> <!-- <template slot="header">
<span>操作</span> <span>操作</span>
<el-button <el-button
circle circle
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
@click="addDialogVisible = true" @click="addDialogVisible = true"
> >
</el-button> </el-button>
</template> </template> -->
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover <el-popover
placement="right" placement="right"
...@@ -212,12 +212,14 @@ ...@@ -212,12 +212,14 @@
<div class="file-add" title="导入文件"> <div class="file-add" title="导入文件">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</div> </div>
<el-button slot="reference" @click="addPDF(scope.row.id)">添加</el-button> <el-button slot="reference" @click="addPDF(scope.row.id)" type="primary">添加</el-button>
<el-button v-if="scope.row.state != '缺失'" slot="reference" @click="detailPDF(scope.row.id)">详情</el-button>
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
</c-table> </c-table>
</c-col> </c-col>
<!-- 不符点 -->
<c-col> <c-col>
<el-dialog :visible.sync="InsertErrorDialogVisibal" center width="500px"> <el-dialog :visible.sync="InsertErrorDialogVisibal" center width="500px">
<c-col :span="24"> <c-col :span="24">
...@@ -229,7 +231,23 @@ ...@@ -229,7 +231,23 @@
</c-col> </c-col>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="InsertError()">确定</el-button> <el-button type="primary" @click="InsertError()">确定</el-button>
<el-button @click="InsertErrorDialogVisibal = false">取消</el-button> <el-button @click="InsertErrorDialogVisibal = false;newInsertError= ''">取消</el-button>
</span>
</el-dialog>
</c-col>
<!-- 新加单据 -->
<c-col>
<el-dialog :visible.sync="InsertGridDataDialogVisibal" center width="500px">
<c-col :span="24">
<c-col :span="20">
<el-form-item label="单据名称" label-width="100px">
<c-input v-model="newInsertGridData"></c-input>
</el-form-item>
</c-col>
</c-col>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="InsertGridData()">确定</el-button>
<el-button @click="InsertGridDataDialogVisibal = false;newInsertGridData = ''">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
</c-col> </c-col>
...@@ -253,8 +271,10 @@ export default { ...@@ -253,8 +271,10 @@ export default {
return { return {
addDialogVisible: false, addDialogVisible: false,
InsertErrorDialogVisibal: false, InsertErrorDialogVisibal: false,
InsertGridDataDialogVisibal: false,
newInsertError:"", newInsertError:"",
newInsertErrorIndex: -1, newInsertErrorIndex: -1,
newInsertGridData:"",
dialog: { dialog: {
cmail1: "", cmail1: "",
cmail2: "", cmail2: "",
...@@ -368,14 +388,26 @@ export default { ...@@ -368,14 +388,26 @@ export default {
addPDF(idx){ addPDF(idx){
this.selectPDFData = idx; this.selectPDFData = idx;
}, },
detailPDF(id){
this.openPdfDialog(id, 0);
},
openPdfDialog(id, idx) { openPdfDialog(id, idx) {
this.$refs.ocrRecognition.show = true this.$refs.ocrRecognition.show = true
var tempId = 0;
for(let i = 0; i < this.docgrdDataStore.length; i++){
if(id == this.docgrdDataStore[i].id){
tempId = i;
break;
}
}
this.$refs.ocrRecognition.formData.type = this.$refs.ocrRecognition.fileType[tempId].value;
this.selectedPdf.id = id; this.selectedPdf.id = id;
this.selectedPdf.index = idx; this.selectedPdf.index = idx;
}, },
selectGridPDF(){ selectGridPDF(){
const id = this.selectedPdf.id; const id = this.selectedPdf.id;
const idx = this.selectedPdf.index; // const idx = this.selectedPdf.index;
const idx = 0; //PDF全部展示,就不存在idx
var tempData = []; var tempData = [];
var list = []; var list = [];
var flag = false; var flag = false;
...@@ -439,6 +471,19 @@ export default { ...@@ -439,6 +471,19 @@ export default {
this.newInsertError = ""; this.newInsertError = "";
this.InsertErrorDialogVisibal = false; this.InsertErrorDialogVisibal = false;
}, },
addDocgrdDataStore(){
this.InsertGridDataDialogVisibal = true;
},
InsertGridData(){
var index = this.docgrdData.length;
var tempData = this.dialog;
tempData.cmail1 = this.newInsertGridData;
tempData.id = "tempId" + index;
tempData.state = "符合";
this.docgrdData.push(this.dialog);
this.InsertGridDataDialogVisibal = false;
this.newInsertGridData = "";
}
}, },
created: function () { created: function () {
var IconList = JSON.parse(sessionStorage.getItem("IconList")); var IconList = JSON.parse(sessionStorage.getItem("IconList"));
......
...@@ -286,7 +286,7 @@ export default { ...@@ -286,7 +286,7 @@ export default {
formData.append('mode', 'formdata'); formData.append('mode', 'formdata');
formData.append('the_file', file) formData.append('the_file', file)
const loading = this.$parent.root.loading("正在识别中...") const loading = this.$parent.root.loading("正在识别中...")
axios.post('/ocr/file', formData, { axios.post('/ocr/mockfile', formData, {
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
}).then(res => { }).then(res => {
const data = res.data const data = res.data
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<el-form-item <el-form-item
label="h" label="h"
prop="wfetsk.tsklist.jobstrtimhh" prop="wfetsk.tsklist.jobstrtimhh"
label-width="20px" label-width="25px"
style="width: 100%" style="width: 100%"
> >
<c-input <c-input
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<c-col :span="4" :offset="1"> <c-col :span="4" :offset="1">
<el-form-item <el-form-item
label="min" label="min"
label-width="20px" label-width="25px"
style="width: 100%" style="width: 100%"
> >
<c-input <c-input
...@@ -148,7 +148,8 @@ ...@@ -148,7 +148,8 @@
<el-form-item <el-form-item
label="h" label="h"
prop="wfetsk.tsklist.downtimehh" prop="wfetsk.tsklist.downtimehh"
label-width="20px" label-width="25px"
style="width: 100%"
> >
<c-input <c-input
v-model="model.wfetsk.tsklist.downtimehh" v-model="model.wfetsk.tsklist.downtimehh"
...@@ -159,11 +160,12 @@ ...@@ -159,11 +160,12 @@
</c-col> </c-col>
<c-col :span="4" :offset="1"> <c-col :span="4" :offset="1">
<el-form-item label="min" prop="" label-width="20px"> <el-form-item label="min" prop="" label-width="25px" style="width: 100%">
<c-input <c-input
v-model="model.wfetsk.tsklist.downtimemm" v-model="model.wfetsk.tsklist.downtimemm"
disabled disabled
placeholder="" placeholder=""
style="width: 100%"
></c-input> ></c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment