1.完成单据生成页面功能
parent
0f4f200bbc
commit
a2e4601ad7
@ -0,0 +1,33 @@
|
||||
import axios from "../../utils/request";
|
||||
|
||||
export function getBusTypeChangeList(params) {
|
||||
return axios({
|
||||
url: "/basic/bustype/change/filter",
|
||||
method: "get",
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
export function addBusTypeChange(data) {
|
||||
return axios({
|
||||
url: "/basic/bustype/change/insert",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function updateBusTypeChange(data) {
|
||||
return axios({
|
||||
url: "/basic/bustype/change/update",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteBusTypeChange(data) {
|
||||
return axios({
|
||||
url: "/basic/bustype/change/delete",
|
||||
method: "post",
|
||||
data: data
|
||||
});
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="inputQuery" :rules="formRules" ref="dataForm" label-width="120px" border>
|
||||
<el-row type="flex">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="单据类型名称" prop="originName">
|
||||
<el-input v-model="inputQuery.originName" :disabled="!isAdd" size="small" placeholder="请输入内容" style="width: 90%"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="11">
|
||||
<el-form-item label="单据类型代码" prop="originAction">
|
||||
<el-input v-model="inputQuery.originAction" :disabled="!isAdd" size="small" placeholder="请输入内容" style="width: 90%"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row type="flex">
|
||||
<el-col :span="11">
|
||||
<el-form-item label="目标单据类型" prop="targetAction">
|
||||
<el-select v-model="inputQuery.targetAction" placeholder="请选择" clearable size="small" style="width: 90%">
|
||||
<el-option
|
||||
v-for="item in busTypes"
|
||||
:key="item.action"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left"> {{item.name}}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{item.action}}</span>
|
||||
</el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="11">
|
||||
<el-form-item label="启用状态" prop="enable">
|
||||
<el-select v-model="inputQuery.enable"
|
||||
size="small"
|
||||
placeholder="启用状态"
|
||||
style="width: 90%"
|
||||
clearable
|
||||
>
|
||||
<el-option label="启用" :value="true"></el-option>
|
||||
<el-option label="禁用" :value="false"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex">
|
||||
<el-col :span="23" type="flex">
|
||||
<el-form-item prop="comments">
|
||||
<label slot="label">备  注</label>
|
||||
<el-input v-model="inputQuery.remark" size="small" style="width: 90%" type="textarea"
|
||||
row="3"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getBusTypeList} from "@/api/basic/busType";
|
||||
|
||||
export default {
|
||||
name: "BusTypePreModify",
|
||||
props: {
|
||||
inputQuery: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
enabled: true,
|
||||
isBuType: true,
|
||||
},
|
||||
busTypes: [],
|
||||
isAdd: false,
|
||||
formRules: {
|
||||
originName: [
|
||||
{
|
||||
required: true,
|
||||
message: "补单类型名称不能为空",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
originAction: [
|
||||
{
|
||||
required: true,
|
||||
message: "补单类型代码不能为空",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
targetAction: [
|
||||
{
|
||||
required: true,
|
||||
message: "目标单据类型不能为空",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
enable: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择启用状态",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getBusType() {
|
||||
let params = {
|
||||
enable: true
|
||||
};
|
||||
getBusTypeList(params).then((res) => {
|
||||
if (res.code === 20000) {
|
||||
this.busTypes = res.data.list || [];
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.inputQuery.originAction == null) {
|
||||
this.isAdd = true;
|
||||
}
|
||||
this.getBusType();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue