样式就差退货了

This commit is contained in:
Teng 2026-02-12 16:14:54 +08:00
parent 520707401f
commit 4651bb437e
17 changed files with 746 additions and 563 deletions

View File

@ -183,7 +183,7 @@
</view> </view>
</view> </view>
<tanchuang :show="open==1" font="是否删除此图片" @back="open = 0" @right="del1()"> </tanchuang> <tanchuang :show="open==1" font="是否删除此图片" @back="open = 0" @right="del1()"> </tanchuang>
<view class="mengban" style="background: #fff;width:100vw;right:0;left: 0vw;top:-5vw;height: 110vh;" v-if="status=='nomore'&&plsbuy.length==0"> <view class="mengban" style="background: #fff;width:92vw;right:0;left: 8vw;top:-5vw;height: 110vh;" v-if="status=='nomore'&&plsbuy.length==0">
<defaultr cont="暂无数据" style="z-index: 999;margin: auto;top: 0;left:35vw;bottom: 0;right: 0;"></defaultr> <defaultr cont="暂无数据" style="z-index: 999;margin: auto;top: 0;left:35vw;bottom: 0;right: 0;"></defaultr>
</view> </view>
<severcard ></severcard> <severcard ></severcard>
@ -193,6 +193,8 @@
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue'; import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import {queryOrderList,queryOrderInfoList,startOrder,endOrder,editSubPicPath,editSubMp4} from './api/api.js' import {queryOrderList,queryOrderInfoList,startOrder,endOrder,editSubPicPath,editSubMp4} from './api/api.js'
import defaultr from '../nurse/component/default.vue'
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/') const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
const servervideoUrl = ref(uni.getStorageSync('serverUrl') + '/sys/commonVideo/staticVideo/') const servervideoUrl = ref(uni.getStorageSync('serverUrl') + '/sys/commonVideo/staticVideo/')
const form = reactive({ const form = reactive({
@ -220,6 +222,7 @@
} }
const firstgetqueryCgdList = () => { const firstgetqueryCgdList = () => {
queryOrderList(form).then(res => { queryOrderList(form).then(res => {
console.log("没数据啊",res)
plsbuy.value.push(...res.result.records); plsbuy.value.push(...res.result.records);
status.value = res.result.total == plsbuy.value.length ? 'nomore' : 'loadmore'; status.value = res.result.total == plsbuy.value.length ? 'nomore' : 'loadmore';
if(form.pageNo==1){ if(form.pageNo==1){

View File

@ -390,6 +390,7 @@
} }
const shtab = (e)=>{ const shtab = (e)=>{
fwzlindex.value = e; fwzlindex.value = e;
if(e==0){ if(e==0){
fwzlarr.value = zlarr.value?.hlList fwzlarr.value = zlarr.value?.hlList
} }
@ -400,6 +401,7 @@
fwzlarr.value = zlarr.value?.hqList fwzlarr.value = zlarr.value?.hqList
} }
fwzldex.value = -1 fwzldex.value = -1
console.log("数据呢啊",fwzlarr.value)
// console.log(zlarr.value,serverUrl.value) // console.log(zlarr.value,serverUrl.value)
} }
const zldex = (e) =>{ const zldex = (e) =>{
@ -570,6 +572,7 @@
const getmenu = () => { const getmenu = () => {
queryPadPageList().then((res => { queryPadPageList().then((res => {
leftMenuArray.value = res.result.records; leftMenuArray.value = res.result.records;
console.log("数据呢",res.result.records)
filteredMenu(0).forEach((element : any, index : number) => { filteredMenu(0).forEach((element : any, index : number) => {
if (element.nuId === uni.getStorageSync('NUall').nuId) { if (element.nuId === uni.getStorageSync('NUall').nuId) {
menutarget.value = index; menutarget.value = index;

View File

@ -317,6 +317,7 @@
const autoplay = ref(false) const autoplay = ref(false)
const severcards = ref<InstanceType<typeof ChildComponent>>() const severcards = ref<InstanceType<typeof ChildComponent>>()
const init = (e) => { const init = (e) => {
console.log("啥啊",e)
firstgetqueryCgdList(e); firstgetqueryCgdList(e);
setTimeout(() => { setTimeout(() => {
severcards.value.firstgetqueryCgdList() severcards.value.firstgetqueryCgdList()
@ -523,6 +524,7 @@
return result; return result;
} }
const clickLeftMenu = (index : any, item : object) => { const clickLeftMenu = (index : any, item : object) => {
// console.log("/////")
queryOrderInfoList({ mainId: item.id }).then(res => { queryOrderInfoList({ mainId: item.id }).then(res => {
if (res.result.length > 0) { if (res.result.length > 0) {
res.result.forEach((item, i) => { res.result.forEach((item, i) => {
@ -536,8 +538,9 @@
// const indexmessage = ref({}); // const indexmessage = ref({});
const firstgetqueryCgdList = (nuId) => { const firstgetqueryCgdList = (nuId) => {
form.nuId = nuId; form.nuId = nuId;
// console.log("wtf")
queryOrderList(form).then(res => { queryOrderList(form).then(res => {
console.log(`这啥啊啊啊啊啊`,form , res.result.records) console.log(`这啥啊啊啊啊啊`,form, res)
if (res.result.records.length > 0) { if (res.result.records.length > 0) {
res.result.records.forEach((item, l) => { res.result.records.forEach((item, l) => {
item.flag = false; item.flag = false;

View File

@ -1268,7 +1268,7 @@
.instant { .instant {
width: 33%; width: 33%;
height: 155rpx; height: 142rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -1296,8 +1296,8 @@
} }
.instant-icon { .instant-icon {
width: 62rpx; width: 70rpx;
height: 62rpx; height: 70rpx;
/* 性能关键 */ /* 性能关键 */
will-change: transform; will-change: transform;
transform-origin: 50% 52%; transform-origin: 50% 52%;

View File

@ -1681,6 +1681,7 @@
timearr.value[res.positioning].children[res.positioningLong] = res; timearr.value[res.positioning].children[res.positioningLong] = res;
}) })
bottomItems.value = res.result.instantList bottomItems.value = res.result.instantList
// console.log("zzzz",res.result.serviceList)
if (!res.result.instantList.length) { if (!res.result.instantList.length) {
deleteshake.value = false deleteshake.value = false
} }
@ -1705,6 +1706,7 @@
onMounted(() => { onMounted(() => {
savePackagelist.value = uni.getStorageSync('Packagelist') || [] savePackagelist.value = uni.getStorageSync('Packagelist') || []
// console.log("0000", savePackagelist.value)
let res = uni.getStorageSync('saveTree0') let res = uni.getStorageSync('saveTree0')
let goodArray = [] let goodArray = []
myArray.forEach((element : any) => { myArray.forEach((element : any) => {
@ -1716,6 +1718,7 @@
}) })
}) })
secondtemp.value = goodArray secondtemp.value = goodArray
let data0 = res.result.fwzl let data0 = res.result.fwzl
// console.log("0000", data0) // console.log("0000", data0)
if (data0) { if (data0) {
@ -2233,7 +2236,10 @@
lastClick.value = now lastClick.value = now
} }
function shortText(str : string, number : number) { function shortText(str : string, number : number) {
return str.length > number ? str.slice(0, number) + '.' : str if(str){
return str.length > number ? str.slice(0, number) + '.' : str
}
} }
function padZero(str : string) { function padZero(str : string) {
return str.length === 1 ? '0' + str : str return str.length === 1 ? '0' + str : str

View File

@ -24,10 +24,11 @@
<style scoped lang="less"> <style scoped lang="less">
.que { .que {
position: fixed; position: fixed;
top: 9%; top: 50%;
left: 10%; left: 50%;
width: 85%; width: 100vw;
height: 88%; height: 100vh;
transform: translate(-50%,-50%);
z-index: 100; z-index: 100;
background-color: #f5f6fa; background-color: #f5f6fa;
display: flex; display: flex;
@ -42,8 +43,9 @@
view { view {
text-align: center; text-align: center;
margin-top: 1vw;
font-weight: 300; font-weight: 300;
font-size: 1.4vw; font-size: 1.5vw;
color: #555555; color: #555555;
} }
} }

View File

@ -391,10 +391,12 @@
// console.log("look",look) // console.log("look",look)
if (look.levle) { if (look.levle) {
whoisit.value = 0; whoisit.value = 0;
movelook.value.url = uni.getStorageSync('imagebase') + look.immediateFileFocus; movelook.value.url = uni.getStorageSync('imagebase') + look.immediateFileFocus;
if (!movelook.value.url) { if (!look.immediateFileFocus) {
movelook.value.url = `/static/index/sharelogo.png` movelook.value.url = `/static/logotarget.png`
} }
// console.log("",movelook.value.url)
movelook.value.title = look.title; movelook.value.title = look.title;
movelook.value.type = 0; movelook.value.type = 0;
startmoveit.value = false startmoveit.value = false

View File

@ -6,14 +6,18 @@
</view> </view>
<view class="boxrt"> <view class="boxrt">
<index :isShow="menuop == 0" v-if="swipdex == 0" @swip="swip" /> <index :isShow="menuop == 0" v-if="swipdex == 0" @swip="swip" />
<material :isShow="menuop == 1" v-if="swipdex == 1" ref="materials"></material> <material :isShow="menuop == 1" v-if="swipdex == 1&&!specialPage" ref="materials" @changepages="changeNumber"></material>
<materialcar v-if="swipdex == 1&&specialPage==1" ></materialcar>
<purchaseorder v-if="swipdex == 1&&specialPage==2"></purchaseorder>
<picking :isShow="menuop == 2" v-if="swipdex == 2"></picking> <picking :isShow="menuop == 2" v-if="swipdex == 2"></picking>
<finish :isShow="menuop == 3" v-if="swipdex == 3"></finish> <finish :isShow="menuop == 3" v-if="swipdex == 3"></finish>
<outbound :isShow="menuop == 4" v-if="swipdex == 4"></outbound> <outbound :isShow="menuop == 4" v-if="swipdex == 4"></outbound>
<retstock :isShow="menuop == 5" v-if="swipdex == 5"></retstock> <retstock :isShow="menuop == 5" v-if="swipdex == 5"></retstock>
<inventory :isShow="menuop == 6 " v-if="swipdex == 6&& !specialPage" ref="inventorys" <inventory :isShow="menuop == 6 " v-if="swipdex == 6&& !specialPage" ref="inventorys"
@changepages="changepages"></inventory> @changepages="changepages"></inventory>
<addtory :isShow="menuop == 6" v-if="swipdex == 6&&specialPage=='1'" :specialitem="specialitem" ></addtory> <addtory :isShow="menuop == 6" v-if="swipdex == 6&&specialPage=='1'" :specialitem="specialitem">
</addtory>
<nurse :isshow="menuop == 7" v-if="swipdex==7&&uni.getStorageSync('nuId')" /> <nurse :isshow="menuop == 7" v-if="swipdex==7&&uni.getStorageSync('nuId')" />
<!-- <invoicing :isshow="menuop == 8" v-if="swipdex==8&&uni.getStorageSync('nuId')" /> --> <!-- <invoicing :isshow="menuop == 8" v-if="swipdex==8&&uni.getStorageSync('nuId')" /> -->
<logistics :isshow="menuop == 9" v-if="swipdex==9&&uni.getStorageSync('nuId')" /> <logistics :isshow="menuop == 9" v-if="swipdex==9&&uni.getStorageSync('nuId')" />
@ -29,6 +33,9 @@
import { queryPadPageList, getPermissionList } from '@/pages/watch/api/lunpan.js' import { queryPadPageList, getPermissionList } from '@/pages/watch/api/lunpan.js'
import leftcontent from "@/pages/NursingNew/component/leftcontent/leftcontent.vue" import leftcontent from "@/pages/NursingNew/component/leftcontent/leftcontent.vue"
import material from "@/pages/procurement/material.vue"; import material from "@/pages/procurement/material.vue";
import materialcar from "@/pages/procurement/materialcar.vue";
import purchaseorder from "@/pages/procurement/purchaseorder.vue";
import index from "./component/index.vue" import index from "./component/index.vue"
import picking from "../picking.vue"; import picking from "../picking.vue";
@ -55,7 +62,7 @@
onBackPress(() => { onBackPress(() => {
if (specialPage.value) { if (specialPage.value) {
specialPage.value-- specialPage.value = 0
return true; // return true; //
} else { } else {
return false; // return false; //
@ -68,6 +75,10 @@
specialPage.value = 1 specialPage.value = 1
specialitem.value = item specialitem.value = item
} }
const changeNumber = (item : any) => {
specialPage.value = item
// specialitem.value = item
}
// onMounted(() => { // onMounted(() => {
// // // //
// navurl(0) // navurl(0)
@ -79,6 +90,7 @@
// //
menuop.value = -1; menuop.value = -1;
swipdex.value = -1; swipdex.value = -1;
specialPage.value = 0;
setTimeout(() => { setTimeout(() => {
switch (v.type) { switch (v.type) {
case 'sy': case 'sy':
@ -152,6 +164,7 @@
console.log('库房') console.log('库房')
break; break;
case 'back': case 'back':
uni.navigateBack()
uni.navigateBack() uni.navigateBack()
break; break;

View File

@ -232,7 +232,7 @@
time.value = Date.now(); time.value = Date.now();
getLoginCode(time.value).then((res : any) => { getLoginCode(time.value).then((res : any) => {
// console.log("", res) console.log("获取验证码", res)
form.captcha = res.message form.captcha = res.message
canclick.value = true canclick.value = true
}) })

View File

@ -567,7 +567,8 @@
overflow: hidden; overflow: hidden;
box-shadow: 0rpx 0rpx 1.6vw 0rpx rgba(136,141,153,0.28); box-shadow: 0rpx 0rpx 1.6vw 0rpx rgba(136,141,153,0.28);
border-radius: 2.2vw; border-radius: 2.2vw;
top: 0vw; top: 50%;
transform: translateY(-50%);
right: 32vw; right: 32vw;
position: fixed; position: fixed;
padding:1.5vw 1vw; padding:1.5vw 1vw;

View File

@ -254,7 +254,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 0vw; top: 1.5vw;
right:1.2vw; right:1.2vw;
>view { >view {
width: 4.5vw; width: 4.5vw;

View File

@ -1,17 +1,19 @@
<template> <template>
<view> <view>
<!-- 购物车 --> <!-- 购物车 -->
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()" enable-back-to-top> <scroll-view scroll-y="true" class="crdcroll" scroll-with-animation @scrolltolower="scrolltolower()"
enable-back-to-top>
<view class="box"> <view class="box">
<view class="fler" v-for="(v,index) in InvoicingList" :key="index" @click="v.flag=!v.flag"> <view class="fler" v-for="(v,index) in InvoicingList" :key="index" @click="v.flag=!v.flag">
<view class="jiao guodu"> <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="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> <image src="/static/index/procurement/dh.png" mode="aspectFill" class="dui"></image>
</view> </view>
<scroll-view class="carditem guodu " @touchend="handleTouchEnd($event,v,index)" <scroll-view class="carditem guodu " @touchend="handleTouchEnd($event,v,index)"
@touchstart="touchstart($event,v,index)" scroll-with-animation scroll-x="true" @touchstart="touchstart($event,v,index)" scroll-with-animation scroll-x="true"
:scroll-left="v.scrollleft" @scroll="scroll" :class="v.flag?'actve':''"> :scroll-left="v.scrollleft" @scroll="scroll" :class="v.flag?'actve':''">
<view class="speitem guodu" > <view class="speitem guodu">
<view class="imghs"> <view class="imghs">
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'" <image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill"> mode="aspectFill">
@ -24,27 +26,32 @@
<view v-if="v.medicationId_dictText">{{v.medicationId_dictText}}</view> <view v-if="v.medicationId_dictText">{{v.medicationId_dictText}}</view>
</view> </view>
</view> </view>
<view class="msitem guodu" > <view class="msitem guodu">
<view> <view>
<view>{{v.wlName}}</view><text>{{v.wlMaterialNo}}</text> <view>{{v.wlName}}</view>
</view>
<!-- <text>{{v.wlMaterialNo}}</text> -->
<view>
<text style="white-space: nowrap;"> 规格编号: {{v.wlMaterialNo}}</text>
</view> </view>
<view> <view>
<text style="white-space: nowrap;"> 规格型号: {{v.wlSpecificationModel}}</text> <text style="white-space: nowrap;"> 规格型号: {{v.wlSpecificationModel}}</text>
</view> </view>
<view> <view>
<text v-if="v.wlUnits == v.materialUnits">采购单价: {{Number(v.unitPrice).toFixed(2) }}</text> <text v-if="v.wlUnits == v.materialUnits">采购单价:
{{Number(v.unitPrice).toFixed(2) }}</text>
<text v-if="v.wlUnits == v.twoUnit">采购单价: {{Number(v.twoUnitPrice).toFixed(2) }}</text> <text v-if="v.wlUnits == v.twoUnit">采购单价: {{Number(v.twoUnitPrice).toFixed(2) }}</text>
<text v-if="v.wlUnits == v.oneUnit">采购单价: {{Number(v.oneUnitPrice).toFixed(2) }}</text> <text v-if="v.wlUnits == v.oneUnit">采购单价: {{Number(v.oneUnitPrice).toFixed(2) }}</text>
</view>
<view>
<text>采购单位: {{v.wlUnits}}</text> <text>采购单位: {{v.wlUnits}}</text>
</view> </view>
<view> <view>
<text>供应商: {{v.suppliersName}}</text> <text>供应商: {{v.suppliersName}}</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> <view>
<text>{{v.kcsl?v.kcsl:'0'}}</text> <text>{{v.kcsl?v.kcsl:'0'}}</text>
<text>库存数量</text> <text>库存数量</text>
@ -60,7 +67,16 @@
</view> </view>
</view> </view>
<view class="add" @click.stop="clkzk(v,index)"> <view class="add" @click.stop="clkzk(v,index)">
<image class="guodu" :style="v.zk?'transform: rotate(180deg);':''" :src="'/static/index/procurement/l.png'" mode="aspectFill"></image> <image class="guodu" :style="v.zk?'transform: rotate(180deg);':''"
:src="'/static/index/procurement/l.png'" mode="aspectFill"></image>
</view>
<view class="right-top">
<view style="font-size: 1.7vw;font-weight: 600;">
{{v.purchaseQuantity}}
</view>
<view style="font-size: 1.3vw;">
采购数量
</view>
</view> </view>
<view class="zkadd guodu" :class="v.isAdd==1?'zkf':''"> <view class="zkadd guodu" :class="v.isAdd==1?'zkf':''">
<view @click.stop="addcar(v,index)" @touchend.stop>编辑</view> <view @click.stop="addcar(v,index)" @touchend.stop>编辑</view>
@ -73,7 +89,8 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;" v-if="InvoicingList.length>6"> <view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;"
v-if="InvoicingList.length>6">
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" /> <u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" />
</view> </view>
</scroll-view> </scroll-view>
@ -81,7 +98,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue'; import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
const props = defineProps({ const props = defineProps({
InvoicingList: { InvoicingList: {
type: Array, type: Array,
@ -96,35 +113,35 @@
required: true, required: true,
}, },
}) })
const emit = defineEmits(['addcartory', 'scrolltolower','delindex']) const emit = defineEmits(['addcartory', 'scrolltolower', 'delindex'])
const serverUrl = ref('') const serverUrl = ref('')
onMounted(() => { onMounted(() => {
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/'; serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
}) })
const addcar = (v : any,i:number) => { const addcar = (v : any, i : number) => {
caigouobj.value = v; caigouobj.value = v;
caigouobj.value.index = i; caigouobj.value.index = i;
emit('addcartory', caigouobj.value) emit('addcartory', caigouobj.value)
} }
const del = (v,i)=>{ const del = (v, i) => {
emit('delindex',v,i) emit('delindex', v, i)
} }
const caigouobj = ref({}) const caigouobj = ref({})
const clkzk = (v : any, i : number) => { const clkzk = (v : any, i : number) => {
if(v.zk==true){ if (v.zk == true) {
v.zk = false; v.zk = false;
v.scrollleft = 0 v.scrollleft = 0
}else{ } else {
v.zk = true; v.zk = true;
v.scrollleft = 150; v.scrollleft = 150;
} }
solleft(v,i) solleft(v, i)
} }
const pageX = ref(0); const pageX = ref(0);
const pageY = ref(0); const pageY = ref(0);
const touchstart = (event : any, v : any,i:number) => { const touchstart = (event : any, v : any, i : number) => {
pageX.value = event.changedTouches[0].pageX; pageX.value = event.changedTouches[0].pageX;
pageY.value = event.changedTouches[0].pageY; pageY.value = event.changedTouches[0].pageY;
solleft(v, i) solleft(v, i)
@ -134,20 +151,20 @@
let x = event.changedTouches[0].pageX; let x = event.changedTouches[0].pageX;
let absx = Math.abs(x - pageX.value) let absx = Math.abs(x - pageX.value)
let absy = Math.abs(y - pageY.value) let absy = Math.abs(y - pageY.value)
if (absy > 30 && absx+10<absy&& absx<70) { if (absy > 30 && absx + 10 < absy && absx < 70) {
if(v.zk==false){ if (v.zk == false) {
v.scrollleft = 1 v.scrollleft = 1
setTimeout(()=>{ setTimeout(() => {
v.scrollleft = 0 v.scrollleft = 0
},20) }, 20)
} }
return return
} }
if (absx < 10 && absy < 10) { if (absx < 10 && absy < 10) {
if(v.zk==false && absx > 2 && absy > 2){ if (v.zk == false && absx > 2 && absy > 2) {
v.scrollleft = 0; v.scrollleft = 0;
return return
} }
return return
} }
caigouobj.value = v; caigouobj.value = v;
@ -160,7 +177,7 @@
const solleft = (v : any, i : number) => { const solleft = (v : any, i : number) => {
props.InvoicingList.forEach((item, k) => { props.InvoicingList.forEach((item, k) => {
if (k != i&&item.zk==true) { if (k != i && item.zk == true) {
item.zk = false; item.zk = false;
item.scrollleft = 0; item.scrollleft = 0;
} }
@ -170,7 +187,7 @@
emit('scrolltolower') emit('scrolltolower')
} }
const scrollLeft = ref(0) const scrollLeft = ref(0)
const scroll = (e)=>{ const scroll = (e) => {
// scrollLeft.value = e.detail.scrollLeft // scrollLeft.value = e.detail.scrollLeft
// console.log(e.detail.scrollLeft) // console.log(e.detail.scrollLeft)
} }
@ -178,29 +195,38 @@
<style scoped lang="less"> <style scoped lang="less">
.crdcroll { .crdcroll {
width: 96vw; width: 91vw;
height: 88.3vh; // background-color: red;
margin-top: 1vh; height: 88.5vh;
margin-top: 1.5vh;
.box { .box {
width: 96vw; width: 89.4vw;
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
padding-left: 1.1vw;
} }
.fler { .fler {
width: 47vw; width: 44.3vw;
height: 17vw; height: 27.3vw;
margin-bottom: 1.2vw; margin-bottom: 0.7vw;
border-radius: 1.6vw; border-radius: 1.6vw;
// background-color: red;
margin-right: 0.7vw;
border: 2px solid rgba(245, 246, 248, 1); border: 2px solid rgba(245, 246, 248, 1);
position: relative; position: relative;
.jiao{
.jiao {
width: 3.4vw; width: 3.4vw;
height: 3.4vw; height: 3.4vw;
position: absolute; position: absolute;
top: -2px; top: -2px;
left: 0; left: 0;
z-index: 99; z-index: 99;
.dui{
.dui {
position: absolute; position: absolute;
width: 1.4vw; width: 1.4vw;
height: 1.4vw; height: 1.4vw;
@ -208,7 +234,8 @@
left: 0.8vw; left: 0.8vw;
z-index: 101; z-index: 101;
} }
.jao{
.jao {
width: 3.4vw; width: 3.4vw;
height: 3.4vw; height: 3.4vw;
position: absolute; position: absolute;
@ -219,22 +246,24 @@
} }
} }
} }
.actve{
.actve {
border: 2rpx solid #3BA1FF !important; border: 2rpx solid #3BA1FF !important;
} }
.carditem { .carditem {
width: calc(47vw - 4px); width: calc(44.3vw - 4px);
height:calc(17vw - 4px) ; height: calc(27.3vw - 4px);
background: rgba(245, 246, 248, 1); background: #fff;
position: relative; position: relative;
display: flex; display: flex;
overflow: hidden; overflow: hidden;
justify-content: flex-start;
white-space: nowrap; white-space: nowrap;
border-radius: 1.6vw; border-radius: 1.6vw;
border: 2px solid rgba(245, 246, 248, 1); border: 2px solid rgba(245, 246, 248, 1);
.zkadd { .zkadd {
width: 14vw; width: 10vw;
height: 100%; height: 100%;
display: inline-flex; display: inline-flex;
justify-content: flex-end; justify-content: flex-end;
@ -246,11 +275,12 @@
width: 7vw; width: 7vw;
height: 100%; height: 100%;
font-weight: 400; font-weight: 400;
font-size: 1.5vw; font-size: 1.8vw;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
writing-mode: vertical-rl; writing-mode: vertical-rl;
// line-height: 2.2vw;
text-orientation: upright; text-orientation: upright;
text-align: center; text-align: center;
@ -266,6 +296,7 @@
align-items: center; align-items: center;
} }
} }
&:nth-child(1) { &:nth-child(1) {
background: #dcdee1; background: #dcdee1;
color: #555555; color: #555555;
@ -279,13 +310,19 @@
} }
.add { .add {
width: 6vw; position: absolute;
height: 17vw; right: 2vw;
display: inline-flex; top: 50%;
justify-content: center; transform: translateY(-50%);
align-items: center; // width: 6vw;
position: relative; // height: 17vw;
top: -2.5vw; // display: inline-flex;
// justify-content: center;
// align-items: center;
// position: relative;
// top: -2.5vw;
// background-color: red;
>view { >view {
width: 4.5vw; width: 4.5vw;
height: 1.9vw; height: 1.9vw;
@ -312,163 +349,205 @@
.msitem { .msitem {
width: 25vw; width: 25vw;
height: 100%; // height: 80%;
padding:1vw 1vw 1vw; padding: 1vw 1vw 1vw;
display: inline-block; display: inline-block;
// background-color: red;
>view { >view {
margin-top: 0.25vw; // margin-top: 0.25vw;
&:nth-child(5) { &:nth-child(7) {
width: 28vw; width: 25vw;
height: 3.4vw; height: 3.4vw;
display: flex; display: flex;
justify-content: space-between; // justify-content: space-between;
position: relative; position: relative;
left: 0; left: -1.3vw;
top: 1.3vw; top: 1.3vw;
>view { >view {
width: 25%; width: 31%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
align-items: center; align-items: center;
// background-color: blue;
// border: 2rpx solid black;
// &:nth-child(1) {
// text-align: center;
// }
&:nth-child(1) &:nth-child(2),
&:nth-child(3),
{
text-align: center;
}
text {
&:nth-child(1) { &:nth-child(1) {
text-align: left; font-weight: bold;
font-size: 1.7vw;
color: #555555;
} }
&:nth-child(2),&:nth-child(3),&:nth-child(4) { &:nth-child(2) {
text-align: center; font-weight: 400;
} font-size: 1.3vw;
color: #999999;
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(2),
&:nth-child(3), &:nth-child(3),
&:nth-child(4){ &:nth-child(4),
display: flex; &:nth-child(5),
justify-content: space-between; &:nth-child(6),
text { {
font-weight: 400; display: flex;
font-size: 1.4vw; justify-content: space-between;
color: #777777; margin-bottom: 0.5vw;
}
}
&:nth-child(4){
width: 25vw;
height: 1.6vw;
display: block !important;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
&:nth-child(1) { text {
display: flex; font-weight: 400;
justify-content: space-between; font-size: 1.4vw;
align-items: center; color: #777777;
height: 1.8vw; white-space: nowrap;
margin-bottom: 1vw; /* 不换行 */
// margin-top: -0.4vw; overflow: hidden;
>view { /* 隐藏溢出部分 */
width: 19vw; text-overflow: ellipsis;
height: 2vw; /* 显示省略号 */
font-weight: bold;
font-size: 1.6vw;
color: #222222;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
text {
width: 6vw;
font-weight: 400;
font-size: 1.4vw;
color: #222222;
}
}
} }
} }
// .spleft{ &:nth-child(6) {
// margin-left: -15vw !important; width: 25vw;
// } height: 1.6vw;
.speitem { display: block !important;
width: 15vw; white-space: nowrap;
height: 100%; text-overflow: ellipsis;
display: inline-flex; overflow: hidden;
flex-direction: column; }
position: relative;
top: -1.5vw;
.cardp {
width: 12.5vw;
height: 4vw;
display: flex;
flex-wrap: wrap;
margin: 0 auto 0;
align-items: center;
view { &:nth-child(1) {
min-width: 5.5vw; display: flex;
height: 1.8vw; justify-content: space-between;
border-radius: 0.9vw; align-items: center;
border: 1px solid #D2D2D2; height: 1.8vw;
margin: 0.5vw 0 0 0.5vw; margin-bottom: 1.2vw;
display: flex; margin-top: 2.3vw;
justify-content: center;
align-items: center; // margin-top: -0.4vw;
font-weight: 400; >view {
font-size: 1vw; width: 19vw;
color: #555555; height: 2vw;
padding: 0 0.5vw; font-weight: bold;
&:nth-child(1),&:nth-child(2){ font-size: 1.8vw;
max-width: 6vw; color: #222222;
overflow: hidden; text-overflow: ellipsis;
text-overflow: ellipsis; overflow: hidden;
white-space: nowrap; white-space: nowrap;
display: block;
line-height: 1.8vw;
text-align: center;
}
}
} }
.imghs{ text {
width: 10vw; width: 6vw;
height: 9vw; font-weight: 400;
margin: -0.8vw auto 0.25vw; font-size: 1.4vw;
padding: 0.2vw; color: #222222;
background: #fff;
border-radius: 1.1vw;
>image {
width: 100%;
height: 100%;
border-radius: 1.1vw;
}
} }
} }
} }
.guodu { }
transition: .4s;
-webkit-transform-style: preserve-3d; // .spleft{
-webkit-overflow-scrolling: touch; // margin-left: -15vw !important;
// }
.speitem {
width: 17vw;
height: 100%;
display: inline-flex;
flex-direction: column;
justify-content: center;
position: relative;
top: -3vw;
// background-color: red;
.cardp {
width: 100%;
height: 4vw;
display: flex;
flex-direction: column;
align-items: center;
// flex-wrap: wrap;
// margin: 0 auto 0;
// align-items: center;
view {
min-width: 9vw;
min-height: 2vw;
border-radius: 0.9vw;
border: 1px solid #D2D2D2;
margin: 0.7vw 0 0 0.5vw;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
font-weight: 400;
font-size: 1.2vw;
color: #555555;
// background-color: red;
// padding: 0 0.5vw;
&: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;
display: flex;
justify-content: center;
align-items: center;
}
}
} }
.imghs {
width: 13vw;
height: 13vw;
margin: -0.5vw auto 0.25vw;
padding: 0.2vw;
background: #fff;
border-radius: 1.1vw;
>image {
width: 100%;
height: 100%;
border-radius: 1.1vw;
}
}
}
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
.right-top{
top: 2vw;
right: 2vw;
position: absolute;
color: #1083F8;
text-align: center;
}
</style> </style>

View File

@ -64,7 +64,7 @@
<text class="sl">{{v.ljkcsl}}</text> <text class="sl">{{v.ljkcsl}}</text>
</view> </view>
<defaultr cont="暂无数据" v-if="Material.length==0&&timeout" <defaultr cont="暂无数据" v-if="Material.length==0&&timeout"
style="position: absolute;width: 10vw;height: 10vw;left: 10%;"></defaultr> style="position: absolute;width: 10vw;height: 10vw;left: 0%;"></defaultr>
</scroll-view> </scroll-view>
</view> </view>
@ -105,7 +105,7 @@
:status="status" @crk="crk"></carditem> :status="status" @crk="crk"></carditem>
</view> </view>
<view class="fiedright"> <view class="fiedright">
<view @click="uni.navigateTo({ url:'/pages/procurement/materialcar' })" class="fiedrightview"> <view @click="emit(`changepages`,1)" class="fiedrightview">
<image src="/static/index/procurement/gc1.png" mode="aspectFill"></image> <image src="/static/index/procurement/gc1.png" mode="aspectFill"></image>
<!-- <text v-if="carnum>0">{{carnum>99?'99+':carnum}}</text> --> <!-- <text v-if="carnum>0">{{carnum>99?'99+':carnum}}</text> -->
<view class="mhao" v-if="carnum>0"> <view class="mhao" v-if="carnum>0">
@ -114,7 +114,7 @@
</view> </view>
</view> </view>
</view> </view>
<view @click="uni.navigateTo({ url:'/pages/procurement/purchaseorder' })" class="fiedrightview"> <view @click="emit(`changepages`,2)" class="fiedrightview">
<image src="/static/index/procurement/cg.png" mode="aspectFill"></image> <image src="/static/index/procurement/cg.png" mode="aspectFill"></image>
</view> </view>
</view> </view>
@ -155,7 +155,7 @@
import addall from './components/addall.vue' import addall from './components/addall.vue'
import defaultr from './components/default.vue' import defaultr from './components/default.vue'
const tx = ref(false) const tx = ref(false)
const emit = defineEmits(['changepages'])
const backmoreopen = ref(false) const backmoreopen = ref(false)
@ -204,25 +204,38 @@
type: Boolean type: Boolean
}, },
}); });
// onMounted(()=>{ const queryInvo = () => {
// form.pageNo = 1; queryInvoicingList(form).then(res => {
// warn.pageNo = 1; console.log(res)
// Material.value = []; res.result.records.forEach(item => {
// InvoicingList.value = []; item.zk = false;
// moredex.value = 0; item.scrollleft = 0;
// shoppcar(); })
// getWaringMaterial() InvoicingList.value.push(...res.result.records);
// nextTick(() => { status.value = (res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore')
// chongzhi() setout2.value = (res.result.total == InvoicingList.value.length ? false : true)
// }) })
// setTimeout(()=>{ }
// timeout.value = true onMounted(()=>{
// },500) // gwcsx()
// transition.value = false; form.pageNo = 1;
// setTimeout(() => { warn.pageNo = 1;
// transition.value = true; Material.value = [];
// }, 50) InvoicingList.value = [];
// }) moredex.value = 0;
shoppcar();
getWaringMaterial()
nextTick(() => {
chongzhi()
})
setTimeout(()=>{
timeout.value = true
},500)
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
})
watch( watch(
() => props.isShow, () => props.isShow,
(newVal, oldVal) => { (newVal, oldVal) => {
@ -387,21 +400,10 @@
InvoicingList.value = []; InvoicingList.value = [];
queryInvo(); queryInvo();
} }
const queryInvo = () => {
queryInvoicingList(form).then(res => {
console.log(res)
res.result.records.forEach(item => {
item.zk = false;
item.scrollleft = 0;
})
InvoicingList.value.push(...res.result.records);
status.value = (res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore')
setout2.value = (res.result.total == InvoicingList.value.length ? false : true)
})
}
const addcartory = (e : any) => { const addcartory = (e : any) => {
// eindexindex0 // eindexindex0
console.log("我要测试",e) // console.log("",e)
if(!e.suppliers_dictText || !e.suppliers){ if(!e.suppliers_dictText || !e.suppliers){
openerror.value = true; openerror.value = true;
errmsg.value = `此物料暂无供应商,请联系管理员` errmsg.value = `此物料暂无供应商,请联系管理员`

View File

@ -3,7 +3,7 @@
<view class="serchs"> <view class="serchs">
<view class="leftbtn"> <view class="leftbtn">
<view class="ipt"> <view class="ipt">
<input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.wlParamInfo" @confirm="search(0)"/> <input type="text" placeholder="物料名称/物料编码/物料简拼" v-model="form.wlParamInfo" @confirm="search(0)" />
<image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.wlParamInfo" <image src="/static/index/procurement/x.png" mode="aspectFill" v-if="form.wlParamInfo"
@click="search(0)"></image> @click="search(0)"></image>
</view> </view>
@ -16,9 +16,8 @@
筛选 筛选
</view> </view>
<view class="shx" @click="chongzhi" <view class="shx" @click="chongzhi"
v-if="form.categoryId!=''||form.wlParamInfo!=''||form.suppliers!=''" v-if="form.categoryId!=''||form.wlParamInfo!=''||form.suppliers!=''">
> <image src="/static/index/procurement/cz.png" mode="aspectFill"></image>
<image src="/static/index/procurement/cz.png" mode="aspectFill"></image>
重置 重置
</view> </view>
</view> </view>
@ -37,28 +36,29 @@
</view> </view>
</view> </view>
</view> </view>
<carlist :InvoicingList="InvoicingList" :status="status" @delindex="opendelindex" @addcartory="addcartory"></carlist> <carlist :InvoicingList="InvoicingList" :status="status" @delindex="opendelindex" @addcartory="addcartory">
</carlist>
<tanchuang :show="open==1" font="是否清空购物车?" @back="open = 0" @right="del()"> </tanchuang> <tanchuang :show="open==1" font="是否清空购物车?" @back="open = 0" @right="del()"> </tanchuang>
<tanchuang :show="open==2" font="是否删除此物料?" @back="open = 0" @right="delindex()"> </tanchuang> <tanchuang :show="open==2" font="是否删除此物料?" @back="open = 0" @right="delindex()"> </tanchuang>
<!-- 筛选 --> <!-- 筛选 -->
<view class="mengban" v-if="ification" @click="ification = false"></view> <view class="mengban" v-if="ification" @click="ification = false"></view>
<classification @confirm="confirm" :show="ification" :typenum="1" ref="classication"></classification> <classification @confirm="confirm" :show="ification" :typenum="1" ref="classication"></classification>
<defaultr cont="暂无数据" v-if="status=='nomore'&&InvoicingList.length==0"></defaultr> <defaultr cont="暂无数据" v-if="status=='nomore'&&InvoicingList.length==0"></defaultr>
<view class="mengban" v-if="addflag" @click="addflag = false"></view> <view class="mengban" v-if="addflag" @click="addflag = false"></view>
<calculator :show="addflag" :caigouobj="caigouobj" @colse="addflag = false" @right="right"></calculator> <calculator :show="addflag" :caigouobj="caigouobj" @colse="addflag = false" @right="right"></calculator>
<view class="mengban" v-if="caigouflag" @click="caigouflag = false"></view> <view class="mengban" v-if="caigouflag" @click="caigouflag = false"></view>
<purorder :arrlist="generatedOrder" :show="caigouflag" @cloe="caigouflag = false" @config="configr"></purorder> <purorder :arrlist="generatedOrder" :show="caigouflag" @cloe="caigouflag = false" @config="configr"></purorder>
<errorshow :show="openerror" :font="errmsg" @close="openerror=false" /> <errorshow :show="openerror" :font="errmsg" @close="openerror=false" />
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent} from 'vue'; import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineComponent } from 'vue';
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import {generatedPurchaseViewOrder,eddShoppingCartList, queryShoppingCartList, getGwcMaterialTreeData, queryNuInfoByNuId, updateKfstatus,deleteQgInfoById,emptiedQgInfo ,queryWlInfoByWlId,generatedPurchaseOrder } from './api/lunpan.js' import { generatedPurchaseViewOrder, eddShoppingCartList, queryShoppingCartList, getGwcMaterialTreeData, queryNuInfoByNuId, updateKfstatus, deleteQgInfoById, emptiedQgInfo, queryWlInfoByWlId, generatedPurchaseOrder } from './api/lunpan.js'
import carlist from './components/carlist.vue'; import carlist from './components/carlist.vue';
import tanchuang from './components/tanchuang.vue'; import tanchuang from './components/tanchuang.vue';
import classification from './components/classification.vue' import classification from './components/classification.vue'
@ -71,258 +71,263 @@
const caigouobj = ref({}) const caigouobj = ref({})
const openerror = ref(false) const openerror = ref(false)
const errmsg = ref('') const errmsg = ref('')
const form = reactive({ const form = reactive({
nuId: uni.getStorageSync('nuId'), nuId: uni.getStorageSync('nuId'),
pageNo: 1, pageNo: 1,
pageSize: -1, pageSize: -1,
categoryId: '', categoryId: '',
typeId: '', typeId: '',
medicationId: '', medicationId: '',
wlParamInfo: '', wlParamInfo: '',
suppliers:'' suppliers: ''
}) })
const InvoicingList = ref([]) const InvoicingList = ref([])
const status = ref('nomore') const status = ref('nomore')
const open = ref(0) const open = ref(0)
onShow(()=>{ const queryInvo = () => {
InvoicingList.value = []; queryShoppingCartList(form).then(res => {
queryInvo() res.result.records.forEach((item, i) => {
}) item.flag = true;
const classication = ref<InstanceType<typeof ChildComponent>>()
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 queryInvo = () => {
queryShoppingCartList(form).then(res => {
res.result.records.forEach((item,i)=>{
item.flag = true;
item.zk = false; item.zk = false;
item.scrollleft = 0; item.scrollleft = 0;
})
InvoicingList.value.push(...res.result.records);
// status.value = (res.result.total == InvoicingList.value.length) ? 'nomore' : 'loadmore';
})
}
const search = (x : number) => {
if (x === 0) { form.wlParamInfo = '' }
form.pageNo = 1;
InvoicingList.value = [];
queryInvo();
}
const addcartory =(e:any)=>{
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);
setTimeout(()=>{
uni.navigateTo({
url:'/pages/procurement/purchaseorder'
})
},1000)
}
let times = null;
const scrolltolower = (t:number) => {
if (status.value == 'loading' || status.value == 'nomore') { return }
status.value = 'loading'
form.pageNo++;
queryInvo()
}
const del=()=>{
emptiedQgInfo().then(res=>{
if(res.success){
form.pageNo=1;
InvoicingList.value = [];
chongzhi()
}else{
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
}
open.value = 0;
}) })
} InvoicingList.value.push(...res.result.records);
const delobj = ref({}) // status.value = (res.result.total == InvoicingList.value.length) ? 'nomore' : 'loadmore';
const opendelindex=(v:any,i:number)=>{ })
open.value = 2; }
v.index = i; onShow(() => {
delobj.value = v; InvoicingList.value = [];
} queryInvo()
const delindex =()=>{ })
let delstr = delobj.value.id; const classication = ref<InstanceType<typeof ChildComponent>>()
deleteQgInfoById(delstr).then(res=>{ const chongzhi = () => {
if(res.success){ form.categoryId = '';
uni.showToast({ form.typeId = '';
icon:res.success?'success':'none', form.medicationId = '';
title:res.message form.suppliers = '';
}) form.pageNo = 1;
setTimeout(()=>{ form.wlParamInfo = '',
InvoicingList.value.splice(delobj.value.index,1); InvoicingList.value = [];
open.value = 0; classication.value.typescroll(1, -1, {});
status.value = InvoicingList.value.length == 0 ? 'nomore' : 'loadmore'; classication.value.qingkong();
classication.value.getTreelnum() classication.value.config();
},800) }
}else{
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
}
const search = (x : number) => {
if (x === 0) { form.wlParamInfo = '' }
form.pageNo = 1;
InvoicingList.value = [];
queryInvo();
}
const addcartory = (e : any) => {
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);
setTimeout(() => {
uni.navigateTo({
url: '/pages/procurement/purchaseorder'
}) })
} }, 1000)
const adfangdou = ref(true); }
// let times = null;
const right = (n:number,nm:any,type:Object,v:object) => { const scrolltolower = (t : number) => {
setTimeout(()=>{ if (status.value == 'loading' || status.value == 'nomore') { return }
if(adfangdou.value){ status.value = 'loading'
connfig(nm,n,type,v); form.pageNo++;
adfangdou.value = false; queryInvo()
} }
},30) const del = () => {
emptiedQgInfo().then(res => {
} if (res.success) {
const timers = ref(true) form.pageNo = 1;
const connfig = (nm:any,num:Number,type:Object,v:object) =>{ InvoicingList.value = [];
if(timers.value==false){return} chongzhi()
timers.value=false; } else {
let dt = { errmsg.value = res.result?.message ? res.result?.message : res.message
nuId:form.nuId, openerror.value = true;
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
} }
eddShoppingCartList(dt).then(res=>{ open.value = 0;
timers.value=true; })
if(res.success){ }
setTimeout(()=>{ const delobj = ref({})
tihuan(v); const opendelindex = (v : any, i : number) => {
addflag.value = false; open.value = 2;
// form.pageNo=1; v.index = i;
// InvoicingList.value = []; delobj.value = v;
}
},700) const delindex = () => {
uni.showToast({ let delstr = delobj.value.id;
icon:res.success?'success':'none', deleteQgInfoById(delstr).then(res => {
title:res.message if (res.success) {
})
}else{
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
}
adfangdou.value = true;
})
}
const tihuan = (v)=>{
let forms={
nuId: uni.getStorageSync('nuId'),
wlParamInfo:v.wlMaterialNo,
}
queryShoppingCartList(forms).then(res => {
let obj = {};
if(res.result.records.length>1){
res.result.records.forEach(item=>{
if(item.id==v.id){
obj = item
}
})
}else{
obj = res.result.records[0];
}
InvoicingList.value.forEach((item,i)=>{
if(item.id == obj.id){
obj.flag = v.flag;
obj.zk = false;
obj.scrollleft = 0;
InvoicingList.value[i] = obj;
}
})
})
}
const caigouflag = ref(false)
const caigouarr = ref([])
const generatedOrder = ref([])
const caigouclk =()=>{
uni.showLoading()
let arr = [];
caigouarr.value = [];
InvoicingList.value.forEach(item=>{
if(item.flag){
arr.push(item)
}
})
caigouarr.value = arr;
console.log("????",arr)
if(arr.length==0){
uni.showToast({ uni.showToast({
title:'请选择物料!', icon: res.success ? 'success' : 'none',
icon:'none' title: res.message
}) })
return setTimeout(() => {
InvoicingList.value.splice(delobj.value.index, 1);
open.value = 0;
status.value = InvoicingList.value.length == 0 ? 'nomore' : 'loadmore';
classication.value.getTreelnum()
}, 800)
} else {
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
} }
generatedPurchaseViewOrder(caigouarr.value).then(res=>{
if(res.success){
generatedOrder.value = res.result; })
caigouflag.value = true; }
uni.hideLoading(); const adfangdou = ref(true);
}else{ //
errmsg.value = res.result?.message ? res.result?.message : res.message const right = (n : number, nm : any, type : Object, v : object) => {
openerror.value = true; setTimeout(() => {
if (adfangdou.value) {
connfig(nm, n, type, v);
adfangdou.value = false;
}
}, 30)
}
const timers = ref(true)
const connfig = (nm : any, num : Number, type : Object, v : 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
}
eddShoppingCartList(dt).then(res => {
timers.value = true;
if (res.success) {
setTimeout(() => {
tihuan(v);
addflag.value = false;
// form.pageNo=1;
// InvoicingList.value = [];
}, 700)
uni.showToast({
icon: res.success ? 'success' : 'none',
title: res.message
})
} else {
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
}
adfangdou.value = true;
})
}
const tihuan = (v) => {
let forms = {
nuId: uni.getStorageSync('nuId'),
wlParamInfo: v.wlMaterialNo,
}
queryShoppingCartList(forms).then(res => {
let obj = {};
if (res.result.records.length > 1) {
res.result.records.forEach(item => {
if (item.id == v.id) {
obj = item
}
})
} else {
obj = res.result.records[0];
}
InvoicingList.value.forEach((item, i) => {
if (item.id == obj.id) {
obj.flag = v.flag;
obj.zk = false;
obj.scrollleft = 0;
InvoicingList.value[i] = obj;
} }
}) })
})
}
const caigouflag = ref(false)
const caigouarr = ref([])
const generatedOrder = ref([])
const caigouclk = () => {
uni.showLoading()
let arr = [];
caigouarr.value = [];
InvoicingList.value.forEach(item => {
if (item.flag) {
arr.push(item)
}
})
caigouarr.value = arr;
console.log("????", arr)
if (arr.length == 0) {
uni.showToast({
title: '请选择物料!',
icon: 'none'
})
return
} }
generatedPurchaseViewOrder(caigouarr.value).then(res => {
if (res.success) {
generatedOrder.value = res.result;
caigouflag.value = true;
uni.hideLoading();
} else {
errmsg.value = res.result?.message ? res.result?.message : res.message
openerror.value = true;
}
})
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.serchs { .serchs {
width:96vw; // background-color: red;
width: 90vw;
height: 3.3vw; height: 3.3vw;
border-radius: 1.6vw; border-radius: 1.6vw;
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0.7vw 0 0; margin: 0.7vw 0 0;
overflow: hidden;
justify-content: space-between; justify-content: space-between;
.leftbtn{
width: 64vw; .leftbtn {
width: 50vw;
height: 3.3vw; height: 3.3vw;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.rightbtn{
.rightbtn {
width: 30vw; width: 30vw;
height: 3.3vw; height: 3.3vw;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
view{ view {
width: 7.3vw; width: 7.3vw;
height: 3.3vw; height: 3.3vw;
border: 1px solid #D9DADC; border: 1px solid #D9DADC;
@ -334,9 +339,10 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-left:0.7vw; margin-left: 0.7vw;
color: #555555; color: #555555;
border: 1px solid #D9DADC; border: 1px solid #D9DADC;
image { image {
width: 1.5vw; width: 1.5vw;
height: 1.3vw; height: 1.3vw;
@ -344,29 +350,35 @@
} }
} }
} }
.ipt { .ipt {
display: flex; display: flex;
align-items: center; align-items: center;
width: 27vw; width: 27vw;
background: #E2E4E9; // background: #E2E4E9;
border-radius: 1.65vw; border-radius: 1.65vw;
height: 3.3vw; height: 3.3vw;
padding-left: 1.1vw;
image { image {
width: 1.8vw; width: 1.8vw;
height: 1.8vw; height: 1.8vw;
margin:0 0.5vw; margin: 0 0.5vw;
} }
input { input {
width: 25vw; width: 100%;
height: 3.3vw; height: 3.3vw;
font-size: 1.4vw; background-color: #fff;
padding-left: 1.6vw; font-size: 27.5rpx;
padding-left: 26rpx;
border-radius: 40rpx;
padding-top: 2rpx;
// border: 2rpx solid #C9C9C9;
} }
} }
.back{
.back {
width: 8vw; width: 8vw;
height: 3.3vw; height: 3.3vw;
border-radius: 1.6vw; border-radius: 1.6vw;
@ -378,8 +390,9 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-left:0.6vw; margin-left: 0.6vw;
border: 1px solid #D9DADC; border: 1px solid #D9DADC;
image { image {
width: 1.5vw !important; width: 1.5vw !important;
height: 1.5vw !important; height: 1.5vw !important;
@ -387,11 +400,15 @@
} }
} }
.rightbtn>view:active,.shx:active,.scr:active{
.rightbtn>view:active,
.shx:active,
.scr:active {
color: #1083F8; color: #1083F8;
background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43)); background: linear-gradient(-45deg, rgba(223, 244, 252, 1), rgba(204, 228, 249, 0.43));
border: 1px solid #1083F8; border: 1px solid #1083F8;
} }
.scr { .scr {
border-radius: 1.65vw; border-radius: 1.65vw;
font-weight: 400; font-weight: 400;
@ -405,6 +422,7 @@
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
border: 1px solid #D9DADC; border: 1px solid #D9DADC;
color: #555555; color: #555555;
image { image {
width: 1.5vw; width: 1.5vw;
height: 1.3vw; height: 1.3vw;
@ -434,25 +452,27 @@
} }
} }
} }
.guodu { .guodu {
transition: .4s; transition: .4s;
-webkit-transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
.mengban {
width: 100vw; .mengban {
height: 100vh; width: 100vw;
position: fixed; height: 100vh;
top: 0; position: fixed;
left: 0; top: 0;
z-index: 90; left: 0;
background: RGBA(239, 240, 244, 0.55); z-index: 90;
} background: RGBA(239, 240, 244, 0.55);
}
</style> </style>
<style> <style>
page { /* page {
background: RGBA(239, 240, 244, 1); background: RGBA(239, 240, 244, 1);
padding: 2vw; padding: 2vw;
box-sizing: border-box; box-sizing: border-box;
} } */
</style> </style>

View File

@ -7,8 +7,11 @@
placeholder="采购单号/采购日期/供应商" @confirm="search()" /> placeholder="采购单号/采购日期/供应商" @confirm="search()" />
<image v-show="plzinfo.cgdParamInfo" class="title-input-img" src="@/static/x.png" <image v-show="plzinfo.cgdParamInfo" class="title-input-img" src="@/static/x.png"
@click="plzinfo.cgdParamInfo=``;search()" /> @click="plzinfo.cgdParamInfo=``;search()" />
<view class="title-input-button" @click="search();"> <!-- <view class="title-input-button" @click="search();">
检索 检索
</view> -->
<view class="title-ball" @click="search();handleClick()">
<image class="title-ball-img" :src="imgSrc" mode="aspectFill"></image>
</view> </view>
</view> </view>
<view class="left-menu-father"> <view class="left-menu-father">
@ -69,10 +72,11 @@
<view class="pls-card-middle-one"> <view class="pls-card-middle-one">
<view class="middle-title" :style=" v?.cgdType=='9' ?{color:`#FF5757`}:{}"> <view class="middle-title" :style=" v?.cgdType=='9' ?{color:`#FF5757`}:{}">
{{ v?.cgdType=='9' ?v.zfTime?.slice(0,10).replace(/-/g, '.'):Number(v.status)<1?``:v.jhTime?.slice(0,10).replace(/-/g, '.') }} {{ 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"> <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" /> <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;" <view class="middle-ball" style="background-color: #1083F8;"
:style=" v?.cgdType=='9' ?{backgroundColor:`#FF5757`}:{}" :style=" v?.cgdType=='9' ?{backgroundColor:`#FF5757`}:{}"
v-else-if="Number(v.status)<2"></view> v-else-if="Number(v.status)<2"></view>
@ -94,9 +98,7 @@
{{ v.wjTime?.slice(0,10).replace(/-/g, '.') }} {{ v.wjTime?.slice(0,10).replace(/-/g, '.') }}
</view> </view>
<view class="middle-heng-father"> <view class="middle-heng-father">
<view class="middle-ball" <view class="middle-ball" v-if="Number(v.status)<2"></view>
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" />
@ -127,7 +129,7 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view class="white-zhezhao"></view> <!-- <view class="white-zhezhao"></view> -->
<view class="contain-right"> <view class="contain-right">
<view class="contain-right-title"> <view class="contain-right-title">
<view class="contain-right-button" @click="ification=true"> <view class="contain-right-button" @click="ification=true">
@ -136,7 +138,7 @@
筛选 筛选
</view> </view>
</view> </view>
<view class="contain-right-button" @click="goback()"> <view class="contain-right-button" @click="goback()" style="margin-right: 1.2vw;">
<image class="buttont-img" style="margin-top: 4rpx;" src="/static/index/purchaseorder/back.png" /> <image class="buttont-img" style="margin-top: 4rpx;" src="/static/index/purchaseorder/back.png" />
<view class="button-font"> <view class="button-font">
返回 返回
@ -147,7 +149,7 @@
<scroll-view scroll-y="true" class="middle-Y" scroll-with-animation :scroll-top="Invoitop"> <scroll-view scroll-y="true" class="middle-Y" scroll-with-animation :scroll-top="Invoitop">
<view class="middle-Y-father"> <view class="middle-Y-father">
<view class="middle-one" v-for="(v,i) in InvoicingList" :key='i' <view class="middle-one" v-for="(v,i) in InvoicingList" :key='i'
:style="{border: middletarget === i? '4rpx dashed #1083F8': '4rpx solid transparent',backgroundColor:middletarget === i?`#F9FCFF`:``}" :style="{border: middletarget === i? '4rpx solid #1083F8': '4rpx solid transparent',backgroundColor:middletarget === i?`#F9FCFF`:``}"
@click="clickmiddle(i)"> @click="clickmiddle(i)">
<image class="middle-img" <image class="middle-img"
:src="v.materialImg?serverUrl + v.materialImg : '/static/index/warehouse/procurement/k.png'" :src="v.materialImg?serverUrl + v.materialImg : '/static/index/warehouse/procurement/k.png'"
@ -158,7 +160,7 @@
</view> </view>
<view class="right-middle" <view class="right-middle"
style="white-space: nowrap;text-overflow:ellipsis;overflow: hidden;"> style="white-space: nowrap;text-overflow:ellipsis;overflow: hidden;">
{{ v.wlSpecificationModel }} 规格型号: {{ v.wlSpecificationModel }}
</view> </view>
<view style="color: #888888;"> <view style="color: #888888;">
采购数量: {{ v.purchaseQuantity + v.wlUnits }} 采购数量: {{ v.purchaseQuantity + v.wlUnits }}
@ -395,7 +397,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick} from 'vue'; import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick } from 'vue';
import { editIzNew, queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getShareUrlByCode, editShareInfo } from './api/lunpan.js' import { editIzNew, queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getShareUrlByCode, editShareInfo } from './api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import classification from './components/cgdclass.vue' import classification from './components/cgdclass.vue'
@ -404,9 +406,12 @@
const ification = ref(false) const ification = ref(false)
const serverUrl = ref("") const serverUrl = ref("")
onLoad(() => { onLoad(() => {
firstgetqueryCgdList();
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/'; serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
}) })
onMounted(() => {
firstgetqueryCgdList();
})
const tagesstatues = ["待入库", "待完结", "已完结"]; const tagesstatues = ["待入库", "待完结", "已完结"];
const searchValue = ref(""); const searchValue = ref("");
const middletarget = ref(0); const middletarget = ref(0);
@ -430,6 +435,7 @@
const plsbuy = ref([]) const plsbuy = ref([])
const nomessageshow = ref(false); const nomessageshow = ref(false);
const firstgetqueryCgdList = () => { const firstgetqueryCgdList = () => {
console.log("zzzz")
queryCgdList(plzinfo).then((res : any) => { queryCgdList(plzinfo).then((res : any) => {
plsbuy.value.push(...res.result.records) plsbuy.value.push(...res.result.records)
console.log("zzzz", plsbuy.value) console.log("zzzz", plsbuy.value)
@ -489,7 +495,7 @@
middletarget.value = 0; middletarget.value = 0;
} }
let num = Math.ceil((index + 1)) let num = Math.ceil((index + 1))
leftscrolltop.value = (num - 2) * 186; leftscrolltop.value = (num - 2) * 202;
lefttarget.value = index; lefttarget.value = index;
form.cgdId = plsbuy.value[index].id form.cgdId = plsbuy.value[index].id
form.pageNo = 1 form.pageNo = 1
@ -677,25 +683,42 @@
} }
}) })
} }
const jiansuotarget = ref(false); const jiansuotarget = ref(false);
// const getdonghua = () => { const basePath = '/static/index/procurement/' //
// jiansuotarget.value = true; const imgNormal = basePath + 'sh.png'
// setTimeout(()=>{ const imgActive = basePath + 'shr.png'
// jiansuotarget.value = false;
// },200) const imgSrc = ref(imgNormal)
// } const busy = ref(false) //
function handleClick() {
if (busy.value) return
busy.value = true
// active
imgSrc.value = imgActive
// 0.5
setTimeout(() => {
imgSrc.value = imgNormal
busy.value = false
}, 300)
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.contain { .contain {
background-color: rgb(239, 240, 244); background-color: #f4f4f4;
width: 100vw; // background-color:red;
width: 91vw;
height: 100vh; height: 100vh;
padding: 5vh 2vw 0 2vw; padding: 0 0 0 1.1vw;
display: flex; display: flex;
// overflow: hidden;
.contain-left { .contain-left {
height: 95vh; height: 100vh;
width: 30%; width: 30%;
overflow: hidden; overflow: hidden;
// background-color: green; // background-color: green;
@ -707,13 +730,32 @@
align-items: center; align-items: center;
position: relative; position: relative;
.title-ball {
width: 5.3vh;
height: 5.3vh;
border-radius: 50%;
margin-left: 10rpx;
background-color: #fff;
border: 2rpx solid #D9DADC;
display: flex;
justify-content: center;
align-items: center;
.title-ball-img {
width: 55%;
height: 55%;
}
}
.title-input { .title-input {
width: 71%; width: 68%;
height: 5vh; height: 5.1vh;
background-color: #E2E4E9; background-color: #fff;
font-size: 30rpx; font-size: 27.5rpx;
padding-left: 45rpx; padding-left: 26rpx;
border-radius: 40rpx; border-radius: 40rpx;
padding-top: 2rpx;
border: 2rpx solid #C9C9C9;
} }
.title-input-button { .title-input-button {
@ -736,7 +778,8 @@
.left-menu-father { .left-menu-father {
margin-top: 1.3vh; margin-top: 1.3vh;
width: 100%; width: 100%;
height: 84vh; height: 89.5vh;
// background-color: red;
.left-menu-scroll { .left-menu-scroll {
height: 100%; height: 100%;
@ -744,11 +787,11 @@
.pls-card { .pls-card {
width: 100%; width: 100%;
height: 26.5vh; height: 386rpx;
border: #0f9fff 3rpx solid; border: #0f9fff 4rpx solid;
background-color: #fff; background-color: #fff;
border-radius: 40rpx; border-radius: 40rpx;
margin-bottom: 2vh; margin-bottom: 18rpx;
padding: 0 30rpx; padding: 0 30rpx;
position: relative; position: relative;
@ -933,12 +976,18 @@
.contain-right { .contain-right {
z-index: 1; z-index: 1;
height: 95vh; height: 96vh;
width: 70%; width: 68.5%;
margin-left: 2%; border-radius: 30rpx;
margin-top: 0.3vw;
margin-left: 1.2%;
overflow: hidden; overflow: hidden;
background-color: #fff;
// background-color: red;
.contain-right-title { .contain-right-title {
margin-top: 16rpx;
margin-right: 20rpx;
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
display: flex; display: flex;
@ -956,7 +1005,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin: 0 0 0 0.7vw; margin: 0 0.8vw 0 0;
color: #555555; color: #555555;
image { image {
@ -967,6 +1016,7 @@
} }
.title-input-button:active, .title-input-button:active,
.contain-right-button:active { .contain-right-button:active {
color: #1083F8; color: #1083F8;
@ -994,7 +1044,7 @@
padding-left: 20rpx; padding-left: 20rpx;
.middle-one { .middle-one {
width: 440rpx; width: 610rpx;
height: 200rpx; height: 200rpx;
background-color: #F9F9F9; background-color: #F9F9F9;
border-radius: 30rpx; border-radius: 30rpx;
@ -1011,7 +1061,7 @@
} }
.middle-right { .middle-right {
width: 250rpx; width: 350rpx;
.right-title { .right-title {
width: 100%; width: 100%;
@ -1039,14 +1089,14 @@
} }
} }
.white-zhezhao { // .white-zhezhao {
position: fixed; // position: fixed;
height: 100%; // height: 100%;
background-color: #fff; // background-color: #fff;
width: 68%; // width: 68%;
top: 0; // top: 0;
left: 32%; // left: 32%;
} // }
.wuliao-title { .wuliao-title {
margin-top: 40rpx; margin-top: 40rpx;
@ -1527,6 +1577,4 @@
-webkit-transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
</style> </style>

View File

@ -313,8 +313,9 @@
const tharrlist = ref([]) const tharrlist = ref([])
const thlist = () => { const thlist = () => {
console.log("退货返回啥了啊",)
thdList(form).then(res => { thdList(form).then(res => {
console.log("退货返回啥了啊",res.result.records)
tharrlist.value.push(...res.result.records); tharrlist.value.push(...res.result.records);
if(!firstlook.value&&!res.result.records.length){ if(!firstlook.value&&!res.result.records.length){
nomessageshow.value = true; nomessageshow.value = true;

View File

@ -1,7 +1,7 @@
// 全局请求封装 // 全局请求封装
const base_url = 'https://www.focusnu.com/opeapi' const base_url = 'https://www.focusnu.com/opeapi'
// const base_url = 'http://192.168.2.27:8081/opeapi' // const base_url = 'http://192.168.2.27:8081/opeapi'
// const base_url = 'http://192.168.2.27:8081/opeapi/' // const base_url = 'http://192.168.2.55:8081/opeapi'
// 请求超出时间 // 请求超出时间
const timeout = 5000 const timeout = 5000
// 登录过期防止多次弹出 // 登录过期防止多次弹出