下料完成
This commit is contained in:
@@ -162,7 +162,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 防腐记录 -->
|
||||
<nbd-anti-record :params="{ materialCode: form.MaterialCode, projectId: currentProject.ProjectId }" />
|
||||
<view class="section">
|
||||
<nbd-record-card title="防腐" :list="antiList" :fields="antiFields" status-key="CheckResult" status-match="合格" />
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
@@ -179,7 +181,25 @@ import { onLoad } from '@dcloudio/uni-app'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { watch, nextTick } from 'vue'
|
||||
import { useUserStore } from '@/store'
|
||||
import { reqMaterialInfoByMaterialCode, reqPaintCodeList, reqSaveAntiCorrosionCheck , reqGetAntiCorrosionCheck } from '@/api/hj.js'
|
||||
import { reqMaterialInfoByMaterialCode, reqPaintCodeList, reqSaveAntiCorrosionCheck, reqGetAntiCorrosionCheck } from '@/api/hj.js'
|
||||
|
||||
// 防腐记录字段
|
||||
const antiFields = [
|
||||
{ label: '防腐等级', key: 'AnticorrosionLevel' },
|
||||
{ label: '中间漆', key: 'IntermediatePaint' },
|
||||
{ label: '面漆', key: 'Topcoat' },
|
||||
{ label: '漆膜厚度', key: 'FilmThickness' },
|
||||
{ label: '喷砂情况', key: 'SandBlasting' },
|
||||
{ label: '除锈喷砂情况', key: 'RustSandBlasting' },
|
||||
{ label: '检查人', key: 'CheckPersonName' },
|
||||
{ label: '检查时间', key: 'CheckTime' },
|
||||
{ label: '检查结果', key: 'CheckResult', type: 'tag', tagMatch: '合格' },
|
||||
{ label: '不合格原因', key: 'UnqualifiedReason', showWhen: { key: 'CheckResult', notEqual: '合格' } },
|
||||
{ label: '整改要求', key: 'RectifyRequirement', showWhen: { key: 'CheckResult', notEqual: '合格' } },
|
||||
{ label: '照片', key: 'AttachUrl1', type: 'photo', cols: 4 },
|
||||
]
|
||||
|
||||
const antiList = ref([])
|
||||
|
||||
const userStore = useUserStore()
|
||||
const { userInfo, currentProject } = storeToRefs(userStore)
|
||||
@@ -265,12 +285,13 @@ const loadData = async (id) => {
|
||||
form.value = res.data
|
||||
}
|
||||
if (res1.code === 1 && res1.data) {
|
||||
antiList.value = res1.data
|
||||
let antiData = res1.data
|
||||
if(antiData&&antiData.length>0){
|
||||
if (antiData && antiData.length > 0) {
|
||||
antiForm.value = {
|
||||
...antiData[0],
|
||||
CheckResult: '合格',
|
||||
UnqualifiedReason: '',
|
||||
UnqualifiedReason: '',
|
||||
RectifyRequirement: '',
|
||||
Remark: ''
|
||||
}
|
||||
@@ -284,6 +305,7 @@ const loadData = async (id) => {
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const handleSubmit = async () => {
|
||||
if (!antiForm.value.PaintId) {
|
||||
uni.showToast({ title: '请选择防腐等级', icon: 'none' })
|
||||
@@ -480,6 +502,4 @@ $shadow-md: 0 2rpx 12rpx rgba(0, 0, 0, 0.04), 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user