物料模块的逻辑配的七七八八了

This commit is contained in:
Teng 2026-04-28 15:21:29 +08:00
parent 8d81be9f99
commit 33ea84972a
14 changed files with 2583 additions and 1699 deletions

View File

@ -21,11 +21,8 @@
)) -->
<template>
<view>
<image :src="displaySrc" :style="{ width: width, height: height }" :mode="objectFit" @error="handleError"
<image lazy-load :src="displaySrc" :style="{ width: width, height: height }" :mode="objectFit" @error="handleError"
@load="handleLoad" />
<button v-if="showButton" @click="togglePlaying">
{{ playing ? '停止播放' : '开始播放' }}
</button>
</view>
</template>
@ -44,7 +41,6 @@
defaultImage: { type: String, default: '' },
interval: { type: Number, default: 80 }, // ms
playing: { type: Boolean, default: false },
showButton: { type: Boolean, default: false },
loop: { type: Boolean, default: false },
//
maxRetryPerFrame: { type: Number, default: 1 }
@ -213,11 +209,6 @@
}
}, { immediate: false })
/* ---------------- toggle via internal button ---------------- */
function togglePlaying() {
emit('update:playing', !props.playing)
}
/* ---------------- cleanup ---------------- */
onUnmounted(() => {
clearTimer()

View File

@ -1,10 +1,12 @@
<template>
<view class="zy-modal" :class="dshow?'show':''">
<view style="position: absolute;top: 240rpx;left: 850rpx;z-index: 9999;" >
<image style="width: 400rpx;height: 370rpx;position: absolute;top: 0rpx;left: 0rpx;" src="/static/index/update/fly.png" />
<view style="position: absolute;top: 240rpx;left: 850rpx;z-index: 9999;">
<image style="width: 400rpx;height: 370rpx;position: absolute;top: 0rpx;left: 0rpx;"
src="/static/index/update/fly.png" />
</view>
<view class="zy-dialog">
<view style="height: 250rpx;width: 100%;position: relative;background: linear-gradient(to bottom,#d7e3f8 , #ffffff);">
<view
style="height: 250rpx;width: 100%;position: relative;background: linear-gradient(to bottom,#d7e3f8 , #ffffff);">
<!-- <image style="width: 1800rpx;height: 1600rpx;position: absolute;top: -370rpx;left: -220rpx;" src="/static/index/update/bgc.png" /> -->
</view>
<view :class="'zy-upgrade-topbg-'+theme">
@ -19,22 +21,22 @@
<scroll-view class="scroll-box" scroll-y="true">
<text>{{update_tips}}</text>
</scroll-view>
<view class="zy-progress radius striped active" style="border-radius: 36upx;overflow: hidden;" v-if="update_flag">
<view class="zy-progress radius striped active" style="border-radius: 36upx;overflow: hidden;"
v-if="update_flag">
<view :class="'bg-'+theme" style="background-color: royalblue;border-radius: 36upx;"
:style="'width: '+update_process+'%;'">
:style="'width: '+update_process+'%;'">
{{update_process}}%
</view>
</view>
</view>
<view class="zy-bar">
<view class="action" v-if="!update_flag && forceupgrade" >
<view class="action" v-if="!update_flag && forceupgrade">
<button class="zy-btn" :class="'bg-'+theme" @click="upgrade_checked">确认升级</button>
</view>
<view class="action" v-if="!update_flag && !forceupgrade">
<view class="zy-btn" @click="upgrade_checked">确认升级</view>
<view class="zy-quxiao"
v-if="!forceupgrade" @click="upgrade_cancel">取消升级</view>
<view class="zy-btn" @click="upgrade_checked">确认升级</view>
<view class="zy-quxiao" v-if="!forceupgrade" @click="upgrade_cancel">取消升级</view>
</view>
<view class="action text-center" v-if="update_flag&&!forceupgrade" style="margin-top: 40rpx;">
<button class="zy-btn" :class="'bg-'+theme" @click="upgrade_break">中断升级</button>
@ -48,19 +50,19 @@
export default {
name: 'ZyUpgrade',
props: {
theme: { //green,pink,blue,yellow,red
theme: { //green,pink,blue,yellow,red
type: String,
default: 'green'
},
updateurl: { //url
type:String,
updateurl: { //url
type: String,
default: ''
},
h5preview:{ //H5
h5preview: { //H5
type: Boolean,
default: false
},
oldversion: { //H5便
oldversion: { //H5便
type: String,
default: ''
},
@ -68,16 +70,16 @@
type: Number,
default: 0
},
appstoreflag: { //appstoreappstore
appstoreflag: { //appstoreappstore
type: Boolean,
default: false
},
noticeflag:{ //
type:Boolean,
noticeflag: { //
type: Boolean,
default: false
},
autocheckupdate:{ //
type:Boolean,
autocheckupdate: { //
type: Boolean,
default: true
}
},
@ -96,131 +98,134 @@
vesioncode: this.oldcode,
wgt_flag: 0,
wgt_url: '',
size: 0 ,//gzip
header:{Authorization:uni.getStorageSync('token')||"token"}
size: 0, //gzip
header: {
Authorization: uni.getStorageSync('token') || "token"
}
}
},
mounted() {
let app_flag = false
// #ifdef APP-PLUS
app_flag = true
// #endif
if((this.h5preview || app_flag) && this.autocheckupdate){
if ((this.h5preview || app_flag) && this.autocheckupdate) {
this.check_update()
}
},
computed:{
version(){
computed: {
version() {
let retversion = ''
retversion = this.currentversion + (this.currentversion!=''&&this.updated2version!=''?' -> ':'')+this.updated2version
retversion = this.currentversion + (this.currentversion != '' && this.updated2version != '' ? ' -> ' :
'') + this.updated2version
return retversion
}
},
methods:{
methods: {
//
check_update(){
check_update() {
let that = this
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
that.currentversion = widgetInfo.version
that.versionname = widgetInfo.name
that.versioncode = widgetInfo.versionCode
that.updatebusiness(that)
});
});
// #endif
// #ifdef H5
if(this.h5preview){
if (this.h5preview) {
this.updatebusiness(that)
}
// #endif
},
updatebusiness: function(that){ // https://www.focusnu.com/opeapi
updatebusiness: function(that) { // https://www.focusnu.com/opeapi
uni.request({
url: `https://www.focusnu.com/devopsapi/api/pad/versionUpdate?platform=1&version=${that.currentversion}`,
method: 'GET',
dataType:'json',
dataType: 'json',
success: (res) => {
// console.log("?????",`https://www.focusnu.com/devopsapi/api/pad/versionUpdate?platform=1&version=${that.currentversion}`)
// this.$emit('chuandinew',this.updated2version)
if(res.statusCode===404){
return
if (res.statusCode === 404) {
return
}
if(res.data.code==100){
//
console.log(res.data.data,111111111)
if(res.data.data.wgt_flag=='2'){
if (res.data.code == 100) {
//
// console.log(res.data.data,111111111)
if (res.data.data.wgt_flag == '2') {
that.wgt_flag = res.data.data.wgt_flag;
that.updated2version = res.data.data.version;
that.updated2version = res.data.data.version;
that.update_tips = res.data.data.update_tips;
that.forceupgrade = res.data.data.forceupdate==1;
that.forceupgrade = res.data.data.forceupdate == 1;
that.version_url = res.data.data.update_url;
that.updated2version = res.data.data.version;
that.wgt_flag = res.data.data.wgt_flag;
that.wgt_url = res.data.data.wgt_url;
that.size = res.data.data.size;
that.dshow = true;
}else if(res.data.data.update_url){
} else if (res.data.data.update_url) {
that.dshow = true;
that.update_tips = res.data.data.update_tips;
that.forceupgrade = res.data.data.forceupdate==1;
that.forceupgrade = res.data.data.forceupdate == 1;
that.version_url = res.data.data.update_url;
that.updated2version = res.data.data.version;
that.wgt_flag = res.data.data.wgt_flag;
that.wgt_url = res.data.data.wgt_url;
that.size = res.data.data.size;
that.getnewbanben();
}else{
if(that.noticeflag){
} else {
if (that.noticeflag) {
//
that.$emit("showupdateTips",0)
that.$emit("showupdateTips", 0)
}
}
}else{
} else {
uni.showToast({
title: '请求升级出错:'+ data.msg,
icon:'none'
title: '请求升级出错:' + data.msg,
icon: 'none'
});
}
}
},
fail() {
this.loading = false;
}
});
},
getnewbanben:function(){
this.$emit('chuandinew',this.updated2version)
getnewbanben: function() {
this.$emit('chuandinew', this.updated2version)
},
//
upgrade_checked:function(){
if(this.wgt_flag==2){
upgrade_checked: function() {
if (this.wgt_flag == 2) {
this.dshow = false
this.updateversion()
}else{
} else {
uni.removeStorageSync('token')
this.update_flag = true
this.updateversion()
}
},
//
upgrade_cancel:function(){
upgrade_cancel: function() {
this.dshow = false
},
//
upgrade_break: function(){
upgrade_break: function() {
this.downloadTask.abort()
this.update_flag = false
},
//apk
updateversion: function(){
updateversion: function() {
//console.log("")
let platform = uni.getSystemInfoSync().platform
let that = this
//console.log("",platform)
if(that.wgt_flag==2){
if (that.wgt_flag == 2) {
try {
const Intent = plus.android.importClass('android.content.Intent')
const Uri = plus.android.importClass('android.net.Uri')
@ -234,66 +239,65 @@
// or
console.log('打开小米应用商店失败', e)
}
return
}
if(platform == 'ios' && this.appstoreflag && that.wgt_flag!=1){
if (platform == 'ios' && this.appstoreflag && that.wgt_flag != 1) {
//ios appstoreappstore
that.dshow = false
//console.log("appstore")
plus.runtime.launchApplication({
action: that.version_url
action: that.version_url
}, function(e) {
uni.showToast({
title: '打开appstore失败',
icon:'none'
});
uni.showToast({
title: '打开appstore失败',
icon: 'none'
});
});
}else{
} else {
let that = this
let downloadurl = that.wgt_flag==1?that.wgt_url:that.version_url;
let downloadurl = that.wgt_flag == 1 ? that.wgt_url : that.version_url;
let targetUrl = "https://www.focusnu.com/devopsapi/sys/common/static/" + downloadurl
this.update_confirm = true
this.update_confirm = true
this.downloadTask = uni.downloadFile({
url: targetUrl,
header:this.header,
success:function(res){
console.log("!!!",res)
if(res.statusCode == 200){
url: targetUrl,
header: this.header,
success: function(res) {
console.log("!!!", res)
if (res.statusCode == 200) {
//
plus.runtime.install(res.tempFilePath, {
force: false
}, function() {
force: false
}, function() {
plus.runtime.restart();
}, function(e) {
}, function(e) {
uni.showToast({
title: '升级失败',
icon:'none'
icon: 'none'
});
});
}else{
});
} else {
uni.showToast({
title: '下载失败,网络错误',
icon:'none'
icon: 'none'
});
}
},
fail:function(e) {
fail: function(e) {
uni.showToast({
title: '下载失败:'+e.errMsg,
icon:'none'
title: '下载失败:' + e.errMsg,
icon: 'none'
});
this.update_flag = false
},
complete:function(){
}
complete: function() {}
})
this.downloadTask.onProgressUpdate(function(res){
this.downloadTask.onProgressUpdate(function(res) {
that.update_process = res.progress
if(res.progress == Infinity){
let progress = (res.totalBytesWritten / that.size)*100
if(progress>100){
if (res.progress == Infinity) {
let progress = (res.totalBytesWritten / that.size) * 100
if (progress > 100) {
progress = 100
}
that.update_process = progress
@ -307,57 +311,66 @@
<style scoped>
@import url("static/css/main.css");
.zy-upgrade-topbg-green {
background-image: url('static/images/green.png');
background-size: 100% 100%;
background-repeat: no-repeat;
height: 290rpx;
}
.zy-upgrade-topbg-red {
background-image: url('static/images/red.png');
background-size: 100% 100%;
background-repeat: no-repeat;
height: 290rpx;
}
.zy-upgrade-topbg-pink {
background-image: url('static/images/pink.png');
background-size: 100% 100%;
background-repeat: no-repeat;
height: 290rpx;
}
.zy-upgrade-topbg-yellow {
background-image: url('static/images/yellow.png');
background-size: 100% 100%;
background-repeat: no-repeat;
height: 290rpx;
}
.zy-upgrade-topbg-blue {
background-size: 100% 100%;
background-repeat: no-repeat;
}
.zy-upgrade-title {
font-size: 35rpx;
font-weight: 800;
/* color: white; */
}
.scroll-box{
.scroll-box {
height: 250rpx;
}
/* ✅ 显示滚动条App / H5 都有效) */
.scroll-box::-webkit-scrollbar {
width: 8rpx; /* 滚动条宽度 */
width: 8rpx;
/* 滚动条宽度 */
}
::v-deep ::-webkit-scrollbar {
/* 滚动条整体样式 */
display: block !important;
/* 滚动条整体样式 */
display: block !important;
width: 7rpx;
}
::v-deep ::-webkit-scrollbar-thumb {
/* 滚动条里面小方块 */
border-radius: 5rpx !important;
box-shadow: inset 0 0 1rpx rgba(0, 0, 0, 0.2) !important;
background-color: #CCCCCC !important;
}
</style>
}
::v-deep ::-webkit-scrollbar-thumb {
/* 滚动条里面小方块 */
border-radius: 5rpx !important;
box-shadow: inset 0 0 1rpx rgba(0, 0, 0, 0.2) !important;
background-color: #CCCCCC !important;
}
</style>

View File

@ -1,14 +1,14 @@
<!-- 动画页 -->
<template>
<view>
<view class="ceshi" v-if="ceshiopen" @click="ceshiopen=false">
<!-- <view class="ceshi" v-if="ceshiopen" @click="ceshiopen=false">
<image class="all-home" src="/static/ceshi7.png" mode="aspectFit"></image>
</view>
</view> -->
<view class="home">
<image class="all-home" src="/static/index/warehouse/newindexhome/backdro.jpg" mode="scaleToFill"></image>
<image lazy-load class="all-home" src="/static/index/warehouse/newindexhome/backdro.jpg" mode="scaleToFill"></image>
</view>
<view class="store tp" @click="housactive(4)">
<image class="all-home" src="/static/index/warehouse/newindexhome/store.png" mode="aspectFit"></image>
<image lazy-load class="all-home" src="/static/index/warehouse/newindexhome/store.png" mode="aspectFit"></image>
</view>
<view class="store-font" @click="housactive(4)">
库房
@ -42,7 +42,7 @@
</view>
</view>
</view>
<view class="fontroom-font" @click="ceshijump()">
<view class="fontroom-font">
服务大厅
<view class="font-ball">
<view class="ball-ball">
@ -72,11 +72,11 @@
{{ fontnumber }}
</view>
<view class="unit-image">
<image class="all-home" :src="fonturl?fonturl:'/static/index/indeximage.png'" mode="aspectFit"></image>
<image lazy-load class="all-home" :src="fonturl?fonturl:'/static/index/indeximage.png'" mode="aspectFit"></image>
</view>
<view class="office" @click="housactive(1)">
<image class="all-home" src="/static/index/warehouse/newindexhome/office.png" mode="aspectFit"></image>
<image lazy-load class="all-home" src="/static/index/warehouse/newindexhome/office.png" mode="aspectFit"></image>
</view>
<view class="officer tp" @click="housactive(1)">
<donghua width="14vw" height="13vw" :interval="250" :links="officerarray" :playing="playall" :loop="true" />
@ -85,10 +85,10 @@
<donghua width="5vw" height="5vw" :interval="300" :links="Printarray" :playing="playall" :loop="true" />
</view>
<view class="fontend tp">
<image class="all-home" src="/static/index/warehouse/newindexhome/reception.png" mode="aspectFit"></image>
<image lazy-load class="all-home" src="/static/index/warehouse/newindexhome/reception.png" mode="aspectFit"></image>
</view>
<view class="fontendtable tp">
<image class="all-home" src="/static/index/warehouse/newindexhome/reception2.png" mode="aspectFit"></image>
<image lazy-load class="all-home" src="/static/index/warehouse/newindexhome/reception2.png" mode="aspectFit"></image>
</view>
<view class="peopleleft tp">
<donghua width="7vw" height="8vw" :interval="550" :links="peopleleftarray" :playing="playall"
@ -106,13 +106,13 @@
<donghua width="5vw" height="6vw" :interval="300" :links="ondoorarray" :playing="playall" :loop="true" />
</view>
<view class="fontroom tp">
<image class="all-home" src="/static/index/warehouse/newindexhome/receive.png" mode="aspectFit"></image>
<image lazy-load class="all-home" src="/static/index/warehouse/newindexhome/receive.png" mode="aspectFit"></image>
</view>
<view class="button-setting" @click="housactive(7)">
<image class="button-img" src="/static/index/setting.png" mode="aspectFit"></image>
<image lazy-load class="button-img" src="/static/index/setting.png" mode="aspectFit"></image>
</view>
<view class="button-back" @click="housactive(8)">
<image class="button-img" src="/static/index/back.png" mode="aspectFit"></image>
<image lazy-load class="button-img" src="/static/index/back.png" mode="aspectFit"></image>
</view>
<exit :show="exitshow" @close="exitshow=false" />
@ -135,7 +135,7 @@
return true; //
})
const ceshiopen = ref(false);
// const ceshiopen = ref(false);
const playall = ref(false);
const zyupgrade = ref(null);
@ -158,7 +158,7 @@
onShow(() => {
setTimeout(() => {
playall.value = true;
}, 500)
}, 1300)
zyupgrade.value?.check_update();
queryPadPageList().then((res => {
@ -265,9 +265,6 @@
1, // 1
false //
)
onMounted(() => {
//
getServiceTree0('1,2,3,4,5').then((res : any) => {
@ -276,16 +273,12 @@
uni.setStorageSync("saveTree3", res.result.fwzl[3])
uni.setStorageSync("saveTree4", res.result.fwzl[4])
uni.setStorageSync("saveTree5", res.result.fwzl[5])
//
})
})
const housedex = ref(0);
const navurl = ref('')
const housactive = (index : number) => {
housedex.value = index;
if (index == 0) {
let data = filteredMenu('izHldy')[0]
@ -306,17 +299,8 @@
})
}
if (index == 1) {
// uni.navigateTo({
// url: '/pages/recording/recorder'
// })
}
// if (index == 2) {
// navurl.value = 'pages/Warehouse/picking'
// uni.navigateTo({
// url: '/' + navurl.value
// })
// }
}
if (index === 3) {
uni.navigateTo({
@ -337,13 +321,9 @@
uni.setStorageSync('nuName', data.nuName);
uni.setStorageSync('elderId', data.elderInfo ? data.elderInfo?.id : null);
uni.setStorageSync('NUall', data);
// uni.navigateTo({
// url: '/pages/Warehouse/index/index',
// })
uni.navigateTo({
url: '/pages/NursingNew/index?kf=1',
})
}
if (index == 6) {
uni.navigateTo({
@ -369,28 +349,6 @@
})
}
const ceshijump = () => {
// ceshiopen.value = true
// uni.navigateTo({
// url:"/pages/login/ceshi"
// })
console.log("wtf")
// try {
// const Intent = plus.android.importClass('android.content.Intent')
// const Uri = plus.android.importClass('android.net.Uri')
// const main = plus.android.runtimeMainActivity()
// const intent = new Intent(Intent.ACTION_VIEW)
// intent.setData(Uri.parse('mimarket://details?id=com.android.hldy'))
// // 使
// intent.setPackage('com.xiaomi.market')
// main.startActivity(intent)
// } catch (e) {
// // or
// console.log('', e)
// }
}
</script>
<style scoped lang="less">
@ -740,13 +698,12 @@
left: 9vw;
}
.ceshi {
position: fixed;
top: 0rpx;
left: 0;
// background-color: red;
z-index: 9999;
width: 2139rpx;
height: 1337rpx;
}
// .ceshi {
// position: fixed;
// top: 0rpx;
// left: 0;
// z-index: 9999;
// width: 2139rpx;
// height: 1337rpx;
// }
</style>

42
pages/material/api/api.js Normal file
View File

@ -0,0 +1,42 @@
// 引入 request 文件
import request from '@/request/index.js'
// 查询物料列表
export const getCkWlList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getCkWlList?nuId=${uni.getStorageSync('nuId')}`,
method: 'get',
data: params,
})
}
// 盘点接口
export const savePddInfo = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/savePddInfo`,
method: 'post',
data: params,
})
}
// 查询物料的进度
export const getPdjd = () => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getPdjd?nuId=${uni.getStorageSync('nuId')}`,
method: 'get',
})
}
// 查询物料信息列表
export const queryCrkInfoList = (param) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/queryCrkInfoList?nuId=${uni.getStorageSync('nuId')}&column=createTime&order=desc&pageNo=${param.pageNo}&pageSize=15&wlId=${param.wlId}&cgdId=${param.cgdId}`,
method: 'get',
})
}
// 改价接口
export const editXsjg = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/editXsjg`,
method: 'post',
data: params,
})
}

View File

@ -0,0 +1,328 @@
<template>
<view class="plsbuy-contain">
<view class="title">
<view></view>
修改价格
</view>
<view class="calculator-father">
<view v-for="(item, index) in calculatorArray" :key="index">
<view :class="blueNumber == index ? 'calculator-kuai-target' : 'calculator-kuai'"
@click="clickKuai(item, index)">
<image v-if="item === 'AC'" src="/static/cleanone.png" mode="aspectFill"
style="width: 50%; height: 50%;" />
<text v-else>{{ item }}</text>
</view>
</view>
</view>
<view class="qinggou-font">
销售价格
</view>
<view class="stringShow-father">
<view v-for="(item, index) in stringShow" :key="index">
<view class="stringShow-kuai">
{{ item }}
</view>
</view>
</view>
<view class="plsbuy-bottom">
<view class="quxiao" @click="colse">取消</view>
<view class="plsbuy-bottom-blue" @click="closeIt">确认</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
const emit = defineEmits(['right','close'])
const props = defineProps({
// doOnce: {
// type: Number,
// required: true,
// },
translateNumber: {
type: Number,
required: true,
},
})
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.', 'AC']
const MAX_INT = 4
const MAX_DEC = 2
const MAX_VALUE = 9999.99
const blueNumber = ref(-1)
//
const inputValue = ref('0')
// 4 + 2
const stringShow = ref('0000.00')
function formatDisplay(raw : string) {
const [intRaw = '0', decRaw = ''] = String(raw ?? '0').split('.')
// 4 0
const intPart = intRaw.replace(/\D/g, '').padStart(4, '0').slice(-4)
// 2 0
const decPart = decRaw.replace(/\D/g, '').padEnd(2, '0').slice(0, 2)
return `${intPart}.${decPart}`
}
function normalizeInput(raw : string) {
let v = String(raw ?? '').replace(/[^\d.]/g, '')
if (!v) return '0'
if (v === '.') return '0.'
//
const dotIndex = v.indexOf('.')
if (dotIndex !== -1) {
const intRaw = v.slice(0, dotIndex)
const decRaw = v.slice(dotIndex + 1)
let intPart = intRaw.replace(/^0+(?=\d)/, '')
if (intPart === '') intPart = '0'
intPart = intPart.slice(0, MAX_INT)
const decPart = decRaw.slice(0, MAX_DEC)
return `${intPart}.${decPart}`
}
let intPart = v.replace(/^0+(?=\d)/, '')
if (intPart === '') intPart = '0'
return intPart.slice(0, MAX_INT)
}
function setValue(raw : string) {
inputValue.value = normalizeInput(raw)
stringShow.value = formatDisplay(inputValue.value)
}
function appendDigit(d : number) {
const digit = String(d)
const raw = inputValue.value
//
if (raw.includes('.')) {
const [intPart, decPart = ''] = raw.split('.')
if (decPart.length >= MAX_DEC) return
setValue(`${intPart}.${decPart}${digit}`)
return
}
// 0
if (raw === '0') {
setValue(digit === '0' ? '0' : digit)
return
}
// 4
if (raw.length >= MAX_INT) return
setValue(raw + digit)
}
function appendDot() {
if (inputValue.value.includes('.')) return
setValue(`${inputValue.value}.`)
}
function deleteOne() {
let raw = inputValue.value
if (!raw || raw === '0') {
setValue('0')
return
}
raw = raw.slice(0, -1)
//
if (raw.endsWith('.')) raw = raw.slice(0, -1)
if (!raw) raw = '0'
setValue(raw)
}
function clickKuai(item : any, index : number) {
blueNumber.value = index
setTimeout(() => {
blueNumber.value = -1
}, 300)
if (item === 'AC') {
deleteOne()
return
}
if (item === '.') {
appendDot()
return
}
appendDigit(Number(item))
}
function closeIt() {
emit('right', Number(inputValue.value || 0))
}
function colse() {
//
emit('close')
}
// /
// watch(
// () => props.doOnce,
// () => {
// setValue(String(props.translateNumber ?? 0))
// },
// { immediate: true }
// )
// translateNumber
watch(
() => props.translateNumber,
() => {
setValue(String(props.translateNumber ?? 0))
}
)
</script>
<style lang="less" scoped>
.plsbuy-contain {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
height: 100%;
background: rgba(250, 251, 252, 1);
overflow: hidden;
border-radius: 2.2vw;
.title {
font-size: 1.7vw;
color: #222222;
display: flex;
width: 100%;
margin-top: 40rpx;
margin-left: 100rpx;
align-items: center;
view {
width: 0.5vw;
height: 1.4vw;
background: radial-gradient(0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
}
}
}
.plsbuy-bottom {
width: 70%;
margin-top: 50rpx;
height: 70rpx;
display: flex;
justify-content: space-around;
font-size: 35rpx;
margin-left: 5%;
view {
display: flex;
justify-content: center;
align-items: center;
width: 180rpx;
height: 70rpx;
color: rgba(92, 121, 146, 1);
border-radius: 35rpx;
font-size: 30rpx;
border: 1px solid #A2B4CF;
}
.quxiao {
background: #FFFFFF;
}
.plsbuy-bottom-blue {
background: linear-gradient(-61deg, #EAF5FF, #CBE7FF);
}
}
.calculator-father {
width: 420rpx;
height: 500rpx;
margin-top: 20rpx;
flex-wrap: wrap;
display: flex;
.calculator-kuai {
display: flex;
justify-content: center;
align-items: center;
background: url('/static/index/warehouse/procurement/bt.png') no-repeat;
background-size: 100% 100%;
border-radius: 25rpx;
font-size: 42rpx;
font-weight: 500;
margin: 15rpx 20rpx 0 20rpx;
width: 100rpx;
height: 100rpx;
}
.calculator-kuai-target {
background: linear-gradient(to bottom, #00C9FF, #0076FF);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
background-color: #DCDCEE;
border-radius: 25rpx;
font-size: 45rpx;
font-weight: 500;
margin: 15rpx 20rpx 0 20rpx;
width: 100rpx;
height: 100rpx;
}
}
.stringShow-father {
width: 630rpx;
height: 70rpx;
margin-top: 20rpx;
// margin-left: 23rpx;
// flex-wrap: wrap;
display: flex;
.stringShow-kuai {
display: flex;
justify-content: center;
align-items: center;
// background-color: #DCDCEE;
border-radius: 25rpx;
// border-radius: 15rpx;
font-size: 42rpx;
font-weight: 500;
margin: 0 10rpx;
width: 70rpx;
height: 70rpx;
border: 2rpx solid rgba(203, 207, 208, 1);
}
}
.qinggou-font {
font-size: 27rpx;
font-weight: 500;
margin-top: 30rpx;
}
</style>

View File

@ -1,21 +1,20 @@
<template>
<view>
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()" lower-threshold="300"
:enhanced="true" :bounce="true" enable-back-to-top>
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()"
lower-threshold="300" :enhanced="true" :bounce="true" enable-back-to-top>
<view class="box">
<view class="fler" v-for="(v,index) in InvoicingList" :key="index">
<view class="fler-view" @touchstart="ts($event)" @touchmove="canmove($event,index)">
<!-- @touchend="handleTouchEnd($event,v,index)"
@touchstart="touchstart($event,v,index)" scroll-with-animation scroll-x="true"
:scroll-left="v.scrollleft" @scroll="scroll" -->
<view class="carditem guodu"
:style="openwhitchindex === index? { transform: 'translateX(-14vw)' }: { transform: 'translateX(0)' }">
<view class="cgdh">
采购单号C10120251012001 <text class="s"></text><text class="j"></text>
采购单号{{ v.ddNo }} <text class="s"
v-if="v.procurementPrice < v.arrivalPrice"></text><text class="j"
v-if="v.procurementPrice > v.arrivalPrice"></text>
</view>
<view class="cgsl">
<text>325</text>
<text>{{ Number(v.kcsl || 0).toFixed(2) }}</text>
<view>库存数量</view>
</view>
<view class="speitem guodu">
@ -26,49 +25,53 @@
</image>
</view>
<view class="cardp">
<view>复健用品</view>
<view>复健用品</view>
<view>{{ v.categoryId_dictText }}</view>
<view>{{ v.typeId_dictText }}</view>
</view>
<!-- <view class="cardp">
<view v-if="v.categoryId_dictText">{{v.categoryId_dictText}}</view>
<view v-if="v.typeId_dictText">{{v.typeId_dictText}}</view>
<view v-if="v.medicationId_dictText">{{v.medicationId_dictText}}</view>
</view> -->
</view>
<view class="msitem guodu">
<view>
<view>纸尿裤-拉拉裤纸尿裤拉拉裤纸尿裤</view>
<view>{{ v.materialName }}</view>
</view>
<view style="margin-top: 1vw;">
<text style="white-space: nowrap;"> 物料编码: ZHYP044</text>
<text style="white-space: nowrap;"> 物料编码: {{ v.materialNo }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: 800mm*680mm</text>
<text style="white-space: nowrap;"> 规格型号: {{ v.specificationModel }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 品牌型号品牌型号名称</text>
<text style="white-space: nowrap;"> 品牌型号{{ v.brandType }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 生产厂家吉林省捌零信创科技有限...</text>
<text style="white-space: nowrap;"> 生产厂家{{ v.manufacturer }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 长春市天林商贸有限公司...</text>
<text style="white-space: nowrap;"> {{ v.gysName }}</text>
</view>
</view>
<!-- <view class="add" @click.stop="addcar(v,index)">
<view v-if="v.isAdd==1">已添加</view>
<image :src="'/static/index/procurement/+.png'" mode="aspectFill"></image>
</view> -->
<view class="zkadd guodu" >
<view class="zkadd-white" style="background: #F1F1F1;" @click.stop="pandian(v,index)" @touchend.stop>盘点</view>
<view class="zkadd guodu">
<view class="zkadd-white" style="background: #F1F1F1;" @click.stop="pandian(v)"
@touchend.stop>盘点</view>
<view class="zkadd-white" @click.stop="crk(v,index)" @touchend.stop>出入库</view>
<view class="zkadd-blue" @click.stop="addcar(v,index)" v-if="v.isAdd!=1" @touchend.stop>
<view class="zkadd-blue" @click.stop="addcar(v)" v-if="v.isAdd!=1" @touchend.stop>
<view>
销售价格
</view>
</view>
</view>
<!-- v-if="v.pdType !== null" -->
<view class="pandianthen white-tag" v-if="v.pdType == `0`">
已盘点
</view>
<view class="pandianthen blue-tag" v-if="v.pdType == `1`">
盘盈
</view>
<view class="pandianthen red-tag" v-if="v.pdType == `2`">
盘亏
</view>
<view class="no-price" v-if="!v.xsjg">
无销售价格
</view>
</view>
</view>
</view>
@ -78,10 +81,10 @@
</view>
</scroll-view>
<view class="mengban" v-if="priceshow" @click="priceshow = false"> </view>
<price :show="priceshow" @close="priceshow = false"></price>
<price :show="priceshow" @close="priceshow = false" :cardvalue="cardvalue" @finishit="finishit"></price>
<view class="mengban" v-if="pd" @click="guanbipd"> </view>
<inventory :isShow="pd" v-if="pds"></inventory>
<inventory :isShow="pd" v-if="pds" :cardvalue="cardvalue" @finishit="finishit"></inventory>
</view>
</template>
@ -104,39 +107,45 @@
const priceshow = ref(false)
const pd = ref(false)
const pds = ref(false)
const emit = defineEmits(['addcartory', 'scrolltolower', 'addcar', 'crk'])
const emit = defineEmits(['scrolltolower', 'crk', `finishit`])
const serverUrl = ref('')
onMounted(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
})
const pandian = ()=>{
const cardvalue = ref({})
const pandian = (item) => {
cardvalue.value = item;
pds.value = true
setTimeout(()=>{
setTimeout(() => {
pd.value = true
},10)
}, 10)
}
const guanbipd = ()=>{
const guanbipd = () => {
pd.value = false;
setTimeout(()=>{
setTimeout(() => {
pds.value = false
},450)
}, 450)
}
const caigouobj = ref({})
// const caigouobj = ref({})
const addcar = (v : any, i : number) => {
console.log("看看值",v)
cardvalue.value = v;
priceshow.value = true
// console.log("",i)
if (Number(v.kcsl) >= Number(v.upperLimit)) {
uni.showToast({
title: '库存数量已满,不可添加购物车!',
icon: 'none'
})
return
}
caigouobj.value = v;
caigouobj.value.index = i;
caigouobj.value.yj = false;
emit('addcartory', caigouobj.value)
// if (Number(v.kcsl) >= Number(v.upperLimit)) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return
// }
// caigouobj.value = v;
// caigouobj.value.index = i;
// caigouobj.value.yj = false;
// emit('addcartory', caigouobj.value)
}
// const pageX = ref(0);
// const pageY = ref(0);
@ -209,10 +218,17 @@
openwhitchindex.value = -1
}
}
const finishit = () => {
pds.value = false;
pd.value = false;
openwhitchindex.value = -1
emit('finishit')
}
</script>
<style scoped lang="less">
.mengban{
.mengban {
width: 100vw;
height: 100vh;
position: fixed;
@ -221,9 +237,10 @@
left: 0;
z-index: 99;
}
.crdcroll {
width: 90vw;
height: calc(100vh - 4vw);
height: calc(100vh - 5vw);
.box {
width: 90vw;
@ -249,17 +266,18 @@
}
}
}
.zkadd {
width: 14vw;
height: 18.8vw;
display:flex;
display: flex;
justify-content: flex-end;
// background-color: blue;
position: absolute;
top: -3vw;
right: -14vw;
z-index: 55;
>view {
width: 4.66vw;
height: 100%;
@ -271,13 +289,13 @@
writing-mode: vertical-rl;
text-orientation: upright;
text-align: center;
}
.zkadd-blue {
background: #1083F8;
color: #fff;
view {
width: 3.8vw;
height: 3.8vw;
@ -287,12 +305,13 @@
margin-top: -0.7vw;
}
}
.zkadd-white {
background: #e3e5e7;
color: #555555;
}
}
.carditem {
position: absolute;
top: 2.5vw;
@ -301,32 +320,36 @@
display: flex;
transition: transform 500ms cubic-bezier(.2, .8, .2, 1);
will-change: transform;
.cgsl{
.cgsl {
position: absolute;
width: 5vw;
height:4.5vw;
height: 4.5vw;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
right: 2.6vw;
top: -1.5vw;
text{
text {
font-weight: bold;
font-size: 2.3vw;
color: #222222;
font-style: normal;
text-transform: none;
margin: 0.6vw 0;
margin: 0;
}
view{
view {
font-size: 1.3vw;
color: #777777;
font-style: normal;
text-transform: none;
}
}
.cgdh{
.cgdh {
position: absolute;
width: 25vw;
height: 3vw;
@ -334,8 +357,8 @@
align-items: center;
top: -2vw;
left: 2.3vw;
text{
text {
width: 1.5vw;
height: 1.5vw;
border-radius: 0.3vw;
@ -347,15 +370,58 @@
color: #fff;
margin-left: 1.2vw;
}
.s{
.s {
background: #FF5B5B;
}
.j{
.j {
background: #1083F8;
}
}
.pandianthen {
position: absolute;
bottom: 86rpx;
right: 32rpx;
width: 130rpx;
height: 62rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
border-radius: 12rpx;
}
.no-price{
position: absolute;
top: 80rpx;
right: 32rpx;
width: 150rpx;
height: 50rpx;
border: 2rpx solid #FF6161;
display: flex;
justify-content: center;
align-items: center;
border-radius: 30rpx;
font-size: 23rpx;
color: #FF6161;
}
.white-tag {
color: #666666;
/* 字体灰 */
background-color: #F5F5F5;
/* 浅灰背景 */
}
.blue-tag {
color: #2391FA;
background-color: #EFF7FF;
}
.red-tag {
color: #FF6161;
background-color: #FFF0F0;
}
.zkf {
width: 7vw;
@ -575,7 +641,7 @@
padding: 0.2vw;
background: #fff;
border-radius: 1.1vw;
>image {
width: 100%;
height: 100%;
@ -585,5 +651,4 @@
}
}
</style>
</style>

View File

@ -1,6 +1,6 @@
<template>
<view>
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()" lower-threshold="300"
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower" lower-threshold="300"
:enhanced="true" :bounce="true" enable-back-to-top>
<view class="box">
<view class="fler" v-for="(v,index) in InvoicingList" :key="index">
@ -12,11 +12,11 @@
<view class="carditem guodu"
:style="openwhitchindex === index? { transform: 'translateX(-14vw)' }: { transform: 'translateX(0)' }">
<view class="cgdh">
采购单号C10120251012001
采购单号{{ v.ddNo }}
<!-- <text class="s"></text><text class="j"></text> -->
</view>
<view class="cgsl">
<text>325</text>
<text>{{ Number(v.kcsl || 0).toFixed(2) }}</text>
<view>库存数量</view>
</view>
<view class="speitem guodu">
@ -27,8 +27,8 @@
</image>
</view>
<view class="cardp">
<view>复健用品</view>
<view>复健用品</view>
<view>{{ v.categoryId_dictText }}</view>
<view>{{ v.typeId_dictText }}</view>
</view>
<!-- <view class="cardp">
<view v-if="v.categoryId_dictText">{{v.categoryId_dictText}}</view>
@ -38,22 +38,22 @@
</view>
<view class="msitem guodu">
<view>
<view>纸尿裤-拉拉裤纸尿裤拉拉裤纸尿裤</view>
<view>{{ v.materialName }}</view>
</view>
<view style="margin-top: 1vw;">
<text style="white-space: nowrap;"> 物料编码: ZHYP044</text>
<text style="white-space: nowrap;"> 物料编码: {{ v.materialNo }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: 800mm*680mm</text>
<text style="white-space: nowrap;"> 规格型号: {{ v.specificationModel }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 品牌型号品牌型号名称</text>
<text style="white-space: nowrap;"> 品牌型号{{ v.brandType }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 生产厂家吉林省捌零信创科技有限...</text>
<text style="white-space: nowrap;"> 生产厂家{{ v.manufacturer }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 长春市天林商贸有限公司...</text>
<text style="white-space: nowrap;"> {{ v.gysName }}</text>
</view>
</view>
<!-- <view class="add" @click.stop="addcar(v,index)">
@ -98,7 +98,7 @@
const priceshow = ref(false)
const pd = ref(false)
const pds = ref(false)
const emit = defineEmits(['crk' ])
const emit = defineEmits(['crk','scrolltolower' ])
const serverUrl = ref('')
onMounted(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
@ -204,6 +204,9 @@
openwhitchindex.value = -1
}
}
const scrolltolower = () => {
emit("scrolltolower")
}
</script>
<style scoped lang="less">
@ -254,7 +257,7 @@
// background-color: blue;
position: absolute;
top: -3vw;
right: -14vw;
right: -16vw;
z-index: 55;
>view {

View File

@ -1,22 +1,22 @@
<template>
<view>
<view class="crkd guodu" :style="!show?'width: 0;right:-4vw':'width: 86.8vw'" >
<view class="crkd guodu" :style="!show?'width: 0;right:-4vw':'width: 86.8vw'">
<view class="topboxs">
<view class="title">
<view></view>
出入库
</view>
<view class="sscgd">
<input type="text" placeholder="采购单号"/>
<input type="text" placeholder="采购单号" />
</view>
<view class="sscgd">
<input type="text" placeholder="退货单号"/>
<input type="text" placeholder="退货单号" />
</view>
<view class="sscgd">
<input type="text" placeholder="物料名称"/>
<input type="text" placeholder="物料名称" />
</view>
<view class="sscgd">
<input type="text" placeholder="生产厂家"/>
<input type="text" placeholder="生产厂家" />
</view>
<view class="search scr guodu">
<image src="/static/index/procurement/sh.png" mode="aspectFill" class="sh"></image>
@ -24,126 +24,177 @@
检索
</view>
</view>
<!-- @addcartory="" @scrolltolower="" :status="" -->
<view class="crklist">
<crkitem :InvoicingList="InvoicingList" @addcartory="addcartory" @scrolltolower="scrolltolower" lower-threshold="300"
:status="status" @crk="crk"></crkitem>
<crkitem :InvoicingList="InvoicingList" lower-threshold="300" @scrolltolower="scrolltolower" @crk="crk"></crkitem>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
import crkitem from './crkitem.vue'
const InvoicingList = ref([{},{},{},{},{},{},]);
const props = defineProps({
show: {
type: Boolean
},
})
const emit = defineEmits(['crk' ])
const crk = (v,i)=>{
emit('crk', v, i)
}
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent, watch } from 'vue';
import crkitem from './crkitem.vue'
import { getCkWlList } from '../api/api.js'
const props = defineProps({
show: {
type: Boolean
},
})
watch(
() => props.show,
(newVal, oldVal) => {
if (!oldVal && newVal) {
getCardArray()
}
// console.log('show:', newVal)
}
)
const InvoicingList = ref([]);
const emit = defineEmits(['crk'])
const crk = (v, i) => {
emit('crk', v, i)
}
//
const inputValue = ref({
pageNo: 1,
pageSize: 16,
nuId: uni.getStorageSync('nuId'),
wlParamInfo: ""
})
//
const getCardArray = () => {
inputValue.value.pageNo = 1;
addlock.value = false
getCkWlList(inputValue.value).then((res : any) => {
// console.log("", res.result.records)
InvoicingList.value = res.result.records
if (res.result.records.length != 16) {
addlock.value = true
}
})
}
//
const addlock = ref(false)
//
const scrolltolower = () => {
if (!addlock.value) {
inputValue.value.pageNo++
getCkWlList(inputValue).then((res : any) => {
InvoicingList.value.push(...res.result.records)
if (res.result.records.length != 16) {
addlock.value = true
}
})
}
}
</script>
<style lang="less" scoped>
.crklist{
.crklist {
width: 100%;
height: calc(100vh - 6vw);
}
.crkd{
width: 86.8vw;
height: 100vh;
position: fixed;
right: 0;
top: 0;
z-index:101;
padding:0 0 0 1vw;
background: #FFFFFF;
border-radius: 3vw 0 0 3vw;
.topboxs{
width: 100%;
height: 5.1vw;
display: flex;
align-items: center;
padding-left: 1vw;
.scr {
image {
width: 1.6vw;
height: 1.6vw;
margin: 0 0.5vw 0 0;
}
}
.shr {
display: none;
}
.scr:active .sh {
display: none;
}
.scr:active {
color: #57A8FA;
border: 1px solid #57A8FA;
}
.shx:active .shr {
display: inline-block;
}
.shx:active .sh {
display: none;
}
.scr:active .shr {
display: inline-block;
}
.search{
width: 8.5vw;
height: 3.4vw;
background: #FFFFFF;
border-radius: 1.5vw;
border: 1px solid #CECECE;
.crkd {
width: 86.8vw;
height: 100vh;
position: fixed;
right: 0;
top: 0;
z-index: 101;
padding: 0 0 0 1vw;
background: #FFFFFF;
border-radius: 3vw 0 0 3vw;
.topboxs {
width: 100%;
height: 5.1vw;
display: flex;
align-items: center;
justify-content: center;
}
.sscgd{
width: 13.8vw;
height: 3.4vw;
background: #FFFFFF;
border-radius: 1.5vw;
border: 1px solid #D2D2D2;
margin-right: 1.2vw;
input{
width: 100%;
height: 100%;
padding: 0 1.2vw;
padding-left: 1vw;
.scr {
image {
width: 1.6vw;
height: 1.6vw;
margin: 0 0.5vw 0 0;
}
}
}
.title{
font-size: 1.7vw;
color: #222222;
display: flex;
align-items: center;
margin-right: 6.9vw;
view{
width: 0.5vw;
height: 1.4vw;
background: radial-gradient( 0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
.shr {
display: none;
}
.scr:active .sh {
display: none;
}
.scr:active {
color: #57A8FA;
border: 1px solid #57A8FA;
}
.shx:active .shr {
display: inline-block;
}
.shx:active .sh {
display: none;
}
.scr:active .shr {
display: inline-block;
}
.search {
width: 8.5vw;
height: 3.4vw;
background: #FFFFFF;
border-radius: 1.5vw;
border: 1px solid #CECECE;
display: flex;
align-items: center;
justify-content: center;
}
.sscgd {
width: 13.8vw;
height: 3.4vw;
background: #FFFFFF;
border-radius: 1.5vw;
border: 1px solid #D2D2D2;
margin-right: 1.2vw;
input {
width: 100%;
height: 100%;
padding: 0 1.2vw;
}
}
.title {
font-size: 1.7vw;
color: #222222;
display: flex;
align-items: center;
margin-right: 6.9vw;
view {
width: 0.5vw;
height: 1.4vw;
background: radial-gradient(0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
}
}
}
}
}
.guodu {
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>
</style>

View File

@ -1,169 +1,161 @@
<template>
<view
class="circle-progress"
:style="{
<view class="circle-progress" :style="{
width: '5vw',
height: '5vw',
}"
>
<view class="circle-bg" :style="{ borderColor: bgColor }"></view>
<view class="circle-bar-wrapper">
<view
class="circle-bar"
:style="{
}">
<view class="circle-bg" :style="{ borderColor: bgColor }"></view>
<view class="circle-bar-wrapper">
<view class="circle-bar" :style="{
background: `conic-gradient(${color} ${animateProgress}%, transparent ${animateProgress}%)`,
'--thickness': `${thickness}px`,
'--half-thickness': `${thickness / 2}px`,
}"
></view>
</view>
}"></view>
</view>
<!-- 中间文字 -->
<view class="circle-content" v-if="showText">
<view class="progress-number">{{ Math.round(animateProgress) }}%</view>
<view class="progress-label">进度</view>
</view>
</view>
<!-- 中间文字 -->
<view class="circle-content" v-if="showText">
<view class="progress-number">{{ Math.round(animateProgress) }}%</view>
<view class="progress-label">进度</view>
</view>
</view>
</template>
<script setup lang="ts">
import { computed, ref, onMounted, watch } from 'vue';
interface ProgressProps {
progress?: number;
color?: string;
bgColor?: string;
thickness?: number;
showText?: boolean;
duration?: number;
}
import { computed, ref, onMounted, watch } from 'vue';
interface ProgressProps {
progress ?: number;
color ?: string;
bgColor ?: string;
thickness ?: number;
showText ?: boolean;
duration ?: number;
}
const props = withDefaults(defineProps<ProgressProps>(), {
progress: 0,
color: '#409EFF',
bgColor: '#E5E5E5',
thickness: 1,
showText: true,
duration: 1.5,
});
const realProgress = computed(() => {
const p = Number(props.progress);
return isNaN(p) ? 0 : Math.max(0, Math.min(100, p));
});
const animateProgress = ref(0);
const startProgressAnimation = () => {
const target = realProgress.value;
const duration = props.duration * 1000;
const frameRate = 60;
const totalFrames = duration / (1000 / frameRate);
const increment = target / totalFrames;
let currentFrame = 0;
const timer = setInterval(() => {
currentFrame++;
animateProgress.value += increment;
if (currentFrame >= totalFrames || animateProgress.value >= target) {
animateProgress.value = target;
clearInterval(timer);
}
}, 1000 / frameRate);
};
const props = withDefaults(defineProps<ProgressProps>(), {
progress: 0,
color: '#409EFF',
bgColor: '#E5E5E5',
thickness: 1,
showText: true,
duration: 1.5,
});
const realProgress = computed(() => {
const p = Number(props.progress);
return isNaN(p) ? 0 : Math.max(0, Math.min(100, p));
});
const animateProgress = ref(0);
const startProgressAnimation = () => {
const target = realProgress.value;
const duration = props.duration * 1000;
const frameRate = 60;
const totalFrames = duration / (1000 / frameRate);
const increment = target / totalFrames;
watch(realProgress, () => {
animateProgress.value = 0;
startProgressAnimation();
}, { immediate: false });
let currentFrame = 0;
const timer = setInterval(() => {
currentFrame++;
animateProgress.value += increment;
onMounted(() => {
startProgressAnimation();
});
if (currentFrame >= totalFrames || animateProgress.value >= target) {
animateProgress.value = target;
clearInterval(timer);
}
}, 1000 / frameRate);
};
watch(realProgress, () => {
animateProgress.value = 0;
startProgressAnimation();
}, { immediate: false });
onMounted(() => {
startProgressAnimation();
});
</script>
<style scoped>
.circle-progress {
position: relative;
flex-shrink: 0;
aspect-ratio: 1/1;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
border-radius: 50%;
background: #fff;
}
.circle-progress {
position: relative;
flex-shrink: 0;
aspect-ratio: 1/1;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
border-radius: 50%;
background: #fff;
}
.circle-bg {
width: 100%;
height: 100%;
border-radius: 50%;
border: 3px solid #E8E9EA;
box-sizing: border-box;
opacity: 1;
z-index: 2;
position: relative;
}
.circle-bg {
width: 100%;
height: 100%;
border-radius: 50%;
border: 3px solid #E8E9EA;
box-sizing: border-box;
opacity: 1;
z-index: 2;
position: relative;
}
.circle-bar-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
z-index: 3;
overflow: hidden;
}
.circle-bar-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
z-index: 3;
overflow: hidden;
}
.circle-bar {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
-webkit-mask: radial-gradient(
transparent calc(50% - 3px),
black calc(50% - 3px)
);
mask: radial-gradient(
transparent calc(50% - 3px),
black calc(50% - 3px)
);
&::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
right: 3px;
bottom: 3px;
border-radius: 50%;
box-shadow: inset 0 0 0 13px rgba(255, 255, 255, 1);
}
clip-path: circle(50% at center);
}
.circle-bar {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
-webkit-mask: radial-gradient(transparent calc(50% - 3px),
black calc(50% - 3px));
mask: radial-gradient(transparent calc(50% - 3px),
black calc(50% - 3px));
.circle-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 3;
}
&::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
right: 3px;
bottom: 3px;
border-radius: 50%;
box-shadow: inset 0 0 0 13px rgba(255, 255, 255, 1);
}
.progress-number {
font-size: 1.2vw;
font-weight: 600;
color: #333;
line-height: 1;
margin-bottom: 0.2vw;
}
clip-path: circle(50% at center);
}
.progress-label {
font-size: 1.1vw;
color: #666;
line-height: 1;
}
.circle-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 3;
}
.progress-number {
font-size: 1.2vw;
font-weight: 600;
color: #333;
line-height: 1;
margin-bottom: 0.2vw;
}
.progress-label {
font-size: 1.1vw;
color: #666;
line-height: 1;
}
</style>

View File

@ -1,465 +1,539 @@
<template>
<view>
<view class="wuliao guodu" :style="!show?'width: 0;right:-7vw':'width: 52.6vw'">
<view class="wuliao guodu" :style="!show?'width: 0;right:-7vw':'width: 52.6vw'">
<view class="crktop">
<view class="title">
<view></view>
物料信息
</view>
</view>
<view class="xinxi">
<view class="carditem guodu" >
<view class="cgsl">
<text>325</text>
<view>库存数量</view>
<view class="carditem guodu">
<view class="cgsl">
<text>{{ Number(pushcrkitem.kcsl || 0).toFixed(2) }}</text>
<view>库存数量</view>
</view>
<view class="speitem guodu">
<view class="imghs">
<image style="border-radius: 1vw;"
:src="pushcrkitem.materialImg?serverUrl+pushcrkitem.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
</image>
</view>
<view class="speitem guodu">
<view class="imghs">
<image style="border-radius: 1vw;"
:src=" '/static/index/procurement/k.png'"
mode="aspectFill">
</image>
</view>
<view class="cardp">
<view>复健用品</view>
<view>复健用品</view>
</view>
</view>
<view class="msitem guodu">
<view>
<view>纸尿裤-拉拉裤纸尿裤拉拉裤纸尿裤</view>
</view>
<view style="margin-top: 1vw;">
<text style="white-space: nowrap;"> 物料编码: ZHYP044</text>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: 800mm*680mm</text>
</view>
<view>
<text style="white-space: nowrap;"> 品牌型号品牌型号名称</text>
</view>
<view>
<text style="white-space: nowrap;"> 生产厂家吉林省捌零信创科技有限...</text>
</view>
<view>
<text style="white-space: nowrap;"> 长春市天林商贸有限公司...</text>
</view>
<view class="cardp">
<view>{{ pushcrkitem.categoryId_dictText }}</view>
<view>{{ pushcrkitem.typeId_dictText }}</view>
</view>
</view>
<view class="msitem guodu">
<view>
<view>{{ pushcrkitem.materialName }}</view>
</view>
<view style="margin-top: 1vw;">
<text style="white-space: nowrap;"> 物料编码: {{ pushcrkitem.materialName }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: {{ pushcrkitem.specificationModel }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 品牌型号{{ pushcrkitem.brandType }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 生产厂家{{ pushcrkitem.manufacturer }}</text>
</view>
<view>
<text style="white-space: nowrap;"> {{ pushcrkitem.gysName }}</text>
</view>
</view>
</view>
<view class="cgqlpd">
<view>
<text>采购单号<text class="hei">C10120251012001</text></text>
<text> <text class="rhei">15+5 </text><text class="rxiao"></text> </text>
</view>
<view>
<text> 李彩霞</text>
<text></text>
</view>
<view>
<text>采购时间 2026.03.27 10:35:26</text>
<view class="kui">盘亏</view>
</view>
</view>
<view class="cgqlpd">
<view>
<text>采购单号<text class="hei">C10120251012001</text></text>
<text> <text class="rjia"> + 5 </text><text class="rjian">- 5</text> </text>
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="getMoreArray()"lower-threshold="300" >
<view class="cgqlpd" v-for="(item,index) in showotherarray" :key="index" >
<view>
<text>采购单号<text class="hei">{{ item.ddNo }}</text></text>
<text> <text class="rhei">{{ item.crkNum }} </text> <text style="color: #2391FA;" v-if="item.gzsl" > +{{ item.gzsl }} </text> <text style="color: #FF6161;" v-if="item.xzsl">-{{ item.xzsl }}</text> <text class="rxiao">{{ item.materialUnits }}</text> </text>
</view>
<view>
<text> {{ item.cgBy }}</text>
<text></text>
</view>
<view>
<text>采购时间 {{ item.createTime }}</text>
<view v-if="item.pdType==`1`" class="kui" style="background-color: #2391FA;" >盘盈</view>
<view v-if="item.pdType==`2`" class="kui">盘亏</view>
</view>
</view>
<view>
<text> 李彩霞</text>
<text></text>
</view>
<view>
<text>采购时间 2026.03.27 10:35:26</text>
<view class="ying">盘盈</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent,watch } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { queryCrkInfoList } from '../api/api.js'
const props = defineProps({
show: {
type: Boolean,
default: false
},
pushcrkitem: {
type: Object
}
})
const serverUrl = uni.getStorageSync('serverUrl') + '/sys/common/static/';
const pageNo = ref(1);
const showotherarray = ref([]);
watch(
() => props.show,
(newVal, oldVal) => {
if (!oldVal && newVal) {
pageNo.value = 1;
getmorelock.value = false
let data = {
pageNo:pageNo.value,
wlId:props.pushcrkitem.wlId,
cgdId:props.pushcrkitem.cgdId,
}
queryCrkInfoList(data).then((res:any)=>{
if (res.success) {
showotherarray.value = res.result.records
// console.log("",res.result.records)
} else {
uni.showToast({
title: res.message,
icon: 'none', // 'success''loading''none'
duration: 2000 // ms
})
}
})
}
}
)
const getmorelock = ref(false)
const getMoreArray = () => {
if(!getmorelock.value){
pageNo.value ++;
let data = {
pageNo:pageNo.value,
wlId:props.pushcrkitem.wlId,
cgdId:props.pushcrkitem.cgdId,
}
queryCrkInfoList(data).then((res:any)=>{
if (res.success) {
showotherarray.value.push(...res.result.records)
if(res.result.records.length!==15){
getmorelock.value = true;
}
} else {
uni.showToast({
title: res.message,
icon: 'none', // 'success''loading''none'
duration: 2000 // ms
})
}
})
}
}
</script>
<style scoped lang="less">
.wuliao{
height: 100vh;
background: #FFFFFF;
position: fixed;
top: 0;
right: 0;
z-index: 105;
border-radius: 3vw 0 0 3vw;
padding: 0 3.5vw;
overflow: hidden;
.cgqlpd{
width: 100%;
height: 13.2vw;
border-bottom: 1px solid #DCDCDC;
padding:3.2vw 0;
display: flex;
flex-direction: column;
justify-content: space-between;
view{
.wuliao {
height: 100vh;
background: #FFFFFF;
position: fixed;
top: 0;
right: 0;
z-index: 105;
border-radius: 3vw 0 0 3vw;
padding: 0 3.5vw;
overflow: hidden;
.cgqlpd {
width: 100%;
height: 13.35vw;
border-bottom: 1px solid #DCDCDC;
padding: 3.2vw 0;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 2vw;
align-items: center;
view {
width: 100%;
display: flex;
justify-content: space-between;
height: 2vw;
align-items: center;
}
.hui {
font-size: 1.4vw;
color: #777777;
}
.hei {
font-weight: bold;
font-size: 1.4vw;
}
.rhei {
font-size: 1.9vw;
font-weight: bold;
}
.rxiao {
font-size: 1.2vw;
font-weight: bold;
}
.rjian {
font-weight: bold;
font-size: 19px;
color: #FD3F3F;
}
.rjia {
font-weight: bold;
font-size: 1.9vw;
color: #0384F8;
}
.kui {
width: 3.3vw;
height: 1.6vw;
background: #FD3F3F;
border-radius: 0.3vw;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.1vw;
color: #FFFFFF;
}
.ying {
width: 3.3vw;
height: 1.6vw;
background: #0384F8;
border-radius: 0.3vw;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.1vw;
color: #FFFFFF;
}
}
.hui{
font-size: 1.4vw;
color: #777777;
}
.hei{
font-weight: bold;
font-size: 1.4vw;
}
.rhei{
font-size: 1.9vw;
font-weight: bold;
}
.rxiao{
font-size: 1.2vw;
font-weight: bold;
}
.rjian{
font-weight: bold;
font-size: 19px;
color: #FD3F3F;
}
.rjia{
font-weight: bold;
font-size: 1.9vw;
color: #0384F8;
}
.kui{
width: 3.3vw;
height: 1.6vw;
background: #FD3F3F;
border-radius: 0.3vw;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.1vw;
color: #FFFFFF;
}
.ying{
width: 3.3vw;
height: 1.6vw;
background: #0384F8;
border-radius: 0.3vw;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.1vw;
color: #FFFFFF;
}
}
.xinxi{
width: 45vw;
height: 15.6vw;
border-bottom: 1px solid #DCDCDC;
position: relative;
.carditem {
height: 100%;
display: flex;
transition: transform 500ms cubic-bezier(.2, .8, .2, 1);
will-change: transform;
.xinxi {
width: 45vw;
height: 15.6vw;
border-bottom: 1px solid #DCDCDC;
position: relative;
.cgsl{
position: absolute;
width: 5vw;
height:4.5vw;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
right: 2vw;
top: -4vw;
text{
font-weight: bold;
font-size: 2.3vw;
color: #222222;
font-style: normal;
text-transform: none;
margin: 0.6vw 0;
}
view{
font-size: 1.3vw;
color: #777777;
white-space: nowrap;
}
}
.zkf {
width: 7vw;
right: -7vw;
}
.add {
width: 4.5vw;
.carditem {
height: 100%;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
top: 50%;
transform: translateY(-50%);
// top: 0.8vw;
right: 16vw;
// background-color: red;
>view {
width: 5.5vw;
height: 2.2vw;
background: #fff;
border-radius: 0.9vw;
border: 1px solid #1083F8;
font-weight: 400;
font-size: 1.4vw;
color: #1083F8;
transition: transform 500ms cubic-bezier(.2, .8, .2, 1);
will-change: transform;
position: relative;
.cgsl {
position: absolute;
width: 5vw;
height: 4.5vw;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
right: 2vw;
top: -4vw;
text {
font-weight: bold;
font-size: 2.3vw;
color: #222222;
font-style: normal;
text-transform: none;
margin: 0.6vw 0;
}
view {
font-size: 1.3vw;
color: #777777;
white-space: nowrap;
}
}
.zkf {
width: 7vw;
right: -7vw;
}
.add {
width: 4.5vw;
height: 100%;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 2.3vw;
right: 0.8vw;
}
image {
width: 2.5vw;
height: 2.5vw;
}
}
.msitem {
min-width: 22vw;
height: 14vw;
margin-right: 4.2vw;
position: relative;
>view {
&:nth-child(2),
&:nth-child(3),
&:nth-child(4),
&:nth-child(6),
&:nth-child(5) {
margin-top: 0.25vw;
max-width: 25vw;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text {
font-weight: 400;
font-size: 1.3vw;
color: #777777;
margin-top: 0.25vw;
}
}
&:nth-child(1) {
display: flex;
justify-content: space-between;
align-items: center;
height: 2vw;
margin-top: 1vw;
>view {
width: 16vw;
height: 2vw;
font-weight: bold;
font-size: 1.8vw;
color: #222222;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
text {
width: 6vw;
font-weight: 300;
font-size: 1.4vw;
color: #222222;
}
}
}
>.wlsy {
width: 100%;
height: 3.4vw;
display: flex;
justify-content: space-between;
margin-top: 0vw;
top: 50%;
transform: translateY(-50%);
// top: 0.8vw;
right: 16vw;
// background-color: red;
>view {
width: 33.3%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
margin-top: 1vw;
&:nth-child(1) {
width: 30%;
align-items: left;
}
&:nth-child(2) {
width: 40%;
align-items: center;
}
&:nth-child(3) {
width: 30%;
text-align: right;
align-items: right;
}
&:nth-child(2)::after {
content: '';
position: absolute;
right: 0;
width: 100%;
height: 2.2vw;
border-left: 1px solid #C9C9C9;
border-right: 1px solid #C9C9C9;
top: 0.6vw;
}
text {
&:nth-child(1) {
font-weight: bold;
font-size: 1.8vw;
color: #555555;
}
&:nth-child(2) {
font-weight: 400;
font-size: 1.2vw;
color: #999999;
}
}
}
}
}
// .spleft{
// margin-left: -15vw !important;
// }
.speitem {
min-width: 14.8vw;
height: 14vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.cardp {
width: 12.5vw;
height: 4vw;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
align-items: center;
view {
min-width: 5.5vw;
height: 1.8vw;
width: 5.5vw;
height: 2.2vw;
background: #fff;
border-radius: 0.9vw;
border: 1px solid #D2D2D2;
margin: 0.5vw 0 0 0.5vw;
border: 1px solid #1083F8;
font-weight: 400;
font-size: 1.4vw;
color: #1083F8;
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 1vw;
color: #555555;
padding: 0 0.25vw;
&:nth-child(1),
&:nth-child(2) {
max-width: 6vw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
line-height: 1.8vw;
text-align: center;
}
&:nth-child(3) {
max-width: 11.5vw;
padding: 0 0.8vw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
line-height: 1.8vw;
text-align: center;
}
position: absolute;
top: 2.3vw;
right: 0.8vw;
}
image {
width: 2.5vw;
height: 2.5vw;
}
}
.imghs {
width: 10vw;
height: 10vw;
margin: 1vw auto 0.25vw;
padding: 0.2vw;
background: #fff;
border-radius: 1.1vw;
>image {
.msitem {
min-width: 22vw;
height: 14vw;
margin-right: 4.2vw;
position: relative;
>view {
&:nth-child(2),
&:nth-child(3),
&:nth-child(4),
&:nth-child(6),
&:nth-child(5) {
margin-top: 0.25vw;
max-width: 25vw;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text {
font-weight: 400;
font-size: 1.3vw;
color: #777777;
margin-top: 0.25vw;
}
}
&:nth-child(1) {
display: flex;
justify-content: space-between;
align-items: center;
height: 2vw;
margin-top: 1vw;
>view {
width: 16vw;
height: 2vw;
font-weight: bold;
font-size: 1.8vw;
color: #222222;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
text {
width: 6vw;
font-weight: 300;
font-size: 1.4vw;
color: #222222;
}
}
}
>.wlsy {
width: 100%;
height: 100%;
border-radius: 1.1vw;
height: 3.4vw;
display: flex;
justify-content: space-between;
margin-top: 0vw;
>view {
width: 33.3%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
margin-top: 1vw;
&:nth-child(1) {
width: 30%;
align-items: left;
}
&:nth-child(2) {
width: 40%;
align-items: center;
}
&:nth-child(3) {
width: 30%;
text-align: right;
align-items: right;
}
&:nth-child(2)::after {
content: '';
position: absolute;
right: 0;
width: 100%;
height: 2.2vw;
border-left: 1px solid #C9C9C9;
border-right: 1px solid #C9C9C9;
top: 0.6vw;
}
text {
&:nth-child(1) {
font-weight: bold;
font-size: 1.8vw;
color: #555555;
}
&:nth-child(2) {
font-weight: 400;
font-size: 1.2vw;
color: #999999;
}
}
}
}
}
// .spleft{
// margin-left: -15vw !important;
// }
.speitem {
min-width: 14.8vw;
height: 14vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.cardp {
width: 12.5vw;
height: 4vw;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
align-items: center;
view {
min-width: 5.5vw;
height: 1.8vw;
border-radius: 0.9vw;
border: 1px solid #D2D2D2;
margin: 0.5vw 0 0 0.5vw;
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
font-size: 1vw;
color: #555555;
padding: 0 0.25vw;
&:nth-child(1),
&:nth-child(2) {
max-width: 6vw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
line-height: 1.8vw;
text-align: center;
}
&:nth-child(3) {
max-width: 11.5vw;
padding: 0 0.8vw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
line-height: 1.8vw;
text-align: center;
}
}
}
.imghs {
width: 10vw;
height: 10vw;
margin: 1vw auto 0.25vw;
padding: 0.2vw;
background: #fff;
border-radius: 1.1vw;
>image {
width: 100%;
height: 100%;
border-radius: 1.1vw;
}
}
}
}
}
}
.crktop{
width: 100%;
height: 6vw;
display: flex;
align-items: center;
.title{
font-size: 1.7vw;
color: #222222;
.crktop {
width: 100%;
height: 6vw;
display: flex;
align-items: center;
view{
width: 0.5vw;
height: 1.4vw;
background: radial-gradient( 0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
.title {
font-size: 1.7vw;
color: #222222;
display: flex;
align-items: center;
view {
width: 0.5vw;
height: 1.4vw;
background: radial-gradient(0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
}
}
}
}
}
.guodu {
.guodu {
transition: .3s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>
.scroll-view{
width: 100%;
height: 40vw;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +1,33 @@
<template>
<view>
<view class="box guodu" :style="!show?'width: 0;right:-6vw':'width: 78vw'" >
<view class="box guodu" :style="!show?'width: 0;right:-6vw':'width: 78vw'">
<view class="title">
<view></view>
销售价格
</view>
<view class="gys">供应商长春市天林商贸有限公司</view>
<view class="gys">供应商{{ cardvalue.gysName }}</view>
<view class="list">
<view class="cgdh">
<view class="zc">
采购单号 101C20251012001
<view>库存数量<text>105</text></view>
采购单号 {{ cardvalue.ddNo }}
<view>库存数量<text style="padding-left: 1vw;">{{ Number(cardvalue.kcsl ).toFixed(2) }}</text>
</view>
</view>
<view class="sxd" @click="sxd = true">随行单</view>
</view>
<view class="contents">
<view class="carditem guodu" >
<view class="carditem guodu">
<view class="speitem guodu">
<view class="imghs">
<image style="border-radius: 1vw;"
:src=" '/static/index/procurement/k.png'"
:src="cardvalue.materialImg?serverUrl+cardvalue.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
</image>
</view>
<view class="cardp">
<view>复健用品</view>
<view>复健用品</view>
<view>{{ cardvalue.categoryId_dictText }}</view>
<view>{{ cardvalue.typeId_dictText }}</view>
</view>
<!-- <view class="cardp">
<view v-if="v.categoryId_dictText">{{v.categoryId_dictText}}</view>
@ -36,86 +37,160 @@
</view>
<view class="msitem guodu">
<view>
<view>纸尿裤-拉拉裤纸尿裤拉拉裤纸尿裤</view>
<view>{{ cardvalue.materialName }}</view>
</view>
<view style="margin-top: 1vw;">
<text style="white-space: nowrap;"> 物料编码: ZHYP044</text>
<text style="white-space: nowrap;"> 物料编码: {{ cardvalue.materialNo }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: 800mm*680mm</text>
<text style="white-space: nowrap;"> 规格型号: {{ cardvalue.specificationModel }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 品牌型号品牌型号名称</text>
<text style="white-space: nowrap;"> 品牌型号{{ cardvalue.brandType }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 生产厂家吉林省捌零信创科技有限...</text>
<text style="white-space: nowrap;"> 生产厂家{{ cardvalue.manufacturer }}</text>
</view>
</view>
</view>
<view class="righs">
<view class="hezi">
<view>
<text></text>
0.35
{{ Number(cardvalue.procurementPrice).toFixed(2) }}
</view>
<view class="jg">
采购价格
<text class="s"></text><text class="sb ss">0.26 </text>
<!-- <text class="s"></text><text class="sb ss">0.26 </text> -->
<text class="s" v-if="cardvalue.procurementPrice < cardvalue.arrivalPrice"> <text
class="info-text">
{{ (cardvalue.arrivalPrice - cardvalue.procurementPrice).toFixed(2) }}</text></text>
<text class="j" v-if="cardvalue.procurementPrice > cardvalue.arrivalPrice"><text
class="info-text">
{{ (cardvalue.procurementPrice - cardvalue.arrivalPrice).toFixed(2) }}</text></text>
</view>
</view>
<view class="hezi">
<view class="hezi" @click="openCalcul">
<view>
<text></text>0.35
<image src="/static/index/material/edh.png" mode="aspectFill"></image>
<text></text>{{ changethenvalue==-998? Number(cardvalue.xsjg).toFixed(2):Number(changethenvalue).toFixed(2) }}
<!-- <image src="/static/index/material/edh.png" mode="aspectFill"></image> -->
<image src="/static/index/material/edl.png" mode="aspectFill"></image>
</view>
<view class="jg">
<view class="jg" style="margin-top: 0.5vw;">
销售价格
<text class="j"></text><text class="sb jj">0.26 </text>
<!-- <text class="j"></text><text class="sb jj">0.26 </text> -->
</view>
</view>
<view class="hezi">
<view>
{{ cardvalue.wlunits }}
</view>
<text>采购单位</text>
</view>
<view class="hezi">
<view style="padding-left: 0.3vw;">
<image src="/static/index/material/edr.png" mode="aspectFill"></image>
{{ cardvalue.xsdw }}
<!-- <image src="/static/index/material/edr.png" mode="aspectFill"></image> -->
</view>
<text>采购单位</text>
<text>销售单位</text>
</view>
</view>
</view>
</view>
<view class="btn">
<view class="qx" @click="emit('close')">取消</view>
<view class="qd">确认</view>
<view class="qd" @click="successchange">确认</view>
</view>
<view class="mengban" style="z-index: 1;" v-if="opencal" @click="opencal=false"></view>
<view class="cal-view" :style="opencal?{}:{bottom:`-1200rpx`}">
<calculator :show="true" :translateNumber="translateNumber" @right="rightchange" @close="opencal=false">
</calculator>
</view>
</view>
<view class="mengban" v-if="sxd" @click="sxd = false"> </view>
<sxds :show="sxd" @close="sxd = false"></sxds>
<!-- <view class="mengban" style="z-index: 119;" v-if="true"></view> -->
<errorshow :show="openerror" :font="errmsg" @close="openerror=false" />
<!-- <calculator :show="addflag" @jjnum="jjnum" :caigouobj="caigouobj" @colse="qk" @right="right"></calculator> -->
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
import sxds from './sxd.vue'
const props = defineProps({
show: {
type: Boolean
},
})
const sxd = ref(false)
const emit = defineEmits(['close' ])
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent, watch } from 'vue';
import sxds from './sxd.vue'
import calculator from './calculator.vue'
import { editXsjg } from '../api/api.js'
const props = defineProps({
show: {
type: Boolean
},
cardvalue: {
type: Object
}
})
watch(
() => props.show,
() => {
changethenvalue.value = -998;
opencal.value = false
}
)
const sxd = ref(false)
const emit = defineEmits(['close', 'finishit'])
const serverUrl = uni.getStorageSync('serverUrl') + '/sys/common/static/';
const opencal = ref(false);
const translateNumber = ref(0)
const openerror = ref(false)
const errmsg = ref('')
const openCalcul = () => {
opencal.value = true;
translateNumber.value = -63.21
nextTick(() => {
if (changethenvalue.value == -998) {
translateNumber.value = Number(props.cardvalue.xsjg)
} else {
translateNumber.value = Number(changethenvalue.value)
}
})
}
const changethenvalue = ref(-998)
const rightchange = (price : number) => {
changethenvalue.value = price
console.log("right", price)
opencal.value = false
}
const successchange = () => {
if (changethenvalue.value == -998) {
emit('close')
} else {
let data = {
id: props.cardvalue.id,
xsjg: changethenvalue.value
}
editXsjg(data).then((res : any) => {
if (res.success) {
console.log("看看改成啥了", res)
emit("finishit")
emit('close')
} else {
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
}
})
// console.log("data", data)
}
}
</script>
<style lang="less" scoped>
.mengban{
.mengban {
width: 100vw;
height: 100vh;
position: fixed;
@ -124,196 +199,241 @@
left: 0;
z-index: 1010;
}
.box{
width: 0;
height: 100vh;
background: #FFFFFF;
position: fixed;
top: 0;
right: 0;
z-index: 1001;
overflow: hidden;
border-radius: 3vw 0 0 3vw;
padding: 3vw;
.btn{
position: absolute;
right: 3.5vw;
bottom: 2.7vw;
display: flex;
justify-content: flex-end;
view{
width: 8vw;
height: 3.4vw;
border-radius: 1.1vw;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
margin-left: 1vw;
}
.qd{
background: #57A8FA;
color: #FFFFFF;
}
.qx{
background: #E1F0FF;
color: #555555;
}
}
.list::after{
content: '';
width: 1rpx;
height: 15vw;
background: #D2D2D2;
position: absolute;
top: 4vw;
left: 39.7vw;
}
.list{
width: 71.9vw;
height: 21.5vw;
.box {
width: 0;
height: 100vh;
background: #FFFFFF;
border-radius:2.2vw;
border: 1px solid #D2D2D2;
margin-top: 1.7vw;
padding: 1.8vw 2.3vw 0;
position: relative;
.contents{
width: 100%;
height: 16vw;
position: fixed;
top: 0;
right: 0;
z-index: 1001;
overflow: hidden;
border-radius: 3vw 0 0 3vw;
padding: 3vw;
.btn {
position: absolute;
right: 3.5vw;
bottom: 2.7vw;
display: flex;
.righs{
width: 30vw;
height: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 3vw;
.s{
color: #FF5B5B !important;
margin: 0 0.5vw;
}
.j{
color: #0385FA !important;
margin: 0 0.5vw;
}
.ss{
background: #FF5B5B !important;
}
.jj{
background: #0385FA !important;
}
.sb{
width: 4.8vw;
height: 2.1vw;
border-radius: 0.5vw;
font-weight: 400;
font-size: 1.4vw;
color: #FFFFFF !important;
display: flex;
justify-content: center;
align-items: center;
}
.hezi{
width: 14vw;
height: 70rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
white-space: nowrap;
>view{
font-size: 2.2vw;
color: #333333;
display: flex;
align-items: flex-end;
font-weight: bold;
height: 2.4vw;
white-space: nowrap;
text{
font-size: 1.4vw;
line-height: 2.3vw;
}
image{
width: 1.4vw;
height: 1.4vw;
position: relative;
top:-0.4vw;
}
}
.jg{
font-size: 1.3vw;
color: #888888;
white-space: nowrap;
}
}
}
}
.cgdh{
width: 100%;
height: 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
white-space: nowrap;
.zc{
font-size: 1.5vw;
color: #777777;
display: flex;
align-items: center;
view{
margin-left: 4.5vw;
text{
font-weight: bold;
font-size: 2vw;
color: #222222;
}
}
}
.sxd{
width: 5.5vw;
height: 2.4vw;
background: #FFFFFF;
border-radius: 0.9vw;
border: 1px solid #0385FA;
font-size: 1.2vw;
color: #0385FA;
justify-content: flex-end;
view {
width: 8vw;
height: 3.4vw;
border-radius: 1.1vw;
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
margin-left: 1vw;
}
.qd {
background: #57A8FA;
color: #FFFFFF;
}
.qx {
background: #E1F0FF;
color: #555555;
}
}
}
.gys{
font-weight: bold;
font-size: 1.4vw;
color: #777777;
margin-top: 2.3vw;
}
.title{
font-size: 1.7vw;
color: #222222;
display: flex;
align-items: center;
view{
width: 0.5vw;
height: 1.4vw;
background: radial-gradient( 0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
.list::after {
content: '';
width: 1rpx;
height: 15vw;
background: #D2D2D2;
position: absolute;
top: 4vw;
left: 39.7vw;
}
.list {
width: 71.9vw;
height: 21.5vw;
background: #FFFFFF;
border-radius: 2.2vw;
border: 1px solid #D2D2D2;
margin-top: 1.7vw;
padding: 1.8vw 2.3vw 0;
position: relative;
.contents {
width: 100%;
height: 16vw;
display: flex;
.righs {
width: 30vw;
height: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 3vw;
.s {
color: #FF5B5B !important;
margin: 0 0.5vw;
.info-text {
color: #fff;
background-color: #FF5B5B;
padding-left: 0.3vw;
padding-right: 0.5vw;
border-radius: 10rpx;
}
}
.j {
color: #0385FA !important;
margin: 0 0.5vw;
.info-text {
color: #fff;
background-color: #0385FA;
padding-left: 0.3vw;
padding-right: 0.5vw;
border-radius: 10rpx;
}
}
.ss {
background: #FF5B5B !important;
}
.jj {
background: #0385FA !important;
}
.sb {
width: 4.8vw;
height: 2.1vw;
border-radius: 0.5vw;
font-weight: 400;
font-size: 1.4vw;
color: #FFFFFF !important;
display: flex;
justify-content: center;
align-items: center;
margin-left: 0.5vw;
}
.hezi {
width: 14vw;
height: 70rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
white-space: nowrap;
>view {
font-size: 2.2vw;
color: #333333;
display: flex;
align-items: flex-end;
font-weight: bold;
height: 2.4vw;
white-space: nowrap;
text {
font-size: 1.4vw;
line-height: 2.3vw;
}
image {
width: 1.4vw;
height: 1.4vw;
position: relative;
top: -0.4vw;
}
}
.jg {
font-size: 1.3vw;
color: #888888;
white-space: nowrap;
}
}
}
}
.cgdh {
width: 100%;
height: 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
white-space: nowrap;
.zc {
font-size: 1.5vw;
color: #777777;
display: flex;
align-items: center;
view {
margin-left: 4.5vw;
text {
font-weight: bold;
font-size: 2vw;
color: #222222;
}
}
}
.sxd {
width: 5.5vw;
height: 2.4vw;
background: #FFFFFF;
border-radius: 0.9vw;
border: 1px solid #0385FA;
font-size: 1.2vw;
color: #0385FA;
display: flex;
justify-content: center;
align-items: center;
}
}
}
.gys {
font-weight: bold;
font-size: 1.4vw;
color: #777777;
margin-top: 2.3vw;
}
.title {
font-size: 1.7vw;
color: #222222;
display: flex;
align-items: center;
view {
width: 0.5vw;
height: 1.4vw;
background: radial-gradient(0% 0% at 0% 0%, #006DC9 7.25%, #0385FA 100%), #F7F7F7;
border-radius: 0.2vw;
margin-right: 1vw;
}
}
}
}
.guodu {
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
.carditem {
height: 100%;
width: 39.7vw;
@ -323,6 +443,7 @@
margin-top: 2vw;
justify-content: space-between;
padding-right: 1.8vw;
.msitem {
min-width: 23vw;
height: 14vw;
@ -330,7 +451,9 @@
display: flex;
flex-direction: column;
justify-content: space-around;
>view {
&:nth-child(2),
&:nth-child(3),
&:nth-child(4),
@ -341,7 +464,7 @@
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text {
font-weight: 400;
font-size: 1.3vw;
@ -349,14 +472,14 @@
margin-top: 0.25vw;
}
}
&:nth-child(1) {
display: flex;
justify-content: space-between;
align-items: center;
height: 2vw;
margin-top: 1vw;
>view {
width: 19vw;
height: 2vw;
@ -367,7 +490,7 @@
overflow: hidden;
white-space: nowrap;
}
text {
width: 6vw;
font-weight: 300;
@ -376,9 +499,9 @@
}
}
}
}
// .spleft{
// margin-left: -15vw !important;
// }
@ -389,7 +512,7 @@
flex-direction: column;
justify-content: center;
align-items: center;
.cardp {
width: 12.5vw;
height: 4vw;
@ -397,7 +520,7 @@
flex-wrap: wrap;
margin: 0 auto;
align-items: center;
view {
min-width: 5.5vw;
height: 1.8vw;
@ -411,7 +534,7 @@
font-size: 1vw;
color: #555555;
padding: 0 0.25vw;
&:nth-child(1),
&:nth-child(2) {
max-width: 6vw;
@ -422,7 +545,7 @@
line-height: 1.8vw;
text-align: center;
}
&:nth-child(3) {
max-width: 11.5vw;
padding: 0 0.8vw;
@ -435,7 +558,7 @@
}
}
}
.imghs {
width: 10vw;
height: 10vw;
@ -443,14 +566,24 @@
padding: 0.2vw;
background: #fff;
border-radius: 1.1vw;
>image {
width: 100%;
height: 100%;
border-radius: 1.1vw;
}
}
}
}
</style>
.cal-view {
position: absolute;
bottom: 70rpx;
left: 400rpx;
width: 800rpx;
height: 1000rpx;
transition: bottom 0.3s ease;
z-index: 2;
}
</style>

View File

@ -1,37 +1,36 @@
<template>
<view>
<view class="jsuq guodu" >
<view class="jsuq guodu">
<view class="leftsa">
<view class="shu">数量</view>
<view class="jiajian">
<view :class="pddType!='3'? `jj`:`jj-bad`" @click="jjnum(-1)" @touchstart="handleTouchStart(-1)" @touchend="handleTouchEnd">
<view class="shu">盘点数量</view>
<view :class="pddType!='3'? `stringShow-kuai`:`stringShow-kuai-bad`" class="kuai-margin">
<view v-for="(item,index) in stringShow" :key="index">
{{item}}
</view>
</view>
<view class="jiajian">
<view :class="pddType!='3'? `jj`:`jj-bad`" @click="jjnum(-1)" @touchstart="handleTouchStart(-1)"
@touchend="handleTouchEnd">
-
</view>
<view :class="pddType!='3'? `stringShow-kuai`:`stringShow-kuai-bad`">
<view v-for="(item,index) in stringShow" :key="index">
{{item}}
</view>
</view>
<view :class="pddType!='3'? `jj`:`jj-bad`" @click="jjnum(1)" @touchstart="handleTouchStart(1)" @touchend="handleTouchEnd">
<view :class="pddType!='3'? `jj`:`jj-bad`" @click="jjnum(1)" @touchstart="handleTouchStart(1)"
@touchend="handleTouchEnd">
+
</view>
</view>
<!-- <view class="jiajian"> </view> -->
</view>
<view class="rigsbt">
<view class="calculator-father">
<view v-for="(item,index) in calculatorArray" :key="index">
<view :class="pddType!='3'?`calculator-kuai`:`calculator-kuai-bad`" v-if="item==`AC`" @click="clickKuai(item,index)">
<view :class="pddType!='3'?`calculator-kuai`:`calculator-kuai-bad`" v-if="item==`AC`"
@click="clickKuai(item,index)">
<image src="/static/cleanone.png" mode="aspectFill"
style="width: 50%;height: 50%;margin-left: -5rpx;"></image>
</view>
<view :class="pddType!='3'?`calculator-kuai`:`calculator-kuai-bad`" v-else-if="item==`AE`" style="font-size: 1.2vw;color: #0385FA;"
<view :class="pddType!='3'?`calculator-kuai`:`calculator-kuai-bad`" v-else
@click="clickKuai(item,index)">
同步
</view>
<view :class="pddType!='3'?`calculator-kuai`:`calculator-kuai-bad`" v-else @click="clickKuai(item,index)">
{{item}}
</view>
@ -43,11 +42,8 @@
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
const stringShow = ref("0000");
const relNumber = ref(0);
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "AC", "AE"];
import { ref, watch, onBeforeUnmount } from 'vue'
const props = defineProps({
show: {
type: Boolean
@ -59,117 +55,228 @@
type: Number
},
pdsl: {
type: Number
type: [Number, String]
},
pddType: {
type: String
},
// pz:{
// // type: Boolean
// },
});
watch(() => props.show,
pushnumber: {
type: Number,
default: 0
}
})
const emit = defineEmits(['pddjjnum'])
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, ".", "AC"]
const MAX_INT = 4
const MAX_DEC = 2
const MAX_VALUE = 9999.99
//
const inputValue = ref('0')
//
const stringShow = ref('0')
const isZero = ref(false)
function formatDisplay(raw : string) {
const [intRaw = '0', decRaw = ''] = String(raw ?? '0').split('.')
// 4 0
const intPart = intRaw.replace(/\D/g, '').padStart(4, '0').slice(-4)
// 2 0
const decPart = decRaw.replace(/\D/g, '').padEnd(2, '0').slice(0, 2)
return `${intPart}.${decPart}`
}
function normalizeInput(raw : string) {
let v = String(raw ?? '').replace(/[^\d.]/g, '')
//
if (!v) return '0'
if (v === '.') return '0.'
//
const dotIndex = v.indexOf('.')
if (dotIndex !== -1) {
const intRaw = v.slice(0, dotIndex)
const decRaw = v.slice(dotIndex + 1)
let intPart = intRaw.replace(/^0+(?=\d)/, '')
if (intPart === '') intPart = '0'
intPart = intPart.slice(0, MAX_INT)
const decPart = decRaw.slice(0, MAX_DEC)
return `${intPart}.${decPart}`
}
let intPart = v.replace(/^0+(?=\d)/, '')
if (intPart === '') intPart = '0'
return intPart.slice(0, MAX_INT)
}
function setValue(raw : string) {
inputValue.value = normalizeInput(raw)
stringShow.value = formatDisplay(inputValue.value)
emit('pddjjnum', Number(inputValue.value || 0))
}
watch(
() => props.show,
() => {
if (props.show == true) {
relNumber.value = props.pdsl ? props.pdsl : 0;
stringShow.value = toFixed4ByPadStart(relNumber.value);
if (props.show) {
setValue(String(props.pdsl ?? 0))
isZero.value = false
} else {
relNumber.value = 0;
stringShow.value = toFixed4ByPadStart(relNumber.value)
setValue('0')
}
})
const emit = defineEmits(['pddjjnum'])
const isZero = ref(false);
const clickKuai = (item : any, index : number) => {
if (props.pddType != '1') { return }
if (item == "AE") {
relNumber.value = props.tb;
stringShow.value = toFixed4ByPadStart(relNumber.value);
emit('pddjjnum', relNumber.value, props.idex);
return
}
if (item == "AC") {
relNumber.value = Math.trunc(relNumber.value / 10)
stringShow.value = toFixed4ByPadStart(relNumber.value);
emit('pddjjnum', relNumber.value, props.idex);
return
}
if (isZero.value == false) {
isZero.value = true;
relNumber.value = item;
stringShow.value = toFixed4ByPadStart(relNumber.value);
emit('pddjjnum', relNumber.value, props.idex);
return
}
if (digitCountByString(relNumber.value) > 3) {
} else {
if (!relNumber.value) {
relNumber.value = item
} else {
relNumber.value = relNumber.value * 10 + item;
}
emit('pddjjnum', relNumber.value, props.idex);
stringShow.value = toFixed4ByPadStart(relNumber.value)
}
},
{ immediate: true }
)
watch(
() => props.pushnumber,
() => {
applyEcho()
},
{ immediate: true }
)
function applyEcho() {
// pushnumber pdsl
const echoValue = props.pushnumber?? 0
setValue(String(echoValue))
isZero.value = false
}
const InteroutId = ref(null)
let longPressTimer = null;
let longPressed = false;
function appendDigit(d : number) {
const digit = String(d)
const raw = inputValue.value
//
if (raw.includes('.')) {
const [intPart, decPart = ''] = raw.split('.')
if (decPart.length >= MAX_DEC) return
setValue(`${intPart}.${decPart}${digit}`)
return
}
// 0
if (raw === '0') {
setValue(digit === '0' ? '0' : digit)
return
}
// 4
if (raw.length >= MAX_INT) return
setValue(raw + digit)
}
function appendDot() {
if (inputValue.value.includes('.')) return
setValue(`${inputValue.value}.`)
}
function deleteOne() {
let raw = inputValue.value
if (!raw || raw === '0') {
setValue('0')
return
}
raw = raw.slice(0, -1)
//
if (raw.endsWith('.')) raw = raw.slice(0, -1)
if (!raw) raw = '0'
setValue(raw)
}
function stepChange(delta : number) {
let n = Number(inputValue.value || 0) + delta
if (Number.isNaN(n)) n = 0
// 9999.99 0
n = Math.min(MAX_VALUE, Math.max(0, Number(n.toFixed(2))))
setValue(String(n))
}
const clickKuai = (item : any) => {
if (props.pddType != '1') return
if (item === 'AC') {
deleteOne()
return
}
if (item === '.') {
appendDot()
return
}
if (item === 'AE') {
setValue(String(props.tb ?? 0))
return
}
appendDigit(Number(item))
}
const interoutId = ref<ReturnType<typeof setInterval> | null>(null)
let longPressTimer : ReturnType<typeof setTimeout> | null = null
let longPressed = false
const handleTouchStart = (e : number) => {
if (props.pddType != '1') { return }
longPressed = false;
if (props.pddType != '1') return
longPressed = false
if (longPressTimer) {
clearTimeout(longPressTimer);
longPressTimer = null;
clearTimeout(longPressTimer)
longPressTimer = null
}
longPressTimer = setTimeout(() => {
longPressTimer = null;
longPressed = true;
Interval(e)
}, 800); // 1000ms = 1s
longPressTimer = null
longPressed = true
interoutId.value = setInterval(() => {
jjnum(e)
}, 120)
}, 800)
}
const handleTouchEnd = () => {
if (longPressTimer) {
clearTimeout(longPressTimer);
longPressTimer = null;
// console.log(' 1 ');
return;
clearTimeout(longPressTimer)
longPressTimer = null
return
}
//
if (longPressed) {
// console.log('');
clearInterval(InteroutId.value);
longPressed = false; //
} else {
console.log('无效状态(通常不会到这)');
if (interoutId.value) {
clearInterval(interoutId.value)
interoutId.value = null
}
longPressed = false
}
}
const Interval = (e : number) => {
InteroutId.value = setInterval(() => {
jjnum(e);
}, 120);
}
const jjnum = (e : number) => {
if (props.pddType != '1') { return }
let num = 9999;
if (num <= relNumber.value && e == 1) { relNumber.value = num; return }
if (relNumber.value <= 0 && e == -1) { relNumber.value = 0; return }
relNumber.value += e;
stringShow.value = toFixed4ByPadStart(relNumber.value)
emit('pddjjnum', relNumber.value, props.idex)
}
function digitCountByString(n) {
const s = Math.abs(n).toString();
return s.length;
}
function toFixed4ByPadStart(n) {
const intPart = Math.floor(Math.abs(n));
return String(intPart).padStart(4, '0');
if (props.pddType != '1') return
stepChange(e)
}
onBeforeUnmount(() => {
if (longPressTimer) {
clearTimeout(longPressTimer)
longPressTimer = null
}
if (interoutId.value) {
clearInterval(interoutId.value)
interoutId.value = null
}
})
</script>
<style scoped lang="less">
@ -223,7 +330,8 @@
height: 4.2vw;
border-radius: 1.6vw;
}
.calculator-kuai-bad{
.calculator-kuai-bad {
display: flex;
justify-content: center;
align-items: center;
@ -259,14 +367,16 @@
.stringShow-kuai {
display: flex;
align-items: center;
width: 9vw;
justify-content: end;
width: 18vw;
padding: 0 1vw;
height: 3.4vw;
background: #F3F5F9;
border-radius: 1vw;
// color: #999;
color: black;
border: 1px solid #CBCFD0;
justify-content: space-around;
// justify-content: space-around;
box-shadow: 0rpx 0.1vw 0.3vw 0rpx rgba(140, 143, 153, 0.17) inset;
opacity: 0.6;
@ -276,40 +386,46 @@
align-items: center;
font-size: 1.7vw;
font-weight: 500;
width: 2.2vw;
width: 2.4vw;
height: 3.4vw;
}
}
.stringShow-kuai-bad {
display: flex;
align-items: center;
width: 9vw;
justify-content: end;
width: 18vw;
height: 3.4vw;
background: #F3F5F9;
border-radius: 1vw;
color: #999;
border: 1px solid #CBCFD0;
justify-content: space-around;
padding: 0 1vw;
box-shadow: 0rpx 0.1vw 0.3vw 0rpx rgba(140, 143, 153, 0.17) inset;
opacity: 0.6;
view {
display: flex;
justify-content: center;
align-items: center;
font-size: 1.7vw;
font-weight: 500;
width: 2.2vw;
width: 2.4vw;
height: 3.4vw;
}
}
.jiajian {
display: flex;
justify-content: space-between;
align-items: center;
.jj-bad{
width: 18vw;
// flex-direction: column;
.jj-bad {
width: 4.2vw;
height: 4.2vw;
margin: 0 0.4vw;
@ -350,4 +466,9 @@
}
}
.kuai-margin {
margin: 20rpx 0;
}
</style>

View File

@ -1,9 +1,10 @@
<template>
<view class="guodu" :style="!transition?'opacity: 0':'opacity: 1'" style="transition: opacity 1s ease;padding: 1.1vw;">
<view class="guodu" :style="!transition?'opacity: 0':'opacity: 1'"
style="transition: opacity 1s ease;padding: 1.1vw;">
<view class="serchs guodu" :style="'width:90vw'">
<view class="ipt">
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.wlParamInfo" @confirm="search" />
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.wlParamInfo"
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="inputValue.wlParamInfo" @confirm="search" />
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="inputValue.wlParamInfo"
@click="search(0)"></image>
</view>
<view @click="search" class="scr guodu">
@ -11,11 +12,11 @@
<image src="/static/index/procurement/shr.png" mode="aspectFill" class="shr"></image>
检索
</view>
<view class="shx guodu" @click="chongzhi"
<!-- <view class="shx guodu" @click="chongzhi"
v-if="form.categoryId!=''||form.wlParamInfo!=''||form.suppliers!=''">
<image src="/static/index/procurement/cz.png" mode="aspectFill"></image>
重置
</view>
</view> -->
<view class="back guodu" @click="crkshow = true">
出入库
</view>
@ -27,14 +28,17 @@
<view>暂无物料</view>
</view>
</view>
<carditem :InvoicingList="InvoicingList" @addcartory="addcartory" @scrolltolower="scrolltolower" lower-threshold="300"
:status="status" @crk="crk"></carditem>
<carditem :InvoicingList="InvoicingList" lower-threshold="300" @scrolltolower="scrolltolower" @crk="crk"
@finishit="finishit">
</carditem>
<!-- @addcartory="addcartory" @scrolltolower="scrolltolower" :status="status" -->
</view>
<gress :progress="percent" :thickness="0.8" style="position: fixed;bottom: 4.7vw;right: 1.3vw;z-index: 3;"></gress>
<gress :progress="percent" :thickness="0.8" style="position: fixed;bottom: 4.7vw;right: 1.3vw;z-index: 3;">
</gress>
<view class="mengban" v-if="crkshow" @click="crkshow = false"> </view>
<crkval :show="crkshow" @crk="crk"></crkval>
<view class="mengban" v-if="crkit" @click.stop="crkit = false" style="z-index: 102;"> </view>
<information :show="crkit" @close="crkit = false"></information>
<information :show="crkit" @close="crkit = false" :pushcrkitem="pushcrkitem" ></information>
</view>
</template>
@ -45,71 +49,122 @@
import gress from './component/gress.vue'
import crkval from './component/crkval.vue'
import information from './component/information.vue'
import { getCkWlList, getPdjd } from './api/api.js'
const percent = ref(0);
const crkit = ref(false)
const transition = ref(false)
const crkshow = ref(false)
const props = defineProps({
isShow: {
type: Boolean
},
});
watch(
() => props.isShow,
(newVal, oldVal) => {
if (!oldVal && newVal) {
transition.value = false;
setTimeout(()=>{
percent.value = 55
},1000)
setTimeout(() => {
transition.value = true;
}, 50)
} else {
transition.value = false;
}
console.log(transition.value)
}
)
const form = reactive({
nuId: uni.getStorageSync('nuId'),
pageNo: 1,
pageSize: 30,
categoryId: '',
typeId: '',
medicationId: '',
wlParamInfo: '',
isWaring: 0,
suppliers: ''
})
const ification = ref(false)
const InvoicingList = ref([{},{},{},{},{},{},]);
const search = (x : number) => {
if (x === 0) { form.wlParamInfo = '' }
form.pageNo = 1;
InvoicingList.value = [];
// queryInvo();
}
const crk = ()=>{
crkit.value = true
}
const chongzhi = () => {
form.categoryId = '';
form.typeId = '';
form.medicationId = '';
form.suppliers = '';
form.pageNo = 1;
form.wlParamInfo = '',
InvoicingList.value = [];
// classication.value.typescroll(1, -1, {});
// classication.value.qingkong();
// classication.value.config();
}
const crkit = ref(false)
const transition = ref(false)
const crkshow = ref(false)
const props = defineProps({
isShow: {
type: Boolean,
default: false
},
});
watch(
() => props.isShow,
(newVal, oldVal) => {
if (!oldVal && newVal) {
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
} else {
transition.value = false;
}
}
)
// const form = reactive({
// nuId: uni.getStorageSync('nuId'),
// pageNo: 1,
// pageSize: 30,
// categoryId: '',
// typeId: '',
// medicationId: '',
// wlParamInfo: '',
// isWaring: 0,
// suppliers: ''
// })
const ification = ref(false)
const InvoicingList = ref([]);
const search = (x : number) => {
if (x === 0) { inputValue.value.wlParamInfo = '' }
getCardArray()
}
const pushcrkitem = ref({})
const crk = (item:any) => {
// console.log("",item)
pushcrkitem.value = item
crkit.value = true
}
// const chongzhi = () => {
// // form.categoryId = '';
// // form.typeId = '';
// // form.medicationId = '';
// // form.suppliers = '';
// // form.pageNo = 1;
// // form.wlParamInfo = '',
// // InvoicingList.value = [];
// getCardArray()
// // classication.value.typescroll(1, -1, {});
// // classication.value.qingkong();
// // classication.value.config();
// }
//
const inputwhat = ref("")
//
const inputValue = ref({
pageNo: 1,
pageSize: 16,
nuId: uni.getStorageSync('nuId'),
wlParamInfo: ""
})
//
const getCardArray = () => {
inputValue.value.pageNo = 1;
addlock.value = false
getCkWlList(inputValue.value).then((res : any) => {
console.log("看看卡片列表",res.result.records)
InvoicingList.value = res.result.records
if (res.result.records.length != 16) {
addlock.value = true
}
})
}
//
const addlock = ref(false)
//
const scrolltolower = () => {
if (!addlock.value) {
inputValue.value.pageNo++
getCkWlList(inputValue).then((res : any) => {
InvoicingList.value.push(...res.result.records)
if (res.result.records.length != 16) {
addlock.value = true
}
})
}
}
//
const finishit = () => {
getCardArray();
getPdjd().then((res : any) => {
const total = Number(res.result.totalNum || 0)
const pd = Number(res.result.pdNum || 0)
percent.value = total === 0 ? 0 : Math.round((pd / total) * 100)
// console.log("", res.result)
})
}
onLoad(() => {
finishit()
})
</script>
<style lang="less" scoped>
.mengban{
.mengban {
width: 100vw;
height: 100vh;
position: fixed;
@ -118,18 +173,20 @@
left: 0;
z-index: 99;
}
.listcard {
.listcard {
width: 90vw;
height: calc(100vh - 4vw);
margin-top: 0.9vw;
// background-color: #fff;
position: relative;
.center {
display: flex;
justify-content: center;
align-items: center;
}
.contain-right-nomessage {
position: fixed;
top: 0;
@ -137,18 +194,19 @@
width: 91.2%;
height: 100vh;
border-radius: 30rpx;
z-index: 100;
z-index: -1;
.que {
width: 20vw;
height: 20vw;
margin-right: 12vw;
// margin: auto;
image {
width: 100%;
height: 100%;
}
view {
margin-top: -30rpx;
width: 100%;
@ -168,13 +226,14 @@
}
}
.serchs {
.serchs {
width: 100%;
height: 3.3vw;
border-radius: 1.6vw;
display: flex;
align-items: center;
position: relative;
z-index: 100;
.ipt {
display: flex;
@ -297,9 +356,10 @@
}
}
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>
</style>