Browse Source

新增库存品备货扫描一键选择

myd
qb 2 years ago
parent
commit
bd311e9663
  1. 13
      api/user.js
  2. 4
      config/host.js
  3. 11
      interfaces/pagesHome/StockUplist.ts
  4. 58
      pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue
  5. 1
      pagesHome/pages/CustomerSign/CustomerSign.vue
  6. 14
      pagesHome/pages/CustomerTrayDetails/CustomerTrayDetails.vue
  7. 63
      pagesHome/pages/StockUplist/StockUplist.vue
  8. 8
      unpackage/dist/dev/mp-weixin/api/user.js
  9. 2
      unpackage/dist/dev/mp-weixin/config/host.js
  10. 45
      unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.js
  11. 1
      unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.json
  12. 2
      unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.wxml
  13. 41
      unpackage/dist/dev/mp-weixin/pagesHome/pages/StockUplist/StockUplist.js

13
api/user.js

@ -1361,4 +1361,17 @@ export function distributionTrayDetail(data) {
method: "get",
data
});
}
/**
* 异常装车
* @param {Object} data
*/
export function postAbnormalTruckLoading(data) {
return request({
url: `logpm-distribution/app/delivery/abnormalLoading`,
method: "post",
data
});
}

4
config/host.js

@ -10,9 +10,9 @@
// zhy
// const devhost='http://192.168.10.48:8888/'
// tjj
const devhost='http://192.168.10.29:13000/'
// const devhost='http://192.168.10.29:13000/'
// cyz
// const devhost='http://192.168.10.75:8777/'
const devhost='http://192.168.10.75:8777/'
// cg
// const devhost='http://192.168.10.200:8888/'
/**

11
interfaces/pagesHome/StockUplist.ts

@ -43,5 +43,14 @@ export interface detailType{
/**
*
* */
items:any
items:any,
/**
*
*/
isscan: Boolean,
/**
*
*/
scancode: string,
trayId: string
}

58
pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue

@ -89,6 +89,18 @@
</view>
</view>
</scroll-view>
<!-- 异常装车弹出层 -->
<u-popup :show="showPopup" mode="center" @close="close" :customStyle="{'padding': '20px', 'border-radius': '5px'}" >
<view style="margin-bottom: 20rpx;">
<text>是否进行异常装车</text>
</view>
<view style="display: flex;">
<button style="margin-right: 10rpx;" @click="abnormalTruckLoading">提交</button>
<button @click="close">取消</button>
</view>
</u-popup>
<tiplist ref="tiplists"></tiplist>
<saomiao2></saomiao2>
</template>
@ -98,7 +110,8 @@
deliveryorder,
signforinventory,
deliveryloadingscan,
deliveryloadinginventory
deliveryloadinginventory,
postAbnormalTruckLoading
} from '@/api/user.js'
import {
onLoad,
@ -109,6 +122,7 @@
import cusSelects from '@/compoment/cus-selects-fan/cus-selects-fan.vue'
import { computed, inject, reactive, ref, toRefs, watchEffect } from "vue";
const utils = inject('utils') as any
const showPopup = ref<Boolean>(false)
let details = reactive({
schanvalue: '',
typearr: [
@ -229,15 +243,28 @@
* */
async function scandata() {
let loadingId = uni.getStorageSync('checkvehicle').id
//
if (details.orderStatus == 1) {
let data = {
reservationId: details.items.id,
deliveryId: details.id,
loadingId,
type: 1,
barcode: details.scancode
}
data.barcode = 'P00752306060908726'
let res = await deliveryloadingscan(data)
console.log(res);
const {code, audio} = res
//
if (code === 5000){
utils.ttsspke(audio)
//
showPopup.value = true
}
//
if (code === 3001) utils.ttsspke(audio)
//
} else if (details.orderStatus == 2) {
let data = {
reservationId: details.items.id,
@ -251,6 +278,7 @@
}
initpage()
}
function checkphon(index : number) {
// details.listcheckindex=index
if (details.listcheckindex == index) {
@ -259,6 +287,34 @@
details.listcheckindex = index
}
}
/**
* 异常装车
*/
function abnormalTruckLoading(){
let loadingId = uni.getStorageSync('checkvehicle').id
let data = {
reservationId: details.items.id,
deliveryId: details.id,
loadingId,
type: 1,
barcode: details.scancode
}
data.barcode = 'P00842306030843402'
//
postAbnormalTruckLoading(data)
//
showPopup.value = false
}
/**
* 关闭弹出窗
*/
function close() {
showPopup.value = false
}
const { listcheckindex, inputtxt, orderStatus, schanvalue, typearr, items, datalist } = toRefs(details)
</script>

1
pagesHome/pages/CustomerSign/CustomerSign.vue

@ -154,7 +154,6 @@
async function uplodimg(item){
let data={
reservationId:item.id,
}
let res=await signforprices(data)
let imglis=[],rearks=''

14
pagesHome/pages/CustomerTrayDetails/CustomerTrayDetails.vue

@ -29,7 +29,6 @@
<view>{{loadingNub}}</view>
</view>
</view>
<button @click="submitEvent">装车</button>
<scroll-view class="scve" scroll-y="true">
<view class="mabx">
<view class="itec" @click="checkphon(index)" v-if="orderStatus==1" v-for="(item,index) in datalist">
@ -77,7 +76,7 @@
signforinventory,
deliveryloadingscan,
deliveryloadinginventory,
distributionTrayDetail
distributionTrayDetail,
} from '@/api/user.js'
import {
onLoad,
@ -222,14 +221,16 @@
// reservationId: '1707271276416094210',
// deliveryId: '1707271279670874114',
loadingId,
type: 1,
type: 2,
barcode: details.scancode
}
data.barcode = details.datalist[0].trayCode
data.barcode = 'HTLQ000019'
let res = await deliveryloadingscan(data)
console.log('res', res);
const {code} = res
//
if (code === 3001 || code === 200) utils.ttsspke(res.audio)
initpage()
}
function checkphon(index : number) {
@ -241,9 +242,6 @@
}
}
function submitEvent(){
scandata()
}
const { listcheckindex, inputtxt, orderStatus, schanvalue, typearr, items, datalist } = toRefs(details)
</script>

63
pagesHome/pages/StockUplist/StockUplist.vue

@ -108,7 +108,8 @@
distributionStockupscanningCode,
distributionStockuplocationSelection
} from '@/api/user.js'
import { reactive, toRefs,ref } from "vue";
import { reactive, toRefs,ref,inject } from "vue";
const utils = inject('utils') as any
const tiplists=ref(null)
let details=reactive<detailType>({
reservationId:'',
@ -122,7 +123,10 @@
},
stockList:[],
stockupId:'',
items:{}
items:{},
isscan: false,
scancode: '',
trayId: ''
})
onLoad((op)=>{
details.reservationId=op.id
@ -131,14 +135,26 @@
// details.user.goodsAreaName=op.stockupArea
// details.reservationId='1682676882390781953'
})
onShow(()=>{
onShow(() => {
uni.$on('scancodedate', function (code) {
if (code) {
console.log(code);
details.scancode = code
details.isscan = true
if (details.isscan) scandata()
}
})
initpage()
})
function goorderdetail(item){
uni.navigateTo({
url:'/pagesHome/pages/orderDetails/orderDetails?orderCode='+item.orderCode
})
}
onHide(() => {
uni.$off('scancodedate')
details.isscan = false
})
function goorderdetail(item){
uni.navigateTo({
url:'/pagesHome/pages/orderDetails/orderDetails?orderCode='+item.orderCode
})
}
async function initpage(){
console.log(details.items);
let data={
@ -149,13 +165,13 @@
}
details.orderList=[]
let response=await distributionStockuporderList(data)
console.log(response);
details.user.consignee=response.data?.consignee
details.user.goodsAreaName=response.data?.goodsAreaName
details.user.planNum=response.data?.planNum
details.user.scanNum=response.data?.scanNum
details.orderList=response.data?.orderList
details.stockList=response.data?.stockList
details.isscan = false
}
function godetails(item:any){
uni.navigateTo({
@ -170,13 +186,15 @@
})
}
async function ckscanningCode(item){
let data={
stockupId:details.stockupId,
trayId:item.trayId,
reservationId:details.reservationId,
}
let res=await distributionStockupscanningCode(data)
async function ckscanningCode(item: any){
details.isscan = item.taryLean
details.trayId = item.trayId
// let data={
// stockupId:details.stockupId,
// trayId:item.trayId,
// reservationId:details.reservationId,
// }
// let res=await distributionStockupscanningCode(data)
}
function setorderStatus(state:number){
@ -238,6 +256,19 @@
}
})
}
/**
* */
async function scandata() {
let data={
trayBarCode: details.scancode,
stockupId:details.stockupId,
trayId: details.trayId,
reservationId:details.reservationId,
}
let res=await distributionStockupscanningCode(data)
if(res.audio) utils.ttsspke(res.audio)
initpage()
}
const { user,orderList,orderStatus,stockList }=toRefs(details)
</script>

8
unpackage/dist/dev/mp-weixin/api/user.js vendored

@ -756,6 +756,13 @@ function distributionTrayDetail(data) {
data
});
}
function postAbnormalTruckLoading(data) {
return utils_request.service({
url: `logpm-distribution/app/delivery/abnormalLoading`,
method: "post",
data
});
}
exports.AppPdaversiondetail = AppPdaversiondetail;
exports.BatchPrintPackages = BatchPrintPackages;
exports.addvalueaddvalueInfo = addvalueaddvalueInfo;
@ -796,6 +803,7 @@ exports.distributionStockupupdateStockArea = distributionStockupupdateStockArea;
exports.distributionTrayDetail = distributionTrayDetail;
exports.getMyWarehouseList = getMyWarehouseList;
exports.oauthtoken = oauthtoken;
exports.postAbnormalTruckLoading = postAbnormalTruckLoading;
exports.preserveCurrentWarehouse = preserveCurrentWarehouse;
exports.signforcustom = signforcustom;
exports.signforinventory = signforinventory;

