This commit is contained in:
Teng 2025-12-18 16:56:41 +08:00
parent 31589526f5
commit cbbf98f6e6
4 changed files with 93 additions and 51 deletions

View File

@ -431,10 +431,10 @@
<view class="bottom-left" @click="chongzhi"> <view class="bottom-left" @click="chongzhi">
重置 重置
</view> </view>
<view class="bottom-right" @click="openselect=false"> <view class="bottom-right" @click="openselect=false;search()">
确定 确定
<text style="font-size: 25rpx;margin-top: 5rpx;" v-if="alltotal>=99"> <text style="font-size: 25rpx;margin-top: 5rpx;" v-if="alltotal">
(99+采购单) {{ alltotal }}采购单
</text> </text>
</view> </view>
@ -1189,12 +1189,13 @@
const closefilteredCgrList = () => { const closefilteredCgrList = () => {
filteredCgrList.value = []; filteredCgrList.value = [];
cgrvalue.value = plzinfo.cgBy; cgrvalue.value = plzinfo.cgBy;
lookshuliang()
} }
const clickfilteredCgrList = (item : any) => { const clickfilteredCgrList = (item : any) => {
filteredCgrList.value = []; filteredCgrList.value = [];
plzinfo.cgBy = item.cgBy plzinfo.cgBy = item.cgBy
cgrvalue.value = plzinfo.cgBy; cgrvalue.value = plzinfo.cgBy;
search() lookshuliang()
} }
// --- --- // --- ---
@ -1257,14 +1258,14 @@
filteredCgrListsecond.value = []; filteredCgrListsecond.value = [];
gysvalue.value = ""; gysvalue.value = "";
plzinfo.suppliers = ""; plzinfo.suppliers = "";
search() lookshuliang()
} }
const clickfilteredCgrListsecond = (item : any, index : number) => { const clickfilteredCgrListsecond = (item : any, index : number) => {
filteredCgrListsecond.value = []; filteredCgrListsecond.value = [];
plzinfo.suppliers = item.suppliers; plzinfo.suppliers = item.suppliers;
gysvalue.value = item.suppliersName; gysvalue.value = item.suppliersName;
secondindex.value = index; secondindex.value = index;
search() lookshuliang()
} }
const cgrvalue = ref(""); const cgrvalue = ref("");
const gysvalue = ref(""); const gysvalue = ref("");
@ -1380,7 +1381,18 @@
const dateget = (res : datetype) => { const dateget = (res : datetype) => {
plzinfo.startTime = res.start; plzinfo.startTime = res.start;
plzinfo.endTime = res.end; plzinfo.endTime = res.end;
search() lookshuliang()
}
const lookshuliang = () => {
let data = {
...plzinfo,
pageNo : 1
}
queryCgdList(data).then((res : any) => {
alltotal.value = res.result.total
})
} }
const leftscrolltop = ref(0) const leftscrolltop = ref(0)

View File

