From 0f0d62f85d0e44c03161ef6d3043a4d70fe553dd Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期四, 30 十一月 2023 15:07:42 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before

---
 src/views/quality/Packaging_ledger/pack-fromadd.vue |  171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 171 insertions(+), 0 deletions(-)

diff --git a/src/views/quality/Packaging_ledger/pack-fromadd.vue b/src/views/quality/Packaging_ledger/pack-fromadd.vue
new file mode 100644
index 0000000..e27e45a
--- /dev/null
+++ b/src/views/quality/Packaging_ledger/pack-fromadd.vue
@@ -0,0 +1,171 @@
+<template>
+    <el-dialog
+      width="60%"
+      title="鍙傛暟"
+      top="5vh"
+      :visible.sync="innerVisible"
+      :show="currshowlist"
+      @close="$emit('update:currshowlist', false)"
+      append-to-body
+      class="part-dialog"
+    >
+      <ttable
+        :table="table"
+        @handleSelectionChange="handleSelectionChange"
+        :prelang="prelang"
+        :options="options"
+        :ajaxFun="ajaxFun"
+        :paramObj="packageBoxIddata"
+        :bottomOffset="350"
+        ref="paramTable"
+      >
+        <template #toolbar></template>
+      </ttable>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="innerVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="saveSelectRow">纭� 瀹�</el-button>
+      </div>
+    </el-dialog>
+  </template>
+  <script>
+import { dataadd,saveList } from '@/api/quality/Packaging_ledger'
+import ttable from '@/views/common/ztt-table.vue'
+  export default {
+    props:{
+        currshowlist: {
+            type: Boolean,
+            default: false
+        },
+        packageBoxIddata:{
+            type: Object
+        },
+    },
+    data() {
+      return {
+        datalist:[],
+        datalistid:"",
+        ajaxFun: dataadd,
+        currentRow: false,
+        typeOptions: [],
+        innerVisible: false,
+        listLoading: true,
+        multipleSelection: [],
+        isShowQuery: false,
+        uploadInfo: {
+          // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
+          isShow: false,
+          url: ''
+        },
+        prelang: 'operation',
+        options: {
+          height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾
+          stripe: true, // 鏄惁涓烘枒椹汗 table
+          highlightCurrentRow: false, // 鏄惁瑕侀珮浜綋鍓嶈
+          border: true, // 鏄惁鏈夌旱鍚戣竟妗�
+          lazy: false, // 鏄惁闇�瑕佹噿鍔犺浇
+          fit: true, // 鍒楃殑瀹藉害鏄惁鑷拺寮�
+          multiSelect: true, //
+          seqNo: true,
+          isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳
+          isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
+          defaultOrderBy: { column: 'createTime', direction: 'desc' }
+        },
+        table: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 20,
+          data: [],
+          // 鏍囬
+          column: [
+            {
+              minWidth: 'code',
+              prop: 'product',
+              label: '浜у搧',
+              sort: true,
+              isTrue: true,
+              isSearch: true,
+              searchInfoType: 'text'
+            },
+            {
+              minWidth: '120',
+              prop: 'productNo',
+              label: '浜у搧缂栧彿',
+              sort: true,
+              isTrue: true,
+              isSearch: true,
+              searchInfoType: 'text'
+            },
+            {
+              minWidth: '140',
+              prop: 'specs',
+              label: '瑙勬牸鍨嬪彿',
+              sort: true,
+              isTrue: true,
+              isSearch: true,
+              searchInfoType: 'text',
+            },
+            {
+              minWidth: '120',
+              prop: 'unit',
+              label: '鍗曚綅',
+              sort: true,
+              isTrue: true,
+              isSearch: true,
+              searchInfoType: 'datetimerange'
+            },
+          ],
+        },
+        addOrUpdateVisible: false
+      }
+    },
+    components: {
+      ttable
+    },
+    watch: {
+      currshowlist() {
+        console.log(22211);
+        this.innerVisible = this.currshowlist
+      }
+    },
+    computed: {
+    //   ...mapGetters(['permissions'])
+    },
+    created() {
+      this.getParamType()
+    },
+    methods: {
+         // 鑾峰彇鏁版嵁鍒楄〃
+        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 )
+        this.innerVisible = false
+      }
+    }
+  }
+  </script>
+  
\ No newline at end of file

--
Gitblit v1.9.3