| File was renamed from src/main/webapp/views/erp/materialuse/index.html |
| | |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../../static/evn/index.css"> |
| | | <link rel="stylesheet" href="../../static/evn/index.css"> |
| | | </head> |
| | | |
| | | <body> |
| | |
| | | <el-input v-model="tableSearchParam.soCode" placeholder="请输入生产单号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车间"> |
| | | <el-select v-model="tableSearchParam.depId" placeholder="选择车间" style="width: 240px" > |
| | | <el-select v-model="tableSearchParam.depId" placeholder="选择车间" style="width: 150px" > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否打印"> |
| | | <el-select v-model="tableSearchParam.izPrint" placeholder="" style="width: 240px" > |
| | | <el-select v-model="tableSearchParam.izPrint" placeholder="是否打印" style="width: 150px" > |
| | | <el-option |
| | | v-for="item in printOptions" |
| | | :key="item.value" |
| | |
| | | </el-form> |
| | | <el-form :inline="true"> |
| | | <el-form-item label=""> |
| | | <el-button type="primary" @click="fnPrintView('否',0)">打印预览</el-button> |
| | | <el-button type="primary" @click="fnPrintView('否')">打印预览</el-button> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="primary">打印</el-button> |
| | | <el-button type="primary" @click="fnPrint('是')">打印</el-button> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="primary">撤销生成</el-button> |
| | | <el-button type="primary" @click="fnCanelPrint()">撤销生成</el-button> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="primary">打印预览(红字)</el-button> |
| | | <el-button type="primary" @click="fnPrintRedView('否')">打印预览(红字)</el-button> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="primary">打印(红字)</el-button> |
| | | <el-button type="primary" @click="fnPrintRed('是')">打印(红字)</el-button> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="primary">撤销生成(红字)</el-button> |
| | | <el-button type="primary" @click="fnCanelPrintRed()">撤销生成(红字)</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="tableData" border style="width: 100%" row-key="finterid" @selection-change="handleSelectionChange" max-height="650"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="invCode" label="物料编码"> |
| | | </el-table-column> |
| | | <el-table-column prop="invName" label="物料名称" width="300" show-overflow-tooltip="true"> |
| | | <el-table-column prop="invName" label="物料名称" width="300" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="invStd" label="规格" width="200" show-overflow-tooltip="true"> |
| | | <el-table-column prop="invStd" label="规格" width="200" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="depName" label="车间"> |
| | | </el-table-column> |
| | |
| | | </el-card> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../../static/js/common.js" charset="utf-8"></script> |
| | | <script src="../../../static/evn/vue.global.js"></script> |
| | | <script src="../../../static/evn/element-plus.js"></script> |
| | | <script src="../../../static/evn/icons-vue.js"></script> |
| | | <script src='../LodopFuncs.js'></script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script src="../../static/evn/vue.global.js"></script> |
| | | <script src="../../static/evn/element-plus.js"></script> |
| | | <script src="../../static/evn/icons-vue.js"></script> |
| | | <script src='../../static/js/erp/LodopFuncs.js'></script> |
| | | <script type="module"> |
| | | // 导入中文语言包 |
| | | import zhCn from '../zh-cn.js'; |
| | | import zhCn from '../../static/js/erp/zh-cn.js'; |
| | | |
| | | const { createApp, ref, onMounted, onBeforeMount ,watchEffect} = Vue; |
| | | |
| | |
| | | depName.value = item.label |
| | | } |
| | | }) |
| | | console.log(depName.value) |
| | | |
| | | }) |
| | | |
| | | const printOptions = [ |
| | |
| | | }); |
| | | } |
| | | |
| | | function getDepOptions(){ |
| | | function fnCanelPrint(){ |
| | | const loading = ElementPlus.ElLoading.service({ |
| | | lock: true, |
| | | text: 'Loading', |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url: "http://127.0.0.1:9090/basicinfo/departmentl/getlistfordropdown", |
| | | url:"http://127.0.0.1:9090/mo/materialuse/canelprint", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: JSON.stringify(selectList.value), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | | method: 'POST', |
| | | success: function(res) { |
| | | loading.close(); |
| | | if (res.code == 200) { |
| | | res.data.map(item => { |
| | | console.log(item) |
| | | options.value.push({ |
| | | value: item.depId, label: item.depName |
| | | }) |
| | | console.log(options.value) |
| | | }) |
| | | ElementPlus.ElMessage({ |
| | | message: "撤销成功", |
| | | type: 'success' |
| | | }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | ElementPlus.ElMessage({ |
| | | message: res.msg, |
| | |
| | | }); |
| | | } |
| | | |
| | | function fnPrintView(izPrint,izRed){ |
| | | function fnCanelPrintRed(){ |
| | | const loading = ElementPlus.ElLoading.service({ |
| | | lock: true, |
| | | text: 'Loading', |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url:"http://127.0.0.1:9090/mo/materialuse/canelprint1", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: JSON.stringify(selectList.value), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function(res) { |
| | | loading.close(); |
| | | if (res.code == 200) { |
| | | ElementPlus.ElMessage({ |
| | | message: "撤销成功", |
| | | type: 'success' |
| | | }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | ElementPlus.ElMessage({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function getDepOptions(){ |
| | | $.ajax({ |
| | | url: "http://127.0.0.1:9090/basicinfo/departmentl/getlistfordropdown", |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | | success: function(res) { |
| | | if (res.code == 200) { |
| | | res.data.map(item => { |
| | | options.value.push({ |
| | | value: item.depId, label: item.depName |
| | | }) |
| | | }) |
| | | } else { |
| | | ElementPlus.ElMessage({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | function fnPrint(izPrint) { |
| | | ElementPlus.ElMessageBox.confirm('确定打印吗?') |
| | | .then(() => { |
| | | print(izPrint,0) |
| | | }) |
| | | .catch(() => { |
| | | // catch error |
| | | }) |
| | | |
| | | } |
| | | |
| | | function fnPrintView(izPrint){ |
| | | print(izPrint,0) |
| | | } |
| | | |
| | | function fnPrintRedView(izPrint) { |
| | | print(izPrint,1); |
| | | } |
| | | |
| | | function fnPrintRed(izPrint) { |
| | | ElementPlus.ElMessageBox.confirm('确定红字打印吗?') |
| | | .then(() => { |
| | | print(izPrint,1); |
| | | }) |
| | | .catch(() => { |
| | | // catch error |
| | | }) |
| | | |
| | | } |
| | | |
| | | function print(izPrint,izRed){ |
| | | const LODOP = getLodop() |
| | | const loading = ElementPlus.ElLoading.service({ |
| | | lock: true, |
| | |
| | | page() |
| | | } |
| | | function handleSelectionChange(val) { |
| | | console.log(val) |
| | | |
| | | selectList.value = val |
| | | } |
| | | |
| | |
| | | options, |
| | | printOptions, |
| | | page, |
| | | fnPrint, |
| | | fnPrintView, |
| | | fnCanelPrint, |
| | | fnCanelPrintRed, |
| | | fnPrintRed, |
| | | fnPrintRedView, |
| | | handleSizeChange, |
| | | handleCurrentChange, |
| | | handleSelectionChange |