265 lines
8.5 KiB
Vue
265 lines
8.5 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="serialNo">
|
|||
|
|
<el-input v-model="form.serialNo" placeholder="请输入进仓序列号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="进仓单号" prop="inNo">
|
|||
|
|
<el-input v-model="form.inNo" placeholder="请输入进仓单号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="进仓子批次单号in_no+001" prop="inBatchNo">
|
|||
|
|
<el-input v-model="form.inBatchNo" placeholder="请输入进仓子批次单号in_no+001" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="客户编号" prop="customerCode">
|
|||
|
|
<el-input v-model="form.customerCode" placeholder="请输入客户编号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="客户名称" prop="customerName">
|
|||
|
|
<el-input v-model="form.customerName" placeholder="请输入客户名称" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="订单号" prop="orderSn">
|
|||
|
|
<el-input v-model="form.orderSn" placeholder="请输入订单号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<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="transCarNo">
|
|||
|
|
<el-input v-model="form.transCarNo" placeholder="请输入运输工具编号" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="进仓日期" prop="entryDate">
|
|||
|
|
<el-date-picker clearable
|
|||
|
|
v-model="form.entryDate"
|
|||
|
|
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="confirmStatus">
|
|||
|
|
<el-input v-model="form.confirmStatus" placeholder="请输入客户确认状态" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="确认时间" prop="confirmDate">
|
|||
|
|
<el-date-picker clearable
|
|||
|
|
v-model="form.confirmDate"
|
|||
|
|
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="status">
|
|||
|
|
<el-input v-model="form.status" placeholder="请输入状态" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="总件数" prop="totalParcelQty">
|
|||
|
|
<el-input v-model="form.totalParcelQty" placeholder="请输入总件数" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="总体积" prop="totalVolume">
|
|||
|
|
<el-input v-model="form.totalVolume" placeholder="请输入总体积" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="24">
|
|||
|
|
<el-form-item label="总重量" prop="totalWeight">
|
|||
|
|
<el-input v-model="form.totalWeight" 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-col :span="24">
|
|||
|
|
<el-form-item label="删除标志(0代表存在" prop="delFlag">
|
|||
|
|
<el-input v-model="form.delFlag" placeholder="请输入删除标志(0代表存在" />
|
|||
|
|
</el-form-item>
|
|||
|
|
</el-col>
|
|||
|
|
|
|||
|
|
<!--
|
|||
|
|
<el-form-item label="上级字典">
|
|||
|
|
<treeselect
|
|||
|
|
ref="tree"
|
|||
|
|
v-model="form.parentId"
|
|||
|
|
:options="emisWarehouseInBatchOptions"
|
|||
|
|
:normalizer="normalizer"
|
|||
|
|
:default-expand-level="1"
|
|||
|
|
:show-count="true"
|
|||
|
|
placeholder="选择上级"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
-->
|
|||
|
|
</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 { listEmisWarehouseInBatch, getEmisWarehouseInBatch, delEmisWarehouseInBatch, addEmisWarehouseInBatch, updateEmisWarehouseInBatch } from "@/api/emis/emisWarehouseInBatch";
|
|||
|
|
|
|||
|
|
export default {
|
|||
|
|
name: "emisWarehouseInBatchForm",
|
|||
|
|
props:{
|
|||
|
|
id:{
|
|||
|
|
type:Number
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
components: { },
|
|||
|
|
dicts: [
|
|||
|
|
],
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
emisWarehouseInBatchOptions: [],
|
|||
|
|
// 遮罩层
|
|||
|
|
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;
|
|||
|
|
getEmisWarehouseInBatch(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,
|
|||
|
|
serialNo: null,
|
|||
|
|
inNo: null,
|
|||
|
|
inBatchNo: null,
|
|||
|
|
customerCode: null,
|
|||
|
|
customerName: null,
|
|||
|
|
orderSn: null,
|
|||
|
|
billCode: null,
|
|||
|
|
transCarNo: null,
|
|||
|
|
entryDate: null,
|
|||
|
|
confirmStatus: null,
|
|||
|
|
confirmDate: null,
|
|||
|
|
status: null,
|
|||
|
|
totalParcelQty: null,
|
|||
|
|
totalVolume: null,
|
|||
|
|
totalWeight: null,
|
|||
|
|
remark: null,
|
|||
|
|
tenantId: null,
|
|||
|
|
delFlag: null,
|
|||
|
|
createBy: null,
|
|||
|
|
createTime: null,
|
|||
|
|
updateBy: null,
|
|||
|
|
updateTime: null,
|
|||
|
|
createSite: null,
|
|||
|
|
updateSite: null
|
|||
|
|
};
|
|||
|
|
this.resetForm("form");
|
|||
|
|
},
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
submitForm() {
|
|||
|
|
this.$refs["form"].validate(valid => {
|
|||
|
|
if (valid) {
|
|||
|
|
if (this.form.id != null) {
|
|||
|
|
updateEmisWarehouseInBatch(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.$emit("on-changed");
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
addEmisWarehouseInBatch(this.form).then(response => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.$emit("on-changed");
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
// /** 转换菜单数据结构 */
|
|||
|
|
// normalizer(node) {
|
|||
|
|
// if (node.children && !node.children.length) {
|
|||
|
|
// delete node.children;
|
|||
|
|
// }
|
|||
|
|
// return {
|
|||
|
|
// id: node.id,
|
|||
|
|
// label: node.idName,
|
|||
|
|
// children: node.children
|
|||
|
|
// };
|
|||
|
|
// },
|
|||
|
|
// /** 查询菜单下拉树结构 */
|
|||
|
|
// getTreeselect() {
|
|||
|
|
// const queryParams = {}
|
|||
|
|
// listEmisWarehouseInBatch(queryParams).then(response => {
|
|||
|
|
// this.emisWarehouseInBatchOptions = [];
|
|||
|
|
// const rootItem = { idId: 0, emisWarehouseInBatchName: '-', children: [] };
|
|||
|
|
// rootItem.children = this.handleTree(response.data, "id");
|
|||
|
|
// this.emisWarehouseInBatchOptions.push(rootItem);
|
|||
|
|
|
|||
|
|
// if(this.parentId != undefined) {
|
|||
|
|
// this.form.parentId = this.parentId;
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
// });
|
|||
|
|
// },
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
</script>
|