niexiting 1 year ago
parent
commit
e4734f5089
  1. 56
      api/httpRequest3.js
  2. 152
      api/request2.js
  3. 25
      common/basic.js
  4. 4
      mycomponents/detail/comDetailCard.vue
  5. 1
      mycomponents/qty/RecommendQty.vue
  6. 64
      pages.json
  7. 198
      pages/home/index.vue
  8. 11
      pages/inspect/coms/inspectComDetailCard.vue
  9. 82
      pages/inspect/job/inspectDetail.vue
  10. 10
      pages/inspect/job/inspectJob.vue
  11. 122
      pages/inspect/job/inspectResult.vue
  12. 71
      pages/mine/about/index.vue
  13. 634
      pages/mine/avatar/index.vue
  14. 109
      pages/mine/help/index.vue
  15. 223
      pages/mine/index.vue
  16. 131
      pages/mine/info/edit.vue
  17. 44
      pages/mine/info/index.vue
  18. 91
      pages/mine/pwd/index.vue
  19. 105
      pages/mine/setting/index.vue
  20. 7
      pages/purchaseReceipt/job/receiptDetail.vue
  21. 41
      pages/purchaseReturn/job/returnDetail.vue
  22. 27
      pages/putaway/record/putawayRecord.vue
  23. 338
      pages/query/number.vue

56
api/httpRequest3.js

@ -0,0 +1,56 @@
import storage from '@/common/utils/storage'
function service(options = {}) {
var token = storage.getStorage(storage.constant.token)
var tenantId = 1
if(getApp()!=undefined){
tenantId = getApp().globalData.tenantId
}
var requestUrl = ""
if(getApp()!=undefined){
requestUrl = getApp().globalData.request_url
}
options.header = {
"content-type": "application/json",
"Authorization": "Bearer "+token,
"dataType":"json",
"tenant-id":tenantId
};
options.timeout = 10000
options.url = requestUrl+options.url
return new Promise((resolve, reject) => {
options.success = (res) => {
if (res ) {
if(res.statusCode == 200){
if(res.data.code==0){
resolve(res.data);
}else {
reject( res.data.msg)
}
}else {
reject( res.data.msg)
}
} else {
reject(res.data.msg)
}
};
options.fail = (error) => {
var message = error.errMsg
if (message === 'Network Error') {
message = '后端接口连接异常'
} else if (message.includes('timeout')) {
message = '系统接口请求超时'
} else if (message.includes('Request failed with status code')) {
message = '系统接口' + message.substr(message.length - 3) + '异常'
}
reject(message);
};
uni.request(options);
});
}
export default service;

152
api/request2.js

