|
|
|
@ -11,7 +11,9 @@
|
|
|
|
|
<div class="el_top_btn"> |
|
|
|
|
<div> |
|
|
|
|
<el-button type="primary" @click="newlyadd" icon="el-icon-plus">新 增</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-delete">删除</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-delete" @click="DeleteInformationAll" |
|
|
|
|
>批量删除</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
|
<el-button icon="el-icon-refresh" @click="searchChangeS" circle></el-button> |
|
|
|
@ -38,7 +40,7 @@
|
|
|
|
|
<div class="ElBtnClass"> |
|
|
|
|
<el-button @click="view(slotProps.scope)">查看</el-button> |
|
|
|
|
<el-button @click="view(slotProps.scope)">编辑</el-button> |
|
|
|
|
<el-button @click="view(slotProps.scope)">删除</el-button> |
|
|
|
|
<el-button @click="DeleteInformation(slotProps.scope)">删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
@ -64,7 +66,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
<!-- 新增弹窗 --> |
|
|
|
|
<el-dialog v-model="newlyaddload" title="新增" width="800"> |
|
|
|
|
<el-dialog destroy-on-close v-model="newlyaddload" title="新增" width="800"> |
|
|
|
|
<el-form class="add_form" inline="true" :model="Addform"> |
|
|
|
|
<el-form-item label="仓库名称"> |
|
|
|
|
<el-input v-model="Addform.name" placeholder="请输入仓库名称" /> |
|
|
|
@ -86,7 +88,7 @@
|
|
|
|
|
|
|
|
|
|
<el-form-item label="管理区域"> |
|
|
|
|
<el-cascader |
|
|
|
|
:props="props" |
|
|
|
|
:props="props" |
|
|
|
|
v-model="Addform.administrativeAreas" |
|
|
|
|
:options="areaoptions" |
|
|
|
|
placeholder="省/市/区" |
|
|
|
@ -253,10 +255,16 @@
|
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
<el-input v-model="Addform.remarks" placeholder="请输入日期范围" /> |
|
|
|
|
<el-input v-model="Addform.remarks" placeholder="请输入备注" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="收款码"> |
|
|
|
|
<el-upload :action="doubledCount" :headers="headers" v-model:file-list="Addform.paymentCodeUrl" list-type="picture-card" :auto-upload="true"> |
|
|
|
|
<el-upload |
|
|
|
|
:action="doubledCount" |
|
|
|
|
:headers="headers" |
|
|
|
|
v-model:file-list="Addform.paymentCodeUrlS" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:auto-upload="true" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
|
|
|
|
|
<template #file="{ file }"> |
|
|
|
@ -300,6 +308,249 @@
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 查看详情弹窗 --> |
|
|
|
|
<el-dialog v-model="dialogDetail" title="查看详情" width="50%"> |
|
|
|
|
<el-form class="add_form" inline="true" :model="Addform"> |
|
|
|
|
<el-form-item label="仓库名称"> |
|
|
|
|
<el-input v-model="Addform.name" placeholder="请输入仓库名称" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="仓库编码"> |
|
|
|
|
<el-input v-model="Addform.warehouseCode" placeholder="请输入仓库编码" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="仓库简称"> |
|
|
|
|
<el-input v-model="Addform.abbreviation" placeholder="请输入仓库简称" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="联系人"> |
|
|
|
|
<el-input v-model="Addform.linkman" placeholder="请输入联系人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="联系电话"> |
|
|
|
|
<el-input v-model="Addform.contactNumber" placeholder="请输入联系电话" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="管理区域"> |
|
|
|
|
<el-cascader |
|
|
|
|
:props="props" |
|
|
|
|
v-model="Addform.administrativeAreas" |
|
|
|
|
:options="areaoptions" |
|
|
|
|
placeholder="省/市/区" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="职能类型"> |
|
|
|
|
<el-select v-model="Addform.functionType" clearable placeholder="请选择职能类型"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in options" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库地区"> |
|
|
|
|
<el-cascader |
|
|
|
|
v-model="Addform.addressInfo" |
|
|
|
|
:options="areaoptions" |
|
|
|
|
placeholder="省/市/区" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库地址"> |
|
|
|
|
<avue-input-map |
|
|
|
|
:params="warehouseAddress" |
|
|
|
|
placeholder="请选择地图" |
|
|
|
|
v-model="Addform.address" |
|
|
|
|
></avue-input-map> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="所属部门"> |
|
|
|
|
<el-tree-select |
|
|
|
|
v-model="Addform.department" |
|
|
|
|
:data="AssessmentDepartment" |
|
|
|
|
check-strictly |
|
|
|
|
:render-after-expand="false" |
|
|
|
|
style="width: 240px" |
|
|
|
|
@node-click="BelongsearcheNodeClick" |
|
|
|
|
clearable |
|
|
|
|
@change="Belongingdepartment" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库类型"> |
|
|
|
|
<el-select v-model="Addform.warehouseType" clearable placeholder="请选择仓库类型"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in WarehouseType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="消防等级"> |
|
|
|
|
<el-select v-model="Addform.fireGrade" clearable placeholder="请选择消防等级"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in FireProtection" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="是否具有消防等级"> |
|
|
|
|
<el-select v-model="Addform.fireRatingNot" clearable placeholder="请选择是否具有消防等级"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Isprotection" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库结构"> |
|
|
|
|
<el-select v-model="Addform.warehouseStructure" clearable placeholder="请选择仓库结构"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in WarehouseStructureList" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="是否高架"> |
|
|
|
|
<el-select v-model="Addform.elevatedNot" clearable placeholder="请选择是否高架"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Iselevated" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库层高"> |
|
|
|
|
<el-input v-model="Addform.storeyHeight" placeholder="请输入仓库层高" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="电力类型"> |
|
|
|
|
<el-select v-model="Addform.powerCondition" clearable placeholder="请选择电力类型"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in powerConditionList" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="租金单价"> |
|
|
|
|
<el-input v-model="Addform.unitPrice" placeholder="请输入租金单价" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="面积"> |
|
|
|
|
<el-input v-model="Addform.acreage" placeholder="请输入面积" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="租金类型"> |
|
|
|
|
<el-select v-model="Addform.rentType" clearable placeholder="请选择租金类型"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in rentTypeList" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="仓库等级"> |
|
|
|
|
<el-select v-model="Addform.grade" clearable placeholder="请选择仓库等级"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in gradeList" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="管理费"> |
|
|
|
|
<el-input v-model="Addform.administrativeFee" placeholder="请输入管理费" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="库位数"> |
|
|
|
|
<el-input v-model="Addform.seating" placeholder="请输入库位数" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="日期范围"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="Addform.daterange" |
|
|
|
|
type="datetimerange" |
|
|
|
|
start-placeholder="租赁开始日期" |
|
|
|
|
end-placeholder="租赁结束日期" |
|
|
|
|
format="YYYY-MM-DD" |
|
|
|
|
date-format="YYYY/MM/DD" |
|
|
|
|
time-format="A hh:mm:ss" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
<el-input v-model="Addform.remarks" placeholder="请输入日期范围" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="收款码"> |
|
|
|
|
<el-upload |
|
|
|
|
:action="doubledCount" |
|
|
|
|
:headers="headers" |
|
|
|
|
v-model:file-list="Addform.paymentCodeUrlS" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:auto-upload="true" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
|
|
|
|
|
<template #file="{ file }"> |
|
|
|
|
<div> |
|
|
|
|
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" /> |
|
|
|
|
<span class="el-upload-list__item-actions"> |
|
|
|
|
<span |
|
|
|
|
class="el-upload-list__item-preview" |
|
|
|
|
@click="handlePictureCardPreview(file)" |
|
|
|
|
> |
|
|
|
|
<el-icon><zoom-in /></el-icon> |
|
|
|
|
</span> |
|
|
|
|
<span |
|
|
|
|
v-if="!disabled" |
|
|
|
|
class="el-upload-list__item-delete" |
|
|
|
|
@click="handleDownload(file)" |
|
|
|
|
> |
|
|
|
|
<el-icon><Download /></el-icon> |
|
|
|
|
</span> |
|
|
|
|
<span |
|
|
|
|
v-if="!disabled" |
|
|
|
|
class="el-upload-list__item-delete" |
|
|
|
|
@click="handleRemove(file)" |
|
|
|
|
> |
|
|
|
|
<el-icon><Delete /></el-icon> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-upload> |
|
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogVisible"> |
|
|
|
|
<img w-full :src="dialogImageUrl" alt="Preview Image" /> |
|
|
|
|
</el-dialog> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<template #footer> |
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
<el-button @click="dialogDetail = false">关闭</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
<!-- 列表配置显示 --> |
|
|
|
|
<edittablehead |
|
|
|
@ -322,29 +573,29 @@ import {
|
|
|
|
|
getCurrentInstance, |
|
|
|
|
} from 'vue'; |
|
|
|
|
import { columnList } from '@/option/basicdata/basicdataWarehouseTemp.js'; |
|
|
|
|
import { $_getList, $_ObtainRegion, $_parentId ,$_addsave} from '@/api/basicdata/basicdataWarehouse'; |
|
|
|
|
import { |
|
|
|
|
$_getList, |
|
|
|
|
$_ObtainRegion, |
|
|
|
|
$_parentId, |
|
|
|
|
$_addsave, |
|
|
|
|
$_dataremove, |
|
|
|
|
$_getDetail, |
|
|
|
|
} from '@/api/basicdata/basicdataWarehouse'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; //字典 |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { Delete, Download, Plus, ZoomIn } from '@element-plus/icons-vue'; |
|
|
|
|
const props = { multiple: true } |
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'; |
|
|
|
|
const props = { multiple: true }; |
|
|
|
|
const options = ref([]); //职能类型 |
|
|
|
|
const selectAll = ref([]); |
|
|
|
|
const search = ref(false); //搜索展开 |
|
|
|
|
const imgs = ref([ |
|
|
|
|
'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg', |
|
|
|
|
'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg', |
|
|
|
|
]); |
|
|
|
|
const imgs1 = ref([ |
|
|
|
|
'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg', |
|
|
|
|
'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg', |
|
|
|
|
'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg', |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
const dialogDetail = ref(false); //查看详情弹窗 |
|
|
|
|
const dialogImageUrl = ref(''); |
|
|
|
|
const dialogVisible = ref(false); |
|
|
|
|
const disabled = ref(false); |
|
|
|
|
|
|
|
|
|
const dialogTitle = ref('新增'); |
|
|
|
|
const handleRemove = file => { |
|
|
|
|
console.log(file); |
|
|
|
|
}; |
|
|
|
@ -362,19 +613,18 @@ const query = ref({}); //顶部搜索参数
|
|
|
|
|
const newlyaddload = ref(false); //新增弹窗 |
|
|
|
|
const AssessmentDepartment = ref([]); //考核部门 |
|
|
|
|
const department = ref(); |
|
|
|
|
const Addform = ref({ |
|
|
|
|
}); //表格新增数据表单 |
|
|
|
|
const Addform = ref({}); //表格新增数据表单 |
|
|
|
|
const WarehouseType = ref([]); //仓库类型 |
|
|
|
|
const FireProtection = ref([]); //消防等级 |
|
|
|
|
const Isprotection = ref([ |
|
|
|
|
{ |
|
|
|
|
dictValue:'是', |
|
|
|
|
dictKey:'1' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
dictValue:'否', |
|
|
|
|
dictKey:'0' |
|
|
|
|
} |
|
|
|
|
dictValue: '是', |
|
|
|
|
dictKey: '1', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
dictValue: '否', |
|
|
|
|
dictKey: '0', |
|
|
|
|
}, |
|
|
|
|
]); //是否具有消防等级 |
|
|
|
|
const WarehouseStructureList = ref([]); //仓库结构 |
|
|
|
|
const Iselevated = ref([]); //是否高架 |
|
|
|
@ -450,6 +700,8 @@ const BelongsearcheNodeClick = data => {
|
|
|
|
|
if (data.hasChildren) { |
|
|
|
|
classification(data.id, data.value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(department.value, '存储的部门'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 初始时获取顶级分类 |
|
|
|
@ -639,26 +891,149 @@ const currentChange = val => {
|
|
|
|
|
}; |
|
|
|
|
// 新增数据 |
|
|
|
|
const newlyadd = () => { |
|
|
|
|
Addform.value = {}; |
|
|
|
|
dialogDetail.value = true; //开启详情弹窗 |
|
|
|
|
Addform.value.warehouseAddress = []; |
|
|
|
|
Addform.value.address = []; |
|
|
|
|
newlyaddload.value = true; //开启新增弹窗 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 批量删除 |
|
|
|
|
const DeleteInformationAll = () => { |
|
|
|
|
if (!selectAll.value.length) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请勾选要删除的数据', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
ElMessageBox.confirm('是否批量删除数据?确定此操作不可撤销!', 'Warning', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
let data = { |
|
|
|
|
ids: [], |
|
|
|
|
}; |
|
|
|
|
selectAll.value.forEach(item => { |
|
|
|
|
data['ids'].push(item.id); |
|
|
|
|
}); |
|
|
|
|
data['ids'] = data['ids'].join(','); |
|
|
|
|
details.loadingObj.list = true; //开启表格加载 |
|
|
|
|
$_dataremove(data) |
|
|
|
|
.then(res => { |
|
|
|
|
console.log(res, '删除成功后返回值'); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
onLoad(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}) |
|
|
|
|
.finally(() => { |
|
|
|
|
details.loadingObj.list = false; //关闭表格加载 |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}; |
|
|
|
|
const selectionChange = val => { |
|
|
|
|
selectAll.value = val; |
|
|
|
|
console.log(selectAll.value, '勾选数据'); |
|
|
|
|
}; |
|
|
|
|
// 查看详情 |
|
|
|
|
const view = val => { |
|
|
|
|
let data = { |
|
|
|
|
id: val.row.id, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
$_getDetail(data).then(res => { |
|
|
|
|
console.log(res, '查看详情'); |
|
|
|
|
Addform.value = res.data.data; |
|
|
|
|
Addform.value['address'] = []; |
|
|
|
|
Addform.value['addressInfo'] = []; |
|
|
|
|
console.log(Addform.value); |
|
|
|
|
dialogDetail.value = true; //开启详情弹窗 |
|
|
|
|
console.log(options.value, '职能类型'); |
|
|
|
|
Addform.value.functionType = String(Addform.value.functionType); //职能类型转换字符串类型 |
|
|
|
|
Addform.value.address[0] = Addform.value.longitude; //精度地区 |
|
|
|
|
Addform.value.address[1] = Addform.value.latitude; //维度 |
|
|
|
|
Addform.value.address[2] = Addform.value.warehouseAddress; //仓库地址 |
|
|
|
|
Addform.value['addressInfo'][0] = Addform.value.provinceCode; //仓库地区-省 |
|
|
|
|
Addform.value['addressInfo'][1] = Addform.value.cityCode; //仓库地区-市 |
|
|
|
|
Addform.value['addressInfo'][2] = Addform.value.code; //仓库地区-区 |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 删除 |
|
|
|
|
const DeleteInformation = val => { |
|
|
|
|
ElMessageBox.confirm('是否删除该条数据?确定此操作后不可撤销!', '删除提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
console.log(val, '删除'); |
|
|
|
|
let data = { |
|
|
|
|
ids: val.row.id, |
|
|
|
|
}; |
|
|
|
|
details.loadingObj.list = true; //开启表格加载 |
|
|
|
|
$_dataremove(data) |
|
|
|
|
.then(res => { |
|
|
|
|
console.log(res, '删除成功后返回值'); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
onLoad(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}) |
|
|
|
|
.finally(() => { |
|
|
|
|
details.loadingObj.list = false; //关闭表格加载 |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}; |
|
|
|
|
// 新增数据确定 |
|
|
|
|
const newlyaddSubmit = () => { |
|
|
|
|
console.log(Addform.value); |
|
|
|
|
Addform.value.warehouseAddress = Addform.value.address[2];//仓库地址 |
|
|
|
|
Addform.value.departmentName = AssessmentDepartment.value.find(res=>res.id == Addform.value.department).label;//部门名称 |
|
|
|
|
Addform.value.daterange[0] = dayjs(Addform.value.daterange[0] ).format('YYYY-MM-DD'); |
|
|
|
|
Addform.value.daterange[1] = dayjs(Addform.value.daterange[1] ).format('YYYY-MM-DD'); |
|
|
|
|
Addform.value.paymentCodeUrl=Addform.value.paymentCodeUrl[0].response.data.link |
|
|
|
|
|
|
|
|
|
Addform.value.administrativeAreas = Addform.value.administrativeAreas.join(',') |
|
|
|
|
console.log(Addform.value); |
|
|
|
|
let data={ |
|
|
|
|
...Addform.value |
|
|
|
|
Addform.value.warehouseAddress = Addform.value.address[2]; //仓库地址 |
|
|
|
|
Addform.value.longitude = Addform.value.address[0]; //精度 |
|
|
|
|
Addform.value.latitude = Addform.value.address[1]; //维度 |
|
|
|
|
console.log(AssessmentDepartment.value, '部门'); |
|
|
|
|
Addform.value.departmentName = department.value.label; //部门名称 |
|
|
|
|
Addform.value.startDate = dayjs(Addform.value.daterange[0]).format('YYYY-MM-DD'); //开始时间 |
|
|
|
|
Addform.value.endDate = dayjs(Addform.value.daterange[1]).format('YYYY-MM-DD'); //结束时间 |
|
|
|
|
if (Addform.value.paymentCodeUrlS) { |
|
|
|
|
if (Addform.value.paymentCodeUrlS.length) { |
|
|
|
|
Addform.value.paymentCodeUrl = Addform.value.paymentCodeUrlS[0].response.data.link; //收款码 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log(data,'准备提交的参数'); |
|
|
|
|
$_addsave(data).then(res=>{ |
|
|
|
|
console.log(res,'新增之后返回值'); |
|
|
|
|
}) |
|
|
|
|
Addform.value.administrativeAreas = Addform.value.administrativeAreas.join(','); |
|
|
|
|
Addform.value.provinceCode = Addform.value.addressInfo[0]; // 仓库地区一级 |
|
|
|
|
Addform.value.cityCode = Addform.value.addressInfo[0]; // 仓库地区二级 |
|
|
|
|
Addform.value.code = Addform.value.addressInfo[0]; // 仓库地区三级 |
|
|
|
|
console.log(Addform.value); |
|
|
|
|
let data = { |
|
|
|
|
...Addform.value, |
|
|
|
|
}; |
|
|
|
|
console.log(data, '准备提交的参数'); |
|
|
|
|
$_addsave(data).then(res => { |
|
|
|
|
console.log(res, '新增之后返回值'); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
newlyaddload.value = false; //关闭新增弹窗 |
|
|
|
|
Addform.value = {}; |
|
|
|
|
ElMessage({ |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
onLoad(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 部门选择 |
|
|
|
|
const AffiliationList = ref({ |
|
|
|
|