Commit c27319a3 by liuxin

单据表格调整

parent a04d7647
......@@ -132,7 +132,7 @@
<!-- =================已交单据====================== -->
<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 :span="24">
<!-- :list="model.bdtp.docgrdm.docgrd" -->
......@@ -178,8 +178,8 @@
</el-table-column>
<el-table-column prop="state" label="状态" width="auto">
</el-table-column>
<el-table-column label="操作" prop="det" width="100px" fixed="right">
<template slot="header">
<el-table-column label="操作" prop="det" width="170px" fixed="right">
<!-- <template slot="header">
<span>操作</span>
<el-button
circle
......@@ -189,7 +189,7 @@
@click="addDialogVisible = true"
>
</el-button>
</template>
</template> -->
<template slot-scope="scope">
<el-popover
placement="right"
......@@ -212,12 +212,14 @@
<div class="file-add" title="导入文件">
<i class="el-icon-plus"></i>
</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>
</template>
</el-table-column>
</c-table>
</c-col>
<!-- 不符点 -->
<c-col>
<el-dialog :visible.sync="InsertErrorDialogVisibal" center width="500px">
<c-col :span="24">
......@@ -229,7 +231,23 @@
</c-col>
<span slot="footer" class="dialog-footer">
<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>
</el-dialog>
</c-col>
......@@ -253,8 +271,10 @@ export default {
return {
addDialogVisible: false,
InsertErrorDialogVisibal: false,
InsertGridDataDialogVisibal: false,
newInsertError:"",
newInsertErrorIndex: -1,
newInsertGridData:"",
dialog: {
cmail1: "",
cmail2: "",
......@@ -368,14 +388,26 @@ export default {
addPDF(idx){
this.selectPDFData = idx;
},
detailPDF(id){
this.openPdfDialog(id, 0);
},
openPdfDialog(id, idx) {
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.index = idx;
},
selectGridPDF(){
const id = this.selectedPdf.id;
const idx = this.selectedPdf.index;
// const idx = this.selectedPdf.index;
const idx = 0; //PDF全部展示,就不存在idx
var tempData = [];
var list = [];
var flag = false;
......@@ -439,6 +471,19 @@ export default {
this.newInsertError = "";
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 () {
var IconList = JSON.parse(sessionStorage.getItem("IconList"));
......
......@@ -286,7 +286,7 @@ export default {
formData.append('mode', 'formdata');
formData.append('the_file', file)
const loading = this.$parent.root.loading("正在识别中...")
axios.post('/ocr/file', formData, {
axios.post('/ocr/mockfile', formData, {
'Content-Type': 'multipart/form-data'
}).then(res => {
const data = res.data
......
......@@ -97,7 +97,7 @@
<el-form-item
label="h"
prop="wfetsk.tsklist.jobstrtimhh"
label-width="20px"
label-width="25px"
style="width: 100%"
>
<c-input
......@@ -111,7 +111,7 @@
<c-col :span="4" :offset="1">
<el-form-item
label="min"
label-width="20px"
label-width="25px"
style="width: 100%"
>
<c-input
......@@ -148,7 +148,8 @@
<el-form-item
label="h"
prop="wfetsk.tsklist.downtimehh"
label-width="20px"
label-width="25px"
style="width: 100%"
>
<c-input
v-model="model.wfetsk.tsklist.downtimehh"
......@@ -159,11 +160,12 @@
</c-col>
<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
v-model="model.wfetsk.tsklist.downtimemm"
disabled
placeholder=""
style="width: 100%"
></c-input>
</el-form-item>
</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