@ -1,8 +1,7 @@
<template> <template>
<view class="contain"> <view class="contain">
<view <view v-show="moreindex!=-1 || topbuttontarget!=-1 || openjianhuo || opengaijia || opendata" class="mengban"
v-show="moreindex!=-1 || topbuttontarget!=-1 || openjianhuo || opengaijia || opendata" :style="opencgr||opengys||opendata ?{background:`transparent`}:{}"
class="mengban" :style="opencgr||opengys||opendata ?{background:`transparent`}:{}"
@click="moreindex=-1; topbuttontarget=-1;openjianhuo=false;opengaijia=false;opendata=false;opencgr=false;opengys=false;albumlist=[]"> @click="moreindex=-1; topbuttontarget=-1;openjianhuo=false;opengaijia=false;opendata=false;opencgr=false;opengys=false;albumlist=[]">
</view> </view>
<!-- 没数据了遮罩 --> <!-- 没数据了遮罩 -->
@ -420,7 +419,7 @@
<view class="bottom-left" @click="chongzhi"> <view class="bottom-left" @click="chongzhi">
重置 重置
</view> </view>
<view class="bottom-right" @click="openselect=false"> <view class="bottom-right" @click="openselect=false;search()">
确定 确定
<text style="font-size: 25rpx;margin-top: 5rpx;" v-if="alltotal"> <text style="font-size: 25rpx;margin-top: 5rpx;" v-if="alltotal">
{{ alltotal }}采购单 {{ alltotal }}采购单
@ -1152,12 +1151,13 @@
console.log("?????????") console.log("?????????")
filteredCgrList.value = []; filteredCgrList.value = [];
cgrvalue.value = plzinfo.cgBy; cgrvalue.value = plzinfo.cgBy;
lookshuliang()
} }
const clickfilteredCgrList = (item : any) => { const clickfilteredCgrList = (item : any) => {
filteredCgrList.value = []; filteredCgrList.value = [];
plzinfo.cgBy = item.cgBy plzinfo.cgBy = item.cgBy
cgrvalue.value = plzinfo.cgBy; cgrvalue.value = plzinfo.cgBy;
search() lookshuliang()
} }
// --- --- // --- ---
@ -1220,14 +1220,14 @@
filteredCgrListsecond.value = []; filteredCgrListsecond.value = [];
gysvalue.value = ""; gysvalue.value = "";
plzinfo.suppliers = ""; plzinfo.suppliers = "";
search() lookshuliang()
} }
const clickfilteredCgrListsecond = (item : any, index : number) => { const clickfilteredCgrListsecond = (item : any, index : number) => {
filteredCgrListsecond.value = []; filteredCgrListsecond.value = [];
plzinfo.suppliers = item.suppliers; plzinfo.suppliers = item.suppliers;
gysvalue.value = item.suppliersName; gysvalue.value = item.suppliersName;
secondindex.value = index; secondindex.value = index;
search() lookshuliang()
} }
const cgrvalue = ref(""); const cgrvalue = ref("");
const gysvalue = ref(""); const gysvalue = ref("");
@ -1311,7 +1311,7 @@
endTime: "", endTime: "",
cgBy: "", cgBy: "",
nuId: uni.getStorageSync('nuId'), nuId: uni.getStorageSync('nuId'),
status:'' status: ''
}) })
const mobanplzinfo = { const mobanplzinfo = {
pageNo: 1, pageNo: 1,
@ -1344,8 +1344,21 @@
const dateget = (res : datetype) => { const dateget = (res : datetype) => {
plzinfo.startTime = res.start; plzinfo.startTime = res.start;
plzinfo.endTime = res.end; plzinfo.endTime = res.end;
search() lookshuliang()
} }
const lookshuliang = () => {
let data = {
...plzinfo,
pageNo: 1
}
queryCgdList(data).then((res : any) => {
alltotal.value = res.result.total
})
}
const leftscrolltop = ref(0) const leftscrolltop = ref(0)
const plsbuy = ref([]) const plsbuy = ref([])

View File

@ -156,10 +156,10 @@
cardtarget.value=-1 cardtarget.value=-1
if(index===1){ if(index===1){
cardarray.value = filteredMenu(0) cardarray.value = filteredMenu(0)
console.log("??11111111",cardarray.value) // console.log("??11111111",cardarray.value)
}else if(index===2){ }else if(index===2){
cardarray.value = filteredMenu(2) cardarray.value = filteredMenu(2)
console.log("??11111111",cardarray.value) // console.log("??11111111",cardarray.value)
} }
leftarraytarget.value = index; leftarraytarget.value = index;

View File

@ -51,7 +51,7 @@
<view class="all-contain" v-show=" !nomessageshow"> <view class="all-contain" v-show=" !nomessageshow">
<scroll-view scroll-y="true" scroll-with-animation class="all-scroll" :scroll-top="leftscrolltop" <scroll-view scroll-y="true" scroll-with-animation class="all-scroll" :scroll-top="leftscrolltop"
@scrolltolower="plsbuytolower" :lower-threshold="200"> @scrolltolower="plsbuytolower" :lower-threshold="200">
<view class="scroll-items"> <view class="scroll-items">
<view class="scroll-item" v-for="(item,index) in plsbuy" :key="index" @click="pdurl(item)"> <view class="scroll-item" v-for="(item,index) in plsbuy" :key="index" @click="pdurl(item)">
<view class="scroll-item-title"> <view class="scroll-item-title">
@ -132,8 +132,11 @@
<view class="bottom-left" @click="chongzhi"> <view class="bottom-left" @click="chongzhi">
重置 重置
</view> </view>
<view class="bottom-right" @click="openselect=false"> <view class="bottom-right" @click="openselect=false;firstgetqueryCgdList()">
确定 确定
<text style="font-size: 25rpx;margin-top: 5rpx;" v-if="alltotal">
{{ alltotal }}采购单
</text>
</view> </view>
</view> </view>
<view class="more-title"> <view class="more-title">
@ -155,7 +158,7 @@
</view> </view>
<!-- <view class="more-select" style="margin-top: 10rpx;"> <!-- <view class="more-select" style="margin-top: 10rpx;">
盘点单号 盘点单号
</view> </view>
<view class="more-time-select" @click="pandian=true"> <view class="more-time-select" @click="pandian=true">
@ -245,13 +248,13 @@
</view> </view>
</view> </view>
<tanchuang :show="addshow" font="确定要新增盘点单吗" @back="addshow=false;" @right="addnew"> </tanchuang> <tanchuang :show="addshow" font="确定要新增盘点单吗" @back="addshow=false;" @right="addnew"> </tanchuang>
<errorshow :show="openmessage" :font="errormessage" @close="openmessage=false" /> <errorshow :show="openmessage" :font="errormessage" @close="openmessage=false" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue'; import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import { queryPddList, queryPddStartByList,addPddMain } from './api/lunpan.js' import { queryPddList, queryPddStartByList, addPddMain } from './api/lunpan.js'
import nomessage from './components/nomessage.vue' import nomessage from './components/nomessage.vue'
import defaultr from './components/default.vue' import defaultr from './components/default.vue'
import calendar from '@/component/public/calendar.vue' import calendar from '@/component/public/calendar.vue'
@ -266,12 +269,12 @@
const getSelectList = () => { const getSelectList = () => {
queryPddStartByList({nuId:uni.getStorageSync('nuId')}).then((res : any) => { queryPddStartByList({ nuId: uni.getStorageSync('nuId') }).then((res : any) => {
cgrlist.value = res.result; cgrlist.value = res.result;
}) })
} }
onShow(()=>{ onShow(() => {
chongzhi() chongzhi()
}) })
onMounted(() => { onMounted(() => {
@ -285,7 +288,8 @@
const dateget = (res : datetype) => { const dateget = (res : datetype) => {
plzinfo.startTime = res.start; plzinfo.startTime = res.start;
plzinfo.endTime = res.end; plzinfo.endTime = res.end;
firstgetqueryCgdList() // firstgetqueryCgdList()
lookshuliang()
} }
const lanjie = ref(false); const lanjie = ref(false);
@ -342,7 +346,7 @@
* changeName - 防抖搜索0.3 秒后无再次输入才执行 * changeName - 防抖搜索0.3 秒后无再次输入才执行
*/ */
function changeName(res : any) { function changeName(res : any) {
console.log("0000",res) console.log("0000", res)
if (!res.detail.value) { if (!res.detail.value) {
plzinfo.pddStartBy = ""; plzinfo.pddStartBy = "";
filteredCgrList.value = []; filteredCgrList.value = [];
@ -380,13 +384,24 @@
// console.log("?????????") // console.log("?????????")
filteredCgrList.value = []; filteredCgrList.value = [];
peoplename.value = plzinfo.pddStartBy; peoplename.value = plzinfo.pddStartBy;
firstgetqueryCgdList() lookshuliang()
} }
const clickfilteredCgrList = (item : any) => { const clickfilteredCgrList = (item : any) => {
filteredCgrList.value = []; filteredCgrList.value = [];
plzinfo.pddStartBy = item.name plzinfo.pddStartBy = item.name
peoplename.value = plzinfo.pddStartBy; peoplename.value = plzinfo.pddStartBy;
firstgetqueryCgdList() lookshuliang()
}
const lookshuliang = () => {
let data = {
...plzinfo,
pageNo: 1
}
queryPddList(data).then((res : any) => {
alltotal.value = res.result.total
})
} }
const pandian = ref(false) const pandian = ref(false)
const pandianclick = () => { const pandianclick = () => {
@ -421,6 +436,7 @@
plzinfo.startTime = ""; plzinfo.startTime = "";
plzinfo.pddStartBy = "" plzinfo.pddStartBy = ""
plzinfo.endTime = ""; plzinfo.endTime = "";
peoplename.value = ""
changetype(0) changetype(0)
setTimeout(() => { setTimeout(() => {
@ -456,8 +472,8 @@
// '1,2' -> // '1,2' ->
const arr = Array.from(set).filter(Boolean).sort((a, b) => a - b); const arr = Array.from(set).filter(Boolean).sort((a, b) => a - b);
plzinfo.pydOrPkd = arr.length ? arr.join(',') : ''; plzinfo.pydOrPkd = arr.length ? arr.join(',') : '';
lookshuliang()
firstgetqueryCgdList() // firstgetqueryCgdList()
} }
const nomessageshow = ref(false); const nomessageshow = ref(false);
const leftscrolltop = ref(0) const leftscrolltop = ref(0)
@ -480,7 +496,7 @@
cannomessage.value = false cannomessage.value = false
plsbuy.value = [] plsbuy.value = []
plsbuy.value.push(...res.result.records) plsbuy.value.push(...res.result.records)
// plsbuy.value.push(...res.result.records) // plsbuy.value.push(...res.result.records)
alltotal.value = res.result.total alltotal.value = res.result.total
if (res.result.records.length < plzinfo.pageSize) { if (res.result.records.length < plzinfo.pageSize) {
@ -505,7 +521,7 @@
if (!plzinfo.canpull) return if (!plzinfo.canpull) return
queryPddList(plzinfo).then((res : any) => { queryPddList(plzinfo).then((res : any) => {
plsbuy.value.push(...res.result.records) plsbuy.value.push(...res.result.records)
console.log("????",plzinfo,res.result.records) console.log("????", plzinfo, res.result.records)
alltotal.value = res.result.total alltotal.value = res.result.total
if (res.result.records.length < plzinfo.pageSize) { if (res.result.records.length < plzinfo.pageSize) {
plzinfo.canpull = false; plzinfo.canpull = false;
@ -521,25 +537,25 @@
} }
const errormessage = ref("") const errormessage = ref("")
const openmessage = ref(false) const openmessage = ref(false)
const addnew = () =>{ const addnew = () => {
addPddMain({nuId:uni.getStorageSync('nuId')}).then((res:any)=>{ addPddMain({ nuId: uni.getStorageSync('nuId') }).then((res : any) => {
console.log("res",res.result) console.log("res", res.result)
if(res.success){ if (res.success) {
addshow.value = false addshow.value = false
chongzhi(); chongzhi();
let pddobj = res.result; let pddobj = res.result;
console.log(pddobj) console.log(pddobj)
uni.navigateTo({url:'/pages/procurement/addtory?pddobj='+JSON.stringify(pddobj)}) uni.navigateTo({ url: '/pages/procurement/addtory?pddobj=' + JSON.stringify(pddobj) })
}else{ } else {
openmessage.value = true openmessage.value = true
errormessage.value = res.message errormessage.value = res.message
} }
}) })
} }
const pdurl = (v)=>{ const pdurl = (v) => {
console.log(v) console.log(v)
uni.navigateTo({url:'/pages/procurement/addtory?pddobj='+JSON.stringify(v)}) uni.navigateTo({ url: '/pages/procurement/addtory?pddobj=' + JSON.stringify(v) })
} }
</script> </script>
@ -1157,6 +1173,7 @@
} }
} }
} }
.input-next { .input-next {
position: fixed; position: fixed;
bottom: 850rpx; bottom: 850rpx;