{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\material\\components\\SelectMaterialDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\material\\components\\SelectMaterialDialog.vue","mtime":1686644136998},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport classManage from '@/api/manager/material/materialInfoManage.js';\nimport { TableMixin } from '@/mixins/tableMixin';\nexport default {\n name: 'SelectMaterialDialog',\n components: {},\n mixins: [TableMixin],\n props: {\n // pageName: String,\n purchasingDetailList: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n titles: '',\n tableData: [],\n showDia: false,\n isEdit: false,\n treeData: [{\n code: '0',\n id: 0,\n name: '物资分类信息',\n parentId: 0,\n children: []\n }],\n defaultProps: {\n value: 'id',\n label: 'name',\n parentId: 'parentId',\n code: 'code',\n children: 'children'\n },\n data: [],\n treeNode: {\n code: '0',\n id: 0,\n name: '物资分类信息',\n parentId: 0,\n children: []\n },\n updateTreeNode: null,\n url: {},\n materialSelection: [],\n sorter: [{\n direction: 'ASC',\n property: 'sn_'\n }],\n querys: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'name_',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'warehouse_',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'manufacturer_',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'class_Id_',\n relation: 'AND',\n value: ''\n }]\n };\n },\n created: function created() {},\n mounted: function mounted() {\n this.getTreen();\n },\n methods: {\n // 指定一个key标识这一行的数据\n getRowKey: function getRowKey(row) {\n return row.id;\n },\n selectionEcho: function selectionEcho() {\n this.$nextTick(function () {\n var _this = this;\n\n this.purchasingDetailList.forEach(function (key) {\n _this.tableData.forEach(function (row) {\n console.log(row.id == key);\n\n if (row.id == key.materialInfoId) {\n _this.$refs.multipleSelection.toggleRowSelection(row, true);\n }\n\n if (row.id == key.id) {\n _this.$refs.multipleSelection.toggleRowSelection(row, true);\n }\n });\n });\n });\n },\n // 树查询\n getTreen: function getTreen() {\n var _this2 = this;\n\n classManage.loadAllClass({}, function (res) {\n // console.log(res)\n _this2.treeData[0].children = res.value;\n\n _this2.$set(_this2.treeData);\n });\n },\n reload: function reload() {\n this.treeData = [{\n code: '',\n id: 0,\n name: '物资管理',\n parentId: 0,\n children: []\n }];\n this.$set(this.treeData);\n this.getTreen();\n this.loadData();\n },\n // 重置\n clearQuerys: function clearQuerys() {\n this.querys[0].value = '';\n this.querys[1].value = '';\n this.querys[2].value = '';\n },\n // 分页查询物资信息\n loadData: function loadData(page) {\n var _this3 = this;\n\n // console.log(this.pageName)\n // let method = 'sdfs'\n // if (this.pageName == '领用申请') {\n // // 新增\n // method = classManage.materialInfoPageQuery\n // }\n // if (this.pageName == '采购需求申请') {\n // // 修改\n // method = classManage.materialInfoQuery\n // }\n if (page) {\n this.queryParam.pageBean.page = page;\n }\n\n this.loading = true;\n this.tableData = [];\n this.queryParam.querys = []; // this.queryParam.sorter = this.sorter\n\n if (this.querys[0].value) {\n this.queryParam.querys.push(this.querys[0]);\n }\n\n if (this.querys[1].value) {\n this.queryParam.querys.push(this.querys[1]);\n }\n\n if (this.querys[2].value) {\n this.queryParam.querys.push(this.querys[2]);\n }\n\n if (this.querys[3].value) {\n this.queryParam.querys.push(this.querys[3]);\n }\n\n classManage.materialInfoPageQuery(this.queryParam).then(function (res) {\n console.log(res);\n _this3.total = res.total;\n _this3.tableData = res.rows;\n\n _this3.$set(_this3.tableData);\n\n _this3.loading = false;\n\n _this3.selectionEcho();\n });\n },\n handleNodeClick: function handleNodeClick(data) {\n // 点击分类树节点\n this.treeNode = data;\n\n if (data.id == '0') {\n this.querys[3].value = this.treeNode.id;\n this.loadData(1);\n } else {\n this.querys[3].value = this.treeNode.id;\n this.loadData(1);\n }\n },\n handleSelectChange: function handleSelectChange(val) {\n console.log('val', val);\n this.materialSelection = val;\n },\n handleClose: function handleClose() {\n this.materialSelection = [];\n this.$refs.multipleSelection.clearSelection(); // done()\n\n this.showDia = false;\n },\n saveMaterial: function saveMaterial() {\n // 获取选中数据\n var materials = [];\n this.materialSelection.forEach(function (r) {\n console.log(r);\n materials.push({\n remainingQuantity: r.quantity,\n quantity: r.num,\n sn: r.sn,\n name: r.name,\n model: r.model,\n memo: r.memo,\n id: null,\n price: r.price,\n amount: r.num * r.price,\n warehouseInoutId: null,\n // materialInfoId: r.id,\n materialInfoId: r.id,\n supplier: r.supplier,\n unit: r.unit,\n description: ''\n });\n });\n console.log(materials);\n this.$emit('saveSelectMaterial', materials);\n this.$refs.multipleSelection.clearSelection(); // this.showDia = false\n },\n editCell: function editCell() {\n this.isEdit = true;\n },\n editCellCancel: function editCellCancel() {\n this.isEdit = false;\n }\n }\n};",null]}