196 lines
6.2 KiB
Vue
196 lines
6.2 KiB
Vue
|
|
<template>
|
|||
|
|
<div >
|
|||
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|||
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="运单号" prop="billCode">
|
|||
|
|
<el-input v-model="form.billCode" placeholder="请输入运单号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="附件类型" prop="attachType">
|
|||
|
|
<el-input v-model="form.attachType" placeholder="请输入附件类型" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="文件名称" prop="fileName">
|
|||
|
|
<el-input v-model="form.fileName" placeholder="请输入文件名称" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="文件地址" prop="fileUrl">
|
|||
|
|
<el-input v-model="form.fileUrl" placeholder="请输入文件地址" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="文件大小KB" prop="fileSiez">
|
|||
|
|
<el-input v-model="form.fileSiez" placeholder="请输入文件大小KB" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="文件描述" prop="fileDesc">
|
|||
|
|
<el-input v-model="form.fileDesc" placeholder="请输入文件描述" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="排序" prop="orderNum">
|
|||
|
|
<el-input v-model="form.orderNum" placeholder="请输入排序" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="数据来源" prop="dataFrom">
|
|||
|
|
<el-input v-model="form.dataFrom" placeholder="请输入数据来源" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="审核状态" prop="blAudit">
|
|||
|
|
<el-input v-model="form.blAudit" placeholder="请输入审核状态" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="审核日期" prop="auditDate">
|
|||
|
|
<el-date-picker clearable
|
|||
|
|
v-model="form.auditDate"
|
|||
|
|
type="date"
|
|||
|
|
value-format="yyyy-MM-dd"
|
|||
|
|
placeholder="请选择审核日期">
|
|||
|
|
</el-date-picker>
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="审核人" prop="auditManCode">
|
|||
|
|
<el-input v-model="form.auditManCode" placeholder="请输入审核人" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="审核站点" prop="auditSiteCode">
|
|||
|
|
<el-input v-model="form.auditSiteCode" placeholder="请输入审核站点" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="审核异常原因" prop="auditNote">
|
|||
|
|
<el-input v-model="form.auditNote" placeholder="请输入审核异常原因" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="录单备注" prop="remark">
|
|||
|
|
<el-input v-model="form.remark" placeholder="请输入录单备注" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
</el-row>
|
|||
|
|
</el-form>
|
|||
|
|
<div style="text-align: center;margin-bottom: 10px;">
|
|||
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|||
|
|
<el-button @click="cancel">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import { listEmisWaybillDeclareAttachment, getEmisWaybillDeclareAttachment, delEmisWaybillDeclareAttachment, addEmisWaybillDeclareAttachment, updateEmisWaybillDeclareAttachment } from "@/api/emis/emisWaybillDeclareAttachment";
|
|||
|
|
|
|||
|
|
export default {
|
|||
|
|
name: "emisWaybillDeclareAttachmentForm",
|
|||
|
|
props:{
|
|||
|
|
id:{
|
|||
|
|
type:Number
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
components: { },
|
|||
|
|
dicts: [
|
|||
|
|
],
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
emisWaybillDeclareAttachmentOptions: [],
|
|||
|
|
// 遮罩层
|
|||
|
|
loading: true,
|
|||
|
|
// 表单参数
|
|||
|
|
form: {},
|
|||
|
|
// 表单校验
|
|||
|
|
rules: {
|
|||
|
|
id: [
|
|||
|
|
{ required: true, message: "id不能为空", trigger: "blur" }
|
|||
|
|
],
|
|||
|
|
delFlag: [
|
|||
|
|
{ required: true, message: "删除标志(0代表存在不能为空", trigger: "blur" }
|
|||
|
|
],
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
watch: {
|
|||
|
|
"id": {
|
|||
|
|
handler (newValue, oldValue) {
|
|||
|
|
this.id = newValue;
|
|||
|
|
this.initData();
|
|||
|
|
},
|
|||
|
|
deep: true
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
created() {
|
|||
|
|
this.initData();
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
methods: {
|
|||
|
|
initData() {
|
|||
|
|
|
|||
|
|
if(this.id !=null) {
|
|||
|
|
this.loading = true;
|
|||
|
|
getEmisWaybillDeclareAttachment(this.id).then(response => {
|
|||
|
|
this.form = response.data;
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
}else{
|
|||
|
|
this.reset();
|
|||
|
|
}
|
|||
|
|
// this.getTreeselect();
|
|||
|
|
},
|
|||
|
|
// 取消按钮
|
|||
|
|
cancel() {
|
|||
|
|
this.reset();
|
|||
|
|
this.$emit("on-cancel");
|
|||
|
|
},
|
|||
|
|
// 表单重置
|
|||
|
|
reset() {
|
|||
|
|
this.form = {
|
|||
|
|
id: null,
|
|||
|
|
waybillId: null,
|
|||
|
|
billCode: null,
|
|||
|
|
attachType: null,
|
|||
|
|
fileName: null,
|
|||
|
|
fileUrl: null,
|
|||
|
|
fileSiez: null,
|
|||
|
|
fileDesc: null,
|
|||
|
|
orderNum: null,
|
|||
|
|
dataFrom: null,
|
|||
|
|
blAudit: null,
|
|||
|
|
auditDate: null,
|
|||
|
|
auditManCode: null,
|
|||
|
|
auditSiteCode: null,
|
|||
|
|
auditNote: null,
|
|||
|
|
remark: null,
|
|||
|
|
};
|
|||
|
|
this.resetForm("form");
|
|||
|
|
},
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
submitForm() {
|
|||
|
|
this.$refs["form"].validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
if (this.form.id != null) {
|
|||
|
|
updateEmisWaybillDeclareAttachment(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.$emit("on-changed");
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
addEmisWaybillDeclareAttachment(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("新增成功");
|
|||
|
|
this.$emit("on-changed");
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
</script>
|