Browse Source

fix: 第一版测试文件修改 Vue2升级Vue3 11/12

syhx_app_vue3
王志国 2 weeks ago
parent
commit
163b9c5dd2
  1. 9
      .env.development
  2. 10
      .env.production
  3. 24
      package.json
  4. 196
      src/api/img-to-base64.js
  5. 2
      src/api/login.js
  6. 31
      src/common/utils/storage.js
  7. 2
      src/mycomponents/detail/comJobDetailCard.vue
  8. 18
      src/mycomponents/qty/stdUom.vue
  9. 4
      src/mycomponents/query/balanceQuery.vue
  10. 26
      src/pages/container/record/containerUnBindRecord.vue
  11. 8
      src/pages/count/job/countBlindDetail.vue
  12. 6
      src/pages/count/job/fuzzyCountDetail.vue
  13. 4
      src/pages/customerReturn/record/recordList.vue
  14. 2
      src/pages/customerReturn/record/recordListDetail.vue
  15. 8
      src/pages/fg/coms/comNoReceiptPopup.vue
  16. 2
      src/pages/fg/coms/comReceiptPopup.vue
  17. 1
      src/pages/fg/receiptByPlan.vue
  18. 2
      src/pages/fg/receiptNoPlan.vue
  19. 6
      src/pages/itemHold/record/recordList.vue
  20. 2
      src/pages/login/index.vue
  21. 3
      src/pages/package/coms/comScanPackagePack.vue
  22. 4
      src/pages/package/job/overPackageJob.vue
  23. 10
      src/pages/pointProductReceipt/index.vue
  24. 28
      src/pages/productPutaway/record/productPutawayRecord.vue
  25. 16
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  26. 15
      src/pages/productionReceipt/job/productionReceiptJob.vue
  27. 8
      src/pages/productionReturn/record/returnToStore.vue
  28. 2
      src/pages/purchaseReturn/coms/comReturnDetailCard.vue
  29. 1
      src/pages/purchaseReturn/job/returnDetail.vue
  30. 4
      src/pages/putaway/job/quantityPutawayJob.vue
  31. 2
      src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue
  32. 1
      src/pages/repleinsh/job/repleinshJob.vue
  33. 2
      src/pages/scrap/coms/comScrapDetailCardBatch.vue
  34. 1
      src/pages/scrap/job/scrapJobDetail.vue
  35. 2
      src/pages/stockUp/coms/comScanStockUpPackBatch.vue
  36. 6
      src/pages/stockUp/job/stockUpJobDetail.vue
  37. 4
      src/plugins/storage.js
  38. 42
      vite.config.ts

9
.env.development

@ -1,11 +1,12 @@
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api VITE_BASE_URL=http://dev.ccwin-in.com:26800/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:26800/admin-api
# 租户配置 # 租户配置
VITE_TENANT='[{"text":"成都","value":2}]' VITE_TENANT='[{"text":"长春1379","value":1}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=false VITE_isDevelopment = true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'

10
.env.production

@ -1,7 +1,11 @@
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' VITE_BASE_URL=http://dev.ccwin-in.com:26800/admin-api
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:26800/admin-api
# 是否是测试环境 # 租户配置
VITE_TENANT='[{"text":"长春1379","value":1}]'
# 是否是测试环境
VITE_isDevelopment=false VITE_isDevelopment=false
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:26800'

24
package.json

