网页版领料工单跳转,材料站退料单
This commit is contained in:
parent
c3765dac48
commit
6869c3a1a8
|
|
@ -82,6 +82,14 @@ export function getBackApplyInfo(id) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询材料站退料详情
|
||||||
|
export function getBackApplyInfoClz(id) {
|
||||||
|
return request({
|
||||||
|
url: '/material/back_apply_info/clz/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 退料新增
|
// 退料新增
|
||||||
export function editBackApply(data) {
|
export function editBackApply(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,12 @@ export function submitAuditingDirectApi(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取审核状态
|
||||||
|
export function getNodeAuditStatusAPI(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/sysWorkflowRecordHistory/getAuditStatus',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,10 @@
|
||||||
<script>
|
<script>
|
||||||
import TitleTip from './components/title-tip.vue'
|
import TitleTip from './components/title-tip.vue'
|
||||||
import { getLeaseTaskDetail } from '@/api/business/index'
|
import { getLeaseTaskDetail } from '@/api/business/index'
|
||||||
import { submitAuditingApi, getAuditingDetailsApi } from '@/api/receive-apply/index.js'
|
import { submitAuditingApi, getAuditingDetailsApi,getNodeAuditStatusAPI} from '@/api/receive-apply/index.js'
|
||||||
|
import { getInfo,iwsLogin } from '@/api/login'
|
||||||
|
import { getConfig } from '@/api/config';
|
||||||
|
import { setToken, setExpiresIn } from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
TitleTip
|
TitleTip
|
||||||
|
|
@ -157,19 +160,98 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
async created() {
|
||||||
|
const origin = window.location.href
|
||||||
|
console.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",origin)
|
||||||
|
// if (origin.indexOf('ticket') != -1) {
|
||||||
|
// console.log("11111111111111111111111111",origin)
|
||||||
|
// await this.getConfigApi() //领料工单
|
||||||
|
// try {
|
||||||
|
// console.log("hhhhhhhhhhhhhhhhhhhhhh",origin)
|
||||||
|
// const urlParams = new URLSearchParams(origin);
|
||||||
|
// console.log("urlParamshhhhhhhhhhhhhhh",urlParams)
|
||||||
|
// this.auditingParams.taskId = urlParams.get('taskId');
|
||||||
|
// const id = urlParams.get('id');
|
||||||
|
// console.log("idhhhhhhhhhhhhhhh",id)
|
||||||
|
// const ticketMatch = origin.match(/ticket=([^&]*)/);
|
||||||
|
// console.log("ticket11111111111111111111",ticketMatch)
|
||||||
|
// const ticket = ticketMatch ? ticketMatch[1] : '';
|
||||||
|
// const res = await iwsLogin({
|
||||||
|
// ticket: ticket,
|
||||||
|
// sysType: 0
|
||||||
|
// })
|
||||||
|
// console.log('🚀 ~ created ~ resxxxxxxxxxxxxxxx:', res)
|
||||||
|
// // 1. 获取token并存储
|
||||||
|
// if (res.code == 200) {
|
||||||
|
// setToken(res.data.access_token)
|
||||||
|
// this.$store.commit('SET_TOKEN', res.data.access_token)
|
||||||
|
// setExpiresIn(1800)
|
||||||
|
// this.$store.commit('SET_EXPIRES_IN', 1800)
|
||||||
|
// }
|
||||||
|
// // 2. 获取用户信息并存储
|
||||||
|
// const resUser = await getInfo()
|
||||||
|
// // 存取用户的userId
|
||||||
|
// sessionStorage.setItem('userId', resUser.user?.userId)
|
||||||
|
// sessionStorage.setItem('deptName', resUser.user?.dept?.deptName)
|
||||||
|
// // sessionStorage.setItem('userName', resUser.user?.userName)
|
||||||
|
|
||||||
|
// this.userId = sessionStorage.getItem('userId')
|
||||||
|
// console.log("yyyyyyyyyyyyyyyuserId",this.userId)
|
||||||
|
// await this.getLeaseTaskDetailFun(id, this.auditingParams.taskId)
|
||||||
|
// // setExpiresIn(res.data.expires_in)
|
||||||
|
// // this.$store.commit('SET_EXPIRES_IN', res.data.expires_in)
|
||||||
|
|
||||||
|
|
||||||
|
// } catch (error) {
|
||||||
|
// console.log('🚀 ~ created ~ error:', error)
|
||||||
|
// this.$message({
|
||||||
|
// message: '登录失败, 即将关闭页面',
|
||||||
|
// type: 'error'
|
||||||
|
// })
|
||||||
|
// // setTimeout(() => {
|
||||||
|
// // // 关闭窗口
|
||||||
|
// // window.close()
|
||||||
|
// // }, 1500)
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
// 判断当前路由页面是否有查询参数
|
// 判断当前路由页面是否有查询参数
|
||||||
if (this.$route.query) {
|
if (this.$route.query) {
|
||||||
const { id, taskId, type, nodeId } = this.$route.query
|
const { id, taskId, type } = this.$route.query
|
||||||
|
console.log('路由参数:', id, taskId, type)
|
||||||
this.auditingParams.taskId = taskId
|
this.auditingParams.taskId = taskId
|
||||||
|
// 如果有type参数,则设置pagesType
|
||||||
|
if (type !== undefined) {
|
||||||
this.pagesType = type
|
this.pagesType = type
|
||||||
this.currentNodeId = nodeId
|
}else{
|
||||||
this.getLeaseTaskDetailFun(id, taskId)
|
this.getNodeAuditStatus()
|
||||||
|
}
|
||||||
|
// this.currentNodeId = nodeId
|
||||||
|
await this.getLeaseTaskDetailFun(id, taskId)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.userId = sessionStorage.getItem('userId')
|
this.userId = sessionStorage.getItem('userId')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// async getConfigApi(){
|
||||||
|
// getConfig().then(response => {
|
||||||
|
// // console.log(response)
|
||||||
|
// localStorage.setItem('systemConfig', JSON.stringify(response.data || {}))
|
||||||
|
// sessionStorage.setItem('systemConfig', JSON.stringify(response.data || {}))
|
||||||
|
// })
|
||||||
|
// .catch(error => {
|
||||||
|
// console.error('Failed to fetch config:', error);
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
async getNodeAuditStatus(){
|
||||||
|
const res = await getNodeAuditStatusAPI({taskId:this.auditingParams.taskId})
|
||||||
|
if(res.data){
|
||||||
|
this.pagesType = res.data.auditStatus
|
||||||
|
}else{
|
||||||
|
this.pagesType = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 通过 或 驳回
|
// 通过 或 驳回
|
||||||
async onHandleAuditing(type) {
|
async onHandleAuditing(type) {
|
||||||
// 组装参数
|
// 组装参数
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCodeImg, iwsLogin } from '@/api/login'
|
import { getCodeImg, iwsLogin, getInfo } from '@/api/login'
|
||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import { decrypt, encrypt } from '@/utils/jsencrypt'
|
import { decrypt, encrypt } from '@/utils/jsencrypt'
|
||||||
import dingding from '@/assets/images/dingding.svg'
|
import dingding from '@/assets/images/dingding.svg'
|
||||||
|
|
@ -258,6 +258,43 @@ export default {
|
||||||
text: '登录中',
|
text: '登录中',
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
|
if(origin.indexOf('business-details')!= -1){ //领料工单跳转
|
||||||
|
console.log("11111111111111111111111111",origin)
|
||||||
|
const ticket = origin.split('ticket%3D')[1].split('%26')[0]
|
||||||
|
const taskId = origin.split('taskId%3D')[1].split('%26')[0]
|
||||||
|
const id = origin.split('id%3D')[1].split('%26')[0]
|
||||||
|
const res = await iwsLogin({
|
||||||
|
ticket: ticket,
|
||||||
|
sysType: 0
|
||||||
|
})
|
||||||
|
console.log('🚀 ~ created ~ res:', res)
|
||||||
|
// 1. 获取token并存储
|
||||||
|
if (res.code == 200) {
|
||||||
|
setToken(res.data.access_token)
|
||||||
|
this.$store.commit('SET_TOKEN', res.data.access_token)
|
||||||
|
setExpiresIn(1800)
|
||||||
|
this.$store.commit('SET_EXPIRES_IN', 1800)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 获取用户信息并存储
|
||||||
|
const resUser = await getInfo()
|
||||||
|
// 存取用户的userId
|
||||||
|
sessionStorage.setItem('userId', resUser.user?.userId)
|
||||||
|
sessionStorage.setItem('deptName', resUser.user?.dept?.deptName)
|
||||||
|
sessionStorage.setItem('userName', resUser.user?.userName)
|
||||||
|
loading.close()
|
||||||
|
// 跳转首页
|
||||||
|
setTimeout(() => {
|
||||||
|
// 跳转审核详情页面
|
||||||
|
this.$router.push({
|
||||||
|
name: 'receive-apply-details',
|
||||||
|
query: {
|
||||||
|
id: id,
|
||||||
|
taskId: taskId,
|
||||||
|
}
|
||||||
|
}) // 跳转审核详情页面
|
||||||
|
}, 300)
|
||||||
|
}else{
|
||||||
const res = await iwsLogin({
|
const res = await iwsLogin({
|
||||||
ticket: origin.split('ticket=')[1].split('#/')[0] || origin.split('ticket%3D')[1].split('%26')[0],
|
ticket: origin.split('ticket=')[1].split('#/')[0] || origin.split('ticket%3D')[1].split('%26')[0],
|
||||||
sysType: 0
|
sysType: 0
|
||||||
|
|
@ -269,13 +306,12 @@ export default {
|
||||||
setExpiresIn(1800)
|
setExpiresIn(1800)
|
||||||
this.$store.commit('SET_EXPIRES_IN', 1800)
|
this.$store.commit('SET_EXPIRES_IN', 1800)
|
||||||
}
|
}
|
||||||
// setExpiresIn(res.data.expires_in)
|
|
||||||
// this.$store.commit('SET_EXPIRES_IN', res.data.expires_in)
|
|
||||||
loading.close()
|
loading.close()
|
||||||
// 跳转首页
|
// 跳转首页
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({ path: '/' })
|
this.$router.push({ path: '/' })
|
||||||
}, 300)
|
}, 300)
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('🚀 ~ created ~ error:', error)
|
console.log('🚀 ~ created ~ error:', error)
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,496 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
|
:before-close="cancel"
|
||||||
|
:title="dialogTitle"
|
||||||
|
:visible.sync="dialogShowFlag"
|
||||||
|
append-to-body
|
||||||
|
width="1090px"
|
||||||
|
>
|
||||||
|
<div id="printcontent" style="height: 600px; overflow-y: scroll; padding: 0 20px">
|
||||||
|
<!-- <vue-easy-print tableShow ref="printRef"> -->
|
||||||
|
<div id="checkId">
|
||||||
|
<div style="text-align: center; font-weight: 600; font-size: 16px">机具设备退料单</div>
|
||||||
|
<div class="info" style="margin-top: 10px; display: flex; align-items: center">
|
||||||
|
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
|
||||||
|
<div>
|
||||||
|
<span>工程名称:</span>
|
||||||
|
<span>{{ rowObj.proName }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>退料时间:</span>
|
||||||
|
<span>{{ rowObj.createTime }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px; text-align: right">
|
||||||
|
<div>
|
||||||
|
<span>退料单位:</span>
|
||||||
|
<span>{{ rowObj.unitName }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>单号:</span>
|
||||||
|
<span>{{ rowObj.code }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table border="1.5" cellspacing="0" cellpadding="8" style="width: 100%; border-collapse: collapse">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 60px; text-align: center">编号</th>
|
||||||
|
<th style="width: 120px; text-align: center">物资类型</th>
|
||||||
|
<th style="text-align: center">物资名称</th>
|
||||||
|
<th style="text-align: center">规格型号</th>
|
||||||
|
<th style="text-align: center">计量单位</th>
|
||||||
|
<th style="width: 200px; text-align: center">退料数量</th>
|
||||||
|
<th style="width: 200px; text-align: center">编号</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(row, index) in tableData" :key="index">
|
||||||
|
<!-- 序号 -->
|
||||||
|
<td style="text-align: center">{{ index + 1 }}</td>
|
||||||
|
|
||||||
|
<!-- 物资类型 -->
|
||||||
|
<td style="text-align: center" :title="row.materialType">{{ row.materialType }}</td>
|
||||||
|
|
||||||
|
<!-- 物资名称 -->
|
||||||
|
<td style="text-align: center" :title="row.typeName">{{ row.typeName }}</td>
|
||||||
|
|
||||||
|
<!-- 规格型号 -->
|
||||||
|
<td style="text-align: center" :title="row.typeModel">{{ row.typeModel }}</td>
|
||||||
|
|
||||||
|
<!-- 计量单位 -->
|
||||||
|
<td style="text-align: center" :title="row.unitName">{{ row.unitName }}</td>
|
||||||
|
|
||||||
|
<!-- 退料数量 -->
|
||||||
|
<td style="text-align: center">{{ row.preNum }}</td>
|
||||||
|
|
||||||
|
<!-- 编号 -->
|
||||||
|
<td style="text-align: center">
|
||||||
|
<span v-if="row.manageType == 1">无编码</span>
|
||||||
|
<span
|
||||||
|
v-if="row.manageType == 0"
|
||||||
|
style="color: rgb(2, 167, 240); cursor: pointer"
|
||||||
|
@click="checkDetail(row)"
|
||||||
|
>
|
||||||
|
查看明细
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="order_footer">
|
||||||
|
<!-- <div>审核人:</div> -->
|
||||||
|
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||||
|
<div style="width: 30%">审核人:</div>
|
||||||
|
<div
|
||||||
|
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||||
|
v-if="backApplyInfo.directAuditSignUrl"
|
||||||
|
>
|
||||||
|
<div style="width: 80%; margin-left: 10px">
|
||||||
|
<img
|
||||||
|
:src="backApplyInfo.directAuditSignUrl"
|
||||||
|
style="width: 40px; height: 100px"
|
||||||
|
:class="{ 'is-rotate': backApplyInfo.directAuditSignType == 0 }"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||||
|
<div style="width: 30%">退料人:</div>
|
||||||
|
<div
|
||||||
|
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||||
|
v-if="backApplyInfo.backSignUrl"
|
||||||
|
>
|
||||||
|
<div style="width: 80%; margin-left: 20px">
|
||||||
|
<img
|
||||||
|
:src="backApplyInfo.backSignUrl"
|
||||||
|
style="width: 40px; height: 100px; max-width: 100%"
|
||||||
|
:class="{ 'is-rotate': backApplyInfo.backSignType == 0 }"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||||
|
<div style="width: 30%">制单:</div>
|
||||||
|
<div style="width: 70%; display: flex; align-items: center; flex-wrap: wrap" v-if="backApplyInfo.signUrl">
|
||||||
|
<div style="width: 80%; margin-left: 20px">
|
||||||
|
<img
|
||||||
|
:src="backApplyInfo.signUrl"
|
||||||
|
style="width: 40px; height: 100px; max-width: 100%"
|
||||||
|
:class="{ 'is-rotate': backApplyInfo.signType == 0 }"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- </vue-easy-print> -->
|
||||||
|
</div>
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||||
|
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
|
||||||
|
<!-- <vue-easy-print tableShow ref="remarksPrintRef"> -->
|
||||||
|
<div id="checkIdTwo">
|
||||||
|
<div class="remarks_box">
|
||||||
|
<div class="remarks_box_title">退料编码明细</div>
|
||||||
|
</div>
|
||||||
|
<div class="info" style="margin-top: 10px; display: flex; align-items: center">
|
||||||
|
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
|
||||||
|
<div>
|
||||||
|
<span>工程名称:</span>
|
||||||
|
<span>{{ rowObj.proName }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>退料时间:</span>
|
||||||
|
<span>{{ rowObj.createTime }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="item"
|
||||||
|
style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px; text-align: right"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<span>退料单位:</span>
|
||||||
|
<span>{{ rowObj.unitName }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>单号:</span>
|
||||||
|
<span>{{ rowObj.code }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table border="1.5" cellspacing="0" cellpadding="8" style="width: 100%; border-collapse: collapse">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 60px; text-align: center">序号</th>
|
||||||
|
<th style="text-align: center">物资类型</th>
|
||||||
|
<th style="text-align: center">物资名称</th>
|
||||||
|
<th style="text-align: center">规格型号</th>
|
||||||
|
<th style="text-align: center">设备编号</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(row, index) in tableSubData" :key="index">
|
||||||
|
<!-- 序号 -->
|
||||||
|
<td style="text-align: center">{{ index + 1 }}</td>
|
||||||
|
|
||||||
|
<!-- 物资类型 -->
|
||||||
|
<td style="text-align: center">{{ row.materialType }}</td>
|
||||||
|
|
||||||
|
<!-- 物资名称 -->
|
||||||
|
<td style="text-align: center">{{ row.typeName }}</td>
|
||||||
|
|
||||||
|
<!-- 规格型号 -->
|
||||||
|
<td style="text-align: center">{{ row.materialName }}</td>
|
||||||
|
|
||||||
|
<!-- 设备编号 -->
|
||||||
|
<td style="text-align: center">{{ row.maCode }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="order_footer">
|
||||||
|
<!-- <div>审核人:</div> -->
|
||||||
|
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||||
|
<div style="width: 30%">审核人:</div>
|
||||||
|
<div
|
||||||
|
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||||
|
v-if="backApplyInfo.directAuditSignUrl"
|
||||||
|
>
|
||||||
|
<div style="width: 80%; margin-left: 10px">
|
||||||
|
<img
|
||||||
|
:src="backApplyInfo.directAuditSignUrl"
|
||||||
|
style="width: 40px; height: 100px"
|
||||||
|
:class="{ 'is-rotate': backApplyInfo.directAuditSignType == 0 }"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||||
|
<div style="width: 30%">退料人:</div>
|
||||||
|
<div
|
||||||
|
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||||
|
v-if="backApplyInfo.backSignUrl"
|
||||||
|
>
|
||||||
|
<div style="width: 80%; margin-left: 20px">
|
||||||
|
<img
|
||||||
|
:src="backApplyInfo.backSignUrl"
|
||||||
|
style="width: 40px; height: 100px; max-width: 100%"
|
||||||
|
:class="{ 'is-rotate': backApplyInfo.backSignType == 0 }"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||||
|
<div style="width: 30%">制单:</div>
|
||||||
|
<div style="width: 70%; display: flex; align-items: center; flex-wrap: wrap" v-if="backApplyInfo.signUrl">
|
||||||
|
<div style="width: 80%; margin-left: 20px">
|
||||||
|
<img
|
||||||
|
:src="backApplyInfo.signUrl"
|
||||||
|
style="width: 40px; height: 100px; max-width: 100%"
|
||||||
|
:class="{ 'is-rotate': backApplyInfo.signType == 0 }"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- </vue-easy-print> -->
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
|
<el-button type="primary" @click="remarksPrint">打印</el-button>
|
||||||
|
<el-button @click="open = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
|
<el-button type="primary" @click="print">打印</el-button>
|
||||||
|
<el-button @click="dialogShowFlag = false">关 闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import vueEasyPrint from 'vue-easy-print'
|
||||||
|
import { getBackApplyInfoClz, updatePrintStatus } from '@/api/back/index.js'
|
||||||
|
import html2canvas from 'html2canvas'
|
||||||
|
import jsPDF from 'jspdf'
|
||||||
|
import printJS from 'print-js'
|
||||||
|
import request from '@/utils/request'
|
||||||
|
// import { getViewByApply,materialReturnNoteByApply } from "@/api/claimAndRefund/return.js"
|
||||||
|
export default {
|
||||||
|
components: { vueEasyPrint },
|
||||||
|
props: {
|
||||||
|
// 弹窗是否显示
|
||||||
|
isShowFlag: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 对应操作数据键值
|
||||||
|
priKey: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
//弹窗标题
|
||||||
|
dialogTitle: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
rowObj: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
isShowFlag(val) {
|
||||||
|
if (val) {
|
||||||
|
this.init()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
dialogShowFlag: {
|
||||||
|
get() {
|
||||||
|
return this.isShowFlag
|
||||||
|
},
|
||||||
|
set(v) {
|
||||||
|
this.$emit('update:isShowFlag', v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fullscreenLoading: false,
|
||||||
|
tableData: [],
|
||||||
|
tableSubData: [],
|
||||||
|
open: false,
|
||||||
|
title: '',
|
||||||
|
backApplyInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
// let params = {
|
||||||
|
// id: this.rowObj.id,
|
||||||
|
// }
|
||||||
|
|
||||||
|
getBackApplyInfoClz(this.rowObj.id).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.tableData = res.data.backApplyDetailsList
|
||||||
|
this.backApplyInfo = res.data.backApplyInfo
|
||||||
|
console.log('🚀 ~ init ~ this.backApplyInfo:', this.backApplyInfo)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.dialogShowFlag = false
|
||||||
|
},
|
||||||
|
|
||||||
|
print() {
|
||||||
|
const element = document.getElementById('checkId')
|
||||||
|
|
||||||
|
// 确保元素存在
|
||||||
|
if (!element) {
|
||||||
|
this.$message.error('未找到要打印的元素')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
printJS({
|
||||||
|
printable: 'checkId',
|
||||||
|
type: 'html',
|
||||||
|
targetStyles: ['*'],
|
||||||
|
maxWidth: '1400'
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
checkDetail(row) {
|
||||||
|
this.title = '查看'
|
||||||
|
this.tableSubData = row.maCodeList
|
||||||
|
this.open = true
|
||||||
|
},
|
||||||
|
remarksPrint() {
|
||||||
|
const element = document.getElementById('checkIdTwo')
|
||||||
|
|
||||||
|
// 确保元素存在
|
||||||
|
if (!element) {
|
||||||
|
this.$message.error('未找到要打印的元素')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 调用上传API - 使用request
|
||||||
|
printJS({
|
||||||
|
printable: 'checkIdTwo',
|
||||||
|
type: 'html',
|
||||||
|
targetStyles: ['*'],
|
||||||
|
maxWidth: '1400'
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
// .order_box {
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: column;
|
||||||
|
// .order_box_one {
|
||||||
|
// width: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// align-content: center;
|
||||||
|
// justify-content: space-between;
|
||||||
|
// margin-bottom: 10px;
|
||||||
|
// :last-child {
|
||||||
|
// margin-right: 20px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.is-rotate {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
.order_footer {
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.remarks_box {
|
||||||
|
display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.remarks_box_title {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen {
|
||||||
|
body {
|
||||||
|
font-family: 'Microsoft YaHei', sans-serif;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.print-container {
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: white;
|
||||||
|
padding: 20px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-buttons {
|
||||||
|
text-align: center;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 10px 20px;
|
||||||
|
margin: 0 10px;
|
||||||
|
background: #409eff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: #66b1ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 通用样式 */
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 15px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signature-area {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.signature-box {
|
||||||
|
width: 30%;
|
||||||
|
min-height: 100px;
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-rotate {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transform-origin: center center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -124,15 +124,15 @@
|
||||||
<el-table-column label="操作" align="center" width="220">
|
<el-table-column label="操作" align="center" width="220">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-button type="text" size="mini" icon="el-icon-zoom-in" @click="handleView(row)">查看</el-button>
|
<el-button type="text" size="mini" icon="el-icon-zoom-in" @click="handleView(row)">查看</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-document"
|
icon="el-icon-document"
|
||||||
style="color: #67c23a"
|
style="color: #67c23a"
|
||||||
@click="handleMaterial(row)"
|
@click="handleLld(row)"
|
||||||
>
|
>
|
||||||
退料单
|
退料单
|
||||||
</el-button> -->
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -146,6 +146,9 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 退料单 -->
|
||||||
|
<dialogFormByClz :dialogTitle="title" :isShowFlag.sync="isShowOneFlag" :priKey="priKey" :rowObj="rowObj"></dialogFormByClz>
|
||||||
|
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%">
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="60%">
|
||||||
<el-table :data="dialogList" fit highlight-current-row style="width: 100%">
|
<el-table :data="dialogList" fit highlight-current-row style="width: 100%">
|
||||||
|
|
@ -183,10 +186,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getBackTotalListApi, getBackDetailsListApi } from '@/api/materialsStation'
|
import { getBackTotalListApi, getBackDetailsListApi } from '@/api/materialsStation'
|
||||||
|
import dialogFormByClz from '@/views/materialsStation/equipment/totalReturnRecord/dialogFormByClz.vue'
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect },
|
components: { dialogFormByClz,Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
|
@ -239,7 +243,13 @@ export default {
|
||||||
deptList: [], // 分公司
|
deptList: [], // 分公司
|
||||||
unitList: [], // 退料单位
|
unitList: [], // 退料单位
|
||||||
proList: [], // 退料工程
|
proList: [], // 退料工程
|
||||||
typeModelList: [] // 物资名称
|
typeModelList: [] ,// 物资名称
|
||||||
|
|
||||||
|
//退料单
|
||||||
|
isShowOneFlag: false,
|
||||||
|
rowObj: {},
|
||||||
|
priKey: '',
|
||||||
|
title: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -329,12 +339,9 @@ export default {
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
// 退料单
|
// 退料单
|
||||||
handleMaterial(row) {
|
handleLld(row) {
|
||||||
console.log('退料单', row)
|
this.isShowOneFlag = true
|
||||||
this.$message({
|
this.rowObj = row
|
||||||
type: 'warning',
|
|
||||||
message: '退料单功能开发中,敬请期待!'
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 导出数据
|
// 导出数据
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="分包单位" prop="unit">
|
<el-form-item label="分包单位" prop="subUnitName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.unit"
|
v-model="queryParams.subUnitName"
|
||||||
placeholder="请输入分包单位"
|
placeholder="请输入分包单位"
|
||||||
clearable
|
clearable
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ module.exports = {
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
// target: `http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api`, // 产线
|
target: `http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api`, // 产线
|
||||||
target: `http://192.168.0.96:18080`,//马
|
// target: `http://192.168.0.96:18080`,//马
|
||||||
// target: `http://192.168.0.244:18580`,//测试
|
// target: `http://192.168.0.244:18580`,//测试
|
||||||
// target: `http://192.168.2.223:18080`,//山
|
// target: `http://192.168.2.223:18080`,//山
|
||||||
// target: `http://192.168.2.23:18080`,//洪
|
// target: `http://192.168.2.23:18080`,//洪
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue