uu
This commit is contained in:
parent
3d1709fba3
commit
964eaae6aa
@ -163,6 +163,7 @@ const downloadFile = (url, ext = {})=> {
|
|||||||
const saveNetFile = ({ url, header } = {}) => {
|
const saveNetFile = ({ url, header } = {}) => {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
showLoading('正在保存文件')
|
showLoading('正在保存文件')
|
||||||
|
console.log("下载文件====", url)
|
||||||
try {
|
try {
|
||||||
let dRes = await downloadFile(url, { header })
|
let dRes = await downloadFile(url, { header })
|
||||||
console.log("saveNetFile:downloadFile==", dRes)
|
console.log("saveNetFile:downloadFile==", dRes)
|
||||||
@ -171,7 +172,6 @@ const saveNetFile = ({ url, header } = {}) => {
|
|||||||
path
|
path
|
||||||
} = dRes
|
} = dRes
|
||||||
path = path || tempFilePath
|
path = path || tempFilePath
|
||||||
debugger
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
saveAs(path)
|
saveAs(path)
|
||||||
// #endif
|
// #endif
|
||||||
@ -183,12 +183,12 @@ const saveNetFile = ({ url, header } = {}) => {
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
debugger
|
|
||||||
await uniPromiseApi('openDocument', { filePath: path, showMenu: true, })
|
await uniPromiseApi('openDocument', { filePath: path, showMenu: true, })
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
hideLoading()
|
hideLoading()
|
||||||
showToast('保存成功')
|
showToast('保存成功')
|
||||||
|
setClipboardData(url)
|
||||||
resolve(tempFilePath)
|
resolve(tempFilePath)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
hideLoading()
|
hideLoading()
|
||||||
|
|||||||
@ -285,12 +285,6 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "进仓单详情"
|
"navigationBarTitleText": "进仓单详情"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/warehousing/pdfPreview",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "进仓单预览"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<view class="dt-block">
|
<view class="dt-block">
|
||||||
<view class="dt-tle">
|
<view class="dt-tle">
|
||||||
<view class="t1">订单号: {{postInfo.billCode}}</view>
|
<view @click="setClipboardData(postInfo.billCode)" class="t1">订单号: {{postInfo.billCode}}</view>
|
||||||
<view class="t2">
|
<view class="t2">
|
||||||
<text class="clr-prm"></text>
|
<text class="clr-prm"></text>
|
||||||
</view>
|
</view>
|
||||||
@ -40,10 +40,7 @@
|
|||||||
<view class="dt-tle">
|
<view class="dt-tle">
|
||||||
<view class="t1">进仓货物总览</view>
|
<view class="t1">进仓货物总览</view>
|
||||||
<view class="t2">
|
<view class="t2">
|
||||||
<tetx v-if="billInfo.status == 0">未入仓</tetx>
|
<tpx-text-dic :value="billInfo.confirmStatus" :list="dicData.emis_wsin_tab"></tpx-text-dic>
|
||||||
<tetx v-if="billInfo.status == 1">已入仓</tetx>
|
|
||||||
<tetx v-if="billInfo.status == 2">部分入仓</tetx>
|
|
||||||
<tetx v-if="billInfo.status == 3">全部入仓</tetx>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-line margin="20rpx 0 20rpx"></u-line>
|
<u-line margin="20rpx 0 20rpx"></u-line>
|
||||||
@ -83,14 +80,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-for="(clItem) in [{}, {}, {}]" class="yditem">
|
<view v-for="(gdItem) in item.cargoList" class="yditem">
|
||||||
<view class="ydi-lab">
|
<view class="ydi-lab">
|
||||||
<text class="font-weight">塑料拉链</text>
|
<text class="font-weight">{{gdItem.goodsName}}</text>
|
||||||
<text>破损:1</text>
|
<text>异常:{{gdItem.abnormalQty}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="ydi-lab mt-10">
|
<view class="ydi-lab mt-10">
|
||||||
<text class="clr-sub">品牌 规格 原产地</text>
|
<text class="clr-sub">{{gdItem.brand}} - {{gdItem.nationArea}}</text>
|
||||||
<text class="clr-prm">实入:10</text>
|
<text class="clr-prm">实入:{{gdItem.cargoQty}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -162,10 +159,14 @@
|
|||||||
<u-row justify="end">
|
<u-row justify="end">
|
||||||
<view style="display: inline-block;white-space: nowrap;" class="mt-10 pb-30">
|
<view style="display: inline-block;white-space: nowrap;" class="mt-10 pb-30">
|
||||||
<u-row>
|
<u-row>
|
||||||
<u-button @click="handleDialogClick(feedModal)" shape="circle" :plain="true"
|
<u-button v-if="item.confirmStatus!=1" @click="handleDialogClick(feedModal)" shape="circle" :plain="true"
|
||||||
custom-style="height: 54rpx;margin-left: 20rpx;">反馈异常</u-button>
|
custom-style="height: 54rpx;margin-left: 20rpx;">反馈异常</u-button>
|
||||||
<u-button @click="confirmJinCang(item.inNo)" shape="circle" type="primary"
|
|
||||||
custom-style="height: 54rpx;margin-left: 20rpx;">进仓确认</u-button>
|
<u-button v-if="billInfo.stockInFlag == 1" :disabled="item.confirmStatus==1" @click="confirmJinCang(item.inNo)" shape="circle" type="primary"
|
||||||
|
custom-style="height: 54rpx;margin-left: 20rpx;">
|
||||||
|
{{item.confirmStatus==1?'已确认进仓':'进仓确认'}}
|
||||||
|
</u-button>
|
||||||
|
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
</u-row>
|
</u-row>
|
||||||
@ -178,8 +179,8 @@
|
|||||||
<u-button @click="handleDownloadPdf()" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
<u-button @click="handleDownloadPdf()" :plain="true" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||||
>下载PDF
|
>下载PDF
|
||||||
</u-button>
|
</u-button>
|
||||||
<u-button @click="confirmJinCang()" type="primary" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
<u-button v-if="billInfo.stockInFlag == 1" :disabled="billInfo.confirmStatus==1" @click="confirmJinCang()" type="primary" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
||||||
>已确认可发货
|
>{{billInfo.confirmStatus==1?'已确认进仓':'确认可发货'}}
|
||||||
</u-button>
|
</u-button>
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
@ -196,11 +197,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import getCdnUrl from "@/common/getCdnUrl"
|
|
||||||
import { goto, goBack, setClipboardData, confirmModal, showLoading } from "@/common/untool"
|
|
||||||
import BpeAddressjiamiTmp from "@/components/buns-post-edit-templates/bpe-addressjiami-tmp"
|
import BpeAddressjiamiTmp from "@/components/buns-post-edit-templates/bpe-addressjiami-tmp"
|
||||||
import BpeGoodstaticTmp from "@/components/buns-post-edit-templates/bpe-goodstatic-tmp"
|
import BpeGoodstaticTmp from "@/components/buns-post-edit-templates/bpe-goodstatic-tmp"
|
||||||
import * as apiService from "@/common/api"
|
import * as apiService from "@/common/api"
|
||||||
|
import { saveNetFile } from "@/common/untool"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { BpeAddressjiamiTmp, BpeGoodstaticTmp },
|
components: { BpeAddressjiamiTmp, BpeGoodstaticTmp },
|
||||||
@ -277,17 +277,15 @@
|
|||||||
},
|
},
|
||||||
async handleDownloadPdf(){
|
async handleDownloadPdf(){
|
||||||
let res = await apiService.exportWarehouseInTpl({ orderSn: this.postInfo.orderSn })
|
let res = await apiService.exportWarehouseInTpl({ orderSn: this.postInfo.orderSn })
|
||||||
debugger
|
let sres = await saveNetFile(res)
|
||||||
},
|
},
|
||||||
async confirmJinCang(inNo) {
|
async confirmJinCang(inNo) {
|
||||||
// "confirmStatus": "1-确认 2-部分确认"
|
let confirmStatus = '2' // 部分入仓
|
||||||
let confirmStatus = '2'
|
|
||||||
if(!inNo) {
|
if(!inNo) {
|
||||||
confirmStatus = '1'
|
confirmStatus = '1' // 全部入仓
|
||||||
inNo = this.billInfo.inNo
|
inNo = this.billInfo.inNo
|
||||||
}
|
}
|
||||||
let res = await apiService.cusConfirmWsIn({ inNo, _loading: true })
|
let res = await apiService.cusConfirmWsIn({ inNo, confirmStatus, _loading: true })
|
||||||
debugger
|
|
||||||
this.initData()
|
this.initData()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,74 +0,0 @@
|
|||||||
<template>
|
|
||||||
<tpx-page>
|
|
||||||
<tpx-layout>
|
|
||||||
<template v-slot:header></template>
|
|
||||||
<template v-slot:body>
|
|
||||||
<view class="dt-block">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<template v-slot:footer>
|
|
||||||
<view class="blcok-white-noradius">
|
|
||||||
<u-row justify="space-around">
|
|
||||||
<u-button @click="downloadFile(``)" :plain="true" size="large" shape="circle" type="primary" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
|
||||||
>下载PDF到本地
|
|
||||||
</u-button>
|
|
||||||
<u-button @click="setClipboardData(`dasdasd`)" size="large" shape="circle" custom-style="margin: 0 10rpx;height:80rpx;font-size: 30rpx;"
|
|
||||||
>复制分享链接
|
|
||||||
</u-button>
|
|
||||||
</u-row>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</tpx-layout>
|
|
||||||
</tpx-page>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
// hasLeftWin: {
|
|
||||||
// type: Boolean
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
queryOption: {
|
|
||||||
url: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShareAppMessage() {
|
|
||||||
return {
|
|
||||||
// title: '',
|
|
||||||
// path: 'TODO'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(queryOption) {
|
|
||||||
this.queryOption = queryOption
|
|
||||||
this.initData();
|
|
||||||
},
|
|
||||||
onUnload() {
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initData(){
|
|
||||||
// showLoading()
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
@import '@/common/uni-nvue.scss';
|
|
||||||
page {
|
|
||||||
background-color: #F6F6F6;
|
|
||||||
height: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue
Block a user