@ -13,14 +13,14 @@
"test:custom": "uni build -p", "test:custom": "uni build -p",
"prod:mp-weixin": "uni build -p mp-weixin --mode production", "prod:mp-weixin": "uni build -p mp-weixin --mode production",
"prod:app": "uni build -p app --mode production", "prod:app": "uni build -p app --mode production",
"prod:custom": "uni build -p --mode production", "prod:custom": "uni build --mode production",
"prod": "uni build --mode production", "prod": "uni build --mode production",
"hella8": "uni build --mode hella8", "hella8": "uni build --mode hella8",
"hella9": "uni build --mode hella9", "hella9": "uni build --mode hella9",
"hella13": "uni build --mode hella13", "hella13": "uni build --mode hella13",
"hella14": "uni build --mode hella14", "hella14": "uni build --mode hella14",
"hella15": "uni build --mode hella15", "hella15": "uni build --mode hella15",
"hella16": "uni build --mode hella16" "hella16": "uni build --mode hella16"
}, },
"dependencies": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001", "@dcloudio/uni-app": "3.0.0-alpha-3060920221114001",
@ -39,9 +39,9 @@
"cz-git": "^1.4.1", "cz-git": "^1.4.1",
"decimal.js": "^10.4.3", "decimal.js": "^10.4.3",
"or": "^0.2.0", "or": "^0.2.0",
"pinia": "^2.0.35", "pinia": "^2.0.17",
"vk-uview-ui": "^1.3.7", "vk-uview-ui": "^1.3.7",
"vue": "^3.2.41", "vue": "3.2.47",
"vue-demi": "latest", "vue-demi": "latest",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"vuex": "^4.0.2" "vuex": "^4.0.2"
@ -71,12 +71,12 @@
"jsdom": "^24.0.0", "jsdom": "^24.0.0",
"less": "^4.1.3", "less": "^4.1.3",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"sass": "^1.53.0", "sass": "1.53.0",
"simple-git-hooks": "^2.8.1", "simple-git-hooks": "^2.8.1",
"typescript": "^4.7.4", "typescript": "^4.7.4",
"unocss": "^0.46.4", "unocss": "^0.46.4",
"unocss-preset-weapp": "^0.2.1", "unocss-preset-weapp": "^0.2.1",
"vite": "^3.1.8", "vite": "^4.0.3",
"vite-plugin-eslint": "^1.6.1", "vite-plugin-eslint": "^1.6.1",
"vitest": "^0.16.0" "vitest": "^0.16.0"
}, },

196
src/api/img-to-base64.js

