修改物料bug和样式,采购写了一点

This commit is contained in:
Teng 2026-04-28 17:25:32 +08:00
parent 2eb648b687
commit 563db5587e
7 changed files with 309 additions and 200 deletions

View File

@ -34,19 +34,34 @@
<view>{{ v.materialName }}</view>
</view>
<view style="margin-top: 1vw;">
<text style="white-space: nowrap;"> 物料编码: {{ v.materialNo }}</text>
<view class="left-text">
物料编码:
</view>
<text class="right-text"> {{ v.materialNo }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: {{ v.specificationModel }}</text>
<view class="left-text">
规格型号:
</view>
<text class="right-text"> {{ v.specificationModel }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 品牌型号{{ v.brandType }}</text>
<view class="left-text">
品牌型号:
</view>
<text class="right-text"> {{ v.brandType }}</text>
</view>
<view>
<text style="white-space: nowrap;"> 生产厂家{{ v.manufacturer }}</text>
<view class="left-text">
生产厂家:
</view>
<text class="right-text"> {{ v.manufacturer }}</text>
</view>
<view>
<text style="white-space: nowrap;"> {{ v.gysName }}</text>
<view class="left-text letter ">
供应商:
</view>
<text class="right-text"> {{ v.gysName }}</text>
</view>
</view>
<view class="zkadd guodu">
@ -131,7 +146,7 @@
}
// const caigouobj = ref({})
const addcar = (v : any, i : number) => {
console.log("看看值",v)
console.log("看看值", v)
cardvalue.value = v;
priceshow.value = true
// console.log("",i)
@ -240,7 +255,7 @@
.crdcroll {
width: 90vw;
height: calc(100vh - 5vw);
height: calc(100vh - 2vw);
.box {
width: 90vw;
@ -392,7 +407,8 @@
font-size: 32rpx;
border-radius: 12rpx;
}
.no-price{
.no-price {
position: absolute;
top: 80rpx;
right: 32rpx;
@ -406,6 +422,7 @@
font-size: 23rpx;
color: #FF6161;
}
.white-tag {
color: #666666;
/* 字体灰 */
@ -479,15 +496,29 @@
&:nth-child(5) {
margin-top: 0.25vw;
max-width: 25vw;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
display: flex;
// align-items: center;
font-weight: 400;
font-size: 1.3vw;
color: #777777;
margin-top: 0.25vw;
text {
font-weight: 400;
font-size: 1.3vw;
color: #777777;
margin-top: 0.25vw;
.left-text {
width: 140rpx;
}
.right-text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 320rpx;
}
.letter {
letter-spacing: 9.2rpx;
}
}

View File

@ -60,10 +60,10 @@
<view v-if="v.isAdd==1">已添加</view>
<image :src="'/static/index/procurement/+.png'" mode="aspectFill"></image>
</view> -->
<view class="zkadd guodu" >
<view class="zkadd guodu" v-if="v.isAdd!=1">
<!-- <view class="zkadd-white" style="background: #F1F1F1;" @click.stop="pandian(v,index)" @touchend.stop>盘点</view>
<view class="zkadd-white" @click.stop="crk(v,index)" @touchend.stop>出入库</view> -->
<view class="zkadd-blue" @click.stop="crk(v,index)" v-if="v.isAdd!=1" @touchend.stop>
<view class="zkadd-blue" @click.stop="crk(v,index)" @touchend.stop>
<view>
出入库
</view>
@ -221,7 +221,7 @@
}
.crdcroll {
width: 86vw;
height: calc(100vh - 6vw);
height: calc(100vh - 3vw);
margin-top: 0.3vw;
.box {
@ -257,7 +257,7 @@
// background-color: blue;
position: absolute;
top: -3vw;
right: -16vw;
right: -11vw;
z-index: 55;
>view {
@ -309,7 +309,7 @@
justify-content: center;
flex-direction: column;
align-items: center;
right: 2.6vw;
left: 32vw;
top: -1.5vw;
text{
font-weight: bold;
@ -399,7 +399,7 @@
}
.msitem {
min-width: 20vw;
width: 25vw;
height: 14vw;
margin-right: 4.2vw;
position: relative;

View File

@ -53,7 +53,7 @@
<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>
<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>
</view>
<view>
<text> {{ item.cgBy }}</text>

View File

@ -33,11 +33,16 @@
</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>
<!-- 出入库的遮罩 -->
<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" :pushcrkitem="pushcrkitem" ></information>
</view>
</template>

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

@ -0,0 +1,42 @@
// 引入 request 文件
import request from '@/request/index.js'
// 查询采购单列表
export const queryCgdList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/queryCgdList?nuId=${uni.getStorageSync('nuId')}&pageNo=${params.pageNo}&pageSize=10`,
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

@ -1,6 +1,7 @@
<template>
<view >
<view class="guodu contain" :style="!transition?'opacity: 0':'opacity: 1'" style="transition: opacity 1s ease;padding: 1.1vw;">
<view>
<view class="guodu contain" :style="!transition?'opacity: 0':'opacity: 1'"
style="transition: opacity 1s ease;padding: 1.1vw;">
<view class="contain-left">
<view class="title-input-father">
<input class="title-input" type="text" v-model="plzinfo.cgdParamInfo" maxlength="15"
@ -13,34 +14,33 @@
<view class="title-ball" @click="search();handleClick()">
<image class="title-ball-img" :src="imgSrc" mode="aspectFill"></image>
</view>
<view class="title-ball" >
<view class="title-ball">
<image class="title-ball-img" src="/static/index/procurement/sx.png" mode="aspectFill"></image>
</view>
</view>
<view class="left-selecttype">
<view :class="selectType===index?`selecttype-target`: `selecttype`" v-for="(item,index) in tagsarray"
@click="changetype(index)">
<view :class="selectType===index?`selecttype-target`: `selecttype`"
v-for="(item,index) in tagsarray" @click="changetype(index)">
{{ item }}
</view>
<view class="heng-blue" :style="{ left: `${ 11.6 + selectType * 18.5}%` }">
</view>
</view>
<view class="haventmessage" v-if=" selectType == 0">
<view class="haventmessage" v-if="!plsbuy.length">
<view class="que">
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
<view>暂无数据</view>
</view>
</view>
<view class="left-menu-father">
<scroll-view scroll-y="true" scroll-with-animation class="left-menu-scroll" :scroll-top="leftscrolltop"
@scrolltolower="plsbuytolower" :lower-threshold="400" lower-threshold="300">
<view class="pls-card" v-for="(v,i) in plsbuy" :key='i' @click="clickLeftMenu(i,v)" :style="{
borderColor: i === lefttarget ? '' : 'transparent',
}">
<scroll-view scroll-y="true" scroll-with-animation class="left-menu-scroll"
:scroll-top="leftscrolltop" @scrolltolower="plsbuytolower" :lower-threshold="400"
lower-threshold="300">
<view class="pls-card" v-for="(v,i) in plsbuy" :key='i' @click="clickLeftMenu(i)" :style="{
borderColor: i === lefttarget ? '' : 'transparent'}">
<!-- <view v-if="moreindex==i" class="more-father">
<view class="more-one" @click="share">
分享
@ -54,17 +54,17 @@
v-if="v.izNew=='Y'"></text>
<view class="pls-card-title">
<view class="title-left">
12313212313
{{ v.cgdNo }}
</view>
<view class="title-right">
<view :class="v?.cgdType=='9' ?`tag-fail`:`tag-success`">
{{ v?.cgdType=='9' ?`已作废`:'待完结' }}
</view>
<!-- <image class="title-right-img" src="/static/more.png" @click="openmore(i)" /> -->
</view>
</view>
<view class="pls-card-middle">
@ -74,7 +74,7 @@
2222.2222.22
</view>
<view class="middle-heng-father">
<image class="middle-ball-img" src="/static/index/requestform/isok.png" />
</view>
<view class="end-font">
@ -90,20 +90,21 @@
<view class="middle-title" :style=" v?.cgdType=='9' ?{color:`#FF5757`}:{}">
2026.03.03
<!--{{ v?.cgdType=='9' ?v.zfTime?.slice(0,10).replace(/-/g, '.'):Number(v.status)<1?``:v.jhTime?.slice(0,10).replace(/-/g, '.') }}-->
</view>
</view>
<view class="middle-heng-father">
<image class="middle-ball-img" style="width: 32rpx;height: 32rpx;"
v-if="v?.cgdType=='9'" src="/static/index/requestform/iserror.png" />
<view class="middle-ball" style="background-color: #1083F8;"
:style=" v?.cgdType=='9' ?{backgroundColor:`#FF5757`}:{}"
v-else-if="Number(v.status)<2"></view>
<image class="middle-ball-img" v-else src="/static/index/requestform/isok.png" />
<image class="middle-ball-img" v-else
src="/static/index/requestform/isok.png" />
</view>
<view class="end-font">
<view :style=" v?.cgdType=='9' ?{color:`#FF5757`}:{}">
{{ v?.cgdType=='9' ?`已作废`:`拣货` }}
</view>
<view v-if="v?.jhBy || v?.zfBy" :style=" v?.cgdType=='9' ?{color:`#FF5757`}:{}">
2026.03.03
@ -118,9 +119,10 @@
</view>
<view class="middle-heng-father">
<view class="middle-ball" v-if="Number(v.status)<2"></view>
<image class="middle-ball-img" v-else src="/static/index/requestform/isok.png" />
<image class="middle-ball-img" v-else
src="/static/index/requestform/isok.png" />
</view>
<view class="end-font">
<view>
@ -136,35 +138,35 @@
<view class="end-left">
<!-- <image class="end-left-img" src="/static/shili.png" /> -->
<view class="end-left-font">
吉林省捌零信创科技有限公司
{{ v.gysName }}
</view>
</view>
<view class="title-right-big">
<text>
</text>
<!-- {{ Number(v.totalPrice ) < 10000? Number(v.totalPrice).toFixed(2) : Number(v.totalPrice) }} -->
255
{{ Number(v.totalPrice).toFixed(2) }}
</view>
<!-- <view :class="v?.cgdType=='9' ?`tag-fail`:`tag-success`">
{{ v?.cgdType=='9' ?`已作废`:2222 }}
</view> -->
</view>
</view>
<view class="pls-card center" style="border-color: #fff;" v-if="plsbuy.length===1&&!shownomessage">
<view class="pls-card center" style="border-color: #fff;" v-if="plsbuy.length===1">
<view class="que">
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
<view>暂无数据</view>
</view>
</view>
<view class="pls-card center" style="border-color: #fff;" v-if="plsbuy.length===1&&!shownomessage">
<view class="pls-card center" style="border-color: #fff;" v-if="plsbuy.length===1">
<view class="que">
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
<view>暂无数据</view>
</view>
</view>
<view class="pls-card center" style="border-color: #fff;" v-if="plsbuy.length===2&&!shownomessage">
<view class="pls-card center" style="border-color: #fff;" v-if="plsbuy.length===2">
<view class="que">
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
<view>暂无数据</view>
@ -175,140 +177,159 @@
</view>
<view class="rightscon">
<contright @link="link" v-if="rightcat==0"></contright>
<procurement @link="link" v-if="rightcat==1"></procurement>
<carlist @link="link" v-if="rightcat==2"></carlist>
<caigoudan @link="link" v-if="lefttarget>=0" style="z-index: 9999;"></caigoudan>
<procurement @link="link" v-if="rightcat==1"></procurement>
<carlist @link="link" v-if="rightcat==2"></carlist>
<caigoudan @link="link" v-if="lefttarget>=0" style="z-index: 9999;"></caigoudan>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent, inject, watch } from 'vue';
import contright from './component/contright.vue';
import procurement from './component/procurement.vue';
import carlist from './component/carlist.vue';
import caigoudan from './component/caigoudan.vue';
const transition = ref(false)
const leftscrolltop = ref(0)
const lefttarget = ref(-1)
const tagsarray = ref(["全部", "待确认", "待完结", "待付款", "已完成"])
const selectType = ref(0)
const rightcat = ref(0)
const link = (e)=>{
console.log(e)
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent, inject, watch } from 'vue';
import { onLoad } from "@dcloudio/uni-app"
import contright from './component/contright.vue';
import procurement from './component/procurement.vue';
import carlist from './component/carlist.vue';
import caigoudan from './component/caigoudan.vue';
import { queryCgdList } from './api/api.js'
//
const inputValue = ref({
pageNo: 1,
})
//
const getCardArray = () => {
inputValue.value.pageNo = 1;
addlock.value = false
queryCgdList(inputValue.value).then((res : any) => {
console.log("看看卡片列表", res.result.records)
plsbuy.value = res.result.records
if (res.result.records.length != 10) {
addlock.value = true
}
})
}
//
const addlock = ref(false)
//
const scrolltolower = () => {
if (!addlock.value) {
inputValue.value.pageNo++
queryCgdList(inputValue).then((res : any) => {
plsbuy.value.push(...res.result.records)
if (res.result.records.length != 10) {
addlock.value = true
}
})
}
}
const transition = ref(false)
const leftscrolltop = ref(0)
const lefttarget = ref(-1)
const tagsarray = ref(["全部", "待确认", "待完结", "待付款", "已完成"])
const selectType = ref(0)
const rightcat = ref(0)
const link = (e) => {
console.log(e)
rightcat.value = e;
lefttarget.value =-1;
}
const clickLeftMenu =(e)=>{
lefttarget.value = e;
rightcat.value = -1;
}
const changetype = (index : number) => {
if ((selectType.value == index) && index) {
return
}
selectType.value = index
leftscrolltop.value = 0.01
setTimeout(() => {
leftscrolltop.value = 0
}, 50)
// lefttarget.value = 0
// plzinfo.pageNo = 1;
// plzinfo.canpull = true;
// switch (index) {
// case 0:
// plzinfo.status = `1,2,4,5`
// break
// case 1:
// plzinfo.status = `1`
// break
// case 2:
// plzinfo.status = `4`
// break
// case 3:
// plzinfo.status = `5`
// break
// case 4:
// plzinfo.status = `2`
// break
// }
}
const props = defineProps({
isShow: {
type: Boolean
},
});
watch(
() => props.isShow,
(newVal, oldVal) => {
if (!oldVal && newVal) {
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
} else {
transition.value = false;
}
console.log(transition.value)
}
)
const search = () => {}
const plzinfo = reactive({
nuId: uni.getStorageSync('nuId'),
pageNo: 1,
pageSize: 30,
canpull: true,
cgdParamInfo: ""
})
const setout = ref(true)
let times = null
const plsbuytolower = () => {
if (!setout.value) { return }
plzinfo.pageNo++;
// getqueryCgdList()
setout.value = false
times = setTimeout(() => {
setout.value = true
}, 500)
}
const plsbuy = ref([{cgdType:9},{},{}])
const basePath = '/static/index/procurement/' //
const imgNormal = basePath + 'sh.png'
const imgActive = basePath + 'shr.png'
const imgSrc = ref(imgNormal)
const busy = ref(false) //
function handleClick() {
if (busy.value) return
busy.value = true
// active
imgSrc.value = imgActive
setTimeout(() => {
imgSrc.value = imgNormal
busy.value = false
}, 300)
}
lefttarget.value = -1;
}
const clickLeftMenu = (e) => {
lefttarget.value = e;
leftscrolltop.value = (e - 1) * 186.5;
rightcat.value = -1;
}
const changetype = (index : number) => {
if ((selectType.value == index) && index) {
return
}
selectType.value = index
leftscrolltop.value = 0.01
setTimeout(() => {
leftscrolltop.value = 0
}, 50)
}
const props = defineProps({
isShow: {
type: Boolean
},
});
watch(
() => props.isShow,
(newVal, oldVal) => {
if (!oldVal && newVal) {
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
} else {
transition.value = false;
}
console.log(transition.value)
}
)
const search = () => { }
const plzinfo = reactive({
nuId: uni.getStorageSync('nuId'),
pageNo: 1,
pageSize: 30,
canpull: true,
cgdParamInfo: ""
})
const setout = ref(true)
let times = null
const plsbuytolower = () => {
if (!setout.value) { return }
plzinfo.pageNo++;
// getqueryCgdList()
setout.value = false
times = setTimeout(() => {
setout.value = true
}, 500)
}
const plsbuy = ref([])
const basePath = '/static/index/procurement/' //
const imgNormal = basePath + 'sh.png'
const imgActive = basePath + 'shr.png'
const imgSrc = ref(imgNormal)
const busy = ref(false) //
function handleClick() {
if (busy.value) return
busy.value = true
// active
imgSrc.value = imgActive
setTimeout(() => {
imgSrc.value = imgNormal
busy.value = false
}, 300)
}
onLoad(() => {
getCardArray()
})
</script>
<style lang="less" scoped>
.rightscon{
width: 62.5vw;
.rightscon {
width: 60vw;
height: 60.4vw;
background: #FFFFFF;
border-radius: 1.6vw;
margin-left: 1vw;
overflow: hidden;
}
.left-selecttype {
margin-top: 8rpx;
width: 98%;
@ -319,8 +340,8 @@
padding-right: 30rpx;
padding-left: 15rpx;
position: relative;
.heng-blue {
position: absolute;
bottom: 0;
@ -331,9 +352,9 @@
border-radius: 10rpx;
background-color: #1083F8;
transition: 0.3s all ease;
}
.selecttype {
width: 20%;
height: 100%;
@ -343,9 +364,9 @@
color: #999999;
font-size: 29rpx;
position: relative;
}
.selecttype-target {
width: 20%;
height: 100%;
@ -358,7 +379,8 @@
position: relative;
}
}
.contain {
.contain {
background-color: #f4f4f4;
// background-color:red;
width: 91vw;
@ -369,7 +391,7 @@
.contain-left {
height: 100vh;
width: 26vw;
min-width: 28vw;
overflow: hidden;
// background-color: green;
@ -428,7 +450,7 @@
.left-menu-father {
margin-top: 1.3vh;
width: 100%;
height: 89.5vh;
height: 83vh;
// background-color: #fff;
border-radius: 1.6vw;
@ -438,7 +460,7 @@
.pls-card {
width: 100%;
height: 386rpx;
height: 355rpx;
border: #0f9fff 4rpx solid;
background-color: #fff;
border-radius: 40rpx;
@ -465,6 +487,7 @@
align-items: flex-end;
font-size: 30rpx;
position: relative;
.tag-fail {
width: 120rpx;
height: 50rpx;
@ -476,7 +499,7 @@
color: #FF5757;
border: 1rpx solid #FF5757;
}
.tag-success {
width: 120rpx;
height: 50rpx;
@ -488,7 +511,7 @@
border: 1rpx solid #0385FA;
color: #1083F8;
}
.title-right-img {
position: absolute;
@ -500,7 +523,7 @@
}
}
}
.pls-card-middle {
width: 100%;
@ -581,18 +604,20 @@
.pls-card-end {
width: 100%;
height: 7vh;
margin-top: 1vh;
// margin-top: 1vh;
display: flex;
justify-content: space-between;
position: relative;
.title-right-big {
font-weight: 600;
font-size: 40rpx;
margin-right: 35rpx;
margin-right: 20rpx;
color: #555555;
display: flex;
align-items: center;
text{
text {
font-size: 30rpx
}
}
@ -609,7 +634,7 @@
.end-left-font {
margin-top: 3rpx;
width: 350rpx;
width: 400rpx;
// background-color: #007CFF;
// font-size: 26rpx;
color: #666666;
@ -620,14 +645,14 @@
}
}
}
}
}
}
}
}
.haventmessage {
width: 100%;
height: 51.9vw;
@ -638,17 +663,17 @@
border-radius: 1.6vw;
margin-top: 0.7vw;
}
.que {
width: 10vw;
height: 10vw;
// margin: auto;
image {
width: 100%;
height: 100%;
}
view {
margin-top: -30rpx;
width: 100%;
@ -658,4 +683,10 @@
color: #555555;
}
}
</style>
.center {
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@ -1,6 +1,6 @@
// 全局请求封装
export const base_url = 'https://www.focusnu.com/opeapi'
// export const base_url = 'http://192.168.2.27:8081/opeapi/'
// export const base_url = 'http://192.168.2.16:8081/opeapi/'
// const base_url = 'http://192.168.2.55:8081/opeapi'
export const media_url = 'https://www.focusnu.com/media/'
// 请求超出时间