ZaiZai 1 năm trước cách đây
mục cha
commit
c85098cf19

+ 3 - 2
src/views/debit-pay/start-work/components/order/dataModal.vue

@@ -116,7 +116,7 @@ const getStartAmountData = async () => {
 watch(() => [props.ids, props.infoData], ([Id, info]) => {
     ids.value = Id
     infoData.value = info
-    if (Id.length > 0) {
+    if (!isNullES(Id)) {
         baseForm.value = info
         fileName.value = info?.fileList
         modalTitle.value = '开工预付款计量单修改'
@@ -245,6 +245,7 @@ const modalSave = async () => {
         modalSaving.value = false
         if (!error && code === 200) {
             window?.$message?.success(msg)
+            modalClose()
             emit('finish')
         } else {
             window.$message.error(msg ?? '操作失败')
@@ -259,12 +260,12 @@ const modalSave = async () => {
         modalSaving.value = false
         if (!error && code === 200) {
             window?.$message?.success(msg)
+            modalClose()
             emit('finish')
         } else {
             window.$message.error(msg ?? '操作失败')
         }
     }
-    modalClose()
 }
 
 const modalClose = () => {

+ 11 - 11
src/views/debit-pay/start-work/order.vue

@@ -2,11 +2,13 @@
     <hc-new-card>
         <template #header>
             <div class="w-40">
-                <el-select
-                    v-model="searchForm.meterPeriodId" placeholder="选择计量期" filterable clearable block
-                    @change="searchKey1Click"
-                >
-                    <el-option v-for="item in key1Data" :key="item.id" :label="item.periodName" :value="item.id" />
+                <el-select v-model="searchForm.meterPeriodId" placeholder="选择计量期" filterable clearable block @change="searchKey1Click">
+                    <el-option v-for="item in key1Data" :key="item.id" :label="item.periodName" :value="item.id" clearable>
+                        <div class="search-form-contract-period-id hc-flex">
+                            <el-tag :color="(item.approveStatus !== 0 || item.id === -1) ? '#e6a23c' : '#67c23a'" class="mr-8px" size="small" />
+                            <span>{{ item.periodName }}</span>
+                        </div>
+                    </el-option>
                 </el-select>
             </div>
         </template>
@@ -200,12 +202,10 @@ const getTableData = async () => {
 //获取详情
 const infoData = ref({})
 const getDetail = async (id) => {
-    const { error, code, data } = await mainApi.detail({ id })
-    if (!error && code === 200) {
-        infoData.value = getObjValue(data)
-    } else {
-        infoData.value = {}
-    }
+    const { data } = await mainApi.detail({ id })
+    const res = getObjValue(data)
+    infoData.value = res
+    newInfoData.value = res
 }
 //查看附件
 const viewFile = (item) => {