This commit is contained in:
wangweidong 2025-12-08 17:30:45 +08:00
parent 37f4b73fe3
commit cdfd4b74b7
3 changed files with 17 additions and 14 deletions

View File

@ -156,7 +156,7 @@
()=>props.show, ()=>props.show,
()=>{ ()=>{
if(props.show){ if(props.show){
// console.log(props.caigouobj) console.log(props.caigouobj)
let a = [ let a = [
{ {
multiUnitType:1, multiUnitType:1,
@ -172,17 +172,16 @@
}, },
{ {
multiUnitType:3, multiUnitType:3,
price:props.caigouobj.unitPrice, price:props.caigouobj.unitPrice?props.caigouobj.unitPrice:props.caigouobj.referenceUnitPrice,
unit:props.caigouobj.materialUnits, unit:props.caigouobj.materialUnits,
num:1 num:1
} }
]; ];
if(props.caigouobj.wlUnits){ if(props.caigouobj.wlUnits){
type.value = a.find(item=> type.value = a.find(item=>
item.unit == props.caigouobj.wlUnits item.unit == props.caigouobj.wlUnits
); );
// console.log(props.caigouobj.wlUnits,type.value) console.log(props.caigouobj.wlUnits,type.value)
}else{ }else{
type.value = a.find(item=> type.value = a.find(item=>
item.multiUnitType == props.caigouobj.multiUnitType item.multiUnitType == props.caigouobj.multiUnitType
@ -191,15 +190,13 @@
cgdwarr.value = [] cgdwarr.value = []
downslength.value = 0; downslength.value = 0;
// console.log("a",a)
a.forEach((element:any)=>{ a.forEach((element:any)=>{
if(element.unit&&element.num){ if(element.unit&&element.num){
cgdwarr.value.push(element) cgdwarr.value.push(element)
// console.log("!!!!",element)
} }
}) })
// console.log("a",a) console.log("a",a)
let n = []; let n = [];
let id = []; let id = [];
gysarr.value = []; gysarr.value = [];
@ -255,10 +252,7 @@
console.log(sx.value,num,bl) console.log(sx.value,num,bl)
} }
const cd =(v,i)=>{ const cd =(v,i)=>{
// return
type.value = v; type.value = v;
// console.log("cd",type.value,cgdwarr.value)
cgdwflag.value = false; cgdwflag.value = false;
cgdwec.value = false; cgdwec.value = false;
jssl() jssl()
@ -340,7 +334,6 @@
return return
} }
emit('right', relNumber.value,gysarr.value[gysidnum.value],type.value) emit('right', relNumber.value,gysarr.value[gysidnum.value],type.value)
} }
const colse = ()=>{ const colse = ()=>{

View File

@ -356,6 +356,7 @@
caigouobj.value.Limitnum += e; caigouobj.value.Limitnum += e;
} }
const right = (n : number, nm : any, type : Object) => { const right = (n : number, nm : any, type : Object) => {
console.log(nm, n, type)
// let d = Number(caigouobj.value.upperLimit)-Number(caigouobj.value.kcsl) // let d = Number(caigouobj.value.upperLimit)-Number(caigouobj.value.kcsl)
// if(d>=n){ // if(d>=n){

View File

@ -85,7 +85,7 @@
</view> </view>
<tanchuang @back="tanshow = false" :show="tanshow" font="确定将该物料从本次请领清单中移除吗?" @right="del"></tanchuang> <tanchuang @back="tanshow = false" :show="tanshow" font="确定将该物料从本次请领清单中移除吗?" @right="del"></tanchuang>
<submits :show="subshow" :list="addMaterial" @fill="subshow = false" :thdt="tharrlist[cardindex]" @config="tijiao"></submits> <submits :show="subshow" :list="addMaterial" @fill="subshow = false" :thdt="tharrlist[cardindex]" @config="tijiao"></submits>
<view class="thdfed" @click="uni.navigateTo({ url:'/pages/procurement/authorization' })"> <view class="thdfed" @click="uni.navigateTo({ url:'/pages/procurement/authorization' })" v-if="carnum>0">
<image src="/static/index/procurement/thd.png" mode="aspectFill"></image> <image src="/static/index/procurement/thd.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> </view>
@ -112,6 +112,17 @@
onMounted(() => { onMounted(() => {
thlist() thlist()
}) })
onShow(()=>{
let forms = {
pageNo: 1,
pageSize: 10,
status:3,
searchContent: ''
}
thdList(forms).then(res => {
carnum.value = res.result.total;
})
})
const submit = () => { const submit = () => {
cardcon(tharrlist.value[cardindex.value], cardindex.value); cardcon(tharrlist.value[cardindex.value], cardindex.value);
nextTick(() => { nextTick(() => {
@ -182,9 +193,7 @@
const tharrlist = ref([]) const tharrlist = ref([])
const thlist = () => { const thlist = () => {
thdList(form).then(res => { thdList(form).then(res => {
console.log(form)
tharrlist.value.push(...res.result.records); tharrlist.value.push(...res.result.records);
carnum.value = res.result.total;
status.value = res.result.total == tharrlist.value.length ? 'nomore' : 'loadmore'; status.value = res.result.total == tharrlist.value.length ? 'nomore' : 'loadmore';
if (form.pageNo == 1) { if (form.pageNo == 1) {
cardcon(tharrlist.value[cardindex.value], cardindex.value); cardcon(tharrlist.value[cardindex.value], cardindex.value);