licp
2024-03-29 f48478135272fa9c3b60ac53434097d225820fa3
src/views/quality/Packaging_ledger/pack-fromadd.vue
@@ -1,7 +1,7 @@
<template>
    <el-dialog
      width="60%"
      title="参数"
      title="产品库存明细"
      top="5vh"
      :visible.sync="innerVisible"
      :show="currshowlist"
@@ -16,7 +16,7 @@
        :options="options"
        :ajaxFun="ajaxFun"
        :paramObj="packageBoxIddata"
        :bottomOffset="350"
        :bottomOffset="150"
        ref="paramTable"
      >
        <template #toolbar></template>
@@ -43,7 +43,6 @@
    data() {
      return {
        datalist:[],
        datalistid:"",
        ajaxFun: dataadd,
        currentRow: false,
        typeOptions: [],
@@ -78,6 +77,15 @@
          // 标题
          column: [
            {
              minWidth: '120',
              prop: 'customerOrderNo',
              label: '合同号',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: 'code',
              prop: 'product',
              label: '产品',
@@ -111,7 +119,43 @@
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'datetimerange'
              searchInfoType: 'text'
            },
            {
              minWidth: '120',
              prop: 'outBatchNo',
              label: '批次号',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '120',
              prop: 'number',
              label: '数量',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '120',
              prop: 'locNo',
              label: '库位编号',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
            {
              minWidth: '120',
              prop: 'locName',
              label: '库位名称',
              sort: true,
              isTrue: true,
              isSearch: true,
              searchInfoType: 'text'
            },
          ],
        },
@@ -123,8 +167,12 @@
    },
    watch: {
      currshowlist() {
        console.log(22211);
        this.innerVisible = this.currshowlist
        if(this.currshowlist){
          this.$nextTick(() => {
            this.getData()
          });
        }
      }
    },
    computed: {
@@ -134,32 +182,12 @@
      this.getParamType()
    },
    methods: {
         // 获取数据列表
        getData() {
      // 获取数据列表
      getData() {
        this.$refs.paramTable.getDataList()
        },
        handleSelectionChange(val){
            let data = val
            data.forEach(el => {
                this.datalistid = el
            });
        },
      saveSelectRow() {
        console.log(this.packageBoxIddata,"123");
        saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{
            console.log(res);
            if (res.status === 200) {
                this.$message.success('新增成功')
            }else{
                this.$message.error('创建失败')
            }
        }))
        this.innerVisible = false
        //   this.$emit('handleSelectionChange',this.innerVisible )
      },
      handleSelectionChange(val){
        this.datalist = val
        console.log(this.datalist,"数据");
      },
      saveSelectRow(){
        this.$emit('handleSelectionChange',this.datalist )
@@ -168,4 +196,3 @@
    }
  }
  </script>