Browse Source

代码更新

qymljy 2 years ago
parent
commit
c0a9eb481f

+ 370 - 0
src/Form/cashcouponPay/add.vue

@@ -0,0 +1,370 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="onShow">新 增</el-button>
+    <el-drawer
+        title="新增返利代金券支出"
+        :visible.sync="dialogFormVisible"
+        size="40%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose(dialogFormVisible = false)">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="right" size="mini">
+            <el-col :span="12">
+              <el-form-item label="企业名称:" prop="enterprisename">
+                <el-popover
+                    placement="bottom"
+                    width="700"
+                    trigger="click"
+                    v-model="enterpriseShow"
+                    @show="queryEnterprise">
+                  <el-input
+                      style="width:300px;margin-bottom: 10px"
+                      :suffix-icon="enterpriseParam.content.where.condition?enterpriseParam.content.where.condition.length > 0?'':'':'el-icon-search'"
+                      placeholder="请输入内容"
+                      v-model="enterpriseParam.content.where.condition"
+                      clearable
+                      @clear="queryEnterprise(enterpriseParam.content.pageNumber = 1)"
+                      size="mini"
+                      @keyup.enter.native="queryEnterprise(enterpriseParam.content.pageNumber = 1)">
+                  </el-input>
+                  <el-table :data="enterprise.enterpriseData" @row-click="enterpriseData" height="396px" border size="mini">
+                    <el-table-column
+                        label="企业名称"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="省市县"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="详细地址"
+                        width="0">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChange"
+                        @current-change="handleCurrentChange"
+                        :page-sizes="[20,50,100,]"
+                        layout="total,sizes, prev, pager, next, jumper"
+                        :current-page="enterprise.currentPage"
+                        :total="enterprise.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference" :readonly="true" v-model="form.enterprisename" autocomplete="off" placeholder="请选择企业" ></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" >
+              <el-form-item label="分类明细:" prop="subclass">
+                <el-select v-model="form.subclass" placeholder="请选择分类明细" style="width: 100%">
+                  <el-option
+                      v-for="item in subClassData"
+                      :key="item"
+                      :label="item"
+                      :value="item">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="单据日期:" prop="billdate">
+                <el-date-picker
+                    v-model="form.billdate"
+                    format="yyyy-MM-dd"
+                    value-format="yyyy-MM-dd"
+                    type="date"
+                    placeholder="选择日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="返利代金券:" prop="sa_cashbillid_rebate">
+                <el-popover
+                    placement="bottom"
+                    width="700"
+                    trigger="click"
+                    v-model="cashCouponShow"
+                    @show="queryCashCoupon">
+                  <el-input
+                      style="width:300px;margin-bottom: 10px"
+                      placeholder="请输入内容"
+                      v-model="cashCouponParam.content.where.condition"
+                      clearable
+                      @clear="queryCashCoupon(cashCouponParam.content.pageNumber = 1)"
+                      size="mini"
+                      @keyup.enter.native="queryCashCoupon(cashCouponParam.content.pageNumber = 1)">
+                    <i slot="prefix" class="el-icon-search" @click="queryCashCoupon(cashCouponParam.content.pageNumber = 1)"></i>
+                  </el-input>
+                  <el-table :data="cashCoupon.cashCouponData" @row-click="cashCouponData" height="396px" border size="mini">
+                    <el-table-column
+                        label="单号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.billno?scope.row.billno:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="金额"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.amount?scope.row.amount:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="分类明细"
+                    >
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.subclass?scope.row.subclass:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeCashCoupon"
+                        @current-change="handleCurrentChangeCashCoupon"
+                        :page-sizes="[10,20,50,100,]"
+                        layout="total,sizes, prev, pager, next, jumper"
+                        :current-page="cashCoupon.currentPage"
+                        :total="cashCoupon.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference" :readonly="true"  v-model="form.sa_cashbillid_billno" autocomplete="off" placeholder="请选择返利代金券"  ></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="金额:" prop="amount">
+                <el-input v-model="form.amount" placeholder="请输入金额" type="number"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注:" prop="remarks">
+                <el-input v-model="form.remarks" type="textarea" rows="5" placeholder="请输入备注信息"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  data() {
+    var amountData = (rule,value,callback) =>{
+      if (this.form.amount < 0 ){
+        callback(new Error('不能下于0'))
+      }else if(this.form.amount > this.cashCouponAmount){
+        callback(new Error('不能超过代金券可用金额'))
+      }
+      else {
+        callback();
+      }
+    }
+    return {
+      dialogFormVisible:false,
+      enterpriseShow:false,
+      cashCouponShow:false,
+      cashCouponAmount:'',
+      form:{
+        "sa_cashbillid": 0,
+        "sys_enterpriseid": '', //合作企业档案ID
+        "remarks": "",
+        "subclass": "", //明细分类
+        "amount": '', //金额
+        "billdate": "", //单据日期
+        "enterprisename":"",
+        "sa_cashbillid_rebate": '', //所选的代金券id
+        "sa_cashbillid_billno":""
+      },
+      rules:{
+        enterprisename:[
+          { required: true, message: '请选择企业', trigger: 'change'},
+        ],
+        subclass:[
+          { required: true, message: '请选择分类明细', trigger: 'change'},
+        ],
+        amount:[
+          { required: true, validator: amountData, trigger: 'blur'},
+        ],
+        sa_cashbillid_rebate:[
+          { required: true, message: '请选择返利代金券', trigger: 'change'},
+        ],
+      },
+      subClassData:[],
+      enterpriseParam:{
+        content: {
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+            type: 1,
+            sa_projectid: ""
+          }
+        },
+        id: 20220920083901
+      },
+      enterprise:{
+        enterpriseData:[],
+        total:0,
+        currentPage:0,
+      },
+      cashCouponParam:{
+        "id": 20230216192902,
+        "content": {
+          // "sys_enterpriseid": 2, //不传查全部,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": "",
+            "status": "审核"
+          }
+        }
+      },
+      cashCoupon:{
+        cashCouponData:[],
+        total:0,
+        currentPage:0,
+      }
+    }
+  },
+  methods:{
+    onSubmit(){
+      console.log(this.form)
+      this.$refs.form.validate(async(valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20230302140402,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.dialogFormVisible = false
+          this.$refs.form.resetFields()
+          this.form = {
+            "sa_cashbillid": 0,
+            "sys_enterpriseid": '', //合作企业档案ID
+            "remarks": "",
+            "subclass": "", //明细分类
+            "amount": '', //金额
+            "billdate": "", //单据日期
+            "enterprisename":"",
+            "sa_cashbillid_rebate": '', //所选的代金券id
+            "sa_cashbillid_billno":""
+          }
+        })
+      })
+    },
+    onShow(){
+      this.dialogFormVisible = true
+      const newData = new Date()
+      console.log(newData.getMonth())
+      this.form.billdate = newData.getFullYear() + '-' + ((newData.getMonth() + 1) < 10? '0'+(newData.getMonth() + 1): (newData.getMonth() + 1)) + '-' + newData.getDate()
+      this.subClassList()
+    },
+    /*获取分类明细*/
+    subClassList(){
+      this.$store.dispatch('optiontypeselect','rebatebillpaytype').then(res=>{
+        console.log(res,'分类明细')
+        let index = ''
+        for (var i = 0 ;i<res.data.length; i++){
+          if (res.data[i].value === '返利金'){
+            index = i
+          }
+        }
+        this.subClassData = res.data[index].subvalues
+      })
+    },
+    /*获取企业*/
+    async queryEnterprise(){
+      const res = await this.$api.requested(this.enterpriseParam)
+      this.enterprise.enterpriseData = res.data
+      this.enterprise.total = res.total
+      this.enterprise.currentPage = res.pageNumber
+    },
+    enterpriseData(row){
+      console.log(row,'row')
+      this.form.sys_enterpriseid = row.sys_enterpriseid
+      this.form.enterprisename = row.enterprisename
+      this.enterpriseShow = false
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.enterpriseParam.content.pageSize = val
+      this.queryEnterprise()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.enterpriseParam.content.pageNumber = val
+      this.queryEnterprise()
+    },
+    /*获取返利代金券*/
+    async queryCashCoupon(){
+      this.cashCouponParam.content.where.condition = this.form.enterprisename
+      const res = await this.$api.requested(this.cashCouponParam)
+      this.cashCoupon.cashCouponData = res.data
+      this.cashCoupon.total = res.total
+      this.cashCoupon.currentPage = res.pageNumber
+    },
+    cashCouponData(row){
+      console.log(row)
+      this.form.sa_cashbillid_billno = row.billno
+      this.form.sa_cashbillid_rebate = row.sa_cashbillid
+      this.cashCouponAmount = row.amount
+      this.cashCouponShow = false
+
+    },
+    handleSizeChangeCashCoupon(val) {
+      // console.log(`每页 ${val} 条`);
+      this.enterpriseParam.content.pageSize = val
+      this.queryCashCoupon()
+    },
+    handleCurrentChangeCashCoupon(val) {
+      // console.log(`当前页: ${val}`);
+      this.enterpriseParam.content.pageNumber = val
+      this.queryCashCoupon()
+    },
+    onClose(){
+      this.$refs.form.resetFields()
+      this.form = {
+        "sa_cashbillid": 0,
+        "sys_enterpriseid": '', //合作企业档案ID
+        "remarks": "",
+        "subclass": "", //明细分类
+        "amount": '', //金额
+        "billdate": "", //单据日期
+        "enterprisename":"",
+        "sa_cashbillid_rebate": '', //所选的代金券id
+        "sa_cashbillid_billno":""
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 369 - 0
src/Form/cashcouponPay/edit.vue

@@ -0,0 +1,369 @@
+<template>
+  <div>
+    <el-button size="mini" type="primary" @click="onShow" :disabled="data.status !== '新建'">编 辑</el-button>
+    <el-drawer
+        title="编辑返利代金券支出"
+        :visible.sync="dialogFormVisible"
+        size="40%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="onClose(dialogFormVisible = false)">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="right" size="mini">
+            <el-col :span="12">
+              <el-form-item label="企业名称:" prop="enterprisename">
+                <el-popover
+                    placement="bottom"
+                    width="700"
+                    trigger="click"
+                    v-model="enterpriseShow"
+                    @show="queryEnterprise">
+                  <el-input
+                      style="width:300px;margin-bottom: 10px"
+                      :suffix-icon="enterpriseParam.content.where.condition?enterpriseParam.content.where.condition.length > 0?'':'':'el-icon-search'"
+                      placeholder="请输入内容"
+                      v-model="enterpriseParam.content.where.condition"
+                      clearable
+                      @clear="queryEnterprise(enterpriseParam.content.pageNumber = 1)"
+                      size="mini"
+                      @keyup.enter.native="queryEnterprise(enterpriseParam.content.pageNumber = 1)">
+                  </el-input>
+                  <el-table :data="enterprise.enterpriseData" @row-click="enterpriseData" height="396px" border size="mini">
+                    <el-table-column
+                        label="企业名称"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="省市县"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="详细地址"
+                        width="0">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChange"
+                        @current-change="handleCurrentChange"
+                        :page-sizes="[20,50,100,]"
+                        layout="total,sizes, prev, pager, next, jumper"
+                        :current-page="enterprise.currentPage"
+                        :total="enterprise.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference" :readonly="true" v-model="form.enterprisename" autocomplete="off" placeholder="请选择企业" ></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" >
+              <el-form-item label="分类明细:" prop="subclass">
+                <el-select v-model="form.subclass" placeholder="请选择分类明细" style="width: 100%">
+                  <el-option
+                      v-for="item in subClassData"
+                      :key="item"
+                      :label="item"
+                      :value="item">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="单据日期:" prop="billdate">
+                <el-date-picker
+                    v-model="form.billdate"
+                    format="yyyy-MM-dd"
+                    value-format="yyyy-MM-dd"
+                    type="date"
+                    placeholder="选择日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="返利代金券:" prop="sa_cashbillid_rebate">
+                <el-popover
+                    placement="bottom"
+                    width="700"
+                    trigger="click"
+                    v-model="cashCouponShow"
+                    @show="queryCashCoupon">
+                  <el-input
+                      style="width:300px;margin-bottom: 10px"
+                      placeholder="请输入内容"
+                      v-model="cashCouponParam.content.where.condition"
+                      clearable
+                      @clear="queryCashCoupon(cashCouponParam.content.pageNumber = 1)"
+                      size="mini"
+                      @keyup.enter.native="queryCashCoupon(cashCouponParam.content.pageNumber = 1)">
+                    <i slot="prefix" class="el-icon-search" @click="queryCashCoupon(cashCouponParam.content.pageNumber = 1)"></i>
+                  </el-input>
+                  <el-table :data="cashCoupon.cashCouponData" @row-click="cashCouponData" height="396px" border size="mini">
+                    <el-table-column
+                        label="单号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.billno?scope.row.billno:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="金额"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.amount?scope.row.amount:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="分类明细"
+                    >
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.subclass?scope.row.subclass:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeCashCoupon"
+                        @current-change="handleCurrentChangeCashCoupon"
+                        :page-sizes="[10,20,50,100,]"
+                        layout="total,sizes, prev, pager, next, jumper"
+                        :current-page="cashCoupon.currentPage"
+                        :total="cashCoupon.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference" :readonly="true"  v-model="form.rebate_billno" autocomplete="off" placeholder="请选择返利代金券"  ></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="金额:" prop="amount">
+                <el-input v-model="form.amount" placeholder="请输入金额" type="number"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注:" prop="remarks">
+                <el-input v-model="form.remarks" type="textarea" rows="5" placeholder="请输入备注信息"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "edit",
+  props:["data"],
+  data() {
+    var amountData = (rule,value,callback) =>{
+      if (this.form.amount < 0 ){
+        callback(new Error('不能下于0'))
+      }else if(this.form.amount > this.cashCouponAmount){
+        callback(new Error('不能超过代金券可用金额'))
+      }
+      else {
+        callback();
+      }
+    }
+    return {
+      dialogFormVisible:false,
+      enterpriseShow:false,
+      cashCouponShow:false,
+      cashCouponAmount:'',
+      form:{
+        "sa_cashbillid": 0,
+        "sys_enterpriseid": '', //合作企业档案ID
+        "remarks": "",
+        "subclass": "", //明细分类
+        "amount": '', //金额
+        "billdate": "", //单据日期
+        "enterprisename":"",
+        "sa_cashbillid_rebate": '', //所选的代金券id
+        "rebate_billno":""
+      },
+      rules:{
+        enterprisename:[
+          { required: true, message: '请选择企业', trigger: 'change'},
+        ],
+        subclass:[
+          { required: true, message: '请选择分类明细', trigger: 'change'},
+        ],
+        amount:[
+          { required: true, validator: amountData, trigger: 'blur'},
+        ],
+        sa_cashbillid_rebate:[
+          { required: true, message: '请选择返利代金券', trigger: 'change'},
+        ],
+      },
+      subClassData:[],
+      enterpriseParam:{
+        content: {
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+            type: 1,
+            sa_projectid: ""
+          }
+        },
+        id: 20220920083901
+      },
+      enterprise:{
+        enterpriseData:[],
+        total:0,
+        currentPage:0,
+      },
+      cashCouponParam:{
+        "id": 20230216192902,
+        "content": {
+          // "sys_enterpriseid": 2, //不传查全部,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": "",
+            "status": "审核"
+          }
+        }
+      },
+      cashCoupon:{
+        cashCouponData:[],
+        total:0,
+        currentPage:0,
+      }
+    }
+  },
+  methods:{
+    onSubmit(){
+      console.log(this.form)
+      this.$refs.form.validate(async(valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20230302140402,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.dialogFormVisible = false
+          this.$refs.form.resetFields()
+          this.form = {
+            "sa_cashbillid": 0,
+            "sys_enterpriseid": '', //合作企业档案ID
+            "remarks": "",
+            "subclass": "", //明细分类
+            "amount": '', //金额
+            "billdate": "", //单据日期
+            "enterprisename":"",
+            "sa_cashbillid_rebate": '', //所选的代金券id
+            "sa_cashbillid_billno":""
+          }
+        })
+      })
+    },
+    onShow(){
+      this.dialogFormVisible = true
+      this.form = Object.assign({},this.form,this.data)
+      this.subClassList()
+    },
+    /*获取分类明细*/
+    subClassList(){
+      this.$store.dispatch('optiontypeselect','rebatebillpaytype').then(res=>{
+        console.log(res,'分类明细')
+        let index = ''
+        for (var i = 0 ;i<res.data.length; i++){
+          if (res.data[i].value === '返利金'){
+            index = i
+          }
+        }
+        this.subClassData = res.data[index].subvalues
+      })
+    },
+    /*获取企业*/
+    async queryEnterprise(){
+      const res = await this.$api.requested(this.enterpriseParam)
+      this.enterprise.enterpriseData = res.data
+      this.enterprise.total = res.total
+      this.enterprise.currentPage = res.pageNumber
+    },
+    enterpriseData(row){
+      console.log(row,'row')
+      this.form.sys_enterpriseid = row.sys_enterpriseid
+      this.form.enterprisename = row.enterprisename
+      this.enterpriseShow = false
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.enterpriseParam.content.pageSize = val
+      this.queryEnterprise()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.enterpriseParam.content.pageNumber = val
+      this.queryEnterprise()
+    },
+    /*获取返利代金券*/
+    async queryCashCoupon(){
+      this.cashCouponParam.content.where.condition = this.form.enterprisename
+      const res = await this.$api.requested(this.cashCouponParam)
+      this.cashCoupon.cashCouponData = res.data
+      this.cashCoupon.total = res.total
+      this.cashCoupon.currentPage = res.pageNumber
+    },
+    cashCouponData(row){
+      console.log(row)
+      this.form.rebate_billno = row.billno
+      this.form.sa_cashbillid_rebate = row.sa_cashbillid
+      this.cashCouponAmount = row.amount
+      this.cashCouponShow = false
+
+    },
+    handleSizeChangeCashCoupon(val) {
+      // console.log(`每页 ${val} 条`);
+      this.enterpriseParam.content.pageSize = val
+      this.queryCashCoupon()
+    },
+    handleCurrentChangeCashCoupon(val) {
+      // console.log(`当前页: ${val}`);
+      this.enterpriseParam.content.pageNumber = val
+      this.queryCashCoupon()
+    },
+    onClose(){
+      this.$refs.form.resetFields()
+      this.form = {
+        "sa_cashbillid": 0,
+        "sys_enterpriseid": '', //合作企业档案ID
+        "remarks": "",
+        "subclass": "", //明细分类
+        "amount": '', //金额
+        "billdate": "", //单据日期
+        "enterprisename":"",
+        "sa_cashbillid_rebate": '', //所选的代金券id
+        "sa_cashbillid_billno":""
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 79 - 0
src/HDrpManagement/cashcouponPay/component/examine.vue

@@ -0,0 +1,79 @@
+<template>
+  <div class="inline-16">
+    <el-button v-if="data.status === '新建'" size="mini" type="primary" @click="onShow" >审核</el-button>
+    <el-dialog
+        title="提示"
+        :visible.sync="dialogVisible"
+        width="500px"
+        append-to-body
+        @close="dialogVisible = false">
+        <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+          <el-form-item
+              prop="amount"
+              label="确认金额">
+              <el-input v-model="form.amount" size="small" placeholder="请输入确认金额"></el-input>
+          </el-form-item>
+        </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" style="width:120px" @click="dialogVisible = false">取 消</el-button>
+        <el-button type="warning" size="small" style="width:120px"  @click="examineRow">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "examine",
+  props:["data"],
+  data(){
+    var checkAmount = (rule, value, callback) => {
+      if (!value) {
+        return callback(new Error('确认金额不能为空'));
+      }
+      setTimeout(() => {
+        if (Number(value) !== this.data.amount) {
+          callback(new Error('确认金额与单据金额不一致'));
+        } else {
+          callback();
+        }
+      }, 1000);
+    };
+    return {
+      dialogVisible:false,
+      form:{
+        amount:''
+      },
+      rules:{
+        amount: [
+          { validator: checkAmount, trigger: 'blur' },
+        ],
+      }
+    }
+  },
+  methods:{
+    onShow(){
+      this.dialogVisible = true
+    },
+    examineRow(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false;
+        const res = await this.$api.requested({
+          "id": "20230302140602",
+          "content": {
+            "sa_cashbillid":this.$route.query.id
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.dialogVisible = false
+          this.$emit("examineSuccess")
+        })
+      })
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 1
src/HDrpManagement/cashcouponPay/index.vue

@@ -2,9 +2,10 @@
   <div>
     <basicLayout
         ref="list"
+        formPath="cashcouponPay"
         tableName="cashcouponpayTable"
         idName="sa_cashbillid"
-        :apiId="{query:20230217095002,del:''}"
+        :apiId="{query:20230217095002,del:'20230302140502'}"
         :detailPath="{
         path:'/cashcouponPayDetail'
         }">

+ 7 - 1
src/HDrpManagement/cashcouponPay/modules/detail.vue

@@ -3,15 +3,20 @@
     <basicDetails
         ref="details"
         :titleText="mainData.billno"
+        formPath="cashcouponPay"
         :editData="mainData"
         :mainAreaData="mainAreaData"
         :turnPageId="20230217095002"
+        :delApiId="20230302140502"
         idname="sa_cashbillid"
         ownertable="sa_cashbill"
         :tabs="['详细信息']"
         @pageChange="pageChange"
+        :statusCheck="[{key:'status',value:'审核'}]"
+        @onEditSuccess="queryMainData($route.query.id)"
         >
       <div slot="customOperation">
+        <examine class="inline-16" v-if="tool.checkAuth($route.name,'check')" :data="mainData"  @examineSuccess="onSuccess"></examine>
       </div>
       <div slot="slot0" >
         <detailed :data="mainData"></detailed>
@@ -22,9 +27,10 @@
 
 <script>
 import detailed from '../component/detailed'
+import examine from '../component/examine'
 export default {
   name: "detail",
-  components:{detailed},
+  components:{detailed,examine},
   data(){
     return {
       mainData:{},

+ 1 - 1
src/HDrpManagement/contractManage/components/productClassList/addProduct.vue

@@ -80,7 +80,7 @@ export default {
         "content": {
             "sa_contractid": '',
             "pageNumber": 1,
-            "pageSize": 20,
+            "pageSize": 999,
             "where": {
                 "condition": ""
             }

+ 1 - 1
src/HManagement/notice/list/modules/detailed.vue

@@ -59,7 +59,7 @@
                     </el-col>
                     <el-col :span="24">
                       <el-form-item label="通告封面">
-                        <previewImage v-if="form.cover" style="width:256px" :image="image" :deletebtn="true"
+                        <previewImage v-if="form.cover" style="width:256px" :image="image" :deletebtn="!edit"
                                       @onSuccess="clearCover"></previewImage>
                         <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG"
                                 :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'cover' }"