@ -0,0 +1,196 @@
function getLocalFilePath(path) {
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
return path
}
if (path.indexOf('file://') === 0) {
return path
}
if (path.indexOf('/storage/emulated/0/') === 0) {
return path
}
if (path.indexOf('/') === 0) {
var localFilePath = plus.io.convertAbsoluteFileSystem(path)
if (localFilePath !== path) {
return localFilePath
} else {
path = path.substr(1)
}
}
return '_www/' + path
}
function dataUrlToBase64(str) {
var array = str.split(',')
return array[array.length - 1]
}
var index = 0
function getNewFileId() {
return Date.now() + String(index++)
}
function biggerThan(v1, v2) {
var v1Array = v1.split('.')
var v2Array = v2.split('.')
var update = false
for (var index = 0; index < v2Array.length; index++) {
var diff = v1Array[index] - v2Array[index]
if (diff !== 0) {
update = diff > 0
break
}
}
return update
}
export async function pathToBase64(path) {
return await new Promise(async function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
if (typeof FileReader === 'function') {
var xhr =await new XMLHttpRequest()
xhr.open('GET', path, true)
xhr.responseType = 'blob'
xhr.onload = function() {
if (this.status === 200) {
let fileReader = new FileReader()
fileReader.onload = function(e) {
resolve(e.target.result)
}
fileReader.onerror = reject
fileReader.readAsDataURL(this.response)
}
}
xhr.onerror = reject
xhr.send()
return
}
var canvas = document.createElement('canvas')
var c2x = canvas.getContext('2d')
var img = new Image
img.onload = function() {
canvas.width = img.width
canvas.height = img.height
c2x.drawImage(img, 0, 0)
resolve(canvas.toDataURL())
canvas.height = canvas.width = 0
}
img.onerror = reject
img.src = path
return
}
if (typeof plus === 'object') {
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
entry.file(function(file) {
var fileReader = new plus.io.FileReader()
fileReader.onload = function(data) {
resolve(data.target.result)
}
fileReader.onerror = function(error) {
reject(error)
}
fileReader.readAsDataURL(file)
}, function(error) {
reject(error)
})
}, function(error) {
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
wx.getFileSystemManager().readFile({
filePath: path,
encoding: 'base64',
success: function(res) {
resolve('data:image/png;base64,' + res.data)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}
export function base64ToPath(base64) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
base64 = base64.split(',')
var type = base64[0].match(/:(.*?);/)[1]
var str = atob(base64[1])
var n = str.length
var array = new Uint8Array(n)
while (n--) {
array[n] = str.charCodeAt(n)
}
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
}
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
if (extName) {
extName = extName[1]
} else {
reject(new Error('base64 error'))
}
var fileName = getNewFileId() + '.' + extName
if (typeof plus === 'object') {
var basePath = '_doc'
var dirPath = 'uniapp_temp'
var filePath = basePath + '/' + dirPath + '/' + fileName
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
entry.getDirectory(dirPath, {
create: true,
exclusive: false,
}, function(entry) {
entry.getFile(fileName, {
create: true,
exclusive: false,
}, function(entry) {
entry.createWriter(function(writer) {
writer.onwrite = function() {
resolve(filePath)
}
writer.onerror = reject
writer.seek(0)
writer.writeAsBinary(dataUrlToBase64(base64))
}, reject)
}, reject)
}, reject)
}, reject)
return
}
var bitmap = new plus.nativeObj.Bitmap(fileName)
bitmap.loadBase64Data(base64, function() {
bitmap.save(filePath, {}, function() {
bitmap.clear()
resolve(filePath)
}, function(error) {
bitmap.clear()
reject(error)
})
}, function(error) {
bitmap.clear()
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
var filePath = wx.env.USER_DATA_PATH + '/' + fileName
wx.getFileSystemManager().writeFile({
filePath: filePath,
data: dataUrlToBase64(base64),
encoding: 'base64',
success: function() {
resolve(filePath)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}

2
src/api/login.js

@ -11,7 +11,7 @@ export function login(username, password, captchaVerification, tenantName, remem
code, code,
uuid, uuid,
} }
return http.post('/system/auth/loginNoCode', data) return http.post('/system/auth/login', data)
} }
// 获取用户详细信息 // 获取用户详细信息

31
src/common/utils/storage.js

@ -10,21 +10,22 @@ const setStorage = (key,value)=>{
// 清除全部本地存储 // 清除全部本地存储
const clearStorage = ()=>{ const clearStorage = ()=>{
const overPackageRecordPointParams = '' let overPackageRecordPointParams = ''
if( uni.getStorageSync('overPackageRecordPointParams')){ if( uni.getStorageSync('overPackageRecordPointParams')){
overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams')
} }
const overPackageJobDetailPointParams = '' let overPackageJobDetailPointParams = ''
if( uni.getStorageSync('overPackageJobDetailPointParams')){ if( uni.getStorageSync('overPackageJobDetailPointParams')){
overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams')
} }
uni.clearStorageSync(); uni.clearStorageSync();
if(overPackageRecordPointParams){ if(overPackageRecordPointParams){
uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams) uni.setStorageSync('overPackageRecordPointParams',overPackageRecordPointParams)
} }
if(overPackageJobDetailPointParams){ if(overPackageJobDetailPointParams){
uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams) uni.setStorageSync('overPackageJobDetailPointParams',overPackageJobDetailPointParams)
} }
} }
// 清除指定key本地存储 // 清除指定key本地存储

2
src/mycomponents/detail/comJobDetailCard.vue

@ -112,7 +112,7 @@ const swipeClick = (e, item) => {
} }
} }
const edit = (item) => { const edit = (item) => {
editItem = item editItem.value = item
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty) receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty)
} }
const remove = (item) => { const remove = (item) => {

18
src/mycomponents/qty/stdUom.vue

@ -1,11 +1,10 @@
<template> <template>
<view class="uom"> <view class="uomStyle">
{{getPackUnit(uom)}} {{getPackUnit(props.uom)}}
</view> </view>
</template> </template>
<script setup>
<script setup lang="ts">
import { import {
getPackUnitInfo getPackUnitInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
@ -26,5 +25,14 @@
</script> </script>
<style> <style lang="scss" scoped>
.uomStyle {
color: #909399;
font-size: 26rpx;
margin-left: 5rpx;
margin-right: 5rpx;
display: flex;
flex-direction: row;
align-items: center;
}
</style> </style>

4
src/mycomponents/query/balanceQuery.vue

@ -1,6 +1,6 @@
<template> <template>
<view style=" "> <view style=" ">
<u-popup v-model="show" mode="left" : :width="330"> <u-popup v-model="show" mode="left" :width="330">
<view style="height:100vh;display:flex;flex-direction:column;"> <view style="height:100vh;display:flex;flex-direction:column;">
<view class="uni-flex" style="justify-content: center; <view class="uni-flex" style="justify-content: center;
background-color:#007AFF ; background-color:#007AFF ;
@ -106,7 +106,7 @@ const props = defineProps({
}); });
const comMessageRef = ref(null); const comMessageRef = ref(null);
const show = ref(false)
const itemCode = ref(""); const itemCode = ref("");
const itemCodeResult = ref([]); const itemCodeResult = ref([]);
const current = ref(1); const current = ref(1);

26
src/pages/container/record/containerUnBindRecord.vue

@ -119,7 +119,7 @@ const createRecordInfo = (detail, label) => {
return record; return record;
}; };
const calcHandleQty = () => { const calcHandleQtyFun = () => {
calcHandleQty(detailSource.value); calcHandleQty(detailSource.value);
scanPopupGetFocus(); scanPopupGetFocus();
}; };
@ -146,28 +146,6 @@ const removeItem = (index) => {
detailSource.value.splice(index, 1); detailSource.value.splice(index, 1);
}; };
const createItemInfo = (res) => {
const item = {
itemCode: res.itemCode,
itemName: res.itemName,
packQty: res.packQty,
packUnit: res.packUnit,
qty: res.qty,
handleQty: 0,
uom: res.uom,
subList: []
};
return item;
};
const createDetailInfo = (data) => {
data.scaned = false;
data.packingNumber = data.contentNumber;
data.qty = Number(data.qty);
data.handleQty = 0;
return data;
};
const removePack = () => { const removePack = () => {
for (let i = 0; i < detailSource.value.length; i++) { for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i]; const item = detailSource.value[i];
@ -321,7 +299,7 @@ const showCommitSuccessMessage = (hint) => {
}; };
const updateData = () => { const updateData = () => {
calcHandleQty(); calcHandleQtyFun();
for (let i = 0; i < detailSource.value.length; i++) { for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i]; const item = detailSource.value[i];
if (item.qty === 0) { if (item.qty === 0) {

8
src/pages/count/job/countBlindDetail.vue

@ -77,9 +77,9 @@ import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comCountDetailcards from '@/pages/count/coms/comCountDetailcards.vue' import comCountDetailcards from '@/pages/count/coms/comCountDetailcards.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue' import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import countQtyEdit from '@/mycomponents/qty/countQtyEdit.vue' import CountQtyEdit from '@/mycomponents/qty/countQtyEdit.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import detailInfoPopup from '@/pages/count/coms/detailInfoPopup.vue' import DetailInfoPopup from '@/pages/count/coms/detailInfoPopup.vue'
import { ref } from 'vue' import { ref } from 'vue'
import { onLoad, onPullDownRefresh, onReachBottom, onBackPress, onNavigationBarButtonTap } from '@dcloudio/uni-app' import { onLoad, onPullDownRefresh, onReachBottom, onBackPress, onNavigationBarButtonTap } from '@dcloudio/uni-app'
import { useCountStore } from "@/store"; import { useCountStore } from "@/store";
@ -454,10 +454,6 @@ const showCommitSuccessMessage = (hint) => {
}) })
} }
const getCountStageName = (value) => {
return getCountStageName(value)
}
const isOpenCount = (value) => { const isOpenCount = (value) => {
return value === 'TRUE' ? '明盘' : '盲盘' return value === 'TRUE' ? '明盘' : '盲盘'
} }

6
src/pages/count/job/fuzzyCountDetail.vue

@ -80,9 +80,9 @@ import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comCountDetailCard from '@/pages/count/coms/comCountDetailCard.vue' import comCountDetailCard from '@/pages/count/coms/comCountDetailCard.vue'
// import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" // import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import countQtyEdit from '@/mycomponents/qty/countQtyEdit.vue' import CountQtyEdit from '@/mycomponents/qty/countQtyEdit.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import JobTop from '@/mycomponents/job/jobTop.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue' import ComBlankView from '@/mycomponents/common/comBlankView.vue'
import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue' import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue'
import { ref, nextTick } from 'vue' import { ref, nextTick } from 'vue'

4
src/pages/customerReturn/record/recordList.vue

@ -37,8 +37,8 @@
import jobFilter from '@/mycomponents/job/jobFilter.vue' import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comReturnRecordCard from '@/pages/customerReturn/coms/comReturnRecordCard.vue' import comReturnRecordCard from '@/pages/customerReturn/coms/comReturnRecordCard.vue'
import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue' import JobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue' import JobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue" import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
import jobList from '@/mycomponents/jobList/jobList.vue' import jobList from '@/mycomponents/jobList/jobList.vue'

2
src/pages/customerReturn/record/recordListDetail.vue

