{"remainingRequest":"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\\SelectQuantityMaterialDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\material\\components\\SelectQuantityMaterialDialog.vue","mtime":1667545183145},{"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":["//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\n\r\nimport quantityManage from '@/views/Manage/material/api/materialQuantityManage.js'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport dictContracts from '@/components/dict/DictSelectUtils.js'\r\n\r\nexport default {\r\n name: 'QuantityMaterialManage',\r\n components: {\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n titles: '',\r\n tableData: [],\r\n showDia: false,\r\n treeData: [\r\n { code: '0', id: 0, typeName: '物资分类信息', parentId: 0, children: [] }\r\n ],\r\n defaultProps: {\r\n value: 'id',\r\n label: 'typeName',\r\n parentId: 'parentId',\r\n code: 'code',\r\n children: 'children'\r\n },\r\n data: [],\r\n treeNode: { code: '0', id: 0, typeName: '物资分类信息', parentId: 0, children: [] },\r\n updateTreeNode: null,\r\n url: {\r\n\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'name_',\r\n relation: 'AND',\r\n value: ''\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'warehouse_',\r\n relation: 'AND',\r\n value: ''\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'manufacturer_',\r\n relation: 'AND',\r\n value: ''\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'class_Id_',\r\n relation: 'AND',\r\n value: ''\r\n }\r\n ],\r\n\t warehouses: [],\r\n\t materialSelection: []\r\n }\r\n },\r\n watch: {\r\n filterText(val) {\r\n console.log(val)\r\n this.$refs.tree.filter(val)\r\n }\r\n },\r\n created() {\r\n this.warehouses = dictContracts.getDictItemsFromCache('cmgt_ckmc')\r\n },\r\n mounted() {\r\n this.getTreen()\r\n },\r\n methods: {\r\n // 树查询\r\n getTreen() {\r\n quantityManage.loadAllClass({}, res => {\r\n this.treeData[0].children = res\r\n this.$set(this.treeData)\r\n })\r\n },\r\n reload() {\r\n this.treeData = [\r\n { code: '', id: 0, typeName: '物资管理', parentId: 0, children: [] }\r\n ]\r\n this.$set(this.treeData)\r\n this.getTreen()\r\n // this.loadData()\r\n },\r\n // 重置\r\n clearQuerys() {\r\n this.querys[0].value = ''\r\n this.querys[1].value = ''\r\n this.querys[2].value = ''\r\n },\r\n // 分页查询物资信息\r\n loadData(page) {\r\n if (page) {\r\n this.queryParam.pageBean.page = page\r\n }\r\n this.loading = true\r\n this.tableData = []\r\n this.queryParam.querys = []\r\n if (this.querys[0].value) {\r\n this.queryParam.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.queryParam.querys.push(this.querys[1])\r\n }\r\n if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n if (this.querys[3].value) {\r\n this.queryParam.querys.push(this.querys[3])\r\n }\r\n quantityManage.materialQuantityQuery(this.queryParam).then(res => {\r\n // console.log(res)\r\n this.total = res.total\r\n this.tableData = res.rows\r\n this.$set(this.tableData)\r\n this.loading = false\r\n })\r\n },\r\n handleNodeClick(data) { // 点击分类树节点\r\n this.treeNode = data\r\n if (data.id == '0') {\r\n this.querys[3].value = this.treeNode.id\r\n this.loadData(1)\r\n } else {\r\n this.querys[3].value = this.treeNode.id\r\n this.loadData(1)\r\n }\r\n },\r\n formartWarehouseName(row, column, cellValue, index) {\r\n var obj = this.warehouses.find(function(item) {\r\n if (item.value === row.warehouse) {\r\n return item\r\n }\r\n })\r\n if (obj !== undefined) {\r\n return obj.name\r\n } else {\r\n return ''\r\n }\r\n },\r\n handleSelectChange(val) {\r\n this.materialSelection = val\r\n },\r\n handleClose() {\r\n\t\t this.materialSelection = []\r\n\t\t this.$refs.multipleSelection.clearSelection()\r\n\t\t // done()\r\n\t\t this.showDia = false\r\n },\r\n saveMaterial() { // 获取选中数据\r\n\t\t var materials = []\r\n\t\t this.materialSelection.forEach(r => {\r\n\t\t \t materials.push({\r\n\t\t \t\t\tquantity: 0,\r\n availableQuantity: r.quantity,\r\n\t\t \t\t\tname: r.cmgtMaterialInfo.name,\r\n\t\t \t\t\tmemo: '',\r\n\t\t \t\t\tid: null,\r\n\t\t \t\t\tprice: 0,\r\n\t\t \t\t\tamount: 0,\r\n\t\t \t\t\twarehouseInoutId: null,\r\n\t\t \t\t\tmaterialInfoId: r.mid,\r\n\t\t \t\t\tsupplier: '',\r\n unit: r.cmgtMaterialInfo.unit,\r\n model: r.cmgtMaterialInfo.model,\r\n\t\t \t\t\tdescription: r.id // 库存id\r\n\t\t \t })\r\n\t\t })\r\n\t this.$emit('saveSelectMaterial', materials)\r\n\t this.$refs.multipleSelection.clearSelection()\r\n\t\t // this.showDia = false\r\n },\r\n checkSelectable(row) {\r\n return row.quantity > 0\r\n }\r\n }\r\n}\r\n",null]}