|
|
@ -54,6 +54,7 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="更新时间" prop="update_time" width="180"></el-table-column>
|
|
|
|
<el-table-column label="更新时间" prop="update_time" width="180"></el-table-column>
|
|
|
|
<el-table-column label="所属客户" prop="customerName" width="240"></el-table-column>
|
|
|
|
<el-table-column label="所属客户" prop="customerName" width="240"></el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="单据类型" prop="bussinessTypeName" width="240"></el-table-column>
|
|
|
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
|
|
|
<el-table-column label="备注" prop="remark"></el-table-column>
|
|
|
|
<el-table-column label="操作" fixed="right" width="250">
|
|
|
|
<el-table-column label="操作" fixed="right" width="250">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
@ -117,7 +118,7 @@
|
|
|
|
<span>模板名称:</span>
|
|
|
|
<span>模板名称:</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="5">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item prop="name">
|
|
|
|
<el-form-item prop="name">
|
|
|
|
<el-input v-model="formData.name" auto-complete="off" :disabled="false"></el-input>
|
|
|
|
<el-input v-model="formData.name" auto-complete="off" :disabled="false"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -134,6 +135,7 @@
|
|
|
|
filterable
|
|
|
|
filterable
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
remote
|
|
|
|
remote
|
|
|
|
|
|
|
|
@change="changeCustomer"
|
|
|
|
reserve-keyword
|
|
|
|
reserve-keyword
|
|
|
|
placeholder="请输入关键词"
|
|
|
|
placeholder="请输入关键词"
|
|
|
|
:remote-method="getCustomerList"
|
|
|
|
:remote-method="getCustomerList"
|
|
|
@ -147,19 +149,42 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-col :span="2">
|
|
|
|
<el-col :span="2">
|
|
|
|
<div class="ao-text">
|
|
|
|
<div class="ao-text">
|
|
|
|
<span>备注:</span>
|
|
|
|
<span>模板类型:</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item prop="module">
|
|
|
|
<el-form-item prop="module">
|
|
|
|
<el-select v-model="formData.module" placeholder="模板类型">
|
|
|
|
<el-select v-model="formData.module" placeholder="模板类型">
|
|
|
|
<el-option label="单据" value="2"></el-option>
|
|
|
|
<el-option label="单据" value="2"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
|
|
|
<span>单据类型:</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
|
|
<el-form-item prop="module">
|
|
|
|
|
|
|
|
<el-select v-model="formData.action" :disabled="enableAction" placeholder="单据类型">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in actions"
|
|
|
|
|
|
|
|
:key="item.action"
|
|
|
|
|
|
|
|
:label="item.name"
|
|
|
|
|
|
|
|
:value="item.action"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-row :gutter="20">
|
|
|
|
<el-col :span="2">
|
|
|
|
<el-col :span="2">
|
|
|
|
<div class="ao-text">
|
|
|
|
<div class="ao-text">
|
|
|
@ -195,7 +220,8 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button slot="trigger" size="small" type="primary" :disabled="uploadDisabled">选取文件
|
|
|
|
<el-button slot="trigger" size="small" type="primary" :disabled="uploadDisabled">选取文件
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<div slot="tip" class="el-upload__tip" v-if="formData.path==''">只能上传 jasper 文件,且不超过 2
|
|
|
|
<div slot="tip" class="el-upload__tip" v-if="formData.path==''">只能上传 jasper 文件,且不超过
|
|
|
|
|
|
|
|
2
|
|
|
|
MB
|
|
|
|
MB
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div slot="tip" class="el-upload__tip">{{ formData.path }}</div>
|
|
|
|
<div slot="tip" class="el-upload__tip">{{ formData.path }}</div>
|
|
|
@ -320,12 +346,14 @@ import {saveAs} from 'file-saver';
|
|
|
|
import {demoPrint} from "@/api/itextpdf/itextpdf";
|
|
|
|
import {demoPrint} from "@/api/itextpdf/itextpdf";
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
import {getCompanyList} from "@/api/warehouse/company";
|
|
|
|
import {getCompanyList} from "@/api/warehouse/company";
|
|
|
|
|
|
|
|
import {getBussinessType} from "@/api/basic/bussinessType";
|
|
|
|
|
|
|
|
|
|
|
|
const formJson = {
|
|
|
|
const formJson = {
|
|
|
|
id: "",
|
|
|
|
id: "",
|
|
|
|
name: "",
|
|
|
|
name: "",
|
|
|
|
type: "2",
|
|
|
|
type: "2",
|
|
|
|
module: null,
|
|
|
|
module: null,
|
|
|
|
|
|
|
|
action: null,
|
|
|
|
param: "",
|
|
|
|
param: "",
|
|
|
|
path: "",
|
|
|
|
path: "",
|
|
|
|
jrxmlPath: null,
|
|
|
|
jrxmlPath: null,
|
|
|
@ -407,7 +435,9 @@ export default {
|
|
|
|
uploadDisabled: false,
|
|
|
|
uploadDisabled: false,
|
|
|
|
moduleLoading: false,
|
|
|
|
moduleLoading: false,
|
|
|
|
moduleNameMap: {0: "标签", 1: "报表", 2: "单据"},
|
|
|
|
moduleNameMap: {0: "标签", 1: "报表", 2: "单据"},
|
|
|
|
customerList: []
|
|
|
|
customerList: [],
|
|
|
|
|
|
|
|
actions: [],
|
|
|
|
|
|
|
|
enableAction: true
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -441,12 +471,12 @@ export default {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
if (this.list.length > 0) {
|
|
|
|
if (this.list.length > 0) {
|
|
|
|
this.list.forEach(item =>{
|
|
|
|
this.list.forEach(item => {
|
|
|
|
if (isBlank(item.customerId)) {
|
|
|
|
if (isBlank(item.customerId)) {
|
|
|
|
item.customerName = '公共模板';
|
|
|
|
item.customerName = '公共模板';
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.customerList.forEach(customer => {
|
|
|
|
this.customerList.forEach(customer => {
|
|
|
|
if (item.customerId === customer.customerId){
|
|
|
|
if (item.customerId === customer.customerId) {
|
|
|
|
item.customerName = customer.companyName;
|
|
|
|
item.customerName = customer.companyName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -592,6 +622,14 @@ export default {
|
|
|
|
this.formData = Object.assign({}, row);
|
|
|
|
this.formData = Object.assign({}, row);
|
|
|
|
this.formData.module = row.module + "";
|
|
|
|
this.formData.module = row.module + "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isBlank(row.customerId)) {
|
|
|
|
|
|
|
|
this.enableAction = false;
|
|
|
|
|
|
|
|
this.getActions(row.customerId);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.enableAction = true;
|
|
|
|
|
|
|
|
this.actions = [];
|
|
|
|
|
|
|
|
}
|
|
|
|
this.index = index;
|
|
|
|
this.index = index;
|
|
|
|
this.formName = "update";
|
|
|
|
this.formName = "update";
|
|
|
|
this.uploadDisabled = true;
|
|
|
|
this.uploadDisabled = true;
|
|
|
@ -806,6 +844,25 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
getActions(customerId) {
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
|
|
|
|
customerId: customerId === null ? this.formData.customerId : customerId,
|
|
|
|
|
|
|
|
page: 1,
|
|
|
|
|
|
|
|
limit: 10000
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getBussinessType(query).then((res) => {
|
|
|
|
|
|
|
|
this.actions = res.data.list;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
changeCustomer() {
|
|
|
|
|
|
|
|
if (!isBlank(this.formData.customerId)) {
|
|
|
|
|
|
|
|
this.formData.action = null;
|
|
|
|
|
|
|
|
this.getActions();
|
|
|
|
|
|
|
|
this.enableAction = false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.enableAction = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
filters: {
|
|
|
|
filters: {
|
|
|
|
paramStatusFilterType(paramStatus) {
|
|
|
|
paramStatusFilterType(paramStatus) {
|
|
|
@ -830,6 +887,7 @@ export default {
|
|
|
|
this.getPDFModuleNameList();
|
|
|
|
this.getPDFModuleNameList();
|
|
|
|
this.getModuleList();
|
|
|
|
this.getModuleList();
|
|
|
|
this.getCustomerList();
|
|
|
|
this.getCustomerList();
|
|
|
|
|
|
|
|
this.getActions();
|
|
|
|
this.uploadUrl = BASE_URL + "/udiwms/upload/pdf/template/jasper";
|
|
|
|
this.uploadUrl = BASE_URL + "/udiwms/upload/pdf/template/jasper";
|
|
|
|
this.uploadJrxmlUrl = BASE_URL + "/udiwms/upload/pdf/template/jrxml";
|
|
|
|
this.uploadJrxmlUrl = BASE_URL + "/udiwms/upload/pdf/template/jrxml";
|
|
|
|
this.headers = {
|
|
|
|
this.headers = {
|
|
|
|