Explorar o código

基础信息保存修改

duy hai 3 meses
pai
achega
40526fb279

+ 7 - 0
src/api/modules/basic/code.js

@@ -70,6 +70,13 @@ export default {
             params: form,
         })
     },
+    async saveBaseInfo(form) {
+        return HcApi({
+            url: '/api/blade-business/detection/self/saveBaseInfo',
+            method: 'post',
+            data: form,
+        })
+    },
     //根据standardCode获取检测项目
 
    async getStandardInfoByStandardId(form) {

+ 12 - 12
src/views/tentative/detect/components/basicInfo.vue

@@ -542,25 +542,25 @@ const handleSave = async () => {
 
         ? ypList.value.filter(item => item.value != null && item.value !== '')
         .map(item => item.value)
-        .join(',') : []
+        .join(',') : ''
 
     basicInfoData.value.standardInfoIds = standardInfoIds
     basicInfoData.value.oldRecordNumber = oldRecordNumber.value
     basicInfoData.value.oldReportNumber = oldReportNumber.value
 
-    emit('change', basicInfoData.value)
-    // handleSaveLoad.value = true
-    //       const { error, code, data, msg } = await dataApi.saveExcelBussData({
-    //                 ...basicInfoData.value,
-    //                 isBatchSave: 1,
-    //             })
-    //         handleSaveLoad.value = false
-    //         if (!error && code === 200) {
-    //             window.$message.success(msg)
-    //             isShow.value = false
+    // emit('change', basicInfoData.value)
+    handleSaveLoad.value = true
+          const { error, code, data, msg } = await codeApi.saveBaseInfo({
+                    ...basicInfoData.value,
+                 
+                })
+            handleSaveLoad.value = false
+            if (!error && code === 200) {
+                window.$message.success(msg)
+                isShow.value = false
 
               
-    //         }
+            }
 }
 //关联上次设备
 const linkLastLoad = ref(false)

+ 34 - 1
src/views/tentative/detect/test.vue

@@ -63,7 +63,11 @@
                             <span>批量上报</span>
                         </el-button>
                     </HcTooltip>
-               
+
+                    <el-button hc-btn type="primary" color="#12C060" style="color: white;" @click="sortFormClick">
+                        <HcIcon name="arrow-up-down" />
+                        <span>排序</span>
+                    </el-button>
 
                     <!-- <el-button
                         :disabled="tableCheckedKeys.length <= 0" :loading="sortLoading" hc-btn
@@ -322,6 +326,18 @@
                 </el-radio-group>
             </div>
         </hc-new-dialog>
+
+        <!-- 排序弹窗 -->
+        <hc-new-dialog v-model="sortDialog" title="排序" widths="38rem" :loading="tableLoading" @close="closeSort" @save="sortClick">
+            <div>
+                <el-radio-group v-model="sortType">
+                    <el-radio :value="1">记录/报告编号(升序)</el-radio>
+                    <el-radio :value="2">记录/报告编号(降序)</el-radio>
+                    <el-radio :value="3">规格型号(升序)</el-radio>
+                    <el-radio :value="4">规格型号(降序)</el-radio>
+                </el-radio-group>
+            </div>
+        </hc-new-dialog>
     </div>
 </template>
 
@@ -593,6 +609,7 @@ const getTableData = async () => {
     const { error, code, data } = await dataApi.queryPage({
         ...searchForm.value,
         projectId: projectId.value,
+        sortType:sortType.value,
         //contractId: contractId.value,
     })
     //处理数据
@@ -1444,9 +1461,25 @@ const signClick = async () => {
 const cancelresign = ()=>{
     resignModalRadio.value = 0
     resignModal.value = false
+}
+const sortDialog = ref(false)
+const sortFormClick = ()=>{
+    sortDialog.value = true
+}
+const sortType = ref('')
+const closeSort = ()=>{
+    sortDialog.value = false
+    sortType.value = ''
+}
+const sortClick = ()=>{
+    getTableData().then()
+    sortDialog.value = false
+
+
 }
 </script>
 
+
 <style lang="scss" scoped>
 @import "../../../styles/tentative/detect/test.scss";