This commit is contained in:
parent
0dcbf8424f
commit
cafa500b08
|
|
@ -157,4 +157,14 @@ export const getGysList = () => {
|
|||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getGysList`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
//(业务)拣货、销账操作
|
||||
export const pickingInfo = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/pickingInfo`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="contain">
|
||||
<view v-show="moreindex!=-1 || topbuttontarget!=-1 || openjianhuo || opengaijia || opendata || opencgr "
|
||||
class="mengban"
|
||||
@click="moreindex=-1; topbuttontarget=-1;openjianhuo=false;opengaijia=false;opendata=false;opencgr=false">
|
||||
@click="moreindex=-1; topbuttontarget=-1;openjianhuo=false;opengaijia=false;opendata=false;opencgr=false;clickflag=false">
|
||||
</view>
|
||||
<!-- 给模糊搜索用的 -->
|
||||
<view v-show="filteredCgrListsecond.length&&gysvalue" class="mengban" @click="closefilteredCgrListsecond">
|
||||
|
|
@ -263,27 +263,28 @@
|
|||
</view>
|
||||
</view>
|
||||
<view style="display: flex;margin-top: 30rpx;margin-left: 20rpx;">
|
||||
<view class="gray-button">
|
||||
<view class="gray-button" @click="jjnum(-1)" @longpress="handleTouchStart(-1)" @touchend="handleTouchEnd">
|
||||
-
|
||||
</view>
|
||||
<view class="gray-input">
|
||||
{{showvalue.num}}
|
||||
<view class="gray-input" style="width:12vw;">
|
||||
<text v-for="(v,i) in stringjh" :key="i">{{v}}</text>
|
||||
</view>
|
||||
<view class="gray-button">
|
||||
<!-- <text></text>{{showvalue.num}} -->
|
||||
<view class="gray-button" @click="jjnum(1)" @longpress="handleTouchStart(1)" @touchend="handleTouchEnd">
|
||||
+
|
||||
</view>
|
||||
</view>
|
||||
<view class="jianhuobutton">
|
||||
<view style="display: flex;">
|
||||
<view @click="openjianhuo = false"
|
||||
<view @click="openjianhuo = false;clickflag = false"
|
||||
style="width: 160rpx;height: 75rpx;background-color: #ebeced;color: #888888;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;">
|
||||
关闭
|
||||
</view>
|
||||
<view
|
||||
<view @click="config(1)"
|
||||
style="width: 160rpx;height: 75rpx;;color: #0385FA;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;border: 1rpx solid #0385FA;background: linear-gradient(to bottom,#E9F4FF,#CAE0F9);margin: 0 20rpx;">
|
||||
销账
|
||||
</view>
|
||||
<view
|
||||
<view @click="config(0)"
|
||||
style="width: 160rpx;height: 75rpx;;color: #0385FA;display: flex;justify-content: center;align-items: center;font-size: 30rpx;border-radius: 40rpx;border: 1rpx solid #0385FA;background: linear-gradient(to bottom,#E9F4FF,#CAE0F9);">
|
||||
入库
|
||||
</view>
|
||||
|
|
@ -1070,20 +1071,22 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mengban" v-if="open==1"> </view>
|
||||
<view class="mengban" v-if="open>0" @click="open = 0"> </view>
|
||||
<equiment :open="open==1" @del="del()" @back="open = 0" :content="'是否删除此图片?'"></equiment>
|
||||
<equiment :open="open==2" @del="sctp(1)" @back="open = 0" :content="'是否销账此物料?'"></equiment>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, onUnmounted } from 'vue';
|
||||
import { queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getCgrLis, getGysList, upload } from './api/lunpan.js'
|
||||
import { pickingInfo,queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain, getCgrLis, getGysList, upload } from './api/lunpan.js'
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import calendar from '@/component/public/calendar.vue'
|
||||
import superpicker from '@/component/public/superpicker.vue'
|
||||
import equiment from './components/equiment.vue';
|
||||
const open = ref(0);
|
||||
const typechange = ref(0);
|
||||
const stringjh = ref(0)
|
||||
const serverUrl = ref("");
|
||||
const opengaijia = ref(false);
|
||||
const openjianhuo = ref(false);
|
||||
|
|
@ -1099,6 +1102,7 @@
|
|||
return
|
||||
}
|
||||
openjianhuo.value = true;
|
||||
clickflag.value = true;
|
||||
donghuaopo.value = false;
|
||||
setTimeout(() => {
|
||||
donghuaopo.value = true;
|
||||
|
|
@ -1251,7 +1255,6 @@
|
|||
})
|
||||
getGysList().then((res : any) => {
|
||||
gyslist.value = res.result;
|
||||
console.log("isright", res)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -1315,12 +1318,10 @@
|
|||
queryCgdList(plzinfo).then((res : any) => {
|
||||
plsbuy.value.push(...res.result.records)
|
||||
alltotal.value = res.result.total
|
||||
// console.log("zzzz", res.result.total)
|
||||
if (res.result.records.length) {
|
||||
form.cgdId = plsbuy.value[0].id
|
||||
queryInvo();
|
||||
}
|
||||
|
||||
if (res.result.records.length < plzinfo.pageSize) {
|
||||
plzinfo.canpull = false;
|
||||
}
|
||||
|
|
@ -1358,21 +1359,7 @@
|
|||
form.cgdId = plsbuy.value[index].id
|
||||
form.pageNo = 1
|
||||
form.canpull = true;
|
||||
// console.log("!!!!",form)
|
||||
queryCgdInfoList(form).then(res => {
|
||||
InvoicingList.value = []
|
||||
console.log("数据呢", res.result.records)
|
||||
if (res.result.records.length == 1) {
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
}
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
if (form.pageNo) {
|
||||
clickmiddle(0);
|
||||
}
|
||||
})
|
||||
queryInvo()
|
||||
}
|
||||
const showvalue = ref({
|
||||
materialImg: ""
|
||||
|
|
@ -1412,6 +1399,7 @@
|
|||
if (Number(showvalue.value.status) == 0 || (Number(showvalue.value.status) > 0 && Number(showvalue.value.wrksl) > 0)) {
|
||||
showvalue.value.maxnum = (showvalue.value.rksl == 0 && showvalue.value.wrksl == 0 && showvalue.value.xzsl == 0) ? showvalue.value.purchaseQuantity : showvalue.value.wrksl
|
||||
showvalue.value.num = showvalue.value.maxnum;
|
||||
stringjh.value = toFixed4ByPadStart(showvalue.value.num);
|
||||
showvalue.value.jianhuobtn = true;
|
||||
}
|
||||
Object.assign(form, mobanform)
|
||||
|
|
@ -1420,13 +1408,7 @@
|
|||
const InvoicingList = ref([])
|
||||
const queryInvo = () => {
|
||||
queryCgdInfoList(form).then(res => {
|
||||
// if (res.result.records.length == 1) {
|
||||
// InvoicingList.value.push(...res.result.records);
|
||||
|
||||
// }
|
||||
// console.log(res.result.records)
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
|
||||
InvoicingList.value=res.result.records;
|
||||
clickmiddle(0);
|
||||
})
|
||||
}
|
||||
|
|
@ -1504,7 +1486,6 @@
|
|||
}
|
||||
const zuofei = () => {
|
||||
voidedCgdMain({ id: plsbuy.value[zuofeiindex.value].id }).then((res : any) => {
|
||||
// console.log("res", res)
|
||||
if (res.success) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
|
@ -1526,7 +1507,6 @@
|
|||
donghuaopo.value = false;
|
||||
setTimeout(() => {
|
||||
donghuaopo.value = true;
|
||||
console.log("zzz", donghuaopo.value)
|
||||
}, 100)
|
||||
}
|
||||
// 上传
|
||||
|
|
@ -1534,17 +1514,20 @@
|
|||
const uplod = () => {
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera'], //从相册选择
|
||||
crop:{
|
||||
quality:60
|
||||
},
|
||||
success: (e) => {
|
||||
console.log(JSON.stringify(e.tempFilePaths))
|
||||
let ar = JSON.stringify(e.tempFilePaths)
|
||||
albumlist.value.push(JSON.parse(ar)[0])
|
||||
// upload({file:url}).then(res=>{
|
||||
// albumlist.value.push(res.result)
|
||||
// console.log(albumlist.value)
|
||||
// })
|
||||
console.log(albumlist.value)
|
||||
uni.compressImage({
|
||||
src: JSON.parse(ar)[0],
|
||||
quality: 60,
|
||||
success: res => {
|
||||
albumlist.value.push(res.tempFilePath)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1563,23 +1546,134 @@
|
|||
open.value = 0;
|
||||
}
|
||||
//
|
||||
const clickflag = ref(false);
|
||||
const clknum = (item : any) => {
|
||||
// showvalue.value.maxnum = showvalue.value.purchaseQuantity : showvalue.value.wrksl
|
||||
// showvalue.value.num
|
||||
if (item == "AC") {
|
||||
|
||||
showvalue.value.num = 0;
|
||||
stringjh.value = toFixed4ByPadStart(showvalue.value.num);
|
||||
return
|
||||
}
|
||||
if (item == "AE") {
|
||||
showvalue.value.num = Math.trunc(showvalue.value.num / 10)
|
||||
stringjh.value = toFixed4ByPadStart(showvalue.value.num);
|
||||
|
||||
return
|
||||
}
|
||||
if (item == "CE") {
|
||||
|
||||
|
||||
if(clickflag.value==true){
|
||||
showvalue.value.num = item;
|
||||
clickflag.value = false;
|
||||
stringjh.value = toFixed4ByPadStart(showvalue.value.num)
|
||||
return
|
||||
}
|
||||
if (digitCountByString(showvalue.value.num) > 3) {
|
||||
} else {
|
||||
if (!showvalue.value.num) {
|
||||
showvalue.value.num = item
|
||||
} else {
|
||||
showvalue.value.num = showvalue.value.num * 10 + item;
|
||||
}
|
||||
// cy()
|
||||
stringjh.value = toFixed4ByPadStart(showvalue.value.num)
|
||||
}
|
||||
}
|
||||
// 数字转化
|
||||
const digitCountByString=(n)=> {
|
||||
const s = Math.abs(n).toString();
|
||||
return s.length;
|
||||
}
|
||||
const toFixed4ByPadStart = (n) => {
|
||||
const intPart = Math.floor(Math.abs(n));
|
||||
return String(intPart).padStart(4, '0');
|
||||
}
|
||||
// 加减
|
||||
const InteroutId = ref(null)
|
||||
const handleTouchStart = (e:number)=> {
|
||||
Interval(e)
|
||||
}
|
||||
const handleTouchEnd=()=> {
|
||||
clearInterval(InteroutId.value);
|
||||
// 清除定时器
|
||||
}
|
||||
const Interval = (e:number)=>{
|
||||
InteroutId.value = setInterval(() => {
|
||||
jjnum(e);
|
||||
}, 120);
|
||||
}
|
||||
const jjnum = (e:number)=>{
|
||||
let m = showvalue.value.maxnum;
|
||||
if(m<=showvalue.value.num&&e==1){showvalue.value.num = m; return}
|
||||
if(showvalue.value.num<=1&&e==-1){showvalue.value.num =1; return}
|
||||
showvalue.value.num+=e;
|
||||
stringjh.value = toFixed4ByPadStart(showvalue.value.num)
|
||||
}
|
||||
//
|
||||
const fag=(e)=>{
|
||||
let str = '';
|
||||
addupimg.value.forEach(item=>{
|
||||
str+=item+','
|
||||
})
|
||||
|
||||
let obj = {
|
||||
jhId:showvalue.value.id,
|
||||
jhNum:showvalue.value.num,
|
||||
jhType:xdex.value,
|
||||
jhPic:str==''?null:str,
|
||||
cgdId:showvalue.value.cgdId
|
||||
}
|
||||
pickingInfo(obj).then(res=>{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: res.message
|
||||
})
|
||||
addupimg.value = [];
|
||||
openjianhuo.value = false;
|
||||
queryInvo()
|
||||
})
|
||||
}
|
||||
const xdex = ref(-1)
|
||||
const addupimg = ref([])
|
||||
const sctp = (e:number)=>{
|
||||
if(albumlist.value.length==0){
|
||||
fag(e)
|
||||
return
|
||||
}
|
||||
albumlist.value.forEach(item=>{
|
||||
uni.uploadFile({
|
||||
url: uni.getStorageSync('serverUrl')+'/sys/common/upload',
|
||||
filePath:item,
|
||||
name: 'file',
|
||||
formData:{
|
||||
biz:'jhPic'
|
||||
},
|
||||
header:{
|
||||
'X-Access-Token':uni.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
const data = JSON.parse(res.data)
|
||||
addupimg.value.push(data.message)
|
||||
if(addupimg.value.length == albumlist.value.length){
|
||||
fag(e)
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const config=(e)=>{
|
||||
xdex.value = e;
|
||||
if(e==1){
|
||||
open.value = 2;
|
||||
}else{
|
||||
sctp(0)
|
||||
}
|
||||
}
|
||||
// 配置
|
||||
const SEG_COUNT = 8; // 分段数量
|
||||
const PADDING = 2; // 外层 padding(rpx)
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@
|
|||
gysidnum.value = e;
|
||||
gysflag.value = false;
|
||||
}
|
||||
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, "AC", 0, "CE"];
|
||||
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, "AC", 0, "AE"];
|
||||
const stringShow = ref("0000");
|
||||
const relNumber = ref(0);
|
||||
// const isZero = ref(false);
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
cy()
|
||||
return
|
||||
}
|
||||
if (item == "CE") {
|
||||
if (item == "AE") {
|
||||
relNumber.value = Math.trunc(relNumber.value / 10)
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
cy()
|
||||
|
|
@ -255,7 +255,7 @@
|
|||
let num = Number(props.caigouobj.upperLimit)-Number(props.caigouobj.kcsl);
|
||||
let m = Math.floor(num/type.value.num)
|
||||
if(m<=relNumber.value&&e==1){relNumber.value = m; return}
|
||||
if(relNumber.value<=1&&e==-1){relNumber.value==1; return}
|
||||
if(relNumber.value<=1&&e==-1){relNumber.value = 1; return}
|
||||
relNumber.value+=e;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
cy()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue