Browse Source

修改接口

master
lijuncheng 6 months ago
parent
commit
8f063fc1e0
  1. BIN
      nativeplugins/TestModule/android/TestModule.aar
  2. BIN
      nativeplugins/TestModule/libs/itextpdf-5.5.8.jar
  3. 35
      nativeplugins/TestModule/package.json
  4. 46
      src/api/request2.js
  5. 10
      src/common/classify.data.js
  6. 2
      src/pages.json
  7. 2
      src/pages/foam/check.vue
  8. 56
      src/pages/foam/downLink.vue
  9. 62
      src/pages/foam/foamNoGood.vue
  10. 31
      src/pages/foam/upLink.vue
  11. 84
      src/pages/index/index.vue
  12. 4
      src/pages/plastics/input.vue
  13. 59
      src/pages/plastics/plasticsNoGood.vue
  14. 29
      src/pages/plastics/scanCode.vue
  15. 5
      src/static/config.js
  16. 8
      src/store/modules/user.js

BIN
nativeplugins/TestModule/android/TestModule.aar

Binary file not shown.

BIN
nativeplugins/TestModule/libs/itextpdf-5.5.8.jar

Binary file not shown.

35
nativeplugins/TestModule/package.json

@ -0,0 +1,35 @@
{
"name": "TestModule",
"id": "TestModule",
"version": "1.0.0",
"description": "打印",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
"android": {
"integrateType": "aar",
"plugins": [
{
"type": "module",
"name": "TestModule",
"class": "io.dcloud.uniplugin.TestModule"
}
]
}
}
}

46
src/api/request2.js

