123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728 |
- <template>
- <view >
- <u-navbar title="出库单详情"></u-navbar>
- <!-- 出库单状态 -->
- <view class="container">
- <view class="head">
- <view class="photo">
- <u-avatar size="84" :src="outUser.headImg"></u-avatar>
-
-
- </view>
- <view class="name">
- {{outUser.name}}
- </view>
- <view class="submit">
- 提交了<text>出库申请</text>
- </view>
- <view class="state">
- {{recordStatus(info.status)}}
- </view>
- </view>
- <!-- 出库单详情 -->
- <view class="details">
- <view class="item">
- <view class="name">
- 所属项目
- </view>
- <view class="value">
- {{info.projectName}}
- </view>
- </view>
- <view class="item">
- <view class="name">
- 需求时间
- </view>
- <view class="value">
- {{info.startTime?info.startTime:'无'}}
- </view>
- </view>
- <view class="item">
- <view class="name">
- 使用周期至
- </view>
- <view class="value">
- {{info.endTime}}
- </view>
- </view>
- <view class="item">
- <view class="name">
- 所属项目部
- </view>
- <view class="value">
- {{info.departmentName}}
- </view>
- </view>
- <view class="item">
- <view class="name">
- 申请时间
- </view>
- <view class="value">
- {{info.createTime}}
- </view>
- </view>
- </view>
- <!-- 出库设备清单 -->
- <view class="list">
- <view class="list-head">
- <view class="title">
- 出库设备清单
- </view>
- <view class="amount" @click="gotoUrl('pages/projectDepartment/exportApplication/deliveriedList?id='+id)">
- 全部 <text>{{recordsTotal}}</text> 类设备
- <u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- <!-- 清单信息 -->
- <view class="list-infos" v-for="(item,i) in outRecordDeviceList" :key="i" >
- <view class="infos-head">
- <view class="name">
- {{item.deviceName}}
- </view>
- <view class="state">
- {{item.statusN}}: <text>{{item.needCount}}</text>
- </view>
- </view>
- <view class="infos">
- <view class="infos-1">
- <view class="infos-item">
- <view class="item-name">
- 厂家:
- </view>
- <view class="item-value">
- {{item.deviceInfo?item.deviceInfo.manufactor:''}}
- </view>
- </view>
- <view class="infos-item">
- <view class="item-name">
- 单位:
- </view>
- <view class="item-value">
- {{item.deviceInfo?item.deviceInfo.unit:''}}
- </view>
- </view>
- </view>
- <view class="infos-2">
- <view class="infos-item">
- <view class="item-name">
- 规格:
- </view>
- <view class="item-value">
- {{item.deviceInfo?item.deviceInfo.specifications:''}}
- </view>
- </view>
- <view class="infos-item">
- <view class="item-name">
- 型号:
- </view>
- <view class="item-value">
- {{item.deviceInfo?item.deviceInfo.model:''}}
- </view>
- </view>
- </view>
-
- </view>
- </view>
- <u-divider @click="gotoUrl('pages/projectDepartment/exportApplication/deliveriedList?id='+id)" border-color="#CFD2D5">仅显示部分数据</u-divider>
- </view>
-
-
- <approveList ref="approveList"
- :outRecordDetailObj="outRecordDetailObj"
- :approveList="approveList"></approveList>
- </view>
- <!-- <u-popup v-model="showpopup" mode="bottom"
- border-radius="14"
- :closeable="true" >
- <p style=" margin-top: 30px;">请在下方空白区域使用正楷字体进行电子签名</p>
-
- <view class="signature">
- <l-signature
- width="100%"
- disableScroll ref="signatureRef" :penColor="penColor" :penSize="penSize"
- :openSmooth="openSmooth"></l-signature>
- </view>
- <view class="clean-save">
- <view class="clean" @click="onClick('clear')">
-
- <view class="">
- 清除
- </view>
- </view>
- <view class="save" @click="onClick('save')">
-
- <view class="">
- 保存并提交
- </view>
- </view>
-
- </view>
-
- </u-popup> -->
- <!-- 确认出库 -->
- <view class="bottom" v-if="isSpPerson" >
- <!-- <button>确认出库</button> -->
- <u-button
- @click="submit(2)"
- style="width: 49%;margin-right: 10rpx;"
-
- size="medium" type="revoke" >拒绝</u-button>
- <u-button
- @click="submit(1)"
- style="width: 49%;" size="medium" type="primary" >同意</u-button>
- </view>
- </view>
- </template>
- <script>
- // import LSignature from '@/pages/projectDepartment/components/l-signature/l-signature.vue'
-
- import * as API from '@/apis/pagejs/approve.js'
- import {
- recordStatus
- } from '@/apis/status.js'
- import {
- base64ToFile
- } from '@/apis/utils/index.js'
- import approveList from "@/components/ApproveList.vue"
-
- export default {
- components: {
- approveList
- },
- //,LSignature
- data() {
- return {
- isSpPerson:false,
- id:"",
- outRecordDetailObj:{},
- info:{
- projectName:"",
- startTime:"",
- endTime:"",
- createTime:"",
- },
- outUser:{
- name:"",
- headImg:""
- },
- outRecordDeviceList:[],
- approveList:[],
- recordsTotal:0,
- signUrl:"",
- showpopup:false,
- penColor: '',
- penSize: 5,
- openSmooth: true,
- }
- },
- onLoad(op){
- this.id=op.id
- this.getInfo()
- },
- methods: {
- recordStatus,
- onClick(type) {
- this.url =""
- if(type == 'openSmooth') {
- this.openSmooth = !this.openSmooth
- return
- }
- if (type == 'save') {
- this.$refs.signatureRef.canvasToTempFilePath({
- success: (res) => {
- // 是否为空画板 无签名
- if(res.isEmpty){
- this.signUrl ="";
- }else{
-
-
-
- // #ifdef MP-WEIXIN
-
- var _this=this;
- wx.getFileSystemManager()
- .readFile({ //读取本地文件内容
- filePath: res.tempFilePath, // 文件路径
- encoding: 'base64', // 返回格式
- success: ({data}) => {
-
- _this.signUrl='data:image/png;base64,' + data;
- _this.saveRecordApprove("1");
- },
- fail(res) {
- console.log('fail', res)
- }
- });
-
- // #endif
- // #ifdef H5
- this.signUrl=res.tempFilePath
- this.saveRecordApprove("1");
- // #endif
-
-
- }
- }
- })
- return
- }
- if (this.$refs.signatureRef)
- this.$refs.signatureRef[type]()
- },
-
- uploadBase64Json(file){
-
- var formData={
- subFolder:"exportProcess",
- photoFile:file
- }
-
- API.uploadPicture(formData).then((res) => {
- uni.hideLoading();
- //this.signUrl =
- //this.saveRecordApprove("1");
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
-
- },
- getList(){
-
- API.outRecordDeviceById({
- recordId:this.id,
- pageSize:3,
- pageIndex:1,
- }).then((res) => {
- uni.hideLoading();
- this.outRecordDeviceList=res.data.data;
- this.recordsTotal=res.data.recordsTotal;
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- getInfo(){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.outRecordDetail({
- id:this.id,
- }).then((res) => {
- var info= this.carhelp.getPersonInfo()
- this.info=res.data.outRecord;
- this.approveList=res.data.approveList;
- this.isSpPerson=false;
- for(var i in this.approveList){
- var item =this.approveList[i]
- if(item.status==1){
- continue
- }
- if(item.status==2){
- break;
- }
- if(item.status==0){
-
- for(var j in item.approveUserList){
- var itemj =item.approveUserList[j]
- if(itemj.id==info.id){
- this.isSpPerson=true;
- }
- }
-
- break;
- }
-
- }
-
-
- this.outUser=res.data.outUser;
- this.outRecordDetailObj=res.data;
- this.getList()
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },saveRecordApprove(status){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- API.saveRecordApprove({
- recordIds:this.id,
- status:status,
- //signUrl:this.signUrl
- }).then((res) => {
- this.showpopup=false;
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.emit('refreshData');
- // uni.showToast({
- // title:"操作成功"
- // })
-
- uni.showModal({
- title:"提示",
- content:"操作成功",
- showCancel:false,
- success(resc) {
-
- if(resc.confirm){
-
- }else{
-
- }
- }
- })
-
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- this.getInfo()
- }).catch(error => {
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- submit(status){
- var message=""
- var _this=this;
- if(status==2){
- message="拒绝"
-
- }else{
- message="同意"
- //this.showpopup=true;
- }
-
- uni.showModal({
- title:"提示",
- content:"是否"+message+"出库审批",
- success(res) {
-
- if(res.confirm){
- _this.saveRecordApprove(status);
- }else{
-
- }
- }
- })
-
- }
- }
- }
- </script>
- <style scoped lang="scss">
-
- .signature{
- background-color: #fff;
- margin-top: 8px;
- height: 160px;
- border: #c2c2c2 1px solid;
- }
- .clean-save{
- background-color: #fff;
- display: flex;flex-wrap: wrap;
- .clean,.save{
- width: 50%;
- text-align: center;
- color: #252525;
- line-height: 40px;
- }
- .clean,.save{
- border:#c2c2c2 1px solid;
- display: flex;flex-wrap: wrap;
- justify-content: center;
- img{
- margin-right: 4px;
- }
- }
- }
-
- page {
- padding-bottom: 200rpx;
- }
- // 出库单状态
- .head {
- background-color: #fff;
- padding: 24rpx 32rpx;
- display: flex;flex-wrap: wrap;
- align-items: center;
- color: #101010;
- font-size: 32rpx;
- .photo {
- width: 84rpx;
- height: 84rpx;
- border-radius: 100rpx;
- .u-avatar{
-
- }
- img {
- width: 100%;
- height: 100%;
- overflow: hidden;
- }
- }
- .name {
- color: #101010;
- font-size: 32rpx;
- margin-right: 8rpx;
- margin-left: 24rpx;
- max-width: 200rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap
- }
- .submit {
- text {
- color: #3385FF;
- }
- }
- .state {
- line-height: 48rpx;
- padding: 0 24rpx;
- border-radius: 50px;
- background-color: rgba(255, 255, 255, 1);
- color: rgba(51, 133, 255, 1);
- font-size: 12px;
- text-align: center;
- font-family: Arial;
- border: 1px solid rgba(51, 133, 255, 1);
- margin-left: auto;
- }
- }
- // 出库单详情
- .details {
- background-color: #fff;
- margin-top: 24rpx;
- padding: 0 32rpx;
- .item {
- display: flex;flex-wrap: wrap;
- justify-content: space-between;
- padding: 12rpx 0;
- border-bottom: 1px solid rgba(244, 244, 244, 1);
- .name {
- color: rgba(119, 119, 119, 1);
- }
- .value {
- color: #101010;
- }
- }
- }
- // 出库单列表
- .list {
- background-color: #fff;
- margin-top: 24rpx;
- padding: 22rpx 32rpx;
- .list-head {
- display: flex;flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
- .title {
- color: #333333;
- font-size: 32rpx
- }
- .amount {
- color: #777777;
- font-size: 24rpx;
- text {
- color: #3385FF;
- }
- ::v-deep .u-icon--right {
- margin-left: 8rpx;
- }
- }
- }
- // 清单信息
- .list-infos {
- border-radius: 8px;
- background-color: #F5F6F9;
- margin-top: 24rpx;
- padding: 24rpx;
- .infos-head {
- display: flex;flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 24rpx;
- .name {
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- }
- .state {
- color: rgba(0, 81, 255, 1);
- }
- }
- .infos {
- margin-top: 16rpx;
- display: flex;flex-wrap: wrap;
- color: #777777;
- font-size: 24rpx;
- .infos-1 {
- margin-right: 68rpx;
- }
- .infos-item {
- display: flex;flex-wrap: wrap;
- margin-bottom: 8rpx;
- .item-value{
- max-width: 200rpx;
- }
- }
- }
- }
- }
- // 流程
- .process {
- background-color: #fff;
- margin-top: 24rpx;
- padding: 24rpx 32rpx;
- .title {
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- }
- .u-time-axis-item{
- //margin-bottom: 76rpx;
- }
- .u-time-axis {
- //padding: 18rpx 40rpx;
- }
- .u-node {
- width: 18rpx;
- height: 18rpx;
- border-radius: 100rpx !important;
- display: flex;flex-wrap: wrap;
- justify-content: center;
- align-items: center;
- background: #d0d0d0;
- }
- .u-order{
- margin-bottom: 32rpx;
- }
- .u-order-title {
- color: #333333;
- font-weight: bold;
- font-size: 32rpx;
- }
- .u-order-desc {
- margin-bottom: 16rpx;
- display: flex;flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
- .level {
- color: #333333;
- font-size: 32rpx;
- font-weight: bold;
- }
- .date {
- color: rgba(119, 119, 119, 1);
- }
- .state {
- color: rgba(255, 121, 0, 1);
- }
- }
- .u-order-time {
- width: 160rpx;
- color: #777777;
- font-size: 28rpx;
- margin-top: 16rpx;
- display: flex;flex-wrap: wrap;
- flex-direction: column;
- align-items: center;
- .photo {
- width: 56rpx;
- height: 56rpx;
- border-radius: 100px;
- margin-bottom: 4rpx;
- img {
- width: 100%;
- height: 100%;
- overflow: hidden;
- position: relative;
- }
- }
- .confirm {
- position: absolute;
- top: 46rpx;
- left: 56rpx;
- }
- .name {
- color: rgba(51, 51, 51, 1);
- font-size: 24rpx;
- }
- }
-
- }
-
- // .u-time-axis{
- // .u-time-axis-item:last-of-type{
- // margin-bottom: 0;
- // }
- // }
- // 确认出库
- .bottom{
- text-align: center;
- background-color: #fff;
- margin-top: 44rpx;
- padding: 16rpx 32rpx;
- z-index: 999;
- position: fixed;
- left: 0;
- right: 0;
- bottom: 0;
- // uni-button{
- // border-radius: 8px;
- // background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(16,98,213,1) 100%);
- // color: rgba(255, 255, 255, 1);
- // font-size: 32rpx;
- // line-height: 88rpx;
-
- // }
- }
- </style>
|