Просмотр исходного кода

点价确认单,附件功能

zxz 3 лет назад
Родитель
Сommit
fe58067bd3

+ 1 - 14
src/views/contractManagement/priceConfirmationSheet.vue

@@ -70,20 +70,7 @@
           <template>{{ item.priceListNo }}</template>
         </p>
         <div class="fujian">
-          <el-upload
-            class="upload-demo"
-            action="https://www.zthymaoyi.com/upload/admin"
-            :on-success="
-              (res, file) => {
-                uploadSuccessHandle(res)
-              }
-            "
-            multiple
-            :limit="3"
-            :file-list="fileList"
-          >
-            <el-button size="small" type="primary">附件</el-button>
-          </el-upload>
+          <el-button size="small" type="primary">附件</el-button>
           <div class="shangchuan">
             <template>
               <span v-if="item.enclosureTypeFlag == 0">未上传</span>

+ 10 - 6
src/views/contractManagement/priceConfirmationSheetAdd.vue

@@ -58,7 +58,7 @@
           </ws-form-item>
 
           <!--点价单附件-->
-          <ws-form-item label="点价单附件" span="1" prop="priceListNo">
+          <ws-form-item label="点价单附件" span="1" prop="addressUrl">
             <el-upload
               class="upload-demo"
               action="https://www.zthymaoyi.com/upload/admin"
@@ -74,10 +74,10 @@
             </el-upload>
             <div class="shangchuan">
               <template>
-                <span v-if="deptBudgetList.enclosureTypeFlag == 0"
+                <span v-if="enclosureTypeFlag == 0"
                   >未上传</span
                 >
-                <span v-if="deptBudgetList.enclosureTypeFlag == 1"
+                <span v-if="enclosureTypeFlag == 1"
                   >已上传</span
                 >
               </template>
@@ -237,20 +237,22 @@ export default {
       year: '',
       options_: regionData,
       selectedOptions: [],
+      appendixIdss:'',
       selectedOptions1: [],
       // 提交类型
       submitType: true,
       size: 10,
       unitList: [],
+      enclosureTypeFlag:0,
       priceConfirmationSheet: {
         contractNo: this.$route.query.contractNo,
         contractType :this.$route.query.contractType,
-        enclosureTypeFlag: '0',
         varietyContractDirection: '',
         buyer: '',
         seller: '',
         sellerPhone: '',
         buyerPhone: '',
+       // enclosureTypeFlag: 0,
         transactionsNumberHand: '',
         transactionsNumber: '',
         transactionPrice: '',
@@ -285,7 +287,7 @@ export default {
     // 上传附件
     uploadSuccessHandle(e) {
       this.addressUrls.push(e.url)
-      this.deptBudgetList.addressUrl = this.addressUrls.toString
+    this.enclosureTypeFlag = 1
     },
     onChange(files) {
       this.fileNum = files
@@ -479,7 +481,8 @@ export default {
       }
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
-      this.deptBudgetList.enclosureTypeFlag = '0'
+       this.deptBudgetList.addressUrl = this.addressUrls.toString()
+
       this.priceConfirmationSheet = this.deptBudgetList
       this.$confirm(`确定提交确认单信息`, {
         cancelButtonText: '取消',
@@ -491,6 +494,7 @@ export default {
         .toPromise()
         .then((response) => {
           this.$message.success('添加成功')
+          this.priceConfirmationSheet = {}
           this.$router.push({ path: 'priceConfirmationSheet'
           ,query: { contractNo: this.$route.query.contractNo , contractType: this.$route.query.contractType } })
         })

+ 9 - 6
src/views/contractManagement/priceConfirmationSheetEdit.vue

@@ -61,7 +61,7 @@
           </ws-form-item>
 
           <!--点价单附件-->
-          <ws-form-item label="点价单附件" span="1" prop="priceListNo">
+          <ws-form-item label="点价单附件" span="1" prop="addressUrl">
             <el-upload
               class="upload-demo"
               action="https://www.zthymaoyi.com/upload/admin"
@@ -77,8 +77,8 @@
             </el-upload>
             <div class="shangchuan">
               <template>
-                <span v-if="deptBudgetList.enclosureTypeFlag == '0'">未上传</span>
-                <span v-if="deptBudgetList.enclosureTypeFlag == '1'">已上传</span>
+                <span v-if="deptBudgetList.enclosureTypeFlag == 0">未上传</span>
+                <span v-if="deptBudgetList.enclosureTypeFlag == 1">已上传</span>
               </template>
             </div>
           </ws-form-item>
@@ -252,8 +252,10 @@ export default {
          contractNo: this.$route.query.contractNo,
          contractType :this.$route.query.contractType,
          id: this.$route.query.id,
-     
+         
+           addressUrl: '',
       },
+
       addressUrls: [],
       deptBudgetList: {},
     }
@@ -286,7 +288,8 @@ export default {
     // 上传附件
     uploadSuccessHandle(e) {
       this.addressUrls.push(e.url)
-      this.deptBudgetList.addressUrl = this.addressUrls.toString
+       this.enclosureTypeFlag = 1
+      
     },
     onChange(files) {
       this.fileNum = files
@@ -502,7 +505,7 @@ export default {
       }
       this.deptBudgetList.contractType = this.$route.query.contractType,
       this.deptBudgetList.contractNo = this.$route.query.contractNo,
-      // this.deptBudgetList.enclosureTypeFlag = '0'
+      this.deptBudgetList.addressUrl = this.addressUrls.toString(),
       this.priceConfirmationSheet = this.deptBudgetList
       this.$confirm(`确定提交确认单信息`, {
         cancelButtonText: '取消',