@ -79,7 +79,7 @@ import {
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' import DetailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import receiveTop from '@/mycomponents/receive/receiveTop.vue' import receiveTop from '@/mycomponents/receive/receiveTop.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'

8
src/pages/fg/coms/comNoReceiptPopup.vue

@ -157,10 +157,10 @@ import {
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
import uom from '@/mycomponents/qty/uom.vue' import Uom from '@/mycomponents/qty/uom.vue'
import packQty from '@/mycomponents/qty/packQty.vue' import PackQty from '@/mycomponents/qty/packQty.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' import BalanceStatus from '@/mycomponents/status/balanceStatus.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue' import WinScanItem from '@/mycomponents/scan/winScanItem.vue'
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
const props = defineProps({ const props = defineProps({

2
src/pages/fg/coms/comReceiptPopup.vue

@ -120,7 +120,7 @@ import { getCurrDate, getBatch8, dateFormatData, lastThreeDays, getSwitchInfoByC
import { calc } from '@/common/calc.js' import { calc } from '@/common/calc.js'
import uom from '@/mycomponents/qty/uom.vue' import Uom from '@/mycomponents/qty/uom.vue'
import PackQty from '@/mycomponents/qty/packQty.vue' import PackQty from '@/mycomponents/qty/packQty.vue'
import BalanceStatus from '@/mycomponents/status/balanceStatus.vue' import BalanceStatus from '@/mycomponents/status/balanceStatus.vue'
import WinScanItem from '@/mycomponents/scan/winScanItem.vue' import WinScanItem from '@/mycomponents/scan/winScanItem.vue'

1
src/pages/fg/receiptByPlan.vue

@ -123,7 +123,6 @@ const showList = ref([])
const allList = ref([]) const allList = ref([])
const index = ref(1) const index = ref(1)
const loadingType = ref('') const loadingType = ref('')
const loadingType = ref('')
const pageSize = ref(500) const pageSize = ref(500)
const comReceiptPopupRef = ref() const comReceiptPopupRef = ref()
const scanPopup = ref() const scanPopup = ref()

2
src/pages/fg/receiptNoPlan.vue

@ -49,7 +49,7 @@
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view class="scan_view" v-for="(item, index) in showList" :key="index"> <view class="scan_view" v-for="(item, index) in showList" :key="index">
<u-swipe-action :options="options" @click="(...event)=>swipeClick(event,item,index)"> <u-swipe-action :options="options" @click="(...event)=>swipeClick(event,item,index)">
<<view class="uni-flex uni-row " <view class="uni-flex uni-row"
style="margin-left: 30rpx; margin-top: 10rpx; margin-bottom: 10rpx;"> style="margin-left: 30rpx; margin-top: 10rpx; margin-bottom: 10rpx;">
<light :lightCode='item.content'></light> <light :lightCode='item.content'></light>
<!-- <view class="auto-wrap" style="font-size: 35rpx;font-weight: bold; width: 100%;"> <!-- <view class="auto-wrap" style="font-size: 35rpx;font-weight: bold; width: 100%;">

6
src/pages/itemHold/record/recordList.vue

@ -17,7 +17,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="recordList.length>0"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="recordList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob> <winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob>
<jobList ref="recordList" @selectItem="selectItem"></jobList> <jobList ref="recordListRef" @selectItem="selectItem"></jobList>
<comMessage ref="comMessageRef"></comMessage> <comMessage ref="comMessageRef"></comMessage>
</view> </view>
</template> </template>
@ -82,7 +82,7 @@ const jobListPopupRef = ref(null);
const jobInfoPopupRef = ref(null); const jobInfoPopupRef = ref(null);
const comMessageRef = ref(null); const comMessageRef = ref(null);
const scanPopup = ref(null); const scanPopup = ref(null);
const recordList = ref(null); const recordListRef = ref(null);
onLoad((option) => { onLoad((option) => {
@ -308,7 +308,7 @@ const getScanResult = (result) => {
const list = resultList.filter((item, index, self) => self.findIndex((t) => t.title === item.title) === index); const list = resultList.filter((item, index, self) => self.findIndex((t) => t.title === item.title) === index);
if (list.length > 1) { if (list.length > 1) {
recordList.value.openList(list); recordListRef.value.openList(list);
} else { } else {
selectItem(list[0]); selectItem(list[0]);
} }

2
src/pages/login/index.vue

@ -117,7 +117,7 @@ onLoad(() => {
backgroundColor: '#476DF5' backgroundColor: '#476DF5'
}) })
// #endif // #endif
getCode() // getCode()
}) })
const handelerlogin = () => { const handelerlogin = () => {
if (username.value === '') { if (username.value === '') {

3
src/pages/package/coms/comScanPackagePack.vue

@ -86,8 +86,7 @@ const openScanPopupForJobSimulate = (content, jobcontent, scanMessage)=> {
jobContent.value = jobcontent; jobContent.value = jobcontent;
initData(); initData();
scanPopup.value.openScanPopupForJobSimulate(fromLocationCode.value, fromLocationList.value, jobContent.value, scanMessage); scanPopup.value.openScanPopupForJobSimulate(fromLocationCode.value, fromLocationList.value, jobContent.value, scanMessage);
}
},
const showBalanceSelect = (items) => { const showBalanceSelect = (items) => {
balanceSelect.value.openPopup(items) balanceSelect.value.openPopup(items)
} }

4
src/pages/package/job/overPackageJob.vue

@ -18,7 +18,7 @@
:bussinessCode="businessTypeCode"> :bussinessCode="businessTypeCode">
</winComScanBalance> </winComScanBalance>
<!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob>--> <!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob>-->
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobListRef" @selectItem="selectItem"></jobList>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
@ -37,7 +37,7 @@ import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue'
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import jobList from '@/mycomponents/jobList/jobList.vue' import JobList from '@/mycomponents/jobList/jobList.vue'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const jobList = ref([]) const jobList = ref([])

10
src/pages/pointProductReceipt/index.vue

@ -61,7 +61,7 @@
const htmlFileUrl = '/hybrid/html/point.html'; const htmlFileUrl = '/hybrid/html/point.html';
import { import {
pathToBase64 pathToBase64
} from "../../api/img-to-base64.js" //js } from "@/api/img-to-base64.js" //js
// #ifdef APP // #ifdef APP
var testModule = uni.requireNativePlugin("TestModule") var testModule = uni.requireNativePlugin("TestModule")
// #endif // #endif
@ -156,15 +156,15 @@
} }
} }
) )
onLoad(option) { onLoad((option)=> {
if (option.points) { if (option.points) {
data.value = JSON.parse(option.points); data.value = JSON.parse(option.points);
} }
} })
onsShow(()=>{ onShow(()=>{
nextTick(async () => { nextTick(async () => {
// //
const el = qrcodeRef.value let el = qrcodeRef.value
const str = '' const str = ''
el.forEach(async (item, index) => { el.forEach(async (item, index) => {
await item.canvasToTempFilePath({ await item.canvasToTempFilePath({

28
src/pages/productPutaway/record/productPutawayRecord.vue

@ -268,34 +268,6 @@ import {ref, getCurrentInstance, nextTick, onMounted} from 'vue'
showErrorMessage(error); showErrorMessage(error);
}) })
} }
const getRecommendLocation = async (balance,result)=> {
uni.showLoading({
title: '扫描中...',
mask: true
})
let param = {
expectinNumber: balance.packingNumber + "-" + Date.now(),
itemCode: balance.itemCode,
inventoryStatus: balance.inventoryStatus,
batch: balance.batch
};
console.log(JSON.stringify(param))
await getrecommendLocationExpectin(param).then(async result1 => {
uni.hideLoading();
let item = detailSource.value.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
item.toLocationCode = result1.data.code;
item.expectinNumber = result1.data.expectinNumber;
await getToLocationBalance(item.toLocationCode,result)
}).catch(error => {
uni.hideLoading()
showErrorMessage(error);
})
}
// //
const getToLocationBalance = async (toLocationCode,result)=> { const getToLocationBalance = async (toLocationCode,result)=> {
uni.showLoading({ uni.showLoading({

16
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -21,7 +21,7 @@
<u-loadmore :status="loadingType" v-if="jobList.length > 0" /> <u-loadmore :status="loadingType" v-if="jobList.length > 0" />
<win-scan-button @goScan="openScanPopup" v-if="jobList.length > 0"></win-scan-button> <win-scan-button @goScan="openScanPopup" v-if="jobList.length > 0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult="getScanResult"></winScanPackJob> <winScanPackJob ref="scanPopup" @getResult="getScanResult"></winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobListRef" @selectItem="selectItem"></jobList>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</view> </view>
@ -37,12 +37,12 @@
import { getDetailOption, getDetailGiveupOption } from '@/common/array.js' import { getDetailOption, getDetailGiveupOption } from '@/common/array.js'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue' import JobFilter from '@/mycomponents/job/jobFilter.vue'
import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue' import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue'
import jobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue' import JobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue' import JobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue'
import jobList from '@/mycomponents/jobList/jobList.vue' import JobList from '@/mycomponents/jobList/jobList.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue' import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
@ -300,12 +300,6 @@
const toHome = () => { const toHome = () => {
goHome() goHome()
} }
const onReach = () => {
if loadingType.value == 'loading' || loadingType.valu == 'noMore') {
return
}
getList('more')
}
const openScanPopup = () => { const openScanPopup = () => {
scanPopup.value.openScanPopup() scanPopup.value.openScanPopup()
} }

15
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -72,7 +72,7 @@ import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue' import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
import jobList from '@/mycomponents/jobList/jobList.vue' import JobList from '@/mycomponents/jobList/jobList.vue'
import {useCountStore} from '@/store' import {useCountStore} from '@/store'
// store // store
@ -145,18 +145,7 @@ onNavigationBarButtonTap((e) => {
filter.value.openFilterParams(uni.getStorageSync(productionReceiptJobFilter)); filter.value.openFilterParams(uni.getStorageSync(productionReceiptJobFilter));
} }
}) })
const productionLineCodeConfirm = (productionLineCode) => {
var params = uni.getStorageSync(productionReceiptJobFilter)
productionLineCode.value = e;
//
if (!params) {
params = {
productionLineCode: "",
itemCode: ""
}
}
getListByFilter(params)
}
const getProductionReceiptJobByProductionline = () => { const getProductionReceiptJobByProductionline = () => {
uni.showLoading({ uni.showLoading({
title: "获取生产线", title: "获取生产线",

8
src/pages/productionReturn/record/returnToStore.vue

@ -88,10 +88,10 @@ const toManagementList = ref([])
const scanPopup = ref() const scanPopup = ref()
const comMessageRef = ref() const comMessageRef = ref()
const toWarehouseCode = ref() const toWarehouseCode = ref()
onLoad(option) { onLoad((option) =>{
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: option.title title: option.title
}) })
getBusinessType(businessTypeCode.value, (res) => { getBusinessType(businessTypeCode.value, (res) => {
if (res.success) { if (res.success) {
businessType.value = res.businessType businessType.value = res.businessType

2
src/pages/purchaseReturn/coms/comReturnDetailCard.vue

@ -60,7 +60,7 @@
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import BalanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'

1
src/pages/purchaseReturn/job/returnDetail.vue

@ -95,7 +95,6 @@ const comMessageRef = ref()
const jobDetailPopup = ref() const jobDetailPopup = ref()
const poNumber = ref('') const poNumber = ref('')
const fromLocationCode = ref('') const fromLocationCode = ref('')
const managementList = ref('')
const comIssueDetailCard = ref() const comIssueDetailCard = ref()
const comScanIssuePack = ref(null) const comScanIssuePack = ref(null)
onLoad((option) => { onLoad((option) => {

4
src/pages/putaway/job/quantityPutawayJob.vue

@ -64,7 +64,7 @@
</view> </view>
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobListRef" @selectItem="selectItem"></jobList>
<view class="footer" v-if="jobList.length>0"> <view class="footer" v-if="jobList.length>0">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">执行当前已选择项</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">执行当前已选择项</button>
</view> </view>
@ -73,7 +73,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import jobList from '@/mycomponents/jobList/jobList.vue' import JobList from '@/mycomponents/jobList/jobList.vue'
import { import {
getPutawayJobList, getPutawayJobList,

2
src/pages/repleinsh/coms/comRepleishDetailCardBatch.vue

@ -26,7 +26,7 @@ import handleBalance from '@/mycomponents/balance/handleBalance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import BalanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import qtyEdit from '@/mycomponents/qty/qtyEdit.vue' import qtyEdit from '@/mycomponents/qty/qtyEdit.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'

1
src/pages/repleinsh/job/repleinshJob.vue

@ -60,7 +60,6 @@ const scanMessage = ref('')
const detailGiveupOptions = ref([]) const detailGiveupOptions = ref([])
const detailCloseOptions = ref([]) const detailCloseOptions = ref([])
const title = ref('') const title = ref('')
const scanMessage = ref('')
const filter = ref() const filter = ref()
const comMessageRef = ref() const comMessageRef = ref()
const jobInfoPopupRef = ref() const jobInfoPopupRef = ref()

2
src/pages/scrap/coms/comScrapDetailCardBatch.vue

@ -25,7 +25,7 @@
import itemQty from '@/mycomponents/item/itemQty.vue' import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue' import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' import JobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import scrapDetailInfoPopup from '@/pages/scrap/coms/scrapDetailInfoPopup.vue' import scrapDetailInfoPopup from '@/pages/scrap/coms/scrapDetailInfoPopup.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'

1
src/pages/scrap/job/scrapJobDetail.vue

@ -74,7 +74,6 @@ const jobStatus = ref('')
const comMessageRef = ref() const comMessageRef = ref()
const scanPopup = ref() const scanPopup = ref()
const managementType = ref('') const managementType = ref('')
const jobStatus = ref('')
const fromLocationCode = ref('') const fromLocationCode = ref('')
onLoad((option) => { onLoad((option) => {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({

2
src/pages/stockUp/coms/comScanStockUpPackBatch.vue

@ -72,7 +72,7 @@
<view class="uni-flex u-col" v-for="(record,index) in issueRecord"> <view class="uni-flex u-col" v-for="(record,index) in issueRecord">
<view style="width: 100%;"> <view style="width: 100%;">
<u-swipe-action ref="swipeAction" :options="scanOptions" @click="(...event)=>swipeClick(event,record,index)"> <u-swipe-action ref="swipeAction" :options="scanOptions" @click="(...event)=>swipeClick(event,record,index)">
<<view style="padding: 0px 10px"> <view style="padding: 0px 10px">
<balance :dataContent="record" :isShowLocation="false" :isShowStdPack="false"></balance> <balance :dataContent="record" :isShowLocation="false" :isShowStdPack="false"></balance>
</view> </view>
</u-swipe-action> </u-swipe-action>

6
src/pages/stockUp/job/stockUpJobDetail.vue

@ -53,13 +53,13 @@ import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { getStockUpJobDetail, takeStockUpJob, cancleTakeStockUpJob, stockUpJobsubmit } from '@/api/request2.js' import { getStockUpJobDetail, takeStockUpJob, cancleTakeStockUpJob, stockUpJobsubmit } from '@/api/request2.js'
import { calc } from '@/common/calc.js's import { calc } from '@/common/calc.js'
import { goHome, navigateBack, getRemoveOption, getCurrDateTime, getDirectoryItemArray, getPackingNumberAndBatch } from '@/common/basic.js' import { goHome, navigateBack, getRemoveOption,deepCopyData, getCurrDateTime, getDirectoryItemArray, getPackingNumberAndBatch } from '@/common/basic.js'
import { getDataSource } from '@/pages/issue/js/issue.js' import { getDataSource } from '@/pages/issue/js/issue.js'
import { getManagementPrecisions, deepCopyData } from '@/common/balance.js' import { getManagementPrecisions } from '@/common/balance.js'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'

4
src/plugins/storage.js

@ -9,11 +9,11 @@ export default {
}, },
// 清除全部本地存储 // 清除全部本地存储
clearStorage (){ clearStorage (){
const overPackageRecordPointParams = '' let overPackageRecordPointParams = ''
if( uni.getStorageSync('overPackageRecordPointParams')){ if( uni.getStorageSync('overPackageRecordPointParams')){
overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams')
} }
const overPackageJobDetailPointParams = '' let overPackageJobDetailPointParams = ''
if( uni.getStorageSync('overPackageJobDetailPointParams')){ if( uni.getStorageSync('overPackageJobDetailPointParams')){
overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams')
} }

42
vite.config.ts

@ -10,6 +10,11 @@ export default defineConfig({
// https://github.com/antfu/unocss // https://github.com/antfu/unocss
Unocss() Unocss()
], ],
//静态资源服务的文件夹
publicDir: "static",
base: './',
//静态资源处理
assetsInclude: "",
server: { server: {
port: 81, port: 81,
host: '0.0.0.0', host: '0.0.0.0',
@ -30,5 +35,40 @@ export default defineConfig({
additionalData: '@import "@/styles/vars/_base.less";' additionalData: '@import "@/styles/vars/_base.less";'
} }
} }
} },
//打包配置
build: {
//浏览器兼容性 "esnext"|"modules"
target: "modules",
//指定输出路径
outDir: "dist/build",
//生成静态资源的存放路径
assetsDir: "static",
//小于此阈值的导入或引用资源将内联为 base64 编码,以避免额外的 http 请求。设置为 0 可以完全禁用此项
assetsInlineLimit: 4096,
//启用/禁用 CSS 代码拆分
cssCodeSplit: true,
//构建后是否生成 source map 文件
sourcemap: false,
//当设置为 true,构建后将会生成 manifest.json 文件
manifest: false,
// 设置为 false 可以禁用最小化混淆,
// 或是用来指定使用哪种混淆器
// boolean | 'terser' | 'esbuild'
minify: "terser", //terser 构建后文件体积更小
//传递给 Terser 的更多 minify 选项。
terserOptions: {
// compress: {
// drop_console: true,
// },
},
//设置为 false 来禁用将构建后的文件写入磁盘
write: true,
//默认情况下,若 outDir 在 root 目录下,则 Vite 会在构建时清空该目录。
emptyOutDir: true,
//启用/禁用 brotli 压缩大小报告
brotliSize: true,
//chunk 大小警告的限制
chunkSizeWarningLimit: 500
},
}) })

Loading…
Cancel
Save