niexiting
11 months ago
28 changed files with 881 additions and 353 deletions
@ -0,0 +1,117 @@ |
|||
<template> |
|||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;"> |
|||
<view class="uni-flex uni-row space-between "> |
|||
<!-- uni-inline-item 暂时拿掉--> |
|||
<view> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> |
|||
</location> |
|||
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> |
|||
</location> |
|||
</view> |
|||
<view> |
|||
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
|||
:isShowStdPack="false"></recommend-qty> --> |
|||
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" :isShowRecommendQty="isShowRecommendQty" |
|||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false"> |
|||
</compare-qty> |
|||
<view class="uni-flex uni-row" style="vertical-align:center"> |
|||
<text style="font-size: 30rpx;color: #2979ff; " |
|||
@click="copy">复制采购</text> |
|||
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
batch, |
|||
recommendQty, |
|||
compareQty |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
|
|||
locationTitle: { |
|||
type: String, |
|||
default: '库位' |
|||
}, |
|||
isShowRecommendQty:{ |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
|
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
copy() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|||
.batch + ";Q" + this.detail.qty |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
}, |
|||
copyPro() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|||
.batch + ";Q" + this.detail.qty |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
@ -1,42 +1,119 @@ |
|||
<template> |
|||
<view class="" style="background-color: #fff; height: 100%;"> |
|||
<view class="" style="font-size: 35rpx;padding: 15rpx;"> |
|||
请求地址 |
|||
<view class="page-wraper"> |
|||
<view class="page-main" style="background-color: #fff; height: 100%;"> |
|||
|
|||
<pullDown label="项目名称" v-model="name" :options="arrayUnique(options,'name')" description='column' /> |
|||
|
|||
<pullDown label="服务器地址" v-model="value" :options="unique(options)" :itemTextCount="2" :isAutoHeight='true' |
|||
description='column' style="font-size: 35rpx;padding: 30rpx 0 0 0;" /> |
|||
|
|||
</view> |
|||
<!-- 页面底部 --> |
|||
<view class="page-footer"> |
|||
<button type="primary" @click="saveClick">保存</button> |
|||
</view> |
|||
<uni-combox :candidates="candidates" placeholder="请选择请求地址" v-model="city"></uni-combox> |
|||
</view> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
candidates:["http://192.168.0.178:12080/admin-api(陈放)", |
|||
"http://192.168.0.178:12080/admin-api" |
|||
], |
|||
city:"" |
|||
|
|||
name: '', |
|||
value: '', |
|||
|
|||
options: [{ |
|||
|
|||
name: '汽车镜备件', |
|||
desc: '汽车镜备件公司测试库', |
|||
value: 'http://192.168.0.178:12080/admin-api', |
|||
}, |
|||
{ |
|||
|
|||
name: '汽车镜备件', |
|||
desc: '汽车镜备件现场测试库', |
|||
value: 'http://192.168.0.178:12080/admin-api', |
|||
}, |
|||
{ |
|||
|
|||
name: '汽车镜备件', |
|||
desc: '汽车镜备件现场正式库', |
|||
value: 'http://192.168.0.178:12080/admin-api', |
|||
}, |
|||
{ |
|||
|
|||
name: '富维汽车镜', |
|||
desc: '汽车镜备件现场正式库', |
|||
value: 'http://192.168.0.178:12080/admin-api', |
|||
}, |
|||
], |
|||
}; |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
onLoad(option) { |
|||
this.value = getApp().globalData.request_url; |
|||
}, |
|||
|
|||
|
|||
|
|||
methods: { |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
saveClick() { |
|||
getApp().globalData.request_url = this.value; |
|||
console.log(getApp().globalData.request_url); |
|||
// 调用uni.navigateBack()函数来返回上一页 |
|||
uni.navigateBack({ |
|||
delta: 1 // 表示返回到上一页,若需要返回多级页面则设置delta值为对应的级数 |
|||
}) |
|||
}, |
|||
|
|||
unique(arr) { |
|||
let that = this; |
|||
if (this.name == '') { |
|||
return this.options |
|||
} else { |
|||
return arr.filter(item => item.name === this.name); |
|||
} |
|||
|
|||
}, |
|||
|
|||
arrayUnique(arr, type) { |
|||
return arr ? [ |
|||
...new Set( |
|||
arr.map((item) => { |
|||
return item[type] |
|||
}) |
|||
) |
|||
] : [] |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
.page-wraper { |
|||
display: flex; |
|||
flex-direction: column; |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.page-main { |
|||
flex: 1; |
|||
position: relative; |
|||
} |
|||
|
|||
.page-footer { |
|||
color: #fff; |
|||
line-height: 100rpx; |
|||
/* 不放大不缩小固定100rpx */ |
|||
flex: 0 0 100rpx; |
|||
background-color: #00AAFF; |
|||
} |
|||
|
|||
.container { |
|||
background-color: #f5f7fa; |
|||
/* 这里只是作为样式展示 */ |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue