Explorar o código

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

gqx %!s(int64=2) %!d(string=hai) anos
pai
achega
14037a0888
Modificáronse 1 ficheiros con 29 adicións e 3 borrados
  1. 29 3
      src/views/markets/modules/agreementUnit/agreementAccount.vue

+ 29 - 3
src/views/markets/modules/agreementUnit/agreementAccount.vue

@@ -191,11 +191,16 @@
                     <a-tag v-if="record.status == 2" color="green">已结算</a-tag>
                     <a-tag v-else color="red">未结算</a-tag>
                 </template>
+                <template slot="remarksSlot" slot-scope="text,record">
+                    <a-input v-model="record.remarks" placeholder="" @blur="handleAccountRemarks(record)"></a-input>
+                </template>
                 <span slot="action" slot-scope="text, record">
-                    <a v-if="record.type == 3" @click="handleGoodsReturn(record)">退货</a>
                     <a-popconfirm v-if="record.status == 2" title="确定撤销结算吗?" @confirm="() => handleRevoke(record)">
                       <a>撤销</a>
                     </a-popconfirm>
+                    <span v-else>
+                        <a v-if="record.type == 3" @click="handleGoodsReturn(record)">退货</a>
+                    </span>
                 </span>
             </a-table>
         </div>
@@ -286,8 +291,10 @@ export default {
                 },
                 {
                     title:'备注',
+                    width: 200,
                     align:"center",
-                    dataIndex: 'remarks'
+                    dataIndex: 'remarks',
+                    scopedSlots: { customRender: 'remarksSlot' }
                 },
                 {
                     title:'操作员',
@@ -319,6 +326,7 @@ export default {
                 exportXlsUrl: "/business/busAgreementOrderFee/exportXls",
                 importExcelUrl: "business/busAgreementOrderFee/importExcel",
                 revoke: "/business/busAgreementOrderFee/revoke",
+                editRemarks: "/business/busAgreementOrderFee/editRemarks",
                 queryAgreementAccount: "/business/busAgreementOrderFee/queryAgreementAccount",//获取协议单位消费、收款信息
             },
             queryParam: {
@@ -372,7 +380,7 @@ export default {
             if (this.settleType == 1 || this.settleType == 2){
                 this.url.list = this.url.baseList +"?status="+this.settleType+"&agreementUnitId="+this.agreementUnitInfo.id;
             }else{
-                this.url.list = this.url.baseList+"?status=1&agreementUnitId="+this.agreementUnitInfo.id;
+                this.url.list = this.url.baseList+"?agreementUnitId="+this.agreementUnitInfo.id;
             }
             // if (!this.queryParam.startTime=="") {
             //     this.url.list = this.url.list + "&startDate=" + this.queryParam.startTime
@@ -493,6 +501,24 @@ export default {
                     that.accountModel = res.result;
                 }
             });
+        },
+        handleAccountRemarks(record){
+            console.log(record)
+            const that = this;
+            that.confirmLoading = true;
+            let httpurl = this.url.editRemarks;
+            let method = 'put';
+            httpAction(httpurl,record,method).then((res)=>{
+                if(res.success){
+                    that.$message.success(res.message);
+                    // that.$emit('ok');
+                    // that.loadData(1);
+                }else{
+                    that.$message.warning(res.message);
+                }
+            }).finally(() => {
+                that.confirmLoading = false;
+            })
         }
     }
 }