|
|
|
@ -91,9 +91,11 @@
|
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
|
<div class="ElBtnClass"> |
|
|
|
|
<el-button @click="view(slotProps.scope)">查看</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- <div class="ElBtnClass"> |
|
|
|
|
<el-text @click="abnormalinformation(slotProps.scope.row)">异常信息</el-text> |
|
|
|
|
<el-text @click="view(slotProps.scope.row)">结算信息</el-text> |
|
|
|
|
<el-text @click="view(slotProps.scope.row)">明细</el-text> |
|
|
|
|
</div> --> |
|
|
|
|
</template> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
@ -118,6 +120,78 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
v-model="Abnormalsettlement.dialogVisible" |
|
|
|
|
title="结算信息" |
|
|
|
|
width="60%" |
|
|
|
|
class="el_Abnormalsettlement" |
|
|
|
|
> |
|
|
|
|
<el-tabs class="demo-tabs" v-model="Abnormalsettlement.activeName1"> |
|
|
|
|
<el-tab-pane label="费用信息" name="费用信息"> |
|
|
|
|
<h3>结算单号:XXXXXXXXXXXX</h3> |
|
|
|
|
<h3>结算状态:已结算</h3> |
|
|
|
|
<div class="el_money"> |
|
|
|
|
<span>总费用:<b>199999</b></span> |
|
|
|
|
<span>待结算费用:<b>2232</b></span> |
|
|
|
|
<span>已结算费用:<b>23423</b></span> |
|
|
|
|
<span>异常费用:<b>124124</b></span> |
|
|
|
|
</div> |
|
|
|
|
<el-form |
|
|
|
|
:model="Abnormalsettlement.form" |
|
|
|
|
label-width="auto" |
|
|
|
|
:rules="Abnormalsettlement.rules" |
|
|
|
|
ref="ruleFormRef" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="异常费用:" prop="money"> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="Abnormalsettlement.form.money" |
|
|
|
|
:controls="false" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
:precision="2" |
|
|
|
|
:step="1" |
|
|
|
|
placeholder="此处填写要登记的异常金额,正数表示异常增款,负数表示异常减款" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="异常备注:" prop="textarea2"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="Abnormalsettlement.form.textarea2" |
|
|
|
|
:autosize="{ minRows: 4, maxRows: 4 }" |
|
|
|
|
type="textarea" |
|
|
|
|
placeholder="请输入异常备注" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="异常图片:" prop="fileList"> |
|
|
|
|
<el-upload |
|
|
|
|
list-type="picture-card" |
|
|
|
|
v-model:file-list="Abnormalsettlement.form.fileList" |
|
|
|
|
drag |
|
|
|
|
:action="FileUpload()" |
|
|
|
|
multiple |
|
|
|
|
:limit="10" |
|
|
|
|
:on-preview="handlePictureCardPreview" |
|
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:headers="headers()" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
|
<!-- 图片预览 --> |
|
|
|
|
<el-dialog v-model="Abnormalsettlement.dialogurl" class="el_imgdialog"> |
|
|
|
|
<img w-full :src="Abnormalsettlement.url" /> |
|
|
|
|
</el-dialog> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
<el-tabs class="demo-tabs" v-model="Abnormalsettlement.activeName2"> |
|
|
|
|
<el-tab-pane label="异常记录" name="异常记录"> </el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
<template #footer> |
|
|
|
|
<el-button @click="Abnormalsettlement.dialogVisible = false">关闭</el-button> |
|
|
|
|
<el-button type="primary" @click="AbnormalsettlementSubmit"> 确定 </el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
<!-- 列表配置显示 --> |
|
|
|
|
<edittablehead |
|
|
|
@ -132,19 +206,58 @@
|
|
|
|
|
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue'; |
|
|
|
|
import { columnList } from '@/option/storagecost/Transferwarehousestatistics.js'; |
|
|
|
|
import { $_getMyWarehouseList } from '@/api/storagecost/index.js'; |
|
|
|
|
import { compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; //字典 |
|
|
|
|
import { processRowProperty, setNodeHeight } from '@/utils/util'; |
|
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
import { downloadXls, FileUpload, headers } from '@/utils/util'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { useStore } from 'vuex'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
const ruleFormRef = ref(null); |
|
|
|
|
const $router = useRouter(); //跳转 |
|
|
|
|
const $useStore = useStore(); //权限 |
|
|
|
|
const $route = useRoute(); //获取地址栏参数 |
|
|
|
|
const queryTop = ref({}); |
|
|
|
|
const warehouseList = ref([]); |
|
|
|
|
const monthList = ref([]); |
|
|
|
|
const validateFileList = (rule, value, callback) => { |
|
|
|
|
if (!value.length) { |
|
|
|
|
callback(new Error('至少上传一张图片')); |
|
|
|
|
} else { |
|
|
|
|
callback(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
const Abnormalsettlement = ref({ |
|
|
|
|
dialogVisible: false, |
|
|
|
|
activeName1: '费用信息', |
|
|
|
|
activeName2: '异常记录', |
|
|
|
|
url: '', |
|
|
|
|
dialogurl: false, |
|
|
|
|
form: { |
|
|
|
|
money: null, |
|
|
|
|
fileList: [], //图片列表 |
|
|
|
|
}, |
|
|
|
|
rules: { |
|
|
|
|
money: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '此处填写要登记的异常金额,正数表示异常增款,负数表示异常减款', |
|
|
|
|
trigger: ['change', 'blur'], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
textarea2: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请填写备注', |
|
|
|
|
trigger: ['change', 'blur'], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
fileList: [{ validator: validateFileList, trigger: 'change' }], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
const details = reactive({ |
|
|
|
|
fileList: [], |
|
|
|
|
/** 是否开启搜索 */ |
|
|
|
|
search: false, |
|
|
|
|
/** 表格搜索条件 */ |
|
|
|
@ -183,7 +296,7 @@ const details = reactive({
|
|
|
|
|
columnList, |
|
|
|
|
|
|
|
|
|
/** 列表数据 */ |
|
|
|
|
data: [], |
|
|
|
|
data: [{}], |
|
|
|
|
/** 页面loading */ |
|
|
|
|
loadingObj: { |
|
|
|
|
/** 列表加载loading */ |
|
|
|
@ -314,6 +427,25 @@ const searchHide = () => {
|
|
|
|
|
const _node = document.querySelector('.tableNode'); |
|
|
|
|
setNodeHeight(_node, '', true); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 上传图片规则 |
|
|
|
|
const beforeAvatarUpload = async rawFile => { |
|
|
|
|
console.log(rawFile, '图片上传前回调'); |
|
|
|
|
const allowedTypes = ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/svg+xml']; |
|
|
|
|
if (!allowedTypes.includes(rawFile.type)) { |
|
|
|
|
ElMessage.error('只能上传格式为PNG/JPG/GIF/WebP/SVG的图片!'); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
const res = await compressImageBlob(rawFile); |
|
|
|
|
return res; |
|
|
|
|
}; |
|
|
|
|
const handlePictureCardPreview = uploadFile => { |
|
|
|
|
console.log(uploadFile, '预览'); |
|
|
|
|
Abnormalsettlement.value.url = uploadFile.response.data.link; |
|
|
|
|
console.log(Abnormalsettlement.value.url, 'url'); |
|
|
|
|
|
|
|
|
|
Abnormalsettlement.value.dialogurl = true; |
|
|
|
|
}; |
|
|
|
|
// 字典公共函数 |
|
|
|
|
function updateDictionary(targetArray, dictionaryType) { |
|
|
|
|
getDictionaryBiz(dictionaryType).then(res => { |
|
|
|
@ -348,9 +480,7 @@ const MyWarehouseList = () => {
|
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 页面初始化 |
|
|
|
|
const onLoad = () => { |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
const onLoad = () => {}; |
|
|
|
|
const PageOnload = () => { |
|
|
|
|
onLoad(); //获取列表参数 |
|
|
|
|
MyWarehouseList(); //获取仓库 |
|
|
|
@ -359,7 +489,21 @@ const PageOnload = () => {
|
|
|
|
|
|
|
|
|
|
//页面初始化方法 |
|
|
|
|
PageOnload(); |
|
|
|
|
// 页面初始化方法 |
|
|
|
|
// 异常信息 |
|
|
|
|
const abnormalinformation = () => { |
|
|
|
|
Abnormalsettlement.value.dialogVisible = true; |
|
|
|
|
}; |
|
|
|
|
// 提交 |
|
|
|
|
const AbnormalsettlementSubmit = async () => { |
|
|
|
|
await ruleFormRef.value.validate((valid, fields) => { |
|
|
|
|
if (valid) { |
|
|
|
|
console.log('submit!'); |
|
|
|
|
} else { |
|
|
|
|
console.log('error submit!', fields); |
|
|
|
|
ElMessage.error('表单校验未通过,请检查输入'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
@ -387,4 +531,48 @@ PageOnload();
|
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
} |
|
|
|
|
:deep(.el_Abnormalsettlement) { |
|
|
|
|
.el-tabs__header { |
|
|
|
|
margin-bottom: 0; |
|
|
|
|
} |
|
|
|
|
.el_money { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
height: 30px; |
|
|
|
|
align-items: center; |
|
|
|
|
span { |
|
|
|
|
font-weight: bold; |
|
|
|
|
b { |
|
|
|
|
text-decoration: underline; |
|
|
|
|
color: #f44336; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
img { |
|
|
|
|
object-fit: inherit; |
|
|
|
|
} |
|
|
|
|
.el-form-item { |
|
|
|
|
padding: 0; |
|
|
|
|
margin: 15px 0; |
|
|
|
|
} |
|
|
|
|
.el-form-item__content { |
|
|
|
|
width: 100%; |
|
|
|
|
.el-textarea { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.el-input-number { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.el_imgdialog { |
|
|
|
|
img { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.el-upload-dragger { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|