hbchen пре 1 година
родитељ
комит
8207465b46

+ 8 - 0
src/api/modules/businessCustom.js

@@ -51,6 +51,14 @@ export const businessCustomInterence = {
     addNewContract:(params)=>{
         return http.post('/eta_business/signing',params)
     },
+    /**
+     * 删除续约信息
+     * @param EtaBusinessContractId Integer 商家合约ID
+     * @returns 
+     */
+    removeContract:(params)=>{
+        return http.post('/eta_business/remove_sign',params)
+    },
     /**
      * 修改销售
      * @param EtaBusinessId Integer 商家ID

+ 13 - 10
src/views/business_ETA_manage/businessEdit.vue

@@ -316,8 +316,7 @@ export default {
             this.renewalForm={
                 id:row.EtaBusinessContractId,
                 signDate:row.SigningTime,
-                expirationDate:row.ExpiredTime,
-                remark:row.Remark,
+                expirationDate:row.ExpiredTime
             }
             this.showRenewal=true
         },
@@ -325,21 +324,25 @@ export default {
             this.$confirm("是否确认删除该签约信息?", "提示", {
                 type: "warning"
             }).then(() => {
-                //TODO: 删除签约信息对接
-                this.$message.success("删除成功")
-                this.getTableData(Number(this.$route.query.id))
-                this.getTimeLineData(Number(this.$route.query.id))
+                businessCustomInterence.
+                removeContract({EtaBusinessContractId:row.EtaBusinessContractId})
+                .then(res=>{
+                    if(res.Ret == 200){
+                        this.$message.success("删除成功")
+                        this.getTableData(Number(this.$route.query.id))
+                        this.getTimeLineData(Number(this.$route.query.id))
+                    }
+                })
             }).catch(() => {});
         },
         //添加续约-保存
-        handleAddRenewal({signDate,expirationDate,remark,id}){
-            console.log({signDate,expirationDate,remark,id});
+        handleAddRenewal({signDate,expirationDate,id}){
+            console.log({signDate,expirationDate,id});
             return 
             businessCustomInterence.addNewContract({
                 EtaBusinessId:Number(this.$route.query.id),
                 SigningTime:signDate,
-                ExpiredTime:expirationDate,
-                Remark:remark
+                ExpiredTime:expirationDate
             }).then(res=>{
                 if(res.Ret!==200) return 
                 this.$message.success('添加续约成功')

+ 3 - 18
src/views/business_ETA_manage/components/AddRenewal.vue

@@ -23,10 +23,6 @@
                     value-format="yyyy-MM-dd"
                 />
             </el-form-item>
-            <el-form-item label="备注" prop="remark" id="remark">
-                <el-input v-model="ruleForm.remark" placeholder="请输入备注" type="textarea" 
-                :maxlength="50" show-word-limit></el-input>
-            </el-form-item>
             <div style="text-align:center;margin:30px 0">
                 <el-button type="primary" plain @click="handleClose">取消</el-button>
                 <el-button type="primary" @click="handleSave">保存</el-button>
@@ -52,7 +48,6 @@ export default {
                     this.ruleForm.id = value.id || 0
                     this.ruleForm.signDate = value.signDate || ''
                     this.ruleForm.expirationDate = value.expirationDate || ''
-                    this.ruleForm.remark = value.remark || ''
                 }
             },
             immediate:true
@@ -62,13 +57,12 @@ export default {
         return {
             rules:{
                 signDate:[{required: true, message: '请选择运维时间', trigger: 'change' },],
-                expirationDate:[{required: true, message: '请选择到期日期', trigger: 'change' },],
+                expirationDate:[{required: true, message: '请选择到期时间', trigger: 'change' },],
             },
             ruleForm:{
                 id:0,
                 signDate:'',
-                expirationDate:'',
-                remark:''
+                expirationDate:''
             }
         }
     },
@@ -90,7 +84,6 @@ export default {
             this.ruleForm.id = 0
             this.ruleForm.signDate = ''
             this.ruleForm.expirationDate = ''
-            this.ruleForm.remark = ''
             this.$nextTick(()=>{
                 this.$refs.ruleForm.clearValidate();
             })
@@ -101,12 +94,4 @@ export default {
         }
     },
 }
-</script>
-
-<style lang="scss">
-#remark{
-    .el-textarea{
-        width: 220px;
-    }
-}
-</style>
+</script>