@ -1,4 +1,4 @@
import request from '@/api/httpRequest2.js'
import request from '@/api/httpRequest3.js'
// const baseApi = "/api/admin-api"
//公司地址
// 本地地址
@ -608,31 +608,32 @@ export function getPurchaseReturnRequestDetail(id) {
});
}
/**
* 采购退货 记录提交
* 采购退货 申请提交
* @param {*} params
*/
export function purchaseReturnRecordSubmit(params) {
export function purchaseReturnRequestSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/createRecord",
method: "put",
url: baseApi + "/wms/purchasereturn-request-main/create",
method: "post",
data: params,
});
}
/**
* 采购退货 申请提交
* 采购退货 记录提交
* @param {*} params
*/
export function purchaseReturnRequestSubmit(params) {
export function purchaseReturnRecordSubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put",
url: baseApi + "/wms/purchasereturn-record-main/create",
method: "post",
data: params,
});
}
/**
* 到货检验 任务
*
@ -732,18 +733,6 @@ export function getPutawayJobDetail(id) {
});
}
/**
* 原料上架 提交
* @param {*} params
*/
export function putawayJobSubmit(params) {
return request({
url: baseApi + "/wms/putaway-job-main/execute",
method: "put",
data: params,
});
}
/**
* 原料上架 承接任务
* @param {*} id
@ -770,6 +759,71 @@ export function cancleTakePutawayJob(id) {
});
}
/**
* 原料上架 任务提交
* @param {*} params
*/
export function putawayJobSubmit(params) {
return request({
url: baseApi + "/wms/putaway-job-main/execute",
method: "put",
data: params,
});
}
/**
* 原料上架申请 获取任务列表
* 任务状态
* 开始日期
* 结束日期
* 获取日期任务列表
* @param {*}
*/
export function getPutawayRequestList(params) {
return request({
url: baseApi + "/wms/putaway-request-main/senior",
method: "post",
data: params,
});
}
/**
* 原料上架申请 获取任务明细
* @param {*} id 任务id
*
*/
export function getPutawayRequestDetail(id) {
return request({
url: baseApi + "/wms/putaway-request-main/getPutawayRequestById?id=" + id,
method: "get",
data: {},
});
}
/**
* 原料上架申请 提交
* @param {*} params
*/
export function putawayRequestSubmit(params) {
return request({
url: baseApi + "/wms/putaway-request-main/create",
method: "post",
data: params,
});
}
/**
* 原料上架记录 提交
* @param {*} params
*/
export function putawayRecordSubmit(params) {
return request({
url: baseApi + "/wms/putaway-record-main/create",
method: "post",
data: params,
});
}
/**
* 发料任务 列表
* status 任务状态
@ -1978,60 +2032,6 @@ export function issueRecordSubmit(params) {
/**
* 原料上架申请 获取任务列表
* 任务状态
* 开始日期
* 结束日期
* 获取日期任务列表
* @param {*}
*/
export function getPutawayRequestList(params) {
return request({
url: baseApi + "/wms/putaway-request-main/senior",
method: "post",
data: params,
});
}
/**
* 原料上架申请 获取任务明细
* @param {*} id 任务id
*
*/
export function getPutawayRequestDetail(id) {
return request({
url: baseApi + "/wms/putaway-request-main/getPutawayRequestById?id=" + id,
method: "get",
data: {},
});
}
/**
* 原料上架申请 提交
* @param {*} params
*/
export function putawayRequestSubmit(params) {
return request({
url: baseApi + "/putaway-request-main/create",
method: "post",
data: params,
});
}
/**
* 原料上架记录 提交
* @param {*} params
*/
export function putawayRecordSubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-request-main/submit",
method: "put",
data: params,
});
}
/**
* 生产退料 任务获取任务列表
* 任务状态

25
common/basic.js

@ -4,7 +4,7 @@ export {
}
let jobStatusList = [];
let itemStatusList =[];
let itemStatusList = [];
let locationTypeList = [];
let uomList = [];
let inventoryStatusList = [];
@ -635,7 +635,7 @@ export function queryManageModel(managementList, itemCode) {
}
}
export function getPackingNumberAndBatch(managementList, itemCode,packingNumber,batch) {
export function getPackingNumberAndBatch(managementList, itemCode, packingNumber, batch) {
var itemInfo = {
packingNumber: "",
batch: ""
@ -677,19 +677,26 @@ export function getPackingNumberAndBatch(managementList, itemCode,packingNumber,
// scanErrorAudio();
// }
export function compare(key) {
export function compareTime() {
return function(a, b) {
// 按照时间降序
return Date.parse(a.time) - Date.parse(a.time)
}
}
//升序
export function compareAsc(key) {
return function(a, b) {
var val1 = a[key];
var val2 = b[key];
return val2 - val1;
return val1 - val2;
}
}
//倒序
export function compareDesc(key) {
return function(a, b) {
var val1 = a[key];
var val2 = b[key];
return val1 - val2;
return val2 - val1;
}
}
@ -704,9 +711,9 @@ export function goHome() {
*/
export function getTodayDate() {
var startTime = new Date(new Date().toLocaleDateString()).getTime();
var endTime = startTime+24*60*60*1000-1
console.log("获取时间",startTime+","+endTime)
return startTime+","+endTime;
var endTime = startTime + 24 * 60 * 60 * 1000 - 1
console.log("获取时间", startTime + "," + endTime)
return startTime + "," + endTime;
}
export function getCurrDate() {

4
mycomponents/detail/comDetailCard.vue

@ -68,8 +68,8 @@
default: true
},
locationTypeList: {
type: Object,
default: {}
type: Array,
default: []
},
},
watch: {

1
mycomponents/qty/RecommendQty.vue

@ -1,6 +1,5 @@
<template>
<view>
推荐
<view class="uni-flex uni-row center">
<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="text_recommend ">

64
pages.json

@ -17,49 +17,7 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": true
}
},
{
"path": "pages/mine/avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
}, {
"path": "pages/mine/info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
}, {
"path": "pages/mine/info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
}, {
"path": "pages/mine/pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
}, {
"path": "pages/mine/setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
}, {
"path": "pages/mine/help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
}, {
"path": "pages/mine/about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
},
{
"path": "pages/common/webview/index",
"style": {
@ -71,16 +29,6 @@
"navigationBarTitleText": "浏览文本"
}
},
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "WMS仓库管理系统-移动端",
"titleNView": {
"autoBackButton": "true",
"buttons": [{}]
}
}
},
{
"path": "pages/login/index",
"style": {
@ -644,16 +592,6 @@
"buttons": [{}]
}
}
}, {
"path": "pages/query/number",
"style": {
"navigationBarTitleText": "按库位查询库存",
"enablePullDownRefresh": true,
"titleNView": {
"autoBackButton": "true",
"buttons": [{}]
}
}
}, {
"path": "pages/query/container",
"style": {

198
pages/home/index.vue

@ -1,198 +0,0 @@
<template>
<u-grid>
<u-grid-item @click="onItemClick(item.menuSpace)" v-for="(item,index) in dataList">
<view class="content2">
<image src="/static/icons_ui/icons_common_sjadd.svg" style="width: 100rpx; height: 120rpx;">
</image>
</view>
<view class="content2" style="font-size: 30rpx;width: 100%; white-space: pre-wrap; text-align:center">
{{item.menuName}}
</view>
</u-grid-item>
</u-grid>
</template>
<script>
import {
getBalanceByLocationcode,
getBalanceByItemCode,
getDictionaryItem
} from '@/api/request.js';
export default {
data() {
return {
dataList: [{
menuName: '组件\n .. ',
menuSpace: '/pages/demo/demo'
}, {
menuName: '采购收货\n (任务)',
menuSpace: '/pages/purchaseReceipt/job/receiptJob'
}, {
menuName: '采购退货\n (任务)',
menuSpace: '/pages/purchaseReturn/job/returnJob'
},
{
menuName: '采购退货\n (直接)',
menuSpace: '/pages/purchaseReturn/record/returnRecord'
},
{
menuName: '按零件查询\n(库存)',
menuSpace: '/pages/query/item'
}, {
menuName: '按库位查询\n(库存)',
menuSpace: '/pages/query/location'
}, {
menuName: '按器具查询\n(库存)',
menuSpace: '/pages/query/container'
}, {
menuName: '单据查询\n(库存)',
menuSpace: '/pages/query/number'
},
{
menuName: '发料\n(任务)',
menuSpace: '/pages/issue/job/issueJob'
},
{
menuName: '发料接收\n(任务)',
menuSpace: '/pages/issue/job/issueReceiptJob'}
,
{
menuName: '直接发料\n ',
menuSpace: '/pages/issue/record/issueRecord'
},
{
menuName: '库存转移\n(自由)',
menuSpace: '/pages/transfer/record/transferFree'
},
{
menuName: "库存转移\n(合格转隔离)",
menuSpace: '/pages/transfer/record/transferOkToHold'
},
{
menuName: "库存转移\n(隔离转合格)",
menuSpace: '/pages/transfer/record/transferHoldToOk'
},
{
menuName: "原料上架\n(任务)",
menuSpace: '/pages/putaway/job/putawayJob'
},
{
menuName: "原料上架\n(记录)",
menuSpace: '/pages/putaway/record/putawayRecord'
},
{
menuName: "生产退料\n(任务)",
menuSpace: '/pages/productionreturn/job/returnJob'
},
{
menuName: "生产退料\n(合格退料)",
menuSpace: '/pages/productionreturn/record/returnToStore'
},
{
menuName: "生产退料\n(隔离退料)",
menuSpace: '/pages/productionreturn/record/returnToHold'
},
{
menuName: "盘点\n(任务)",
menuSpace: '/pages/count/job/countJob'
},
{
menuName: "盘点\n(记录)",
menuSpace: '/pages/count/record/countRecord'
},
{
menuName: "制品收货任务\n",
menuSpace: '/pages/productionReceipt/job/productionReceiptJob'
},
{
menuName: "制品直接收货\n",
menuSpace: '/pages/productionReceipt/record/productionReceiptRecord'
},
]
};
},
onLoad() {
var code ={
codes:["rwzt","kwlx","wpzt","jldw","kczt","qjzt","bzdw"]
}
uni.showLoading({
title:"获取配置信息..."
})
getDictionaryItem(code).then(res=>{
uni.hideLoading()
if(res.data){
var list =res.data;
uni.setStorageSync("dictionary",list)
}else {
uni.showToast({
title:"没有获取到数据",
duration:3000
})
}
}).catch(error=>{
uni.hideLoading()
uni.showToast({
title:error,
duration:3000
})
})
},
methods: {
onItemClick(menuSpace) {
uni.navigateTo({
url: menuSpace
});
},
purchasePutawayClick(e) {
uni.navigateTo({
url: '/pages/purchaseReceipt/job/receiptJob'
});
},
demoClick() {
uni.navigateTo({
url: '/pages/demo/demo'
});
},
itemQuery() {
uni.navigateTo({
url: '/pages/query/item'
});
},
locationQuery() {
uni.navigateTo({
url: '/pages/query/location'
});
},
issue() {
uni.navigateTo({
url: '/pages/issue/job/issueJob'
});
}
}
};
</script>
<style scoped lang="scss">
/* 下方这些scss变量为uView内置变量,详见开发 组件-指南-内置样式 */
.content {
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
}
.content2 {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
}
</style>

11
pages/inspect/coms/inspectComDetailCard.vue

@ -2,6 +2,9 @@
<view class="" style="background-color: #fff;">
<view class="">
<view class="" style="font-size: 32rpx;margin-left: 20rpx;">
<view class="">
检验类型 : {{getInspectType(jobContent.inspectType)}}
</view>
<view class="">
收货数量 : {{jobContent.receiveQty}}{{getUnitInfo(jobContent.uom)}}
</view>
@ -73,9 +76,9 @@
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
import {
getUnitInfo
getUnitInfo,
getInspectType
} from '@/common/directory.js';
export default {
@ -144,6 +147,10 @@
},
methods: {
getInspectType(value){
return getInspectType(value)
},
swipeClick(e, item,index) {
if (e.content.text == "详情") {
this.detail(item)

82
pages/inspect/job/inspectDetail.vue

@ -89,25 +89,28 @@
locationTypeList: [],
managementList: [],
selectedItem: {},
failedQty:0,
crackQty:0
failedQty: 0,
crackQty: 0,
inspectType: ""
};
},
onLoad(option) {
this.id = option.id;
this.failedQty = option.failedQty;
this.crackQty = option.crackQty;
this.inspectType = option.inspectType;
if (this.id != undefined) {
if (this.id != undefined && this.inspectType == "FULL") {
// //
// if (option.status == "1") {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
if (option.status == "1") {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
} else {
this.getDetail();
}
@ -119,24 +122,24 @@
}
},
// onBackPress(e) {
// //
// if (e.from == 'backbutton') {
// if (this.received) {
// //
// cancleTakeInspectJob(this.id).then(res => {
// uni.navigateBack();
// }).catch(error => {
// uni.navigateBack();
// })
// } else {
// uni.navigateBack();
// }
// return true;
// }
// },
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.received) {
//
cancleTakeInspectJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
onPullDownRefresh() {
this.getDetail();
@ -178,7 +181,7 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobContent.failedQty= this.failedQty
that.jobContent.failedQty = this.failedQty
that.jobContent.crackQty = this.crackQty;
that.subList = res.data.subList;
that.subList.forEach(res => {
@ -318,6 +321,21 @@
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (this.inspectType == "FULL") {
if (this.scanCount == this.subList.length) {
this.submitJob();
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
});
}
} else {
//
if (this.scanCount == this.subList.length) {
this.submitJob();
@ -337,6 +355,8 @@
});
}
}
}
},
submitJob() {
@ -447,7 +467,7 @@
// detail.produceDate = detail.balance.produceDate;
// detail.expireDate = detail.balance.expireDate;
}else {
} else {
detail.sampleQty = detail.qty;
detail.failedQty = 0;
detail.crackQty = 0;

10
pages/inspect/job/inspectJob.vue

@ -173,14 +173,22 @@
},
openJobDetail(item) {
// uni.navigateTo({
// url: './inspectDetail?id=' + item.id + '&status=' + item.status
// });
if(item.inspectType=="FULL"){
uni.navigateTo({
url: './inspectDetail?id=' + item.id + '&status=' + item.status+'&inspectType=' + item.inspectType
});
}else {
uni.navigateTo({
url: './inspectResult?id=' + item.id + '&status=' + item.status
});
}
},
showItemList(itemList) {

122
pages/inspect/job/inspectResult.vue

@ -50,9 +50,9 @@
<view class="pda-list-cell-left">
<view class="uni-label">不合格数量</view>
</view>
<view class="pda-list-cell-db" >
<uni-easyinput :inputBorder="true" type="number" placeholder="请输入数字"
v-model="jobContent.failedQty" @blur="failedQtyConfirm" class="count-input">
<view class="pda-list-cell-db">
<uni-easyinput :inputBorder="true" type="number" placeholder="请输入数字" v-model="jobContent.failedQty"
@blur="failedQtyConfirm" class="count-input">
</uni-easyinput>
</view>
</view>
@ -62,18 +62,18 @@
<view class="pda-list-cell-left">
<view class="uni-label">报废数量</view>
</view>
<view class="pda-list-cell-db" >
<view class="pda-list-cell-db">
<uni-easyinput placeholder="请输入数字" type="number" v-model="jobContent.crackQty" @blur=""
class="count-input">
</uni-easyinput>
</view>
</view>
<view class="pda-list-cell" >
<view class="pda-list-cell">
<view class="pda-list-cell-left">
<view class="uni-label">下一步动作</view>
</view>
<view class="pda-list-cell-db" >
<view class="pda-list-cell-db">
<uni-data-picker class='uni-data-picker' placeholder="请选择下一步动作" popup-title="下一步动作"
@change="nextStepChange" :localdata="nextActionList" v-model="nextAction">
</uni-data-picker>
@ -84,9 +84,9 @@
<view class="pda-list-cell-left">
<view class="uni-label">最终不合格</view>
</view>
<view class="pda-list-cell-db" >
<uni-easyinput placeholder="待计算" type="number" :disabled="true"
v-model="jobContent.notPassedQty" class="count-input">
<view class="pda-list-cell-db">
<uni-easyinput placeholder="待计算" type="number" :disabled="true" v-model="jobContent.notPassedQty"
class="count-input">
</uni-easyinput>
</view>
</view>
@ -248,10 +248,10 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.detailList = res.data.subList;
that.inspectType =that.jobContent.inspectType;
that.inspectType = that.jobContent.inspectType;
that.jobContent.goodQty = null, //
that.jobContent.failedQty = null,//
that.jobContent.crackQty = null,//
that.jobContent.failedQty = null, //
that.jobContent.crackQty = null, //
that.jobContent.notPassedQty = null; //
} else {
that.showMessage('列表数据为0');
@ -291,27 +291,28 @@
return getUnitInfo(value).label
},
nextStepChange(e){
nextStepChange(e) {
this.nextAction = e.detail.value[0].value;
this.calcNotPassQty();
},
calcNotPassQty(){
calcNotPassQty() {
var failedQty = Number(this.jobContent.failedQty == null ? 0 : this.jobContent.failedQty)
//()
if (this.inspectType == 'FUll' ) {
if (this.inspectType == 'FUll') {
//
this.jobContent.notPassedQty = failedQty
}else if(this.inspectType == 'SAMPLING'){
} else if (this.inspectType == 'SAMPLING') {
//
//
//
if (this.nextAction == "FULL_INSPECT"||this.nextAction == "PARTIAL_OK") {
if (this.nextAction == "FULL_INSPECT" || this.nextAction == "PARTIAL_OK") {
// =
this.jobContent.notPassedQty = failedQty
}else if(this.nextAction=="ALL_NOK"){
} else if (this.nextAction == "ALL_NOK") {
//=-
this.jobContent.notPassedQty = Number(this.jobContent.receiveQty)-Number(this.jobContent.crackQty==null?0:this.jobContent.crackQty)
this.jobContent.notPassedQty = Number(this.jobContent.receiveQty) - Number(this.jobContent
.crackQty == null ? 0 : this.jobContent.crackQty)
}
}
@ -342,24 +343,38 @@
//==0()
if (failedQty == 0) {
//
this.jobContent.subList.forEach(res=>{
if (crackQty == 0) {
//==0
this.jobContent.subList.forEach(res => {
res.handleQty = res.qty
res.failedQty = 0;
res.notPassedQty = 0;
res.crackQty = 0;
res.goodQty = this.jobContent.receiveQty;
res.toInventoryStatus = res.inventoryStatus
res.failedReason ="";
res.goodQty = res.qty;
res.failedReason = "";
res.photos = ""
res.inspectResult =""
res.inspectUser =this.$store.state.user.id
res.inspectResult = ""
res.toInventoryStatus = "OK"
res.inspectUser = this.$store.state.user.id
})
this.jobContent.nextAction = this.nextAction;
this.jobContent.nextAction = "";
this.jobContent.goodQty = this.jobContent.receiveQty
this.submitJob(this.jobContent)
} else {
//0
//
uni.navigateTo({
url: './inspectDetail?id=' + this.id +
'&status=' + this.status +
'&failedQty=' + this.jobContent.failedQty +
'&crackQty=' + this.jobContent.crackQty
});
}
} else {
//>0
//
if (this.nextAction == null) {
@ -369,64 +384,74 @@
//
if (this.nextAction == "ALL_NOK") {
//
this.jobContent.subList.forEach(res=>{
this.jobContent.subList.forEach(res => {
res.handleQty = res.qty
res.failedQty = this.jobContent.receiveQty;
res.notPassedQty = this.jobContent.receiveQty;
res.failedQty = res.qty;
res.notPassedQty = res.qty;
res.crackQty = 0;
res.goodQty = 0;
res.toInventoryStatus = "NOK"
res.failedReason ="";
res.failedReason = "";
res.photos = ""
res.inspectResult =""
re.inspectUser =this.$store.state.user.id
res.inspectResult = ""
res.toInventoryStatus = "NOK"
re.inspectUser = this.$store.state.user.id
})
this.jobContent.nextAction = this.nextAction;
this.jobContent.goodQty = 0
this.submitJob(this.jobContent)
//
} else if (this.nextAction == "PARTIAL_OK") {
//
uni.navigateTo({
url: './inspectDetail?id=' + this.id +
'&status=' + this.status+
'&failedQty=' + this.jobContent.failedQty+
'&status=' + this.status +
'&failedQty=' + this.jobContent.failedQty +
'&crackQty=' + this.jobContent.crackQty
});
//===
//
} else if (this.nextAction == "FULL_INSPECT") {
//
this.jobContent.subList.forEach(res=>{
this.jobContent.subList.forEach(res => {
res.handleQty = res.qty
res.failedQty = 0;
res.notPassedQty = 0;
res.crackQty = 0;
res.goodQty = this.jobContent.receiveQty;
res.toInventoryStatus = res.inventoryStatus
res.failedReason ="";
res.goodQty = res.qty;
res.failedReason = "";
res.photos = ""
res.inspectResult =""
res.inspectResult = ""
res.toInventoryStatus = "OK"
res.inspectUser = this.$store.state.user.id
})
this.jobContent.goodQty = this.jobContent.receiveQty
this.jobContent.nextAction = this.nextAction;
this.submitJob(this.jobContent)
}
}
},
submitJob(params){
submitJob(params) {
uni.showLoading({
title: "提交中....",
mask: true
});
console.log("提交参数", JSON.stringify(params));
inspectJobSubmit(params).then(res=>{
inspectJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, )
var hint="";
if(this.jobContent.nextAction=="FULL_INSPECT"){
hint ="提交成功<br>生成到货检验任务" + res.data
}else {
hint ="提交成功<br>生成到货检验记录" + res.data
}
this.showCommitSuccessMessage(hint)
} else {
this.showErrorMessage("提交失败["+res.msg+"]")
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error=>{
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
@ -440,8 +465,7 @@
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
if (res) {}
});
},

71
pages/mine/about/index.vue

@ -1,71 +0,0 @@
<template>
<view class="about-container">
<view class="header-section text-center">
<image style="width: 150rpx;height: 150rpx;" src="/static/logo200.png" mode="widthFix">
</image>
<uni-title type="h2" title="若依移动端"></uni-title>
</view>
<view class="content-section">
<view class="menu-list">
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>版本信息</view>
<view class="text-right">v{{version}}</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>官方邮箱</view>
<view class="text-right">ruoyi@xx.com</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>服务热线</view>
<view class="text-right">400-999-9999</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>公司网站</view>
<view class="text-right">
<uni-link :href="url" :text="url" showUnderLine="false"></uni-link>
</view>
</view>
</view>
</view>
</view>
<view class="copyright">
<view>Copyright &copy; 2022 ruoyi.vip All Rights Reserved.</view>
</view>
</view>
</template>
<script setup>
import config from '@/config.js'
const url=config.appInfo.site_url;
const version=config.appInfo.version;
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.copyright {
margin-top: 50rpx;
text-align: center;
line-height: 60rpx;
color: #999;
}
.header-section {
display: flex;
padding: 30rpx 0 0;
flex-direction: column;
align-items: center;
}
</style>

634
pages/mine/avatar/index.vue

@ -1,634 +0,0 @@
<template>
<view class="container">
<view class="page-body uni-content-info">
<view class='cropper-content'>
<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
:style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
<view class="uni-cropper-view-box">
<view class="uni-cropper-dashed-h"></view>
<view class="uni-cropper-dashed-v"></view>
<view class="uni-cropper-line-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-line-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-t" data-drag="top" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-tr" data-drag="topTight"></view>
<view class="uni-cropper-point point-r" data-drag="right" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-rb" data-drag="rightBottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-b" data-drag="bottom" @touchstart.stop="dragStart" @touchmove.stop="dragMove" @touchend.stop="dragEnd"></view>
<view class="uni-cropper-point point-bl" data-drag="bottomLeft"></view>
<view class="uni-cropper-point point-l" data-drag="left" @touchstart.stop="dragStart" @touchmove.stop="dragMove"></view>
<view class="uni-cropper-point point-lt" data-drag="leftTop"></view>
</view>
</view>
</view>
</view>
</view>
<view class='cropper-config'>
<button type="primary reverse" @click="getImage" style='margin-top: 30rpx;'> 选择头像 </button>
<button type="warn" @click="getImageInfo" style='margin-top: 30rpx;'> 提交 </button>
</view>
<canvas canvas-id="myCanvas" :style="'position:absolute;border: 1px solid red; width:'+imageW+'px;height:'+imageH+'px;top:-9999px;left:-9999px;'"></canvas>
</view>
</view>
</template>
<script>
import config from '@/config'
import store from "@/store"
import { uploadAvatar } from "@/api/system/user"
const baseUrl = config.baseUrl
let sysInfo = uni.getSystemInfoSync()
let SCREEN_WIDTH = sysInfo.screenWidth
let PAGE_X, // x
PAGE_Y, // y
PR = sysInfo.pixelRatio, // dpi
T_PAGE_X, // x
T_PAGE_Y, // Y
CUT_L, // left
CUT_T, // top
CUT_R, //
CUT_B, //
CUT_W, //
CUT_H, //
IMG_RATIO, //
IMG_REAL_W, //
IMG_REAL_H, //
DRAFG_MOVE_RATIO = 1, //,
INIT_DRAG_POSITION = 100, //
DRAW_IMAGE_W = sysInfo.screenWidth //
export default {
/**
* 页面的初始数据
*/
data() {
return {
imageSrc: store.getters.avatar,
isShowImg: false,
//
cropperInitW: SCREEN_WIDTH,
cropperInitH: SCREEN_WIDTH,
//
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH,
// left top
cropperL: 0,
cropperT: 0,
transL: 0,
transT: 0,
//
scaleP: 0,
imageW: 0,
imageH: 0,
//
cutL: 0,
cutT: 0,
cutB: SCREEN_WIDTH,
cutR: '100%',
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: DRAFG_MOVE_RATIO
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.loadImage()
},
methods: {
setData: function (obj) {
let that = this
Object.keys(obj).forEach(function (key) {
that.$set(that.$data, key, obj[key])
})
},
getImage: function () {
var _this = this
uni.chooseImage({
success: function (res) {
_this.setData({
imageSrc: res.tempFilePaths[0],
})
_this.loadImage()
},
})
},
loadImage: function () {
var _this = this
uni.getImageInfo({
src: _this.imageSrc,
success: function success(res) {
IMG_RATIO = 1 / 1
if (IMG_RATIO >= 1) {
IMG_REAL_W = SCREEN_WIDTH
IMG_REAL_H = SCREEN_WIDTH / IMG_RATIO
} else {
IMG_REAL_W = SCREEN_WIDTH * IMG_RATIO
IMG_REAL_H = SCREEN_WIDTH
}
let minRange = IMG_REAL_W > IMG_REAL_H ? IMG_REAL_W : IMG_REAL_H
INIT_DRAG_POSITION = minRange > INIT_DRAG_POSITION ? INIT_DRAG_POSITION : minRange
//
if (IMG_RATIO >= 1) {
let cutT = Math.ceil((SCREEN_WIDTH / IMG_RATIO - (SCREEN_WIDTH / IMG_RATIO - INIT_DRAG_POSITION)) / 2)
let cutB = cutT
let cutL = Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH + INIT_DRAG_POSITION) / 2)
let cutR = cutL
_this.setData({
cropperW: SCREEN_WIDTH,
cropperH: SCREEN_WIDTH / IMG_RATIO,
// left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH / IMG_RATIO) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
//
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
} else {
let cutL = Math.ceil((SCREEN_WIDTH * IMG_RATIO - (SCREEN_WIDTH * IMG_RATIO)) / 2)
let cutR = cutL
let cutT = Math.ceil((SCREEN_WIDTH - INIT_DRAG_POSITION) / 2)
let cutB = cutT
_this.setData({
cropperW: SCREEN_WIDTH * IMG_RATIO,
cropperH: SCREEN_WIDTH,
// left right
cropperL: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH * IMG_RATIO) / 2),
cropperT: Math.ceil((SCREEN_WIDTH - SCREEN_WIDTH) / 2),
cutL: cutL,
cutT: cutT,
cutR: cutR,
cutB: cutB,
//
imageW: IMG_REAL_W,
imageH: IMG_REAL_H,
scaleP: IMG_REAL_W / SCREEN_WIDTH,
qualityWidth: DRAW_IMAGE_W,
innerAspectRadio: IMG_RATIO
})
}
_this.setData({
isShowImg: true
})
uni.hideLoading()
}
})
},
// touchStart
contentStartMove(e) {
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
// touchMove
contentMoveing(e) {
var _this = this
var dragLengthX = (PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
//
if (dragLengthX > 0) {
if (this.cutL - dragLengthX < 0) dragLengthX = this.cutL
} else {
if (this.cutR + dragLengthX < 0) dragLengthX = -this.cutR
}
if (dragLengthY > 0) {
if (this.cutT - dragLengthY < 0) dragLengthY = this.cutT
} else {
if (this.cutB + dragLengthY < 0) dragLengthY = -this.cutB
}
this.setData({
cutL: this.cutL - dragLengthX,
cutT: this.cutT - dragLengthY,
cutR: this.cutR + dragLengthX,
cutB: this.cutB + dragLengthY
})
PAGE_X = e.touches[0].pageX
PAGE_Y = e.touches[0].pageY
},
contentTouchEnd() {
},
//
getImageInfo() {
var _this = this
uni.showLoading({
title: '图片生成中...',
})
//
const ctx = uni.createCanvasContext('myCanvas')
ctx.drawImage(_this.imageSrc, 0, 0, IMG_REAL_W, IMG_REAL_H)
ctx.draw(true, () => {
// * canvasT = (_this.cutT / _this.cropperH) * (_this.imageH / pixelRatio)
var canvasW = ((_this.cropperW - _this.cutL - _this.cutR) / _this.cropperW) * IMG_REAL_W
var canvasH = ((_this.cropperH - _this.cutT - _this.cutB) / _this.cropperH) * IMG_REAL_H
var canvasL = (_this.cutL / _this.cropperW) * IMG_REAL_W
var canvasT = (_this.cutT / _this.cropperH) * IMG_REAL_H
uni.canvasToTempFilePath({
x: canvasL,
y: canvasT,
width: canvasW,
height: canvasH,
destWidth: canvasW,
destHeight: canvasH,
quality: 0.5,
canvasId: 'myCanvas',
success: function (res) {
uni.hideLoading()
let data = {name: 'avatarfile', filePath: res.tempFilePath}
uploadAvatar(data).then(response => {
//store.commit('SET_AVATAR', response.imgUrl)
/*cloud*/
store.commit('SET_AVATAR',baseUrl + response.imgUrl)
uni.showToast({ title: "修改成功", icon: 'success' })
uni.$emit('refresh');
uni.navigateBack();
})
}
})
})
},
// touchStart
dragStart(e) {
T_PAGE_X = e.touches[0].pageX
T_PAGE_Y = e.touches[0].pageY
CUT_L = this.cutL
CUT_R = this.cutR
CUT_B = this.cutB
CUT_T = this.cutT
},
// touchMove
dragMove(e) {
var _this = this
var dragType = e.target.dataset.drag
switch (dragType) {
case 'right':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_R + dragLength < 0) dragLength = -CUT_R
this.setData({
cutR: CUT_R + dragLength
})
break
case 'left':
var dragLength = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
if (CUT_L - dragLength < 0) dragLength = CUT_L
if ((CUT_L - dragLength) > (this.cropperW - this.cutR)) dragLength = CUT_L - (this.cropperW - this.cutR)
this.setData({
cutL: CUT_L - dragLength
})
break
case 'top':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_T - dragLength < 0) dragLength = CUT_T
if ((CUT_T - dragLength) > (this.cropperH - this.cutB)) dragLength = CUT_T - (this.cropperH - this.cutB)
this.setData({
cutT: CUT_T - dragLength
})
break
case 'bottom':
var dragLength = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLength < 0) dragLength = -CUT_B
this.setData({
cutB: CUT_B + dragLength
})
break
case 'rightBottom':
var dragLengthX = (T_PAGE_X - e.touches[0].pageX) * DRAFG_MOVE_RATIO
var dragLengthY = (T_PAGE_Y - e.touches[0].pageY) * DRAFG_MOVE_RATIO
if (CUT_B + dragLengthY < 0) dragLengthY = -CUT_B
if (CUT_R + dragLengthX < 0) dragLengthX = -CUT_R
let cutB = CUT_B + dragLengthY
let cutR = CUT_R + dragLengthX
this.setData({
cutB: cutB,
cutR: cutR
})
break
default:
break
}
}
}
}
</script>
<style>
/* pages/uni-cropper/index.wxss */
.uni-content-info {
/* position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: block;
align-items: center;
flex-direction: column; */
}
.cropper-config {
padding: 20rpx 40rpx;
}
.cropper-content {
min-height: 750rpx;
width: 100%;
}
.uni-corpper {
position: relative;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
box-sizing: border-box;
}
.uni-corpper-content {
position: relative;
}
.uni-corpper-content image {
display: block;
width: 100%;
min-width: 0 !important;
max-width: none !important;
height: 100%;
min-height: 0 !important;
max-height: none !important;
image-orientation: 0deg !important;
margin: 0 auto;
}
/* 移动图片效果 */
.uni-cropper-drag-box {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
cursor: move;
background: rgba(0, 0, 0, 0.6);
z-index: 1;
}
/* 内部的信息 */
.uni-corpper-crop-box {
position: absolute;
background: rgba(255, 255, 255, 0.3);
z-index: 2;
}
.uni-corpper-crop-box .uni-cropper-view-box {
position: relative;
display: block;
width: 100%;
height: 100%;
overflow: visible;
outline: 1rpx solid #69f;
outline-color: rgba(102, 153, 255, .75)
}
/* 横向虚线 */
.uni-cropper-dashed-h {
position: absolute;
top: 33.33333333%;
left: 0;
width: 100%;
height: 33.33333333%;
border-top: 1rpx dashed rgba(255, 255, 255, 0.5);
border-bottom: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 纵向虚线 */
.uni-cropper-dashed-v {
position: absolute;
left: 33.33333333%;
top: 0;
width: 33.33333333%;
height: 100%;
border-left: 1rpx dashed rgba(255, 255, 255, 0.5);
border-right: 1rpx dashed rgba(255, 255, 255, 0.5);
}
/* 四个方向的线 为了之后的拖动事件*/
.uni-cropper-line-t {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
top: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: n-resize;
}
.uni-cropper-line-t::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-r {
position: absolute;
display: block;
background-color: #69f;
top: 0;
right: 0rpx;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: e-resize;
}
.uni-cropper-line-r::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-line-b {
position: absolute;
display: block;
width: 100%;
background-color: #69f;
bottom: 0;
left: 0;
height: 1rpx;
opacity: 0.1;
cursor: s-resize;
}
.uni-cropper-line-b::before {
content: '';
position: absolute;
top: 50%;
right: 0rpx;
width: 100%;
-webkit-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
bottom: 0;
height: 41rpx;
background: transparent;
z-index: 11;
}
.uni-cropper-line-l {
position: absolute;
display: block;
background-color: #69f;
top: 0;
left: 0;
width: 1rpx;
opacity: 0.1;
height: 100%;
cursor: w-resize;
}
.uni-cropper-line-l::before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 41rpx;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
bottom: 0;
height: 100%;
background: transparent;
z-index: 11;
}
.uni-cropper-point {
width: 5rpx;
height: 5rpx;
background-color: #69f;
opacity: .75;
position: absolute;
z-index: 3;
}
.point-t {
top: -3rpx;
left: 50%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-tr {
top: -3rpx;
left: 100%;
margin-left: -3rpx;
cursor: n-resize;
}
.point-r {
top: 50%;
left: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-rb {
left: 100%;
top: 100%;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
cursor: n-resize;
width: 36rpx;
height: 36rpx;
background-color: #69f;
position: absolute;
z-index: 1112;
opacity: 1;
}
.point-b {
left: 50%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-bl {
left: 0%;
top: 100%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-l {
left: 0%;
top: 50%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
.point-lt {
left: 0%;
top: 0%;
margin-left: -3rpx;
margin-top: -3rpx;
cursor: n-resize;
}
/* 裁剪框预览内容 */
.uni-cropper-viewer {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.uni-cropper-viewer image {
position: absolute;
z-index: 2;
}
</style>

109
pages/mine/help/index.vue

@ -1,109 +0,0 @@
<template>
<view class="help-container">
<view v-for="(item, findex) in list" :key="findex" :title="item.title" class="list-title">
<view class="text-title">
<view :class="item.icon"></view>{{ item.title }}
</view>
<view class="childList">
<view v-for="(child, zindex) in item.childList" :key="zindex" class="question" hover-class="hover"
@click="handleText(child)">
<view class="text-item">{{ child.title }}</view>
<view class="line" v-if="zindex !== item.childList.length - 1"></view>
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from "vue";
const list =ref([{
icon: 'iconfont icon-github',
title: '若依问题',
childList: [{
title: '若依开源吗?',
content: '开源'
}, {
title: '若依可以商用吗?',
content: '可以'
}, {
title: '若依官网地址多少?',
content: 'http://ruoyi.vip'
}, {
title: '若依文档地址多少?',
content: 'http://doc.ruoyi.vip'
}]
},
{
icon: 'iconfont icon-help',
title: '其他问题',
childList: [{
title: '如何退出登录?',
content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
}, {
title: '如何修改用户头像?',
content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
}, {
title: '如何修改登录密码?',
content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
}]
}
])
function handleText(item) {
uni.navigateTo({
url: `/pages/common/textview/index?title=${item.title}&content=${item.content}`
});
}
</script>
<style lang="scss" scoped>
page {
background-color: #f8f8f8;
}
.help-container {
margin-bottom: 100rpx;
padding: 30rpx;
}
.list-title {
margin-bottom: 30rpx;
}
.childList {
background: #ffffff;
box-shadow: 0px 0px 10rpx rgba(193, 193, 193, 0.2);
border-radius: 16rpx;
margin-top: 10rpx;
}
.line {
width: 100%;
height: 1rpx;
background-color: #F5F5F5;
}
.text-title {
color: #303133;
font-size: 32rpx;
font-weight: bold;
margin-left: 10rpx;
.iconfont {
font-size: 16px;
margin-right: 10rpx;
}
}
.text-item {
font-size: 28rpx;
padding: 24rpx;
}
.question {
color: #606266;
font-size: 28rpx;
}
</style>

223
pages/mine/index.vue

@ -1,223 +0,0 @@
<template>
<view class="mine-container" :style="{height: `${windowHeight}px`}">
<!--顶部个人信息栏-->
<view class="header-section">
<view class="flex padding justify-between">
<view class="flex align-center">
<view v-if="!avatar" class="cu-avatar xl round bg-white">
<view class="iconfont icon-people text-gray icon"></view>
</view>
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round"
mode="widthFix">
</image>
<view v-if="!name" @click="handleToLogin" class="login-tip">
点击登录
</view>
<view v-if="name" @click="handleToInfo" class="user-info">
<view class="u_title">
用户名{{ name }}
</view>
</view>
</view>
<view @click="handleToInfo" class="flex align-center">
<text>个人信息</text>
<view class="iconfont icon-right"></view>
</view>
</view>
</view>
<view class="content-section">
<view class="mine-actions grid col-4 text-center">
<view class="action-item" @click="handleJiaoLiuQun">
<view class="iconfont icon-friendfill text-pink icon"></view>
<text class="text">交流群</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-service text-blue icon"></view>
<text class="text">在线客服</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-community text-mauve icon"></view>
<text class="text">反馈社区</text>
</view>
<view class="action-item" @click="handleBuilding">
<view class="iconfont icon-dianzan text-green icon"></view>
<text class="text">点赞我们</text>
</view>
</view>
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToEditInfo">
<view class="menu-item-box">
<view class="iconfont icon-user menu-icon"></view>
<view>编辑资料</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleHelp">
<view class="menu-item-box">
<view class="iconfont icon-help menu-icon"></view>
<view>常见问题</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleAbout">
<view class="menu-item-box">
<view class="iconfont icon-aixin menu-icon"></view>
<view>关于我们</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToSetting">
<view class="menu-item-box">
<view class="iconfont icon-setting menu-icon"></view>
<view>应用设置</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import storage from '@/common/utils/storage'
export default {
data() {
return {
name: this.$store.state.user.name,
// version: getApp().globalData.config.appInfo.version
}
},
computed: {
avatar() {
return this.$store.state.user.avatar
},
windowHeight() {
return uni.getSystemInfoSync().windowHeight - 50
}
},
methods: {
handleToInfo() {
uni.navigateTo({
url: '/pages/mine/info/index'
});
},
handleToEditInfo() {
uni.navigateTo({
url: '/pages/mine/info/edit'
});
},
handleToSetting() {
uni.navigateTo({
url: '/pages/mine/setting/index'
});
},
handleToLogin() {
uni.reLaunch({
url: '/pages/login'
});
},
handleToAvatar() {
uni.navigateTo({
url: '/pages/mine/avatar/index'
});
},
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
uni.reLaunch('/pages/index')
})
})
},
handleHelp() {
uni.navigateTo({
url: '/pages/mine/help/index'
});
},
handleAbout() {
uni.navigateTo({
url: '/pages/mine/about/index'
});
},
handleJiaoLiuQun() {
uni.showToast({
title: 'QQ群:133713780',
mask: false,
icon: "none",
duration: 1000
});
},
handleBuilding() {
uni.showToast({
title: '模块建设中~',
mask: false,
icon: "none",
duration: 1000
});
}
}
}
</script>
<style lang="scss">
page {
background-color: #f5f6f7;
}
.mine-container {
width: 100%;
height: 100%;
.header-section {
padding: 15px 15px 45px 15px;
background-color: #3c96f3;
color: white;
.login-tip {
font-size: 18px;
margin-left: 10px;
}
.cu-avatar {
border: 2px solid #eaeaea;
.icon {
font-size: 40px;
}
}
.user-info {
margin-left: 15px;
.u_title {
font-size: 18px;
line-height: 30px;
}
}
}
.content-section {
position: relative;
top: -50px;
.mine-actions {
margin: 15px 15px;
padding: 20px 0px;
border-radius: 8px;
background-color: white;
.action-item {
.icon {
font-size: 28px;
}
.text {
display: block;
font-size: 13px;
margin: 8px 0px;
}
}
}
}
}
</style>

131
pages/mine/info/edit.vue

@ -1,131 +0,0 @@
<template>
<view class="container">
<view class="example">
<uni-forms ref="form" :model="user" labelWidth="80px">
<uni-forms-item label="用户昵称" name="nickName">
<uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
</uni-forms-item>
<uni-forms-item label="手机号码" name="phonenumber">
<uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
</uni-forms-item>
<uni-forms-item label="邮箱" name="email">
<uni-easyinput v-model="user.email" placeholder="请输入邮箱" />
</uni-forms-item>
<uni-forms-item label="性别" name="sex" required>
<uni-data-checkbox v-model="user.sex" :localdata="sexs" />
</uni-forms-item>
</uni-forms>
<button type="primary" @click="submit">提交</button>
</view>
</view>
</template>
<script>
import { getUserProfile ,updateUserProfile} from "@/api/request"
export default {
data() {
return {
user: {
nickName: "",
phonenumber: "",
email: "",
sex: ""
},
sexs: [{
text: '男',
value: "0"
}, {
text: '女',
value: "1"
}],
rules: {
nickName: {
rules: [{
required: true,
errorMessage: '用户昵称不能为空'
}]
},
phonenumber: {
rules: [{
required: true,
errorMessage: '手机号码不能为空'
}, {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
errorMessage: '请输入正确的手机号码'
}]
},
email: {
rules: [{
required: true,
errorMessage: '邮箱地址不能为空'
}, {
format: 'email',
errorMessage: '请输入正确的邮箱地址'
}]
}
}
}
},
onLoad() {
// this.getUser()
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data
})
},
submit(ref) {
this.$refs.form.validate().then(res => {
updateUserProfile(this.user).then(response => {
uni.showToast({
title: '修改成功',
mask: false,
duration: 1000
});
uni.navigateBack();
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.example {
padding: 15px;
background-color: #fff;
}
.segmented-control {
margin-bottom: 15px;
}
.button-group {
margin-top: 15px;
display: flex;
justify-content: space-around;
}
.form-item {
display: flex;
align-items: center;
flex: 1;
}
.button {
display: flex;
align-items: center;
height: 35px;
line-height: 35px;
margin-left: 10px;
}
</style>

44
pages/mine/info/index.vue

@ -1,44 +0,0 @@
<template>
<view class="container">
<uni-list>
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickName" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.phonenumber" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroup" />
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" />
</uni-list>
</view>
</template>
<script>
import { getUserProfile } from "@/api/request.js"
export default {
data() {
return {
user: {},
roleGroup: "",
postGroup: ""
}
},
onLoad() {
this.getUser()
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data
this.roleGroup = response.roleGroup
this.postGroup = response.postGroup
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
</style>

91
pages/mine/pwd/index.vue

@ -1,91 +0,0 @@
<template>
<view class="pwd-retrieve-container">
<uni-forms ref="form" :value="user" labelWidth="80px">
<uni-forms-item name="oldPassword" label="旧密码">
<uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
</uni-forms-item>
<uni-forms-item name="newPassword" label="新密码">
<uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" />
</uni-forms-item>
<uni-forms-item name="confirmPassword" label="确认密码">
<uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
</uni-forms-item>
<button type="primary" @click="submit">提交</button>
</uni-forms>
</view>
</template>
<script>
import { updateUserPwd } from "@/api/request"
export default {
data() {
return {
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
rules: {
oldPassword: {
rules: [{
required: true,
errorMessage: '旧密码不能为空'
}]
},
newPassword: {
rules: [{
required: true,
errorMessage: '新密码不能为空',
},
{
minLength: 6,
maxLength: 20,
errorMessage: '长度在 6 到 20 个字符'
}
]
},
confirmPassword: {
rules: [{
required: true,
errorMessage: '确认密码不能为空'
}, {
validateFunction: (rule, value, data) => data.newPassword === value,
errorMessage: '两次输入的密码不一致'
}
]
}
}
}
},
onReady() {
this.$refs.form.setRules(this.rules)
},
methods: {
submit() {
this.$refs.form.validate().then(res => {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
uni.showToast({
title: '修改成功',
mask: false,
duration: 1000
});
uni.navigateBack();
})
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
.pwd-retrieve-container {
padding-top: 36rpx;
padding: 15px;
}
</style>

105
pages/mine/setting/index.vue

@ -1,105 +0,0 @@
<template>
<view class="setting-container" :style="{height: `${windowHeight}px`}">
<view class="menu-list">
<view class="list-cell list-cell-arrow" @click="handleToPwd">
<view class="menu-item-box">
<view class="iconfont icon-password menu-icon"></view>
<view>修改密码</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleToUpgrade">
<view class="menu-item-box">
<view class="iconfont icon-refresh menu-icon"></view>
<view>检查更新</view>
</view>
</view>
<view class="list-cell list-cell-arrow" @click="handleCleanTmp">
<view class="menu-item-box">
<view class="iconfont icon-clean menu-icon"></view>
<view>清理缓存</view>
</view>
</view>
</view>
<view class="cu-list menu">
<view class="cu-item item-box">
<view class="content text-center" @click="handleLogout">
<text class="text-black">退出登录</text>
</view>
</view>
</view>
</view>
<view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="info" cancelText="关闭" confirmText="退出"
title="通知" content="确定注销并退出系统吗"
@confirm="dialogConfirm"
@close="dialogClose">
</uni-popup-dialog>
</uni-popup>
</view>
</template>
<script setup>
import { ref } from "vue";
import store from '@/store'
const windowHeight=ref(uni.getSystemInfoSync().windowHeight) ;
const popup = ref(null);
function handleToPwd() {
uni.navigateTo({
url: '/pages/mine/pwd/index'
});
};
function handleToUpgrade() {
uni.showToast({
title: '模块建设中~',
mask: false,
icon:"none",
duration: 1000
});
};
function handleCleanTmp() {
uni.showToast({
title: '模块建设中~',
mask: false,
icon:"none",
duration: 1000
});
};
function handleLogout() {
popup.value.open();
};
function dialogConfirm() {
//console.log('----------------------------')
store.dispatch('LogOut').then(() => {
uni.reLaunch({
url: '/pages/login'
});
})
};
function dialogClose() {
//console.log('')
};
</script>
<style lang="scss" scoped>
.page {
background-color: #f8f8f8;
}
.item-box {
background-color: #FFFFFF;
margin: 30rpx;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10rpx;
border-radius: 8rpx;
color: #303133;
font-size: 32rpx;
}
</style>

7
pages/purchaseReceipt/job/receiptDetail.vue

@ -45,7 +45,8 @@
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
updateTitle
updateTitle,
compareAsc
} from '@/common/basic.js';
import {
@ -107,7 +108,6 @@
} else {
this.getDetail();
}
}
},
//
@ -208,11 +208,14 @@
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); //
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
var list =this.detailSource[0].subList;
}
}
}

41
pages/purchaseReturn/job/returnDetail.vue

@ -92,9 +92,7 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
managementList: []
};
},
@ -316,17 +314,17 @@
var params =this.setParams()
console.log("提交参数", JSON.stringify(params));
// purchaseReturnJobsubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>退" + res.data, )
// } else {
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
purchaseReturnJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage(res.data)
} else {
this.showErrorMessage("提交失败["+res.msg+"]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
@ -337,16 +335,11 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch);
// detail.toPackingNumber = info.packingNumber;
// detail.toBatch = info.batch;
detail.singlePrice = detail.balance.singlePrice;
detail.amount = detail.balance.singlePrice * detail.handleQty;
detail.arriveDate = detail.balance.arriveDate;
detail.produceDate = detail.balance.produceDate;
detail.expireDate = detail.balance.expireDate;
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;
detail.toInventoryStatus = detail.inventoryStatus;
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
})
@ -423,12 +416,10 @@
showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => {
setTimeout(() => {
uni.navigateTo({
url: './returnJob'
})
})
})
}
}
}

27
pages/putaway/record/putawayRecord.vue

@ -17,8 +17,8 @@
</scroll-view>
</view>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
@ -112,15 +112,18 @@
outInventoryStatus: "", //
businessType: {},
fromType: "",
showToLoaction:true
showToLoaction: true
};
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){ this.showToLoaction=false
updateTitle("原料上架申请") }else {
if (this.fromType == "requestType") {
this.showToLoaction = false
updateTitle("原料上架申请")
} else {
updateTitle("原料上架记录")
this.showToLoaction=true
this.showToLoaction = true
}
var typeCode = "PurchasePutaway"
getBusinessType(typeCode, res => {
@ -130,7 +133,7 @@
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.$refs.comMessage.showBreakMessage(res.message );
this.showErrorMessage(res.message)
}
});
},
@ -145,8 +148,7 @@
onPullDownRefresh() {},
mounted() {
},
mounted() {},
methods: {
getScanResult(result) {
let balance = result.balance;
@ -187,7 +189,6 @@
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
@ -248,7 +249,7 @@
},
commit() {
if (this.showToLoaction &&this.toLocationCode == "") {
if (this.showToLoaction && this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
@ -258,7 +259,7 @@
mask: true
});
if(this.fromType=="requestType"){
if (this.fromType == "requestType") {
var params = this.setParams(false)
console.log("提交" + JSON.stringify(params))
// putawayRequestSubmit(params).then(res => {
@ -272,7 +273,7 @@
// uni.hideLoading()
// this.showErrorMessage(error)
// })
}else {
} else {
//
var itemCodes = []
this.detailSource.forEach(item => {

338
pages/query/number.vue

@ -1,338 +0,0 @@
<template>
<!-- <page-meta root-font-size="18px"></page-meta> -->
<view class="">
<com-blank-view @goScan='openScanPopup' v-if="locationCode==''"></com-blank-view>
<view class="top_card">
<location-info :locationDetail='locationDetail' v-if="locationCode"></location-info>
</view>
<view class="tabs" v-if="locationCode" style="height: 100%;">
<u-line></u-line>
<scroll-view id="tab-bar" class="scroll-h" :scroll-x="true" :show-scrollbar="false">
<view class="title_tab">
<view v-for="(tab, index) in tabBars" :key="tab.id" class="uni-tab-item" :id="tab.id"
:data-current="index" @click="ontabtap">
<text class="uni-tab-item-title"
:class="tabIndex == index ? 'uni-tab-item-title-active' : ''">{{ tab.name }}</text>
</view>
</view>
</scroll-view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<view v-if="tabIndex == 0" v-for="(item, index) in summarysList">
<comLocationDetailCard :isShowPack="false" :dataContent="item" style='margin: 10rpx;'>
</comLocationDetailCard>
</view>
</scroll-view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<view v-if="tabIndex == 1" v-for="(item, index) in detailList">
<comLocationDetailCard :dataContent="item" style='margin: 10rpx;'></comLocationDetailCard>
</view>
</scroll-view>
<!-- 预计入 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<view v-if="tabIndex == 2" v-for="(item, index) in detailList">
<comLocationDetailCard :dataContent="item" style='margin: 10rpx;'></comLocationDetailCard>
</view>
</scroll-view>
<!-- 预计出 -->
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll">
<view v-if="tabIndex == 3" v-for="(item, index) in detailList">
<comLocationDetailCard :dataContent="item" style='margin: 10rpx;'></comLocationDetailCard>
</view>
</scroll-view>
</view>
<win-scan-button @goScan='openScanPopup' v-if="locationCode!=''"></win-scan-button>
<winScanLocationCode ref="scanPopup" title="库位代码" @getLocation='getScanCode'></winScanLocationCode>
<show-modal ref="modal"></show-modal>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getBalanceByLocationcodeGroup,
getBalanceByLocationcode,
} from '@/api/request.js';
import {
getBasicLocationByCode,
} from '@/api/request2.js';
import {
maxPageSize,
goHome
} from '@/common/basic.js';
import locationInfo from '@/mycomponents/location/locationInfo.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comLocationDetailCard from '@/pages/query/coms/comLocationDetailCard.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default {
name: 'location',
components: {
locationInfo,
comBlankView,
winScanButton,
comMessage,
comLocationDetailCard,
winScanLocation
},
data() {
return {
locationDetail: {},
locationCode: '',
summarys: [],
balances: [],
dataIn: [],
dataOut: [],
//
pageSize: 1000,
//
pageCurrent: 1,
//
tabIndex: 0,
tabBars: [{
name: '汇总',
id: 'huizong'
},
{
name: '明细',
id: 'mingxi'
},
{
name: '预计入',
id: 'in'
},
{
name: '预计出',
id: 'out'
}
],
scrollTop: 0,
old: {
scrollTop: 0
},
dataList: [{
Name: "物料名称",
itemCode: "CEVINR",
uom: "件",
qty: 20,
list: [{
packingNumber: "1234",
Lot: "202123",
uom: "件",
qty: 10
},
{
packingNumber: "1234",
Lot: "202123",
uom: "件",
qty: 10
}
]
},
{
Name: "测试2",
itemCode: "CEVINR2",
uom: "件",
qty: 20,
list: [{
packingNumber: "12342",
Lot: "2021232",
uom: "件",
qty: 10
},
{
packingNumber: "12342",
Lot: "2021232",
uom: "件",
qty: 10
}
]
}
],
testData: {
Name: "物料名称",
itemCode: "CEVINR",
uom: "件",
qty: 20,
list: [{
packingNumber: "1234",
Lot: "202123",
uom: "件",
qty: 10
},
{
packingNumber: "1234",
Lot: "202123",
uom: "件",
qty: 10
}
]
},
detailList: [],
summarysList: []
};
},
onLoad() {},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
filters: {
},
mounted() {
this.openScanPopup()
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
getScanCode(location,code) {
this.locationCode = '';
this.summarys = [];
this.balances = [];
this.locationCode = code;
this.locationDetail=location
this.getContentByTab(this.tabIndex);
},
getSummary() {
let that = this;
uni.showLoading({
title: "加载中...",
mask: true
});
getBalanceByLocationcodeGroup(this.locationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
this.summarysList = this.setShowList(res.data.list)
} else {
this.showMessage('未查找到库位【' + this.locationCode + '】');
}
}).catch(error => {
uni.hideLoading();
this.showMessage(error);
})
},
getDetailList() {
let that = this;
uni.showLoading({
title: "加载中...",
mask: true
});
getBalanceByLocationcode(this.locationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) {
this.detailList = this.setShowList(res.data.list)
} else {
this.showMessage('未查找到库位【' + this.locationCode + '】');
}
}).catch(error => {
uni.hideLoading();
this.showMessage(error);
})
},
setShowList(list) {
var resultlist = [];
list.forEach(res => {
var temp = resultlist.find(res1 =>
res1.itemCode == res.itemCode)
if (temp == undefined) {
var data = {
itemCode: res.itemCode,
qty: res.qty,
uom: res.uom,
list: []
}
var item = {
packingNumber: res.packingNumber,
batch: res.batch,
uom: res.uom,
qty: res.qty,
inventoryStatus: res.inventoryStatus,
}
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += res.qty
var item = {
packingNumber: res.packingNumber,
batch: res.batch,
uom: res.uom,
qty: res.qty,
inventoryStatus: res.inventoryStatus,
}
temp.list.push(item)
}
})
return resultlist;
},
ontabtap(e) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
this.tabIndex = index;
this.getContentByTab(this.tabIndex);
},
getContentByTab(index) {
if (index === 0) {
this.getSummary();
} else if (index === 1) this.getDetailList()
else if (index === 2) {
this.dataIn = this.balances;
} else if (index == 3) {
this.dataOut = this.balances;
}
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
showMessage(message) {
this.$refs.comMessage.showWarningMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
afterCloseMessage() {
this.$refs.scanPopup.getfocus();
}
}
};
</script>
<style scoped lang="scss">
page {
height: 100%;
}
</style>
Loading…
Cancel
Save