2
unpackage/dist/dev/mp-weixin/config/host.js vendored

@ -1,5 +1,5 @@
"use strict";
const devhost = "http://192.168.10.29:13000/";
const devhost = "http://192.168.10.75:8777/";
const imghost = "";
const host = devhost;
const APPKEY = "h5u:h5u_secret";

45
unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.js vendored

@ -10,19 +10,22 @@ require("../../../config/host.js");
require("../../../utils/md5.js");
if (!Array) {
const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
const _component_tiplist = common_vendor.resolveComponent("tiplist");
const _component_saomiao2 = common_vendor.resolveComponent("saomiao2");
(_easycom_u_navbar2 + _component_tiplist + _component_saomiao2)();
(_easycom_u_navbar2 + _easycom_u_popup2 + _component_tiplist + _component_saomiao2)();
}
const _easycom_u_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_u_popup = () => "../../../uni_modules/uview-plus/components/u-popup/u-popup.js";
if (!Math) {
(_easycom_u_navbar + cusSelects)();
(_easycom_u_navbar + cusSelects + _easycom_u_popup)();
}
const cusSelects = () => "../../../compoment/cus-selects-fan/cus-selects-fan.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "CustomerOrdersDetails",
setup(__props) {
const utils = common_vendor.inject("utils");
const showPopup = common_vendor.ref(false);
let details = common_vendor.reactive({
schanvalue: "",
typearr: [
@ -142,13 +145,22 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
let loadingId = common_vendor.index.getStorageSync("checkvehicle").id;
if (details.orderStatus == 1) {
let data = {
reservationId: details.items.id,
deliveryId: details.id,
loadingId,
type: 1,
barcode: details.scancode
};
data.barcode = "P00752306060908726";
let res = await api_user.deliveryloadingscan(data);
console.log(res);
const { code, audio } = res;
if (code === 5e3) {
utils.ttsspke(audio);
showPopup.value = true;
}
if (code === 3001)
utils.ttsspke(audio);
} else if (details.orderStatus == 2) {
let data = {
reservationId: details.items.id,
@ -169,6 +181,22 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
details.listcheckindex = index;
}
}
function abnormalTruckLoading() {
let loadingId = common_vendor.index.getStorageSync("checkvehicle").id;
let data = {
reservationId: details.items.id,
deliveryId: details.id,
loadingId,
type: 1,
barcode: details.scancode
};
data.barcode = "P00842306030843402";
api_user.postAbnormalTruckLoading(data);
showPopup.value = false;
}
function close() {
showPopup.value = false;
}
const { listcheckindex, inputtxt, orderStatus, schanvalue, typearr, items, datalist } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return common_vendor.e({
@ -241,7 +269,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
})
} : {}, {
x: common_vendor.sr(tiplists, "03d20205-2", {
x: common_vendor.o(abnormalTruckLoading),
y: common_vendor.o(close),
z: common_vendor.o(close),
A: common_vendor.p({
show: showPopup.value,
mode: "center",
customStyle: {
"padding": "20px",
"border-radius": "5px"
}
}),
B: common_vendor.sr(tiplists, "03d20205-3", {
"k": "tiplists"
})
});

1
unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.json vendored

@ -4,6 +4,7 @@
"navigationStyle": "custom",
"usingComponents": {
"u-navbar": "../../../uni_modules/uview-plus/components/u-navbar/u-navbar",
"u-popup": "../../../uni_modules/uview-plus/components/u-popup/u-popup",
"cus-selects": "../../../compoment/cus-selects-fan/cus-selects-fan"
}
}

2
unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.wxml vendored

@ -1 +1 @@
<u-navbar wx:if="{{a}}" u-i="03d20205-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="hdtp"><view><view> 客户:{{b}}</view><view class="butlur" bindtap="{{c}}"> 录入包条码 </view></view><view><view>备货是否完成:{{d}}</view><view>装车是否完成:{{e}}</view></view></view><view class="hdtpnum"><view><view>订单总数</view><view>{{f}}</view></view><view><view>计划件数</view><view>{{g}}</view></view><view><view>装车件数</view><view>{{h}}</view></view><view><view>签收件数</view><view>{{i}}</view></view></view><view class="scinp"><view>齐套状态</view><view><cus-selects wx:if="{{k}}" bindchange="{{j}}" u-i="03d20205-1" bind:__l="__l" u-p="{{k}}"></cus-selects></view><view class="inputs"><input placeholder="请输入查询的订单号" value="{{l}}" bindinput="{{m}}"/></view><view bindtap="{{n}}" class="btscan">查询</view></view><view class="tabtip"><view bindtap="{{p}}"><view class="{{o}}">定制品</view></view><view bindtap="{{r}}"><view class="{{q}}">库存品</view></view></view><scroll-view class="scve" scroll-y="true"><view class="mabx"><block wx:if="{{s}}"><view wx:for="{{t}}" wx:for-item="item" class="itec" bindtap="{{item.i}}"><view class="contenbx1"><view><text style="color:#90A0AF" catchtap="{{item.a}}">订单编号:</text>{{item.b}}</view></view><view class="contenbx1"><view><text style="color:#90A0AF">配送数:</text>{{item.c}}</view><view><text style="color:#90A0AF">已扫码数:</text>{{item.d}}</view></view><view wx:if="{{item.e}}" class="xialaxz"><view wx:for="{{item.f}}" wx:for-item="ite"><view>包条码:{{ite.a}}</view><view>货物品类:{{ite.b}}</view><view>扫描状态:{{ite.c}}</view></view></view><view class="{{item.h}}">{{item.g}}</view></view></block><block wx:if="{{v}}"><view wx:for="{{w}}" wx:for-item="item" class="itec" bindtap="{{item.e}}"><view class="contenbx1"><view><text style="color:#90A0AF">SKU:</text>{{item.a}}</view></view><view class="contenbx1"><view><text style="color:#90A0AF">物品:</text>{{item.b}}</view><view><text style="color:#90A0AF">规格:</text>{{item.c}}</view></view><view class="contenbx1"><view><text style="color:#90A0AF">单位:</text>{{item.d}}</view></view></view></block></view></scroll-view><tiplist class="r" u-r="tiplists" u-i="03d20205-2" bind:__l="__l"></tiplist><saomiao2 u-i="03d20205-3" bind:__l="__l"></saomiao2>
<u-navbar wx:if="{{a}}" u-i="03d20205-0" bind:__l="__l" u-p="{{a}}"></u-navbar><view class="hdtp"><view><view> 客户:{{b}}</view><view class="butlur" bindtap="{{c}}"> 录入包条码 </view></view><view><view>备货是否完成:{{d}}</view><view>装车是否完成:{{e}}</view></view></view><view class="hdtpnum"><view><view>订单总数</view><view>{{f}}</view></view><view><view>计划件数</view><view>{{g}}</view></view><view><view>装车件数</view><view>{{h}}</view></view><view><view>签收件数</view><view>{{i}}</view></view></view><view class="scinp"><view>齐套状态</view><view><cus-selects wx:if="{{k}}" bindchange="{{j}}" u-i="03d20205-1" bind:__l="__l" u-p="{{k}}"></cus-selects></view><view class="inputs"><input placeholder="请输入查询的订单号" value="{{l}}" bindinput="{{m}}"/></view><view bindtap="{{n}}" class="btscan">查询</view></view><view class="tabtip"><view bindtap="{{p}}"><view class="{{o}}">定制品</view></view><view bindtap="{{r}}"><view class="{{q}}">库存品</view></view></view><scroll-view class="scve" scroll-y="true"><view class="mabx"><block wx:if="{{s}}"><view wx:for="{{t}}" wx:for-item="item" class="itec" bindtap="{{item.i}}"><view class="contenbx1"><view><text style="color:#90A0AF" catchtap="{{item.a}}">订单编号:</text>{{item.b}}</view></view><view class="contenbx1"><view><text style="color:#90A0AF">配送数:</text>{{item.c}}</view><view><text style="color:#90A0AF">已扫码数:</text>{{item.d}}</view></view><view wx:if="{{item.e}}" class="xialaxz"><view wx:for="{{item.f}}" wx:for-item="ite"><view>包条码:{{ite.a}}</view><view>货物品类:{{ite.b}}</view><view>扫描状态:{{ite.c}}</view></view></view><view class="{{item.h}}">{{item.g}}</view></view></block><block wx:if="{{v}}"><view wx:for="{{w}}" wx:for-item="item" class="itec" bindtap="{{item.e}}"><view class="contenbx1"><view><text style="color:#90A0AF">SKU:</text>{{item.a}}</view></view><view class="contenbx1"><view><text style="color:#90A0AF">物品:</text>{{item.b}}</view><view><text style="color:#90A0AF">规格:</text>{{item.c}}</view></view><view class="contenbx1"><view><text style="color:#90A0AF">单位:</text>{{item.d}}</view></view></view></block></view></scroll-view><u-popup wx:if="{{A}}" u-s="{{['d']}}" bindclose="{{z}}" u-i="03d20205-2" bind:__l="__l" u-p="{{A}}"><view style="margin-bottom:20rpx"><text>是否进行异常装车</text></view><view style="display:flex"><button style="margin-right:10rpx" bindtap="{{x}}">提交</button><button bindtap="{{y}}">取消</button></view></u-popup><tiplist class="r" u-r="tiplists" u-i="03d20205-3" bind:__l="__l"></tiplist><saomiao2 u-i="03d20205-4" bind:__l="__l"></saomiao2>

41
unpackage/dist/dev/mp-weixin/pagesHome/pages/StockUplist/StockUplist.js vendored

@ -20,6 +20,7 @@ if (!Math) {
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "StockUplist",
setup(__props) {
const utils = common_vendor.inject("utils");
const tiplists = common_vendor.ref(null);
let details = common_vendor.reactive({
reservationId: "",
@ -33,7 +34,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
},
stockList: [],
stockupId: "",
items: {}
items: {},
isscan: false,
scancode: "",
trayId: ""
});
common_vendor.onLoad((op) => {
details.reservationId = op.id;
@ -41,8 +45,21 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
details.items = JSON.parse(op.item);
});
common_vendor.onShow(() => {
common_vendor.index.$on("scancodedate", function(code) {
if (code) {
console.log(code);
details.scancode = code;
details.isscan = true;
if (details.isscan)
scandata();
}
});
initpage();
});
common_vendor.onHide(() => {
common_vendor.index.$off("scancodedate");
details.isscan = false;
});
function goorderdetail(item) {
common_vendor.index.navigateTo({
url: "/pagesHome/pages/orderDetails/orderDetails?orderCode=" + item.orderCode
@ -59,13 +76,13 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
};
details.orderList = [];
let response = await api_user.distributionStockuporderList(data);
console.log(response);
details.user.consignee = (_a = response.data) == null ? void 0 : _a.consignee;
details.user.goodsAreaName = (_b = response.data) == null ? void 0 : _b.goodsAreaName;
details.user.planNum = (_c = response.data) == null ? void 0 : _c.planNum;
details.user.scanNum = (_d = response.data) == null ? void 0 : _d.scanNum;
details.orderList = (_e = response.data) == null ? void 0 : _e.orderList;
details.stockList = (_f = response.data) == null ? void 0 : _f.stockList;
details.isscan = false;
}
function godetails(item) {
common_vendor.index.navigateTo({
@ -73,12 +90,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
});
}
async function ckscanningCode(item) {
let data = {
stockupId: details.stockupId,
trayId: item.trayId,
reservationId: details.reservationId
};
await api_user.distributionStockupscanningCode(data);
details.isscan = item.taryLean;
details.trayId = item.trayId;
}
function setorderStatus(state) {
details.orderStatus = state;
@ -129,6 +142,18 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
}
});
}
async function scandata() {
let data = {
trayBarCode: details.scancode,
stockupId: details.stockupId,
trayId: details.trayId,
reservationId: details.reservationId
};
let res = await api_user.distributionStockupscanningCode(data);
if (res.audio)
utils.ttsspke(res.audio);
initpage();
}
const { user, orderList, orderStatus, stockList } = common_vendor.toRefs(details);
return (_ctx, _cache) => {
return common_vendor.e({

Loading…
Cancel
Save