物资管理PC端 根据原形调整
This commit is contained in:
parent
3bd42ef2a7
commit
e20e06c303
@ -12,6 +12,7 @@
|
||||
v-bind="componentProps"
|
||||
@vue:mounted="handleComponentMount"
|
||||
/>
|
||||
<slot></slot>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="onCancel">取消</el-button>
|
||||
|
||||
@ -7,22 +7,47 @@
|
||||
style="max-height: 60vh; overflow-y: auto; padding-right: 50px"
|
||||
>
|
||||
<el-form-item label="所属服务站:">
|
||||
<span>{{ form.material.yhzmc}}</span>
|
||||
<span>{{ yhzData.rawName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称:">
|
||||
<el-input v-model="form.material.wzmc"></el-input>
|
||||
<el-input
|
||||
maxlength="20"
|
||||
show-word-limit
|
||||
v-model="form.material.wzmc"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量:">
|
||||
<el-input v-model="form.material.sl"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位:">
|
||||
<el-select v-model="form.material.dw">
|
||||
<el-form-item label="数量与单位:">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-input
|
||||
v-model="form.material.sl"
|
||||
type="number"
|
||||
placeholder="请输入数量"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-select
|
||||
v-model="form.material.dw"
|
||||
filterable
|
||||
allow-create
|
||||
clearable
|
||||
placeholder="选择单位"
|
||||
>
|
||||
<el-option label="个" value="个"></el-option>
|
||||
<el-option label="包" value="包"></el-option>
|
||||
<el-option label="盒" value="盒"></el-option>
|
||||
<el-option label="桶" value="桶"></el-option>
|
||||
<el-option label="箱" value="箱"></el-option>
|
||||
<el-option label="袋" value="袋"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备经度:">
|
||||
<span>{{ yhzData.jd }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备纬度:">
|
||||
<span>{{ yhzData.wd }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -34,7 +59,7 @@ const formRef = ref(null);
|
||||
defineExpose({ formRef });
|
||||
|
||||
const props = defineProps({
|
||||
detailData: {
|
||||
yhzData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@ const filterText = ref(''); // 树节点过滤条件
|
||||
const tableData = ref([]);
|
||||
const qxmc = ref(''); // 区县名称
|
||||
const yhzid = ref(''); // 养护站id
|
||||
const yhzmc = ref(''); // 养护站名称
|
||||
const yhzData = ref(); // 养护站信息
|
||||
const filterData = reactive({
|
||||
wzmc: '',
|
||||
}); // 表格过滤条件
|
||||
@ -72,7 +72,8 @@ const INIT_FORM = {
|
||||
wzmc: "",
|
||||
fzrid: "",
|
||||
yhzid: "",
|
||||
yhzmc: "",
|
||||
jd: "",
|
||||
wd: "",
|
||||
},
|
||||
photos: [],
|
||||
}; // 表单初始值
|
||||
@ -118,6 +119,8 @@ const getTreeData = async () => {
|
||||
name: `${site.mc}(${site.wzsl})`,
|
||||
type: 'site',
|
||||
rawName: site.mc, // 原始名称
|
||||
jd: site.jd,
|
||||
wd: site.wd,
|
||||
})),
|
||||
rawName: qx.qxmc, // 原始名称
|
||||
})
|
||||
@ -137,21 +140,21 @@ const handleNodeClick = (data, node) => {
|
||||
if (data.type === 'area' && node.expanded === false) {
|
||||
console.log('树节点关闭', node.expanded)
|
||||
yhzid.value = ''; // 重置养护站id
|
||||
yhzmc.value = ''; // 重置养护站名称
|
||||
yhzData.value = null; // 重置养护站信息
|
||||
qxmc.value = ''; // 重置区县名称
|
||||
return;
|
||||
}
|
||||
if (data.type === 'area') {
|
||||
console.log('你点击的是区县', data.id)
|
||||
yhzid.value = ''; // 重置养护站id
|
||||
yhzmc.value = ''; // 重置养护站名称
|
||||
yhzData.value = null; // 重置养护站信息
|
||||
qxmc.value = data.id; // 保存区县名称
|
||||
|
||||
}
|
||||
if (data.type === 'site') {
|
||||
console.log('你点击的是站点', data.name)
|
||||
yhzid.value = data.id; // 保存养护站id
|
||||
yhzmc.value = data.rawName; // 保存养护站名称
|
||||
yhzData.value = data; // 保存养护站信息
|
||||
qxmc.value = ''; // 重置区县名称
|
||||
}
|
||||
};
|
||||
@ -366,9 +369,10 @@ const openAddModel = () => {
|
||||
model.content = AddDialog;
|
||||
Object.assign(form, INIT_FORM);
|
||||
form.material.yhzid = yhzid.value;
|
||||
form.material.yhzmc = yhzmc.value;
|
||||
form.material.jd = yhzData.value?.jd;
|
||||
form.material.wd = yhzData.value?.wd;
|
||||
model.props = {
|
||||
detailData: {},
|
||||
yhzData: yhzData.value,
|
||||
form: form,
|
||||
};
|
||||
model.onCancel = () => {
|
||||
@ -396,6 +400,7 @@ const openAddModel = () => {
|
||||
console.log('error', error)
|
||||
}
|
||||
};
|
||||
model.width = '40%';
|
||||
modelVisible.value = true;
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
:onConfirm="script.model?.onConfirm"
|
||||
:onCancel="script.model?.onCancel"
|
||||
ref="dialogRef"
|
||||
width="60%"
|
||||
:width="script.model?.width"
|
||||
>
|
||||
</MyDialog>
|
||||
<MyDrawer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user