@ -342,7 +342,7 @@ export function checkItemCodeByBucket(BucketCode,itemCode) {
*/
export function upLickSubmit(params) {
return request({
url: baseApi + "/Ware/Insert",
url: baseApi + "/Inventory/Insert",
method: "post",
data: params,
});
@ -353,18 +353,40 @@ export function upLickSubmit(params) {
*/
export function downLickSubmit(params) {
return request({
url: baseApi + "/Ware/Insert",
url: baseApi + "/Inventory/Insert",
method: "post",
data: params,
});
}
/**
* @param params 获取泡沫不良品原因
*/
export function getFoamNoGoodReason() {
return request({
url: baseApi + "/Inventory/GetDefectDictList",
method: "get",
data: {},
});
}
/**
* @param params 获取泡沫不良品类型
*/
export function getFoamNoGoodType() {
return request({
url: baseApi + "/Ware/Insert",
method: "get",
data: {},
});
}
/**
* @param params 泡沫不良品收货 提交
*/
export function foamNoGoodSubmit(params) {
return request({
url: baseApi + "/Ware/Insert",
url: baseApi + "/Inventory/Insert",
method: "post",
data: params,
});
@ -375,7 +397,7 @@ export function foamNoGoodSubmit(params) {
*/
export function plasticsNoGoodSubmit(params) {
return request({
url: baseApi + "/Ware/Insert",
url: baseApi + "/Inventory/Insert",
method: "post",
data: params,
});
@ -386,7 +408,7 @@ export function plasticsNoGoodSubmit(params) {
*/
export function getUpLinkPlaneNumberList() {
return request({
url: baseApi + "/Plan/GetList?Type=paomo",
url: baseApi + "/Inventory/GetPlanList?state=ok",
method: "get",
data: {},
});
@ -408,7 +430,7 @@ export function getFoamScanUpLinkInfo(machineCode) {
*/
export function getFoamNoGoodNumberList() {
return request({
url: baseApi + "/Plan/GetList?Type=paomo",
url: baseApi + "/Inventory/GetPlanList?state=nok",
method: "get",
data: {},
});
@ -419,9 +441,19 @@ export function getFoamNoGoodNumberList() {
*/
export function getPlasticsNoGoodNumberList() {
return request({
url: baseApi + "/Plan/GetList?Type=paomo",
url: baseApi + "/Inventory/GetPlanList?state=nok",
method: "get",
data: {},
});
}
/**
* @param params 开班件 提交
*/
export function scanCodeSubmit(params) {
return request({
url: baseApi + "/BeginShift/Insert",
method: "post",
data: params,
});
}

10
src/common/classify.data.js

@ -50,7 +50,7 @@ export default [{
"isShow":true,
"children": [{
"name": "注塑点检",
"code":"SPDA0000001",
"code":"SPDA000001",
"icon": "/query_supplier_deliver.svg",
"isShow":true,
"path": "/pages/plastics/check",
@ -58,15 +58,15 @@ export default [{
},
{
"name": "注塑投料",
"code":"SPDA0000002",
"code":"SPDA000002",
"icon": "/unbind_pallet.svg",
"isShow":true,
"path": "/pages/plastics/input",
"index": 2,
},
{
"name": "开件扫码",
"code":"SPDA0000003",
"name": "开件扫码",
"code":"SPDA000003",
"icon": "/unbind_pallet.svg",
"isShow":true,
"path": "/pages/plastics/scanCode",
@ -74,7 +74,7 @@ export default [{
},
{
"name": "不良品收货",
"code":"SPDA0000004",
"code":"SPDA000004",
"icon": "/unbind_pallet.svg",
"isShow":true,
"path": "/pages/plastics/plasticsNoGood",

2
src/pages.json

@ -114,7 +114,7 @@
{
"path": "pages/plastics/scanCode",
"style": {
"navigationBarTitleText": "开件扫码",
"navigationBarTitleText": "开件扫码",
"titleNView": {
"buttons": [{}]
}

2
src/pages/foam/check.vue

@ -1,5 +1,5 @@
<template>
<view class="page-wraper">
<view class="page-wraper" >
<view class="page-header flex"
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;">
<!-- <view class="flex u-col-center space-between"> -->

56
src/pages/foam/downLink.vue

@ -9,7 +9,7 @@
<view style="padding-bottom: 80rpx;width: 100%;">
<view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="扫描" subTitle="码" subTitleFontSize="26rpx" titleFontSize="35rpx"
<uni-section title="扫描产品码" subTitle="产品码" subTitleFontSize="26rpx" titleFontSize="35rpx"
type="line">
</uni-section>
@ -21,7 +21,7 @@
@confirm="onConfirm"></uni-easyinput>
</view>
</view>
<view class="" v-if="scanCode!=''">
<view class="" v-if="false">
<uni-table border stripe >
<!-- 表头行 -->
<!-- <uni-tr>
@ -46,7 +46,6 @@
</uni-table>
</view>
</view>
@ -122,8 +121,9 @@
methods: {
submit() {
if (this.scanCode == "") {
if (this.scanCheckCode == "") {
this.scanCheckCode=""
this.scanCode=""
this.showMessage("请先扫描")
return
}
@ -134,6 +134,10 @@
var param = {
id: this.$store.state.user.id,
createTime: getCurrDateTime(),
ProductCode:this.scanCheckCode,
Type:1,
State:2,//1.2,
User:this.$store.state.user.name
}
console.log("提交", JSON.stringify(param))
@ -152,37 +156,41 @@
})
},
resetData() {
this.scanCode == ""
this.scanCode =""
this.scanCheckCode=""
},
clearCode() {
this.scanCode == ""
this.scanCode = ""
this.scanCheckCode=""
},
onConfirm(data) {
if(data==undefined||data==""){
this.showMessage("扫描数据为空,请先输入")
if(!data){
this.showMessage("扫描数据不能为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getFoamScanUpLinkInfo(data).then(res => {
uni.hideLoading()
this.scanCode = data;
this.scanCheckCode = data;
console.log(data)
}).catch(error => {
this.scanCode = "";
this.scanCheckCode = "";
uni.hideLoading()
this.showMessage("扫描["+data+"]"+error)
})
this.scanCheckCode=data
// if(data==undefined||data==""){
// this.showMessage(",")
// return;
// }
// uni.showLoading({
// title: "",
// mask: true
// })
// getFoamScanUpLinkInfo(data).then(res => {
// uni.hideLoading()
// this.scanCode = data;
// this.scanCheckCode = data;
// console.log(data)
// }).catch(error => {
// this.scanCode = "";
// this.scanCheckCode = "";
// uni.hideLoading()
// this.showMessage("["+data+"]"+error)
// })
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},

62
src/pages/foam/foamNoGood.vue

@ -69,7 +69,7 @@
</view>
<view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="扫描" subTitle="码" subTitleFontSize="26rpx" titleFontSize="35rpx"
<uni-section title="扫描产品码" subTitle="产品码" subTitleFontSize="26rpx" titleFontSize="35rpx"
type="line">
</uni-section>
@ -81,7 +81,7 @@
</view>
</view>
<view class="" v-if="scanCode!=''">
<view class="" v-if="false">
<uni-table border stripe>
<!-- 表头行 -->
<!-- <uni-tr>
@ -139,7 +139,9 @@
<script>
import {
getFoamNoGoodNumberList,
foamNoGoodSubmit
foamNoGoodSubmit,
getFoamNoGoodReason,
getFoamNoGoodType
} from '@/api/request2.js';
import {
showConfirmMsg
@ -167,13 +169,15 @@
materialList: [],
planList: [],
scanCode: "",
scanCheckCode:"",
showReason: false,
showType: false,
reason: "",
type: "",
typeCode:"",
mode: 'selector',
reasonRange: ['破损', '返工与返修'],
typeRange: ["合格", "报废"]
typeRange: ["隔离", "报废"],
}
},
@ -191,14 +195,36 @@
},
confirmType(e) {
this.type = this.typeRange[e[0]];
console.log("原因", JSON.stringify(e))
console.log("类型", this.type)
if(this.type=="隔离"){
this.typeCode =3
}else if(this.type=="报废"){
this.typeCode =4
}
},
showReasonPicker() {
uni.showLoading({
title: "加载中",
mask: true
})
getFoamNoGoodReason().then(res => {
uni.hideLoading()
this.showReason = true;
this.reasonRange=[]
res.Result.forEach(item=>{
this.reasonRange.push(item.MFGNAME
)
})
}).catch(error => {
uni.hideLoading()
this.reasonRange = []
this.showMessage(error)
})
},
confirmReason(e) {
this.reason = this.reasonRange[e[0]];
console.log("原因", JSON.stringify(e))
console.log("原因", this.reason)
},
submit() {
if (this.planNumber == "") {
@ -213,15 +239,26 @@
this.showMessage("请选择类型")
return
}
if (this.scanCheckCode == "") {
this.scanCheckCode=""
this.showMessage("请先校验扫描码")
return
}
uni.showLoading({
title: "加载中",
mask: true
})
var param = {
planNumber: this.planNumber,
PlanID : this.planNumber,
id: this.$store.state.user.id,
createTime: getCurrDateTime(),
ProductCode:this.scanCheckCode,
Type:1,
State:this.typeCode,
MFGNAME:this.reason,
User: this.$store.state.user.name
}
console.log("提交", JSON.stringify(param))
foamNoGoodSubmit(param).then(res => {
@ -239,16 +276,22 @@
})
},
resetData() {
this.planNumber = "";
this.reason = ""
this.type = ""
this.scanCode = ""
this.scanCheckCode=""
},
clearCode() {
this.scanCode = "";
this.scanCheckCode=""
},
onConfirm(data) {
console.log(data)
if(!data){
this.showMessage("扫描数据不能为空")
return;
}
this.scanCode = data;
this.scanCheckCode=data
},
showPlanSelect() {
uni.showLoading({
@ -280,6 +323,7 @@
this.reason = ""
this.type = ""
this.scanCode = ""
this.scanCheckCode=""
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();

31
src/pages/foam/upLink.vue

@ -24,7 +24,7 @@
</view>
<view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="扫描" subTitle="码" subTitleFontSize="26rpx" titleFontSize="35rpx"
<uni-section title="扫描产品码" subTitle="产品码" subTitleFontSize="26rpx" titleFontSize="35rpx"
type="line">
</uni-section>
@ -37,7 +37,7 @@
</view>
</view>
<view class="" v-if="scanCode!=''">
<view class="" v-if="false">
<uni-table border stripe >
<!-- 表头行 -->
<!-- <uni-tr>
@ -63,8 +63,6 @@
</view>
</view>
</view>
@ -147,9 +145,9 @@
this.showMessage("请选择计划单号")
return
}
if (this.scanCode == "") {
if (this.scanCheckCode == "") {
this.scanCheckCode=""
this.showMessage("请先扫描")
this.showMessage("请先校验扫描")
return
}
@ -158,9 +156,14 @@
mask: true
})
var param = {
planNumber: this.planNumber,
PlanID : this.planNumber,
id: this.$store.state.user.id,
createTime: getCurrDateTime(),
ProductCode :this.scanCheckCode,
Type:1,
State:1,
User: this.$store.state.user.name
}
console.log("提交", JSON.stringify(param))
@ -180,13 +183,23 @@
},
resetData() {
this.planNumber = "";
this.scanCode == ""
this.scanCode =""
this.scanCheckCode=""
},
clearCode() {
this.scanCode = "";
this.scanCheckCode=""
},
onConfirm(data){
if(!data){
this.showMessage("扫描数据不能为空")
return;
}
this.scanCode = data;
this.scanCheckCode=data
},
onConfirm(data) {
onConfirm1(data) {
if(this.planNumber==""){
this.showMessage("请先选择单号")
this.scanCode = "";

84
src/pages/index/index.vue

@ -1,5 +1,5 @@
<template>
<view class="u-wrap">
<view class="u-wrap" @touchstart="touchScreen" @touchcancel="touchMove">
<!-- <view class="serch txt-16">
<uni-search-bar class="flex1" placeholder="请输入菜单名称" @confirm="search" @input="input" cancelButton="none"
@clear="clearfilterlist">
@ -29,7 +29,6 @@
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
:scroll-into-view="itemId">
<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text>
</view>
@ -70,7 +69,7 @@
<script>
import classifyData from '@/common/classify.data.js';
import config from '../../static/config.js'
export default {
components: {},
data() {
@ -93,14 +92,17 @@
menusCount: {},
filterList: [],
serchval: "",
backButtonPress: 0
backButtonPress: 0,
pageTimeOut: config.pageTimeOut,
timeCount: null
}
},
onLoad() {
var test =""
if (uni.getStorageSync("hasLogin")) {
var test = ""
if (uni.getStorageSync("hasLogin")) {
this.tabbar = this.getPowersByRoles();
this.startTimer();
} else {
this.tabbar = []
}
@ -110,6 +112,13 @@
this.getMenuItemTop()
}
},
beforeDestroy() {
if (this.timeCount) {
clearInterval(this.timeCount);
this.timeCount = null;
}
},
onHide() {},
onShow() {
@ -151,31 +160,62 @@
// },
mounted() {},
methods: {
getPowersByRoles(){
startTimer(){
var that = this;
this.timeCount = setInterval(()=> {
console.log("记时", that.pageTimeOut)
if(that.pageTimeOut>0&&that.pageTimeOut<=config.pageTimeOut){
that.pageTimeOut--;
}else {
console.log("停止", that.pageTimeOut)
clearInterval(this.timeCount);
this.timeCount = null;
uni.reLaunch({
url: "../login/index"
})
}
}, 1000)
},
touchScreen() {
this.pageTimeOut = config.pageTimeOut
if (this.timeCount) {
clearInterval(this.timeCount);
this.timeCount = null;
}
this.startTimer();
console.log("页面点击touchScreen", this.pageTimeOut)
},
touchMove(){
this.pageTimeOut = config.pageTimeOut
console.log("页面点击touchMove", this.pageTimeOut)
},
getPowersByRoles() {
var permissionList = this.$store.state.user.powers
var tempList=[];
classifyData.forEach(menuItem=>{
var tempList = [];
classifyData.forEach(menuItem => {
var temp = {
name :menuItem.name,
isShow:menuItem.isShow,
children:[]
}
menuItem.children.forEach(rightItem=>{
permissionList.forEach(permission=>{
if(rightItem.code==permission){
rightItem.isShow=true
name: menuItem.name,
isShow: menuItem.isShow,
children: []
}
menuItem.children.forEach(rightItem => {
permissionList.forEach(permission => {
if (rightItem.code == permission) {
rightItem.isShow = true
temp.children.push(rightItem)
}else {
rightItem.isShow=false
} else {
rightItem.isShow = false
}
})
})
tempList.push(temp)
})
var showList =[];
tempList.forEach(res=>{
if(res.children.length>0){
var showList = [];
tempList.forEach(res => {
if (res.children.length > 0) {
showList.push(res)
}
})

4
src/pages/plastics/input.vue

@ -247,7 +247,7 @@
if (this.bucketCode == "") {
this.bucketCode = ""
this.bucketCheckCode == ""
this.bucketCheckCode ==""
this.showMessage("2.料筒号", "请扫描料筒号")
return
}
@ -259,7 +259,7 @@
if (this.itemCode == "") {
this.itemCode = ""
this.itemCheckCode == ""
this.itemCheckCode = ""
this.showMessage("3.零件号", "请扫描零件号")
return
}

59
src/pages/plastics/plasticsNoGood.vue

@ -69,7 +69,7 @@
</view>
<view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="扫描" subTitle="码" subTitleFontSize="26rpx" titleFontSize="35rpx"
<uni-section title="扫描产品码" subTitle="产品码" subTitleFontSize="26rpx" titleFontSize="35rpx"
type="line">
</uni-section>
@ -139,6 +139,7 @@
<script>
import {
getPlasticsNoGoodNumberList,
getFoamNoGoodReason,
plasticsNoGoodSubmit
} from '@/api/request2.js';
import {
@ -167,13 +168,15 @@
materialList: [],
planList: [],
scanCode: "",
scanCheckCode:"",
showReason: false,
showType: false,
reason: "",
type: "",
typeCode:"",
mode: 'selector',
reasonRange: ['破损', '返工与返修'],
typeRange: ["合格", "报废"]
reasonRange: [],
typeRange: ["隔离", "报废"],
}
},
@ -185,20 +188,39 @@
},
methods: {
showTypePicker() {
this.showType = true;
},
confirmType(e) {
this.type = this.typeRange[e[0]];
console.log("原因", JSON.stringify(e))
console.log("类型", this.type)
if (this.type == "隔离") {
this.typeCode = 3
} else if (this.type == "报废") {
this.typeCode = 4
}
},
showReasonPicker() {
uni.showLoading({
title: "加载中",
mask: true
})
getFoamNoGoodReason().then(res => {
uni.hideLoading()
this.showReason = true;
this.reasonRange = []
res.Result.forEach(item => {
this.reasonRange.push(item.MFGNAME)
})
}).catch(error => {
uni.hideLoading()
this.reasonRange = []
this.showMessage(error)
})
},
confirmReason(e) {
this.reason = this.reasonRange[e[0]];
console.log("原因", JSON.stringify(e))
console.log("原因", this.reason)
},
submit() {
if (this.planNumber == "") {
@ -213,14 +235,24 @@
this.showMessage("请选择类型")
return
}
if (this.scanCheckCode == "") {
this.scanCheckCode=""
this.showMessage("请先校验扫描码")
return
}
uni.showLoading({
title: "加载中",
mask: true
})
var param = {
planNumber: this.planNumber,
PlanID : this.planNumber,
id: this.$store.state.user.id,
createTime: getCurrDateTime(),
ProductCode:this.scanCheckCode,
Type:2,
State:this.typeCode,
MFGNAME:this.reason,
User: this.$store.state.user.name
}
console.log("提交", JSON.stringify(param))
@ -239,16 +271,22 @@
})
},
resetData() {
this.planNumber = "";
this.reason = ""
this.type = ""
this.scanCode = ""
this.scanCheckCode=""
},
clearCode() {
this.scanCode = "";
this.scanCheckCode=""
},
onConfirm(data) {
console.log(data)
if(!data){
this.showMessage("扫描数据不能为空")
return;
}
this.scanCode = data;
this.scanCheckCode=data
},
showPlanSelect() {
uni.showLoading({
@ -266,7 +304,7 @@
})
this.$refs.selectPopup.openScanPopup(list)
} else {
this.showMessage("原料列表为0")
this.showMessage("单号列表为0")
}
}).catch(error => {
@ -280,6 +318,7 @@
this.reason = ""
this.type = ""
this.scanCode = ""
this.scanCheckCode=""
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();

29
src/pages/plastics/scanCode.vue

@ -9,7 +9,7 @@
<view style="padding-bottom: 80rpx;width: 100%;">
<view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="扫描" subTitle="码" subTitleFontSize="26rpx" titleFontSize="35rpx"
<uni-section title="扫描产品码" subTitle="产品码" subTitleFontSize="26rpx" titleFontSize="35rpx"
type="line">
</uni-section>
@ -20,7 +20,7 @@
@confirm="onConfirm"></uni-easyinput>
</view>
</view>
<view class="" v-if="scanCode!=''">
<view class="" v-if="false">
<uni-table border stripe>
<!-- 表头行 -->
<!-- <uni-tr>
@ -78,7 +78,7 @@
</script>
<script>
import {
foamInputSubmit
scanCodeSubmit
} from '@/api/request2.js';
import {
showConfirmMsg
@ -103,7 +103,8 @@
values: [],
origin: []
},
scanCode: ""
scanCode: "",
scanCheckCode:""
}
@ -117,8 +118,8 @@
methods: {
submit() {
if (this.scanCode == "") {
this.showMessage("请选择计划单号")
if (this.scanCheckCode == "") {
this.showMessage("请扫描产品码")
return
}
@ -127,13 +128,14 @@
mask: true
})
var param = {
scanCode: this.scanCode,
ProductCode: this.scanCheckCode,
id: this.$store.state.user.id,
createTime: getCurrDateTime(),
CreateDate: getCurrDateTime(),
CreateUser: this.$store.state.user.name
}
console.log("提交", JSON.stringify(param))
foamInputSubmit(param).then(res => {
scanCodeSubmit(param).then(res => {
uni.hideLoading()
this.showMessage("提交成功")
this.resetData()
@ -149,12 +151,19 @@
},
resetData() {
this.scanCode = "";
this.scanCheckCode=""
},
clearCode() {
this.scanCode = "";
this.scanCheckCode=""
},
onConfirm(data) {
console.log(data)
if(!data){
this.showMessage("扫描数据不能为空")
return;
}
this.scanCode = data;
this.scanCheckCode=data
},
openScanPopup() {

5
src/static/config.js

@ -2,8 +2,11 @@ let request_url = "http://123.56.115.74:8088/api"
// let request_url = "http://192.168.0.113:12080/admin-api"
let isDevelopment = true
//10秒
let pageTimeOut =30
export default {
request_url,
isDevelopment
isDevelopment,
pageTimeOut
}

8
src/store/modules/user.js

@ -65,10 +65,10 @@ const user = {
"PDA0000003",
"PDA0000004",
"PDA0000005",
"SPDA0000001",
"SPDA0000002",
"SPDA0000003",
"SPDA0000004"
"SPDA000001",
"SPDA000002",
"SPDA000003",
"SPDA000004"
]
commit('SET_ID',res.Result.LoginUserID)
commit('SET_NAME',res.Result.UserName)

Loading…
Cancel
Save