This commit is contained in:
Teng 2025-11-17 16:28:12 +08:00
commit 438d101c0c
19 changed files with 2825 additions and 353 deletions

View File

@ -197,7 +197,7 @@
}
},
{
"path": "pages/Warehouse/purchaseorder",
"path": "pages/procurement/purchaseorder",
"style": {
"navigationStyle": "custom"
}

View File

@ -136,6 +136,14 @@ export const updateWarehouserEnabled = (params) => {
data: params,
})
}
//(业务)修改购物车请购信息
export const eddShoppingCartList = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/eddShoppingCartList`,
method: 'post',
data: params,
})
}
//(业务)获取物料分类树可采购的物料数量(仓库列表使用)
@ -154,4 +162,22 @@ export const getTreeDataWlnum = (params) => {
data: params,
})
}
//(业务)库存预警添加全部物料
export const addWaringAll = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/addWaringAll`,
method: 'post',
data: params,
})
}
// (业务)获取物料分类树可采购的物料数量(购物车列表使用)
export const getGwcTreeDataWlnum = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGwcTreeDataWlnum`,
method: 'get',
data: params,
})
}

View File

@ -8,64 +8,29 @@
<view>确认将所有未添加状态的库存预警物料添加至购物车中并且物料的采购数量为物料的库存上限-库存数量吗</view>
<view>
<view @click="$emit('back')">取消</view>
<view class="qd" @click="config()">确定</view>
<view class="qd" @click="add()">确定</view>
</view>
</view>
</view>
</template>
<script>
import { queryInvoicingList,addShoppingCartList } from '../api/lunpan.js'
import { addWaringAll } from '../api/lunpan.js'
export default {
props:{
show:false,
},
data() {
return {
Materialarr:[]
}
},
methods: {
config(){
let warn = {
nuId: uni.getStorageSync('nuId'),
pageSize: -1,
isWaring: 1
}
queryInvoicingList(warn).then(res => {
this.Material=res.result.records;
this.add()
})
},
add(){
let r = []
this.Material.forEach(item=>{
if(item.isAdd!=1){
let n = item.suppliers_dictText.split(/[, ]+/);
let id = item.suppliers.split(/[, ]+/);
let max = Number(item.upperLimit)- Number(item.kcsl);
let dt = {
nuId:uni.getStorageSync('nuId'),
purchaseQuantity:max,
suppliersId:id[0],
suppliersName:n[0],
wlId:item.wlId,
kcsl:item.kcsl,
wlUnits:item.materialUnits,
referenceUnitPrice:item.referenceUnitPrice,
dhbl:type.num
}
r.push(dt)
}
})
addShoppingCartList(r).then(res=>{
addWaringAll({nuId: uni.getStorageSync('nuId')}).then(res=>{
uni.showToast({
icon:res.success?'success':'none',
title:res.message
})
this.$emit('config')
setTimeout(()=>{
this.$emit('config')
},800)
})
}
}

View File

@ -51,8 +51,8 @@
<view class="dwdw" v-if="cgdwflag">
<view class="gysscrol">
<view v-for="(v,i) in cgdwarr" :key='i' :class="type.multiUnitType==v.multiUnitType?'acts':''"
@click="cd(v,i)" :style="v.unit&&v.num?'':'height:0 !important'">
<text v-if="v.unit&&v.num">{{v.unit}}</text><text v-if="v.unit&&v.num">{{v.num}}{{caigouobj.materialUnits}}</text>
@click="cd(v,i)" :style="v.unit&&v.num?'':'height:0 !important;margin-top:-0.5vw'">
<text v-if="v.unit&&v.num">{{v.unit}}</text><text v-if="v.unit&&v.num">{{v.num}}{{caigouobj.materialUnits}}</text>
<image src="/static/index/procurement/d.png" mode="aspectFill"></image>
</view>
</view>
@ -126,6 +126,7 @@
()=>props.show,
()=>{
if(props.show){
console.log(props.caigouobj)
let a = [
{
multiUnitType:1,
@ -146,11 +147,6 @@
num:1
}
];
a.forEach((v,i)=>{
if(v.price==null||!v.price){
a.splice(i,1)
}
})
type.value = a.find(item=>
item.multiUnitType == props.caigouobj.multiUnitType
);
@ -164,7 +160,12 @@
n.forEach((item,i)=>{
gysarr.value.push({'name':item,'id':id[i]})
})
jssl()
if(props.caigouobj.purchaseQuantity){
props.caigouobj.upperLimit=props.caigouobj.wlUpperLimit
huansuan(props.caigouobj.purchaseQuantity)
}else{
jssl()
}
}else{
gysflag.value = false;
cgdwflag.value = false;
@ -213,12 +214,14 @@
}, 300)
if (item == "AC") {
relNumber.value = 0;
stringShow.value = "0000"
stringShow.value = "0000";
cy()
return
}
if (item == "CE") {
relNumber.value = Math.trunc(relNumber.value / 10)
stringShow.value = toFixed4ByPadStart(relNumber.value)
stringShow.value = toFixed4ByPadStart(relNumber.value);
cy()
return
}

View File

@ -1,11 +1,16 @@
<template>
<view>
<!-- 购物车 -->
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()" enable-back-to-top>
<view class="box">
<view class="fler" v-for="(v,index) in InvoicingList" :key="index">
<scroll-view class="carditem guodu" @touchend="handleTouchEnd($event,v,index)"
<view class="fler" v-for="(v,index) in InvoicingList" :key="index" @click="v.flag=!v.flag">
<view class="jiao guodu">
<image :src="v.flag?'/static/index/procurement/lxz.png':'/static/index/procurement/jxz.png'" mode="aspectFill" class="jao guodu"></image>
<image src="/static/index/procurement/dh.png" mode="aspectFill" class="dui"></image>
</view>
<scroll-view class="carditem guodu " @touchend="handleTouchEnd($event,v,index)"
@touchstart="touchstart($event,v,index)" scroll-with-animation scroll-x="true"
:scroll-left="v.scrollleft" @scroll="scroll" >
:scroll-left="v.scrollleft" @scroll="scroll" :class="v.flag?'actve':''">
<view class="speitem guodu" >
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
@ -31,8 +36,12 @@
<text>供应商: {{v.suppliersName}}{{v.suppliersName}}</text>
</view>
<view>
<view style="align-items: flex-start;">
<text style="color: #1083F8;">{{v.purchaseQuantity}}</text>
<text style="color: #1083F8;">采购数量</text>
</view>
<view>
<text>{{v.kcsl}}</text>
<text>{{v.kcsl?v.kcsl:'0'}}</text>
<text>库存数量</text>
</view>
<view>
@ -49,8 +58,8 @@
<image class="guodu" :style="v.zk?'transform: rotate(180deg);':''" :src="'/static/index/procurement/l.png'" mode="aspectFill"></image>
</view>
<view class="zkadd guodu" :class="v.isAdd==1?'zkf':''">
<view @click.stop @touchend.stop>编辑</view>
<view @click.stop="addcar(v,index)" v-if="v.isAdd!=1" @touchend.stop>
<view @click.stop="addcar(v,index)" @touchend.stop>编辑</view>
<view @click.stop="del(v,index)" v-if="v.isAdd!=1" @touchend.stop>
<view>
<text>删除</text>
</view>
@ -82,11 +91,19 @@
required: true,
},
})
const emit = defineEmits(['addcartory', 'scrolltolower','addcar'])
const emit = defineEmits(['addcartory', 'scrolltolower','delindex'])
const serverUrl = ref('')
onMounted(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
})
const addcar = (v : any,i:number) => {
caigouobj.value = v;
caigouobj.value.index = i;
emit('addcartory', caigouobj.value)
}
const del = (v,i)=>{
emit('delindex',v,i)
}
const caigouobj = ref({})
const clkzk = (v : any, i : number) => {
// caigouobj.value = v;
@ -104,7 +121,6 @@
v.scrollleft = 150;
}
solleft(v,i)
// emit('addcar', caigouobj.value,obj)
}
const pageX = ref(0);
@ -172,22 +188,51 @@
}
.fler {
width: 47vw;
height: 18.2vw;
height: 17vw;
margin-bottom: 1.2vw;
border-radius: 1.6vw;
border: 2px solid rgba(245, 246, 248, 1);
position: relative;
.jiao{
width: 3.4vw;
height: 3.4vw;
position: absolute;
top: -2px;
left: 0;
z-index: 99;
.dui{
position: absolute;
width: 1.4vw;
height: 1.4vw;
top: 0.8vw;
left: 0.8vw;
z-index: 101;
}
.jao{
width: 3.4vw;
height: 3.4vw;
position: absolute;
top: 0;
left: 0;
z-index: 100;
}
}
}
}
.actve{
border: 2px solid #1083F8 !important;
}
.carditem {
width: 47vw;
height: 17vw;
width: calc(47vw - 4px);
height:calc(17vw - 4px) ;
background: rgba(245, 246, 248, 1);
border-radius: 1.6vw;
position: relative;
margin-bottom: 1.2vw;
display: flex;
overflow: hidden;
justify-content: flex-start;
white-space: nowrap;
border-radius: 1.6vw;
border: 2px solid rgba(245, 246, 248, 1);
.zkadd {
width: 14vw;
height: 100%;
@ -270,20 +315,21 @@
.msitem {
width: 25vw;
height: 100%;
padding: 1vw;
padding:0.5vw 1vw 1vw;
display: inline-block;
>view {
margin-top: 0.8vw;
&:nth-child(5) {
width: 100%;
width: 28vw;
height: 3.4vw;
display: flex;
justify-content: space-between;
position: relative;
left: 0;
>view {
width: 33.3%;
width: 25%;
height: 100%;
display: flex;
flex-direction: column;
@ -291,31 +337,13 @@
align-items: center;
&:nth-child(1) {
width: 30%;
text-align: left;
}
&:nth-child(2) {
width: 40%;
&:nth-child(2),&:nth-child(3),&:nth-child(4) {
text-align: center;
}
&:nth-child(3) {
width: 30%;
text-align: 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;
@ -388,13 +416,13 @@
display: inline-flex;
flex-direction: column;
position: relative;
top: -3.5vw;
.cardp {
width: 12.5vw;
height: 4vw;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
margin: 1vw auto 0;
align-items: center;
view {

View File

@ -1,16 +1,19 @@
<template>
<view>
<view class="ifclass guodu" :class="show?'':'unclass'">
<view class="ifclass guodu" :class="show?'':'unclass'">
<view class="gyss">
<view class="lef"> </view>
<view class="set" @click="selt = !selt">
<text :class="gysidnum>-1?'n':''">{{gysidnum>-1?gysarr[gysidnum].suppliersName:'请选择供应商'}}</text>
<image @click.stop="qingkong" class="guodu" :style="selt&&gysidnum==-1?'transform: rotate(180deg);':''"
:src="gysidnum<0?'/static/index/procurement/sj.png':'/static/index/procurement/x.png'" mode="aspectFill"></image>
<image @click.stop="qingkong" class="guodu"
:style="selt&&gysidnum==-1?'transform: rotate(180deg);':''"
:src="gysidnum<0?'/static/index/procurement/sj.png':'/static/index/procurement/x.png'"
mode="aspectFill"></image>
</view>
<view class="xuze guodu" :class="selt?'':'hei0'">
<scroll-view scroll-y="true" class="gysscrol guodu" :class="selt?'':'hei0'">
<view v-for="(v,i) in gysarr" :key='i' :class="gysidnum==i?'acts':''" @click="gysidnum=i;selt=false;getTreelnum()">
<scroll-view scroll-y="true" class="gysscrol guodu" :class="selt?'':'hei0'">
<view v-for="(v,i) in gysarr" :key='i' :class="gysidnum==i?'acts':''"
@click="gysidnum=i;selt=false;getTreelnum()">
<text>{{v.suppliersName}}</text>
<image src="/static/index/procurement/d.png" mode="aspectFill"></image>
</view>
@ -33,7 +36,7 @@
</text>
</view>
</scroll-view>
<scroll-view scroll-y="true" scroll-with-animation :scroll-top="scroll.scrolltop2"
class="scroll-Y scrl2">
<view :class="scroll.act2==i?'act':''" v-for="(v,i) in TreeData[scroll.act1]?.children"
@ -49,10 +52,10 @@
{{v.title}}
</view>
</scroll-view>
</view>
<view class="btnbotm">
<view class="bt" @click="typescroll(1,-1,{})" >重置</view>
<view class="bt" @click="typescroll(1,-1,{})">重置</view>
<view class="bt qd" @click="config">确定 <text v-if="num>0">{{num>99?'99+':num}}件物料</text></view>
</view>
</view>
@ -60,132 +63,179 @@
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,watch} from 'vue';
import { getMaterialTreeData , getTreeDataWlnum,getGysList} from '../api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
const scroll = reactive({ scrolltop1: 0, scrolltop2: 0, scrolltop3: 0, act1: -1, act2: -1, act3: -1 });
const TreeData = ref([]);
const gysarr = ref([]);
const gysidnum = ref(-1);
const serverUrl = ref('');
const selt = ref(false);
const emit = defineEmits(['confirm'])
const typescroll = (e : number, i : number, v : object) => {
if (e == 1) {
scroll.act2 = -1;
scroll.act3 = -1;
scroll.scrolltop2 = 0;
scroll.scrolltop3 = 0;
if (scroll.act1 == i) {
scroll.act1 = -1;
getTreelnum()
return
}
}
if (e == 2) {
scroll.act3 = -1;
scroll.scrolltop3 = 0;
}
if (e == 3) {
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, watch } from 'vue';
import { getMaterialTreeData, getTreeDataWlnum, getGysList, getGwcTreeDataWlnum, getGwcMaterialTreeData } from '../api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
const scroll = reactive({ scrolltop1: 0, scrolltop2: 0, scrolltop3: 0, act1: -1, act2: -1, act3: -1 });
const TreeData = ref([]);
const gysarr = ref([]);
const gysidnum = ref(-1);
}
scroll['act' + e] = i;
scroll['scrolltop' + e] = (i - 2) * 50;
const serverUrl = ref('');
const selt = ref(false);
const emit = defineEmits(['confirm'])
const typescroll = (e : number, i : number, v : object) => {
if (e == 1) {
scroll.act2 = -1;
scroll.act3 = -1;
scroll.scrolltop2 = 0;
scroll.scrolltop3 = 0;
if (scroll.act1 == i) {
scroll.act1 = -1;
getTreelnum()
return
}
}
if (e == 2) {
scroll.act3 = -1;
scroll.scrolltop3 = 0;
}
if (e == 3) {
}
scroll['act' + e] = i;
scroll['scrolltop' + e] = (i - 2) * 50;
getTreelnum()
}
onMounted(()=>{
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
getMaterial();
GysList()
})
const GysList =()=>{
getGysList().then(res=>{
console.log(res)
gysarr.value = res.result
})
}
const num = ref(0)
const getTreelnum = ()=>{
let obj= {
nuId:uni.getStorageSync('nuId'),
categoryId:scroll.act1>-1?TreeData.value[scroll.act1].categoryId:'',
typeId:scroll.act2>-1?TreeData.value[scroll.act1].children[scroll.act2].typeId:'',
medicationId:scroll.act3>-1?TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].key:'',
suppliers:gysidnum.value>-1? gysarr.value[gysidnum.value].suppliers:''
}
getTreeDataWlnum(obj).then(res=>{
num.value = res.result.totalSize;
})
}
const getMaterial = () => {
getMaterialTreeData({'nuId':uni.getStorageSync('nuId')}).then(res => {
TreeData.value = res.result;
getTreelnum()
})
}
const config =()=>{
let obj= {
categoryId:scroll.act1>-1?TreeData.value[scroll.act1].categoryId:'',
typeId:scroll.act2>-1?TreeData.value[scroll.act1].children[scroll.act2].typeId:'',
medicationId:scroll.act3>-1?TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].key:'',
suppliers:gysidnum.value>-1? gysarr.value[gysidnum.value].suppliers:''
}
emit('confirm',obj)
}
const props = defineProps({
show: {
type: Boolean,
default:false,
required: true,
},
})
watch(
()=>props.show,
()=>{
if(props.show==false){
}
onMounted(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
getMaterial();
GysList()
})
const GysList = () => {
getGysList().then(res => {
gysarr.value = res.result
})
}
const num = ref(0)
const getTreelnum = () => {
let obj = {
nuId: uni.getStorageSync('nuId'),
categoryId: scroll.act1 > -1 ? TreeData.value[scroll.act1].categoryId : '',
typeId: scroll.act2 > -1 ? TreeData.value[scroll.act1].children[scroll.act2].typeId : '',
medicationId: scroll.act3 > -1 ? TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].key : '',
suppliers: gysidnum.value > -1 ? gysarr.value[gysidnum.value].suppliers : ''
}
switch (props.typenum) {
case 0:
//
getTreeDataWlnum(obj).then(res => {
num.value = res.result.totalSize;
})
break;
case 1:
//
getGwcTreeDataWlnum(obj).then(res => {
num.value = res.result.totalSize;
})
break;
case 2:
break;
default:
break;
}
}
const getMaterial = () => {
switch (props.typenum) {
case 0:
//
getMaterialTreeData({ 'nuId': uni.getStorageSync('nuId') }).then(res => {
TreeData.value = res.result;
getTreelnum()
})
break;
case 1:
//
getGwcMaterialTreeData({ 'nuId': uni.getStorageSync('nuId') }).then(res => {
TreeData.value = res.result;
getTreelnum()
})
break;
case 2:
break;
default:
break;
}
}
const config = () => {
let obj = {
categoryId: scroll.act1 > -1 ? TreeData.value[scroll.act1].categoryId : '',
typeId: scroll.act2 > -1 ? TreeData.value[scroll.act1].children[scroll.act2].typeId : '',
medicationId: scroll.act3 > -1 ? TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].key : '',
suppliers: gysidnum.value > -1 ? gysarr.value[gysidnum.value].suppliers : ''
}
emit('confirm', obj)
}
const props = defineProps({
show: {
type: Boolean,
default: false,
required: true,
},
typenum: {
type: Number,
default: 0
}
})
watch(
() => props.show,
() => {
if (props.show == false) {
selt.value = false
}
})
const qingkong=()=>{
if(gysidnum.value>-1){
gysidnum.value = -1;
getTreelnum()
}
}
const qingkong = () => {
if (gysidnum.value > -1) {
gysidnum.value = -1;
getTreelnum()
}
}
</script>
<style scoped lang="less">
.gyss{
.gyss {
width: 100%;
height: 4vw;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
.hei0{
.hei0 {
height: 0 !important;
}
.xuze{
.xuze {
width: 23vw;
height: calc(85vh - 22vw);
background: #fff;
border-radius: 1.6vw;
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163,167,182,0.16);
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163, 167, 182, 0.16);
position: absolute;
top: 4vw;
right: 0;
z-index: 133;
.gysscrol{
.gysscrol {
width: 100%;
height: calc(85vh - 24vw);
.acts{
.acts {
color: #0385FA !important;
image{
image {
display: block;
}
}
view{
view {
display: flex;
justify-content: space-between;
align-items: center;
@ -194,10 +244,12 @@
color: #666666;
margin-bottom: 1.2vw;
padding: 0 1vw;
&:nth-child(1){
&:nth-child(1) {
margin-top: 0.9vw;
}
image{
image {
width: 1vw !important;
height: 0.7vw !important;
display: none;
@ -205,14 +257,16 @@
}
}
}
.lef{
.lef {
width: 6.7vw;
letter-spacing: 2px;
font-weight: 400;
font-size: 1.5vw;
color: #333333;
}
.set{
.set {
width: 23vw;
height: 3.8vw;
padding: 0 1.7vw;
@ -221,11 +275,13 @@
background: #F8F8FA;
border-radius: 1vw;
align-items: center;
image{
image {
width: 1.6vw;
height: 1.6vw;
}
text{
text {
font-weight: 300;
font-size: 1.4vw;
color: #999999;
@ -237,150 +293,169 @@
line-height: 1.5vw;
text-overflow: ellipsis;
}
.n{
.n {
color: #000;
}
}
}
.unclass{
.unclass {
top: -86vh !important;
}
.ifclass{
width: 36vw;
height: 85vh;
position: fixed;
z-index: 120;
background:rgba(255, 255, 255, 0.98);
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163,167,182,0.16);
border-radius: 1.6vw;
top: 10vh;
left: 32vw;
padding: 2.5vw 3vw;
.btnbotm{
width: 100%;
height: 4vw;
margin-top: 3vw;
display: flex;
justify-content: flex-end;
align-items: end;
.bt{
min-width: 8vw;
height: 3.8vw;
background: #EDEDEF;
border-radius: 1.6vw;
padding: 0 2vw;
margin-left: 1vw;
border: 1px solid #EDEDEF;
font-size: 1.8vw;
font-weight: 400;
color: #888888;
white-space: nowrap;
.ifclass {
width: 36vw;
height: 85vh;
position: fixed;
z-index: 120;
background: rgba(255, 255, 255, 0.98);
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163, 167, 182, 0.16);
border-radius: 1.6vw;
top: 10vh;
left: 32vw;
padding: 2.5vw 3vw;
.btnbotm {
width: 100%;
height: 4vw;
margin-top: 3vw;
display: flex;
justify-content: center;
align-items: center;
}
.qd{
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3,133,250,0.34);
color: #0385FA;
text{
font-size: 1.4vw;
}
}
}
.scroltype {
width: 100%;
height: calc(85vh - 22vw);
display: flex;
justify-content: space-around;
.scrl1{
width: 9vw;
view {
width: 8.8vw;
}
}
.scrl2,.scrl3{
width: 8vw;
view {
width: 7.7vw;
}
}
.scroll-Y {
width: 8.5vw;
height: calc(85vh - 22vw);
view {
width: 100%;
justify-content: flex-end;
align-items: end;
.bt {
min-width: 8vw;
height: 3.8vw;
background: #F5F5F8;;
border-radius: 1.9vw;
background: #EDEDEF;
border-radius: 1.6vw;
padding: 0 2vw;
margin-left: 1vw;
border: 1px solid #EDEDEF;
font-size: 1.8vw;
font-weight: 400;
font-size: 1.3vw;
color: #212327;
color: #888888;
white-space: nowrap;
display: flex;
justify-content: center;
align-items: center;
padding: 0 0.4vw;
margin-bottom: .8vw;
text-align: center;
}
.qd {
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3, 133, 250, 0.34);
color: #0385FA;
text {
white-space: nowrap;
}
>image {
width: 2vw;
height: 2vw;
font-size: 1.4vw;
}
}
.act {
background: #EAF5FF !important;
font-weight: 600;
color: #0385FA !important;
}
.scroltype {
width: 100%;
height: calc(85vh - 22vw);
display: flex;
justify-content: space-around;
.scrl1 {
width: 9vw;
view {
width: 8.8vw;
}
}
.scrl2,
.scrl3 {
width: 8vw;
view {
width: 7.7vw;
}
}
.scroll-Y {
width: 8.5vw;
height: calc(85vh - 22vw);
view {
width: 100%;
height: 3.8vw;
background: #F5F5F8;
border-radius: 1.9vw;
font-weight: 400;
font-size: 1.3vw;
color: #212327;
display: flex;
justify-content: center;
align-items: center;
padding: 0 0.4vw;
margin-bottom: .8vw;
text-align: center;
text {
white-space: nowrap;
}
>image {
width: 2vw;
height: 2vw;
}
}
.act {
background: #EAF5FF !important;
font-weight: 600;
color: #0385FA !important;
}
}
}
}
}
.toptype {
width: 100%;
height: 2vw;
display: flex;
justify-content: space-around;
margin: 1.4vw 0 .4vw 0;
.act {
background: rgba(255, 255, 255, 1) !important;
font-weight: 600;
color: #0385FA !important;
}
>view {
width: 7vw;
height: 1.9vw;
border-radius: 1vw;
.toptype {
width: 100%;
height: 2vw;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, .5);
border:1px solid rgba(255, 255, 255, .5);
font-weight: 400;
font-size: 1.2vw;
color: #333333;
padding: 0;
justify-content: space-around;
margin: 1.4vw 0 .4vw 0;
.act {
background: rgba(255, 255, 255, 1) !important;
font-weight: 600;
color: #0385FA !important;
}
>view {
width: 7vw;
height: 1.9vw;
border-radius: 1vw;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, .5);
border: 1px solid rgba(255, 255, 255, .5);
font-weight: 400;
font-size: 1.2vw;
color: #333333;
padding: 0;
}
}
}
.titletop{
width: 100%;
height: 2.5vw;
font-weight: 400;
font-size: 1.5vw;
color: #333333;
line-height: 2.5vw;
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>
.titletop {
width: 100%;
height: 2.5vw;
font-weight: 400;
font-size: 1.5vw;
color: #333333;
line-height: 2.5vw;
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>

View File

@ -0,0 +1,43 @@
<template>
<view>
<view class="que">
<image src="/static/index/procurement/que.png" mode="aspectFill"></image>
<view>{{cont}}</view>
</view>
</view>
</template>
<script>
export default {
props:{
cont:''
}
}
</script>
<style scoped lang="less">
.que{
width: 16.3vw;
height: 16.3vw;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
image{
width: 100%;
height: 100%;
}
view{
width: 100%;
text-align: center;
position: absolute;
bottom: 0.5vw;
left: 0;
font-weight: 300;
font-size: 1.4vw;
color: #555555;
}
}
</style>

View File

@ -0,0 +1,183 @@
<template>
<view>
<view class="zhezhao" v-show="open" @click="emit('back')">
<view class="neuro-box" @click.stop v-if="open">
<view class="button-father">
<view :class="buttonposition?`buttontarget button`:`button-white` " @click="emit('back')">
取消</view>
<view :class="!buttonposition?`buttontarget button`:`button-white` " @click="config()">确定</view>
</view>
<view class="card-font">
{{content}}
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, onMounted, onBeforeUnmount, computed, nextTick, defineProps, watch, onUnmounted ,defineEmits } from 'vue';
const emit = defineEmits(["back", "del"])
const props = defineProps({
open: {
type: Boolean,
required: true,
},
content: {
type: String
},
});
const buttonposition = ref(false)
const config = ()=>{
emit('del')
}
</script>
<style scoped lang="less">
.card-font {
margin-top: 70rpx;
width: 600rpx;
justify-content: center;
display: flex;
}
.button-white {
width: 40%;
border: 2rpx solid #c3cacd;
background: linear-gradient(to bottom, #f3f3f5, #dee4e9);
display: flex;
justify-content: center;
align-items: center;
font-size: 25rpx;
border-radius: 30rpx;
}
.button {
width: 40%;
background-color: #ddf0ff;
display: flex;
justify-content: center;
align-items: center;
color: #007CFF;
border: 1rpx solid #007CFF;
font-size: 25rpx;
border-radius: 30rpx;
}
.button-father {
position: absolute;
bottom: 60rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 60rpx;
display: flex;
justify-content: space-around;
padding: 0 50rpx;
}
.neuro-box {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
width: 400rpx;
height: 270rpx;
border-radius: 30rpx;
background-color: #fff;
display: flex;
flex-direction: column;
align-items: center;
z-index: 21;
padding: 0 10%;
z-index: 999;
}
.zhezhao {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 125;
}
.zerotarget {
--color: #99C9FD;
--thick: 2px;
--radius: 50rpx;
--outline-offset: 0rpx;
/* 外扩多少 */
/* 内层虚线(你现在用的) */
border-radius: var(--radius);
background-color: white;
/* 内部背景 */
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
/* 外层虚线:放在 outline不会影响元素尺寸 */
outline: var(--thick) dashed var(--color);
outline-offset: var(--outline-offset);
/* 保证文本 / 子元素在最上层 */
position: relative;
z-index: 0;
}
.firsttarget {
--color: #99C9FD;
--thick: 2px;
--radius: 50%;
--outline-offset: 0rpx;
/* 外扩多少 */
/* 内层虚线(你现在用的) */
border-radius: var(--radius);
background-color: white;
/* 内部背景 */
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
/* 外层虚线:放在 outline不会影响元素尺寸 */
outline: var(--thick) dashed var(--color);
outline-offset: var(--outline-offset);
/* 保证文本 / 子元素在最上层 */
position: relative;
z-index: 0;
}
.buttontarget {
--color: #99C9FD;
--thick: 2px;
--radius: 30rpx;
--outline-offset: 0rpx;
/* 外扩多少 */
/* 内层虚线(你现在用的) */
border-radius: var(--radius);
background-color: white;
/* 内部背景 */
animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1);
/* 外层虚线:放在 outline不会影响元素尺寸 */
outline: var(--thick) dashed var(--color);
outline-offset: var(--outline-offset);
/* 保证文本 / 子元素在最上层 */
position: relative;
z-index: 0;
}
@keyframes scalePulse {
0% {
transform: scale(1);
}
25% {
/* 先收缩一点点 */
transform: scale(0.94);
}
65% {
/* 再放大到略超出的感觉 */
transform: scale(1.08);
}
100% {
transform: scale(1);
}
}
</style>

View File

@ -0,0 +1,667 @@
<template>
<view>
<view class="purbox guodu" :style="show?'top:6vh':'top:-99vh'">
<view class="lfitem">
<scroll-view scroll-y="true" scroll-with-animation class="left-menu-scroll" :scroll-top="leftscrolltop" >
<view class="pls-card" v-for="(v,i) in generatedOrder" :key='i' @click="clickLeftMenu(i)"
:style="{borderColor: i==lefttarget? ``:`#fff`,marginTop:i==0?'2vw':'' }">
<view class="pls-card-title">
<view class="title-left">
{{v.cgdNo}}
</view>
<view class="title-right">
<text style="position: absolute;bottom: 4rpx;left: -30rpx;">
</text>
<view class="title-right-big">
{{v.totalPrice}}
</view>
<!-- <image class="title-right-img" src="/static/more.png" @click="openmore(i)" /> -->
</view>
</view>
<view class="pls-card-middle">
<view class="pls-card-middle-one">
<view class="middle-title">
{{v.qgDate}}
</view>
<view class="middle-heng-father">
<view class="middle-heng"
style="border-top-left-radius: 20rpx;border-bottom-left-radius: 20rpx;"></view>
<view class="middle-heng" style="border-radius: 20rpx;background-color: #1083F8;">
</view>
<!-- <view class="middle-heng" v-if="Number(v.status)<3 "
style="border-radius: 20rpx;background-color: #1083F8;"></view> -->
<view class="middle-ball"
:style="Number(v.status)<3?{backgroundColor: `#1083F8`}:{} "></view>
<!-- <view class="middle-ball" :style="{backgroundColor: `#1083F8`}"></view> -->
</view>
<view class="end-font">
<view :style="Number(v.status)<3?{color: `#1083F8`}:{} ">
采购
</view>
<view style="font-size: 25rpx;">
[ {{v.qgBy}} ]
</view>
</view>
</view>
<view class="pls-card-middle-one">
<view class="middle-title">
{{ Number(v.status)==1 ?``:v.jhTime }}
</view>
<view class="middle-heng-father">
<view class="middle-heng"></view>
<!-- <view class="middle-heng"
style="border-radius: 20rpx;background-color: #1083F8;width: 105%;margin-left: -5%;">
</view> -->
<view class="middle-heng" v-if="Number(v.status)==1 "
style="border-radius: 20rpx;background-color: #1083F8;width: 105%;margin-left: -5%;">
</view>
<view class="middle-ball"
:style="Number(v.status)==1 ?{backgroundColor: `#1083F8`}:{} ">
</view>
<!-- <view class="middle-ball" :style="{backgroundColor: `#1083F8`}"></view> -->
<view class="middle-ball"
:style="Number(v.status)==1 ?{backgroundColor: `#1083F8`}:{} ">
</view>
</view>
<view class="end-font">
<!-- <view class=""
:style="Number(v.status)<3 && Number(v.status)>0?{color: `#1083F8`}:{} ">
拣货
</view> -->
<view class="" :style="Number(v.status)==1 ?{color: `#1083F8`}:{}">
拣货
</view>
<view style="font-size: 25rpx;" v-if="Number(v.status)==1 ">
[ {{v.jhBy}} ]
</view>
</view>
</view>
<view class="pls-card-middle-one">
<view class="middle-title">
{{v.wjTime}}
</view>
<view class="middle-heng-father">
<view class="middle-heng"
style="border-top-right-radius: 20rpx;border-bottom-right-radius: 20rpx;">
</view>
<view class="middle-heng" v-if="Number(v.status)<3 && Number(v.status)>1 "
style="border-radius: 20rpx;background-color: #1083F8;width: 105%;margin-left: -5%;">
</view>
<view class="middle-ball"
:style="Number(v.status)<3 && Number(v.status)>1?{backgroundColor: `#1083F8`}:{} ">
</view>
</view>
<view class="end-font">
<view class=""
:style="Number(v.status)<3 && Number(v.status)>1?{color: `#1083F8`}:{} ">
完结
</view>
<view style="font-size: 25rpx;" v-if="Number(v.status)==2 ">
[ {{v.wjTime}} ]
</view>
</view>
</view>
</view>
<view class="pls-card-end">
<view class="end-left">
<image class="end-left-img" src="/static/shili.png" />
<view class="end-left-font">
{{v.gysName}}
</view>
</view>
<!-- <view :class="v?.cgdType=='9' ?`tag-fail`:`tag-success`">
{{ tagesstatues[Number(v.status)] }}
</view> -->
<view class="tag-success">
<text v-if="v.cgdType==0">待入库 </text>
<text v-if="v.cgdType==1">待完结 </text>
<text v-if="v.cgdType==2">巳完结 </text>
<text v-if="v.cgdType==9">作废 </text>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="rigitem">
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation enable-back-to-top @scroll="scroll" :scroll-top="scrolltoplist">
<view style="height:2vw;" ></view>
<view class="fler" v-for="(v,index) in generatedOrder[lefttarget]?.cgdInfoList" :key="index" >
<view class="speitem guodu" >
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
</image>
<view class="cardp">
<view v-if="v.categoryName">{{v.categoryName}}</view>
<view v-if="v.typeName">{{v.typeName}}</view>
<view v-if="v.medicationName">{{v.medicationName}}</view>
</view>
</view>
<view class="msitem guodu" >
<view>
<view>{{v.wlName}}</view>
<text>{{v.wlMaterialNo}}</text>
<text> <text class="q">{{v.totalPrice}}</text></text>
</view>
<view>
<text> 规格型号: {{v.wlSpecificationModel}}</text>
</view>
<view>
<text>采购单价: {{v.arrivalPrice?v.arrivalPrice:v.procurementPrice}}</text>
<text>采购单位: {{v.wlUnits}}</text>
</view>
<view></view>
<view>
<view style="align-items: flex-start;">
<text style="color: #1083F8;">{{v.purchaseQuantity}}</text>
<text style="color: #1083F8;">采购数量</text>
</view>
<view>
<text>{{v.kcsl?v.kcsl:'0'}}</text>
<text>库存数量</text>
</view>
<view>
<text>{{v.wlUpperLimit}}</text>
<text>物料上限 </text>
</view>
<view>
<text>{{v.wlLowerLimit}}</text>
<text> 物料下限</text>
</view>
</view>
</view>
</view>
<view style="height: 1.5vw;" v-if="generatedOrder[lefttarget]?.cgdInfoList.length>2"></view>
</scroll-view>
<view class="anniubtn">
<view class="gb" @click="emit('cloe')">取消</view>
<view class="scsgd" @click="connfig">生成采购单</view>
</view>
<!-- -->
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,defineComponent, watch} from 'vue';
import { generatedPurchaseViewOrder,generatedPurchaseOrder } from '../api/lunpan.js'
const emit = defineEmits(['cloe','config'])
const leftscrolltop = ref(0);
const scrolltoplist = ref(0);
const lefttarget = ref(0);
const form = reactive({
nuId: '',
pageNo: 1,
pageSize: 9,
categoryId: '',
typeId: '',
medicationId: '',
wlParamInfo: '',
cgdId: "",
isWaring: 0,
canpull: true
})
const props = defineProps({
arrlist: {
type: Array,
default:[]
},
show: {
type: Boolean,
default:false
}
})
const generatedOrder = ref([])
const serverUrl = ref('')
onMounted(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
})
watch(
()=>props.show,
()=>{
if(props.show==true){
console.log(props.arrlist)
generatedPurchaseViewOrder(props.arrlist).then(res=>{
console.log( res.result)
generatedOrder.value = res.result;
})
}
}
)
const oldscl = ref(0)
const scroll = (e)=>{
oldscl.value = e.detail.scrollTop
}
const clickLeftMenu = (index : any) => {
let num = Math.ceil((index + 1))
leftscrolltop.value = (num - 2) * 186;
lefttarget.value = index;
scrolltoplist.value = 0;
form.cgdId = generatedOrder.value[index].id
form.pageNo = 1
form.canpull = true;
scrolltoplist.value = oldscl.value;
nextTick(()=> {
scrolltoplist.value = 0
});
// console.log("!!!!",form)
}
const timerflag = ref(true);
const connfig = () =>{
if(timerflag.value==false){return}
timerflag.value = false;
generatedPurchaseOrder(generatedOrder.value).then(res=>{
uni.showToast({
icon:res.success?'success':'error',
title:res.message
})
setTimeout(()=>{
if(res.success){
emit('config')
timerflag.value = true;
}
},700)
})
}
</script>
<style scoped lang="less">
.anniubtn{
width: 100%;
height: 7vw;
display: flex;
justify-content: flex-end;
align-items: center;
.gb{
width: 10vw;
background: #EDEDEF;
color: #888888;
}
.scsgd{
width: 12vw;
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3,133,250,0.34);
color: #0385FA;
}
view{
display: flex;
justify-content: center;
align-items: center;
margin-right: 1vw;
border-radius: 1.6vw;
font-weight: 400;
font-size: 1.6vw;
height: 3.8vw;
}
}
.purbox{
width: 83vw;
height: 90vh;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(136,141,153,0.26);
border-radius: 1.6vw;
position: fixed;
top: 6vh;
left: 8.5vw;
z-index: 133;
display: flex;
overflow: hidden;
.lfitem{
width: 33vw;
height: 100%;
background: #EFF0F4;
}
.rigitem{
width: 50vw;
height: 100%;
background: #fff;
.crdcroll {
width: 100%;
height: calc(90vh - 7vw);
}
.actve{
border: 2px solid #1083F8 !important;
}
.fler {
width: 47vw;
height: 15.5vw;
border-radius: 1.6vw;
border: 2px solid #F9F9F9;
background: #F9F9F9;
position: relative;
margin: 0 auto 1.2vw;
display: flex;
overflow: hidden;
justify-content: flex-start;
white-space: nowrap;
.zkf {
width: 7vw;
right: -7vw;
}
.msitem {
width: 25vw;
height: 100%;
padding:0.5vw 1vw 1vw;
display: inline-block;
>view {
margin-top: 0.8vw;
&:nth-child(5) {
width: 28vw;
height: 3.4vw;
display: flex;
justify-content: space-between;
position: relative;
left: 0;
>view {
width: 25%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
align-items: center;
&:nth-child(1) {
text-align: left;
}
&:nth-child(2),&:nth-child(3),&:nth-child(4) {
text-align: center;
}
text {
&:nth-child(1) {
font-weight: bold;
font-size: 1.7vw;
color: #555555;
}
&:nth-child(2) {
font-weight: 400;
font-size: 1.1vw;
color: #999999;
}
}
}
}
&:nth-child(2),
&:nth-child(3),
&:nth-child(4){
display: flex;
justify-content: space-between;
text {
font-weight: 400;
font-size: 1.4vw;
color: #777777;
}
}
&:nth-child(1) {
width: 28vw;
display: flex;
justify-content: space-between;
align-items: center;
height: 2vw;
margin-top: 1vw;
white-space: nowrap;
>view {
width: 13vw;
height: 2vw;
font-weight: bold;
font-size: 1.6vw;
color: #222222;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
text {
width: 6vw;
font-weight: 300;
font-size: 1.4vw;
color: #222222;
white-space: nowrap;
.q{
color: #555555;
font-size: 1.6vw;
font-weight: 800;
}
}
}
}
}
// .spleft{
// margin-left: -15vw !important;
// }
.speitem {
width: 15vw;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
.cardp {
width: 12.5vw;
height: 4vw;
display: flex;
flex-wrap: wrap;
margin: 0vw auto 0;
align-items: center;
view {
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;
}
}
>image {
width: 10vw;
height: 9vw;
margin: 0.5vw auto 0;
}
}
}
}
}
.left-menu-scroll {
height: 100%;
width: 100%;
.pls-card {
width: 30vw;
height: 16.5vw;
border: #0f9fff 3rpx solid;
background-color: #fff;
border-radius: 40rpx;
margin: 0 auto 1.2vw;
padding: 0 30rpx;
position: relative;
.pls-card-title {
height: 5.5vh;
width: 100%;
display: flex;
justify-content: space-between;
align-items: flex-end;
.title-left {
font-weight: 600;
font-size: 32rpx;
}
.title-right {
display: flex;
align-items: flex-end;
font-size: 30rpx;
position: relative;
.title-right-big {
font-weight: 600;
font-size: 40rpx;
}
.title-right-img {
position: absolute;
right: -10rpx;
bottom: 6rpx;
width: 40rpx;
height: 40rpx;
}
}
}
.pls-card-middle {
width: 100%;
height: 11vh;
margin-top: 1vw;
// background-color: blue;
display: flex;
.pls-card-middle-one {
width: 33.3%;
height: 100%;
// background-color: yellow;
.middle-title {
width: 100%;
height: 2vh;
// background-color: #007CFF;
color: #888888;
text-align: center;
font-size: 25rpx;
}
.middle-heng-father {
width: 100%;
height: 4vh;
position: relative;
.middle-heng {
width: 100%;
height: 0.8vh;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
background-color: #EEEEEE;
}
.middle-ball {
width: 30rpx;
height: 30rpx;
background-color: #EEEEEE;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
}
}
.end-font {
width: 100%;
height: 6vh;
text-align: center;
color: #666666;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.pls-card-end {
width: 100%;
height: 7vh;
margin-top:0.5vw;
display: flex;
justify-content: space-between;
position: relative;
.end-left {
height: 100%;
display: flex;
align-items: center;
.end-left-img {
width: 30rpx;
height: 30rpx;
}
.end-left-font {
margin-top: 3rpx;
width: 400rpx;
// background-color: #007CFF;
// font-size: 26rpx;
color: #666666;
margin-left: 10rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.tag-fail {
width: 120rpx;
height: 50rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #FDEBEC;
color: #FF5757;
position: absolute;
right: -5rpx;
bottom: 20rpx;
}
.tag-success {
width: 120rpx;
height: 50rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #ECF6FF;
color: #1083F8;
position: absolute;
right: -5rpx;
bottom: 20rpx;
}
}
}
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>

View File

@ -82,7 +82,7 @@
<image src="/static/index/procurement/gc.png" mode="aspectFill"></image>
<text v-if="carnum>0">{{carnum>99?'99':carnum}}</text>
</view>
<view>
<view @click="uni.navigateTo({ url:'/pages/procurement/purchaseorder' })">
<image src="/static/index/procurement/cg.png" mode="aspectFill"></image>
</view>
</view>
@ -91,7 +91,7 @@
<calculator :show="addflag" @jjnum="jjnum" :caigouobj="caigouobj" @colse="qk" @right="right"></calculator>
<!-- 筛选 -->
<view class="mengban" v-if="ification" @click="qk"></view>
<classification @confirm="confirm" :show="ification"></classification>
<classification @confirm="confirm" :show="ification" :typenum="0"></classification>
<!-- more -->
<view class="mengban" v-if="Invenshow" @click="Invenshow = false;moredex=0"></view>
<Inventory @addcartory="addcartory" :show="Invenshow" :InvoicingList="Material"
@ -158,11 +158,9 @@
})
onLoad(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
queryInvo();
})
onShow(()=>{
shoppcar();
getWaringMaterial()
config()
})
const Material = ref([])
const getWaringMaterial=()=>{
@ -178,18 +176,22 @@
})
}
const config = ()=>{
warn.pageNo = 1;
Material.value = [];
getWaringMaterial();
moredex.value=0
form.pageNo=1;
warn.pageNo=1;
Material.value=[];
InvoicingList.value=[];
shoppcar();
queryInvo();
getWaringMaterial()
moredex.value=0;
shoppcar();
}
const carnum = ref(0)
const shoppcar=()=>{
let c = {
nuId: form.nuId,
pageNo: 1,
pageSize: 10
}
pageSize: 1 }
queryShoppingCartList(c).then(resr=>{
carnum.value = resr.result.total
})
@ -293,6 +295,7 @@
referenceUnitPrice:type.price,
dhbl:type.num
}
console.log(dt)
addShoppingCartList([dt]).then(res=>{
uni.showToast({
icon:res.success?'success':'none',

View File

@ -16,11 +16,11 @@
</view>
</view>
<view class="rightbtn">
<view>
<view @click="open = 1">
<image src="/static/index/procurement/del1.png" mode="aspectFill"></image>
清空
</view>
<view>
<view @click="caigouclk">
<image src="/static/index/procurement/procure01.png" mode="aspectFill"></image>
采购
</view>
@ -30,15 +30,36 @@
</view>
</view>
</view>
<carlist :InvoicingList="InvoicingList" :status="status"></carlist>
<carlist :InvoicingList="InvoicingList" :status="status" @delindex="opendelindex" @addcartory="addcartory"></carlist>
<equiment :open="open==1" @del="del()" @back="open = 0" :content="'是否清空购物车?'"></equiment>
<equiment :open="open==2" @del="delindex()" @back="open = 0" :content="'是否删除此物料?'"></equiment>
<!-- 筛选 -->
<view class="mengban" v-if="ification" @click="ification = false"></view>
<classification @confirm="confirm" :show="ification" :typenum="1"></classification>
<defaultr cont="暂无数据" v-if="status=='nomore'&&InvoicingList.length==0"></defaultr>
<view class="mengban" v-if="addflag" @click="addflag = false"></view>
<calculator :show="addflag" :caigouobj="caigouobj" @colse="addflag = false" @right="right"></calculator>
<purorder :arrlist="caigouarr" :show="caigouflag" @cloe="caigouflag = false" @config="configr"></purorder>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,defineComponent} from 'vue';
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import { queryShoppingCartList, getGwcMaterialTreeData, queryNuInfoByNuId, updateKfstatus,deleteQgInfoById,emptiedQgInfo ,queryWlInfoByWlId,generatedPurchaseOrder,generatedPurchaseViewOrder } from './api/lunpan.js'
import {eddShoppingCartList, queryShoppingCartList, getGwcMaterialTreeData, queryNuInfoByNuId, updateKfstatus,deleteQgInfoById,emptiedQgInfo ,queryWlInfoByWlId,generatedPurchaseOrder,generatedPurchaseViewOrder } from './api/lunpan.js'
import carlist from './components/carlist.vue';
import equiment from './components/equiment.vue';
import classification from './components/classification.vue'
import defaultr from './components/default.vue'
import calculator from './components/calculator.vue'
import purorder from './components/purorder.vue'
import config from '../../uni_modules/vk-uview-ui/libs/config/config.js';
const addflag = ref(false)
const ification = ref(false)
const caigouobj = ref({})
const form = reactive({
nuId: uni.getStorageSync('nuId'),
pageNo: 1,
@ -47,17 +68,18 @@
typeId: '',
medicationId: '',
wlParamInfo: '',
isWaring: 0
suppliers:''
})
const InvoicingList = ref([])
const status = ref('loading')
const open = ref(0)
onLoad(()=>{
queryInvo()
})
const queryInvo = () => {
queryShoppingCartList(form).then(res => {
res.result.records.forEach((item,i)=>{
item.flag = true;
item.flag = false;
item.zk = false;
item.scrollleft = 0;
})
@ -67,6 +89,32 @@
setout.value = (res.result.total == InvoicingList.value.length ? false : true)
})
}
const search = (x : number) => {
if (x === 0) { form.wlParamInfo = '' }
form.pageNo = 1;
InvoicingList.value = [];
queryInvo();
}
const addcartory =(e:any)=>{
console.log(e)
caigouobj.value = e;
addflag.value = true;
}
const confirm =(e:any)=>{
form.categoryId = e.categoryId;
form.typeId = e.typeId;
form.medicationId = e.medicationId;
form.suppliers = e.suppliers;
form.pageNo=1;
InvoicingList.value = [];
queryInvo();
ification.value = false
}
const configr=()=>{
caigouflag.value = false;
search(1)
}
let times = null;
const setout = ref(true)
const scrolltolower = (t:number) => {
@ -76,6 +124,98 @@
form.pageNo++;
queryInvo()
}
const del=()=>{
emptiedQgInfo().then(res=>{
if(res.success){
form.pageNo=1;
InvoicingList.value = [];
queryInvo()
}
open.value = 0;
// uni.showToast({
// icon:res.success?'success':'none',
// title:res.message
// })
})
}
const delobj = ref({})
const opendelindex=(v:any,i:number)=>{
open.value = 2;
v.index = i;
delobj.value = v;
}
const delindex =()=>{
let delstr = delobj.value.id;
deleteQgInfoById(delstr).then(res=>{
uni.showToast({
icon:res.success?'success':'none',
title:res.message
})
setTimeout(()=>{
if(res.success){
InvoicingList.value.splice(delobj.value.index,1);
open.value = 0;
}
},800)
})
}
const right = (n:number,nm:any,type:Object) => {
connfig(nm,n,type)
}
const timers = ref(true)
const connfig = (nm:any,num:Number,type:Object) =>{
if(timers.value==false){return}
timers.value=false;
let dt = {
nuId:form.nuId,
purchaseQuantity:num,
suppliersId:nm.id,
suppliersName:nm.name,
id:caigouobj.value.id,
wlId:caigouobj.value.wlId,
kcsl:caigouobj.value.kcsl,
wlUnits:type.unit,
referenceUnitPrice:type.price,
dhbl:type.num
}
console.log(dt)
eddShoppingCartList(dt).then(res=>{
uni.showToast({
icon:res.success?'success':'none',
title:res.message
})
setTimeout(()=>{
timers.value=true;
if(res.success){
addflag.value = false;
form.pageNo=1;
InvoicingList.value = [];
queryInvo();
}
},700)
})
}
const caigouflag = ref(false)
const caigouarr = ref([])
const caigouclk =()=>{
let arr = [];
InvoicingList.value.forEach(item=>{
if(item.flag){
arr.push(item)
}
})
caigouarr.value = arr;
if(arr.length==0){
uni.showToast({
title:'请选择物料!',
icon:'none'
})
return
}
caigouflag.value = true;
}
</script>
<style scoped lang="less">
@ -205,6 +345,15 @@
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
.mengban {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 90;
background: RGBA(239, 240, 244, 0.55);
}
</style>
<style>
page {

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,8 +1,8 @@
{
"hash": "411276bc",
"configHash": "6a46f7c8",
"hash": "9e248234",
"configHash": "17f5f5b6",
"lockfileHash": "285de26d",
"browserHash": "e7fc8171",
"browserHash": "f287ed85",
"optimized": {},
"chunks": {}
}

View File

@ -574,7 +574,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
)
]);
}
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/camera.nvue"]]);
const camera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/camera.nvue"]]);
export {
camera as default
};

View File

@ -577,7 +577,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
)
]);
}
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/hldy_app_mini/pages/fullcamera.nvue"]]);
const fullcamera = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/项目/hldy_app_mini/pages/fullcamera.nvue"]]);
export {
fullcamera as default
};