This commit is contained in:
wangweidong 2025-12-04 08:38:32 +08:00
parent 070665730f
commit 757341ead2
5 changed files with 283 additions and 29 deletions

View File

@ -113,3 +113,10 @@ export const confirmReceipt = (params) => {
data: params,
})
}
export const submitQld = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/submitQld`,
method: 'post',
data: params,
})
}

View File

@ -7,7 +7,7 @@
</view>
<scroll-view scroll-x="true" class="kcscrol guodu" @scroll="onScroll"
scroll-with-animation :scroll-left="scrollleft" :style="qb?'width:calc(100% - 21.8vw)':'width:calc(100% - 10vw)' ">
<view class="yjbox" v-for="(v,i) in Material" :key="i" @click="clickaddcar(v,i)">
<view class="yjbox" v-for="(v,i) in Material" :key="i" >
<image :src="v.materialInfo.materialImg?serverUrl+v.materialInfo.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill"></image>
<view>{{v.materialInfo.materialName}}</view>

View File

@ -6,10 +6,55 @@
<view>请领详情</view>
</view>
<view class="itemcan">
<text>{{ uni.getStorageSync('nuName')}}</text>
<text>请领区域:{{ uni.getStorageSync('nuName')}}</text>
<text>请领人:{{uni.getStorageSync('realname')}}</text>
<text>请领日期:{{times}}</text>
</view>
<view class="qlwl">
请领物料
</view>
<scroll-view scroll-y="true" class="wuliaolist">
<view class="list">
<view class="card" v-for="(v,i) in list" :key='i'>
<view class="speitem guodu" >
<image :src="v.materialInfo.materialImg?serverUrl+v.materialInfo.materialImg:'/static/index/procurement/k.png'"
mode="aspectFill">
</image>
<view class="cardp">
<view v-if="v.materialInfo.categoryName">{{v.materialInfo.categoryName}}</view>
<view v-if="v.materialInfo.typeName">{{v.materialInfo.typeName}}</view>
</view>
</view>
<view class="msitem guodu" >
<view>
<view>{{v.materialInfo.materialName}}</view>
</view>
<view>
<text style="white-space: nowrap;"> 规格型号: </text>
<view>{{v.materialInfo.specificationModel}}</view>
</view>
<view>
<view>
<text>{{v.qlNum?v.qlNum:'--'}}</text>
<text>请领数量</text>
</view>
<view>
<text>{{v.materialInfo.materialUnits}}</text>
<text>请领单位</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="plsbuy-bottom">
<view class="quxiao" @click="emit('fill')">
取消
</view>
<view class="plsbuy-bottom-blue" @click="emit('config')">
提交请领单
</view>
</view>
</view>
</view>
</template>
@ -19,17 +64,15 @@
import { queryMaterialInfo,queryQlwcLog} from '../api/api.js'
import defaultr from './default.vue'
const props = defineProps({
objtake: {
type: Object,
list: {
type: Array,
required: true
},
show: {
type: Boolean
}
})
const pageNo = ref(1)
const times = ref('')
const status = ref('loadmore')
onMounted(()=>{
let now = new Date();
let year = now.getFullYear();
@ -39,12 +82,11 @@
})
const wuobj = ref({})
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
const emit = defineEmits([ 'fill' ,'qingling'])
const emit = defineEmits([ 'fill' ,'submit','config'])
const showbox = ref(false)
const wcLog = ref([])
watch(()=>props.show,
()=>{
console.log(props.objtake)
console.log(props.list)
if(props.show==true){
setTimeout(()=>{
@ -52,16 +94,9 @@
},50)
}else{
showbox.value = false;
wcLog.value = [];
pageNo.value = 1;
status.value = "loadmore"
}
})
const scrolltolower = ()=>{
if (status.value=='loading'||status.value=='nomore') { return }
status.value = 'loading';
pageNo.value++;
}
</script>
<style scoped lang="less">
@ -76,6 +111,166 @@
left: 20vw;
z-index: 200;
padding:1vw 1.4vw;
.wuliaolist{
width: 100%;
height: 27vw;
.list{
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 1fr 1fr ;
padding-left: 0.6vw;
.card{
width: 27.5vw;
height: 13vw;
background: rgba(247, 247, 247, 0.5);
border-radius: 1.1vw;
position: relative;
overflow: hidden;
margin-bottom: 1.1vw;
padding: 1vw;
.msitem {
width: 11.5vw;
height: 100%;
position: absolute;
top:0;
left: 10vw;
>view {
margin-top: 0.25vw;
&:nth-child(3) {
width: 100%;
height: 3.4vw;
display: flex;
justify-content: space-between;
>view {
width: 50%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
margin-top:1vw;
white-space: nowrap;
&:nth-child(1){
padding-right: 1.7vw;
align-items: flex-start;
}
&:nth-child(2){
padding-left: 1.7vw;
align-items: flex-start;
}
&:nth-child(1)::after {
content: '';
position: absolute;
right: 0;
width: 100%;
height: 2.2vw;
border-right: 1px solid #C9C9C9;
top: 0.6vw;
}
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;
white-space: nowrap;
}
}
}
}
&:nth-child(2) {
display: flex;
justify-content: space-between;
flex-direction: column;
margin-top: 0.1vw;
view{
font-size: 1.4vw;
color: #888888;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
text {
font-weight: 400;
font-size: 1.1vw;
color: #777777;
margin-top: 0.25vw;
}
}
&:nth-child(1) {
view{
display: inline-block;
width: 10vw;
font-weight: bold;
font-size: 1.6vw;
color: #222222;
height: 3vw;
padding-top: 1.3vw;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
}
.speitem {
width: 10vw;
height: 100%;
display: inline-flex;
flex-direction: column;
position: absolute;
top:0;
left: 0;
.cardp {
width:8vw;
height: 4vw;
display: flex;
margin: 0 auto;
align-items: center;
justify-content: center;
flex-direction: column;
view {
min-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;
padding: 0 0.25vw;
}
}
>image {
width: 8.5vw;
height: 7.5vw;
margin: 0.7vw auto 0.25vw;
}
}
}
}
}
.qlwl{
width: 100%;
height: 3vw;
font-weight: 400;
font-size: 1.4vw;
color: #555555;
}
.itemcan{
width: 100%;
height: 6.6vw;
@ -124,4 +319,34 @@
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
.plsbuy-bottom {
width: 100%;
margin-top: 2vw;
height: 7vw;
display: flex;
justify-content: flex-end;
font-size: 35rpx;
padding-right: 1vw;
view{
display: flex;
justify-content: center;
align-items: center;
min-width: 9.1vw;
height: 3.8vw;
color: rgba(92, 121, 146, 1);
border-radius:1.9vw;
font-size: 1.8vw;
border: 1px solid #EDEDEF;
margin-left: 1vw;
padding: 0 2vw;
}
.quxiao{
background: #EDEDEF;
}
.plsbuy-bottom-blue {
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
border: 1px solid rgba(3,133,250,0.34);
color: #0385FA;
}
}
</style>

View File

@ -390,6 +390,6 @@
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
-webkit-overflow-scrolling: touch;
}
</style>

View File

@ -50,13 +50,13 @@
<medetails :show="detaishow" @fill="detaishow = false" @confirm="confirm" :objtake="objtake"></medetails>
<tanchuang @back="tanshow = false" :show="tanshow" font="确定将该物料从本次请领清单中移除吗?" @right="del"></tanchuang>
<takerecord :objtake="objtake" :show="recordshow" @fill="recordshow = false"></takerecord>
<submits></submits>
<submits :show="subshow" :list="addMaterial" @fill="subshow = false" @config="tijiao"></submits>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, watch, reactive } from 'vue';
import { queryInvoicingList,wlzd,queryGwcInfo,addGwc ,deleteGwcWl,removeAllGwc} from '../api/api.js'
import { queryInvoicingList,wlzd,queryGwcInfo,addGwc ,deleteGwcWl,removeAllGwc,submitQld} from '../api/api.js'
import addwl from '../common/addwl.vue';
import carditem from '../common/carditem.vue';
import takeing from '../common/takeing.vue';
@ -80,12 +80,11 @@
const detaishow = ref(false)
const tanshow = ref(false)
const recordshow = ref(false)
const subshow = ref(false)
const classication = ref<InstanceType<typeof ChildComponent>>()
onMounted(()=>{
config()
wuliao()
console.log(uni.getStorageSync('NUall'))
wuliao()
})
const addMaterial = ref([])
const wuliao = () =>{
@ -101,7 +100,6 @@
const listarr = ref([])
const status = ref('loadmore')
const config = ()=>{
console.log(form)
queryInvoicingList(form).then(res=>{
res.result.records.forEach(item=>{
item.zk = false;
@ -109,7 +107,6 @@
})
listarr.value.push(...res.result.records)
status.value = (res.result.total == listarr.value.length ? 'nomore' : 'loadmore')
console.log( listarr.value )
})
}
const scrolltolower = ( ) => {
@ -119,15 +116,20 @@
config()
}
const submit = ()=>{
wuliao();
subshow.value = true;
}
const adddel = (v)=>{
console.log(v)
listarr.value.forEach(item=>{
if(item.wlId == v.wlId){
console.log(item)
objtake.value = item
}
})
if(!objtake.value.wlId){
objtake.value = v;
}
tanshow.value = true;
console.log(objtake.value)
}
@ -137,12 +139,13 @@
elderId:form.elderId,
wlId:objtake.value.wlId
}
console.log(obj)
deleteGwcWl(obj).then(res=>{
if(res.success){
wuliao();
tanshow.value = false;
objtake.value.isAdd = null;
objtake.value.qlNum = null;
wuliao();
}else{
uni.showToast({
icon:'none',
@ -152,6 +155,7 @@
})
}
const delall = () =>{
console.log({nuId:form.nuId, elderId:form.elderId})
removeAllGwc({nuId:form.nuId, elderId:form.elderId}).then(res=>{
if(res.success){
wuliao();
@ -227,15 +231,15 @@
}
}
const right = (e,v) =>{
console.log(v)
let obj = {
kfId:v.id,
kfId:v.nuId,
wlId:v.wlId,
qlNum:e,
nuId:form.nuId,
elderId:form.elderId
}
addGwc(obj).then(res=>{
console.log(res)
if(res.success){
takeshow.value = false;
v.isAdd = 1;
@ -249,6 +253,24 @@
}
})
}
const tijiao = ()=>{
let obj = {
nuId:form.nuId,
elderId:form.elderId
}
submitQld(obj).then(res=>{
if(res.success&&res.result.status=='success'){
subshow.value = false;
wuliao();
}else{
uni.showToast({
icon:'none',
title:res.result.message
})
}
console.log(res)
})
}
const confirm = (e)=>{
form.categoryId = e.categoryId;
form.typeId = e.typeId;