zouyu
2023-12-26 032ddb30a8d9d884cc176a4a506580b4a1272586
src/views/quality/Packaging_ledger/pack-from.vue
@@ -1,7 +1,7 @@
<template>
    <el-dialog
      width="60%"
      title="参数"
      title="新增"
      top="5vh"
      :visible.sync="innerVisible"
      :show="currshowlist"
@@ -11,11 +11,11 @@
    >
      <ttable
        :table="table"
        @handleSelectionChange="handleSelectionChange"
        @currentChange="Getdata"
        :prelang="prelang"
        :options="options"
        :ajaxFun="ajaxFun"
        :bottomOffset="350"
        :bottomOffset="150"
        ref="paramTable"
      >
        <template #toolbar></template>
@@ -38,7 +38,7 @@
    },
    data() {
      return {
        datalistid:"",
        datalistid:{},
        ajaxFun: customerpage,
        currentRow: false,
        typeOptions: [],
@@ -59,7 +59,8 @@
          border: true, // 是否有纵向边框
          lazy: false, // 是否需要懒加载
          fit: true, // 列的宽度是否自撑开
          multiSelect: true, //
          multiSelect: false, //
          isEdit:false,
          seqNo: true,
          isShowHide: true, // 是否显示显影按钮
          isSearch: true, // 高级查询按钮
@@ -127,7 +128,6 @@
    },
    watch: {
      currshowlist() {
        console.log(22211);
        this.innerVisible = this.currshowlist
        if (this.currshowlist) {
          this.$nextTick(() => {
@@ -140,31 +140,31 @@
    //   ...mapGetters(['permissions'])
    },
    created() {
      this.getParamType()
      // this.getParamType()
    },
    methods: {
         // 获取数据列表
        getData() {
        this.$refs.paramTable.getDataList()
        },
        handleSelectionChange(val){
            let data = val
            data.forEach(el => {
                this.datalistid = el
            });
            console.log(this.datalistid);
        // getData() {
        // this.$refs.paramTable.getDataList()
        // },
        Getdata(val){
            this.datalistid = val
        },
      saveSelectRow() {
        pagedataadd ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
            console.log(res);
        let packageBox = {
            customerId:this.datalistid.id,
            contractNo:this.datalistid.contractNo
        }
        pagedataadd (packageBox).then((res =>{
            if (res.status === 200) {
                this.$message.success('新增成功')
                this.$emit('refreshDataList')
            }else{
                this.$message.error('创建失败')
            }
        }))
        this.innerVisible = false
          this.$emit('handleSelectionChange',this.innerVisible )
          this.$emit('wayapi',this.innerVisible )
      },
    }
  }