Jelajahi Sumber

任务管理

ZaiZai 1 tahun lalu
induk
melakukan
3c1980e2df

+ 0 - 1
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -441,7 +441,6 @@ const attachmentUploadChange = (a, b, fileList) => {
     baseForm.value.fileList = getArrValue(fileList)
 }
 
-
 //文件上传
 const uploadFileRef = ref(null)
 const uploadFileParams = ref({})

+ 16 - 6
src/views/tasks/components/hc-data/addBillBase.vue

@@ -27,6 +27,10 @@ const props = defineProps({
         type: [String, Number],
         default: '',
     },
+    projectId: {
+        type: [String, Number],
+        default: '',
+    },
     contractId: {
         type: [String, Number],
         default: '',
@@ -40,6 +44,7 @@ const taskInfo = ref(props.info)
 const tableInfo = ref(props.table)
 const tableIds = ref(props.ids)
 const contractId = ref(props.contractId)
+const projectId = ref(props.projectId)
 
 //双向绑定
 // eslint-disable-next-line no-undef
@@ -50,9 +55,11 @@ const isShow = defineModel('modelValue', {
 //监听
 watch(() => [
     props.ids,
+    props.projectId,
     props.contractId,
-], ([ids, cid]) => {
+], ([ids, pid, cid]) => {
     tableIds.value = ids
+    projectId.value = pid
     contractId.value = cid
 }, { immediate: true, deep: true })
 
@@ -112,14 +119,17 @@ const modalSave = async () => {
         return false
     }
     const rowIds = arrToId(rows)
-    /*const { contractPeriodId, contractUnitId } = tableInfo.value
+    const { contractPeriodId, contractUnitId, id } = tableInfo.value
     const { data } = await mainApi.tableFormApplyTaskSave({
-        contractPeriodId: contractPeriodId.value,
-        contractId: cid.value,
-        nodeId: nodeId.value,
+        contractPeriodId: contractPeriodId,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: contractUnitId,
+        taskId: taskInfo.value.id,
+        dataId: id,
         ids: rowIds,
     })
-    emit('finish', getArrValue(data))*/
+    emit('finish', getArrValue(data))
     modalClose()
 }
 

+ 10 - 3
src/views/tasks/components/hc-data/middlepay-form.vue

@@ -108,12 +108,12 @@
             </template>
             <el-form :model="baseForm" label-position="left" label-width="auto">
                 <el-form-item label="上传附件">
-                    <hc-form-upload type="list" :src="baseForm.fileList" :h-props="uploadFormProps" @upload="attachmentUpload" @change="attachmentUploadChange" />
+                    <hc-form-upload type="list" :src="baseForm.fileList" :h-props="uploadFormProps" is-del @upload="attachmentUpload" @change="attachmentUploadChange" @del="attachmentUploadDel" />
                 </el-form-item>
             </el-form>
         </hc-card-item>
         <!-- 添加分解清单 -->
-        <HcBillBase v-model="addBillBaseShow" :info="taskInfo" :table="tableInfo" :ids="billBaseIds" :contract-id="contractId" @finish="finishChange" />
+        <HcBillBase v-model="addBillBaseShow" :info="taskInfo" :table="tableInfo" :ids="billBaseIds" :project-id="projectId" :contract-id="contractId" @finish="finishChange" />
         <!-- 文件上传组件 -->
         <hc-upload-file ref="uploadFileRef" :options="uploadFileOptions" @success="uploadFileSuccess" />
     </div>
@@ -320,8 +320,9 @@ const addBillModalClick = () => {
     billBaseIds.value = arrToId(tableData.value)
 }
 
+//添加计量清单完成
 const finishChange = () => {
-
+    getDataDetail()
 }
 
 //文件上传
@@ -365,6 +366,12 @@ const uploadFileSuccess = async ({ resData }) => {
         window.$message.error(msg ?? '上传失败')
     }
 }
+
+//删除文件
+const attachmentUploadDel = ({ file }, resolve) => {
+    console.log(file)
+    resolve(false)
+}
 </script>
 
 <style lang="scss" scoped>