Browse Source

改成vue3

hella_vue3
zhang_li 6 months ago
parent
commit
f017805d76
  1. 12
      .env.development
  2. 11
      .env.hella13
  3. 11
      .env.hella14
  4. 11
      .env.hella15
  5. 11
      .env.hella16
  6. 12
      .env.hella8
  7. 11
      .env.hella9
  8. 11
      .env.production
  9. 14
      .env.test
  10. 10
      package.json
  11. 56
      src/api/http.ts
  12. 60
      src/api/request2.js
  13. 8
      src/common/balance.js
  14. 2
      src/common/calc.js
  15. 16
      src/common/detail.js
  16. 2
      src/common/directory.js
  17. 5
      src/common/record.js
  18. 98
      src/common/style/new_style.css
  19. 48
      src/common/style/pdabasic.css
  20. 136
      src/components/my-paging/my-paging.vue
  21. 116
      src/manifest.json
  22. 116
      src/mycomponents/balance/balance.vue
  23. 51
      src/mycomponents/balance/balanceSelect.vue
  24. 18
      src/mycomponents/balance/batch.vue
  25. 37
      src/mycomponents/balance/bussinessType.vue
  26. 56
      src/mycomponents/balance/handleBalance.vue
  27. 18
      src/mycomponents/balance/location.vue
  28. 31
      src/mycomponents/balance/pack.vue
  29. 35
      src/mycomponents/balance/productionLabel.vue
  30. 60
      src/mycomponents/balance/recommendBalance.vue
  31. 18
      src/mycomponents/balance/toLocation.vue
  32. 64
      src/mycomponents/button/requestButton.vue
  33. 32
      src/mycomponents/common/comBlankView.vue
  34. 27
      src/mycomponents/common/comEmptyView.vue
  35. 92
      src/mycomponents/common/comListItem.vue
  36. 490
      src/mycomponents/common/comMessage.vue
  37. 25
      src/mycomponents/common/comPopup.vue
  38. 79
      src/mycomponents/container/targetContainer.vue
  39. 212
      src/mycomponents/detail/comDetailCard.vue
  40. 214
      src/mycomponents/detail/comJobDetailCard.vue
  41. 201
      src/mycomponents/detail/comRequestDetailCard.vue
  42. 30
      src/mycomponents/detail/detailBalanceInfo.vue
  43. 67
      src/mycomponents/detail/detailCommonInfo.vue
  44. 21
      src/mycomponents/detail/detailHandleInfo.vue
  45. 25
      src/mycomponents/detail/detailItemInfo.vue
  46. 24
      src/mycomponents/detail/detailPackageInfo.vue
  47. 29
      src/mycomponents/detail/detailRecommendInfo.vue
  48. 89
      src/mycomponents/detail/jobDetailPopup.vue
  49. 56
      src/mycomponents/detail/recordDetailCommonInfo.vue
  50. 77
      src/mycomponents/detail/recordDetailPopup.vue
  51. 62
      src/mycomponents/detail/requestDetailCommonInfo.vue
  52. 40
      src/mycomponents/item/item.vue
  53. 54
      src/mycomponents/item/itemCompareQty.vue
  54. 45
      src/mycomponents/item/itemInfo.vue
  55. 152
      src/mycomponents/item/itemInfoPopup.vue
  56. 42
      src/mycomponents/item/itemQty.vue
  57. 26
      src/mycomponents/job/jobBottom.vue
  58. 21
      src/mycomponents/job/jobComMainCard.vue
  59. 31
      src/mycomponents/job/jobComMainCardAsn.vue
  60. 70
      src/mycomponents/job/jobComMainDetailCard.vue
  61. 60
      src/mycomponents/job/jobCommonInfo.vue
  62. 93
      src/mycomponents/job/jobDetailPopup.vue
  63. 229
      src/mycomponents/job/jobFilter.vue
  64. 20
      src/mycomponents/job/jobNumber.vue
  65. 27
      src/mycomponents/job/jobPersonInfo.vue
  66. 62
      src/mycomponents/job/jobRequestInfo.vue
  67. 23
      src/mycomponents/job/jobSettingInfo.vue
  68. 34
      src/mycomponents/job/jobStatus.vue
  69. 31
      src/mycomponents/job/jobTop.vue
  70. 42
      src/mycomponents/job/jobTopAsn.vue
  71. 65
      src/mycomponents/jobList/jobList.vue
  72. 47
      src/mycomponents/location/location.vue
  73. 126
      src/mycomponents/location/locationCompare.vue
  74. 30
      src/mycomponents/location/locationDetail.vue
  75. 43
      src/mycomponents/location/locationInfo.vue
  76. 44
      src/mycomponents/location/locationStatus.vue
  77. 78
      src/mycomponents/location/requiredLocation.vue
  78. 89
      src/mycomponents/package/packageCard.vue
  79. 315
      src/mycomponents/package/packageDetailPopup.vue
  80. 198
      src/mycomponents/package/packageList.vue
  81. 89
      src/mycomponents/package/packageRecordCard.vue
  82. 154
      src/mycomponents/package/packageRecordList.vue
  83. 60
      src/mycomponents/package/packageTarget.vue
  84. 140
      src/mycomponents/popup/selectList.vue
  85. 34
      src/mycomponents/production/productionInfo.vue
  86. 30
      src/mycomponents/qty/balanceQty.vue
  87. 255
      src/mycomponents/qty/balanceQtyEdit.vue
  88. 47
      src/mycomponents/qty/compareQty.vue
  89. 321
      src/mycomponents/qty/countQtyEdit.vue
  90. 20
      src/mycomponents/qty/packQty.vue
  91. 27
      src/mycomponents/qty/packUnit.vue
  92. 42
      src/mycomponents/qty/qty.vue
  93. 34
      src/mycomponents/qty/recommendQty.vue
  94. 270
      src/mycomponents/qty/recommendQtyEdit.vue
  95. 20
      src/mycomponents/qty/stdUom.vue
  96. 20
      src/mycomponents/qty/uom.vue
  97. 126
      src/mycomponents/recommend/recommend.vue
  98. 109
      src/mycomponents/recommend/recommendCount.vue
  99. 62
      src/mycomponents/record/record.vue
  100. 231
      src/mycomponents/record/recordComDetailCard.vue

12
.env.development

@ -1,4 +1,10 @@
#VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api
#VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api
VITE_BASE_URL=http://localhost:12080/admin-api
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api
VITE_BASE_URL=http://localhost:12080/admin-api VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310'

11
.env.hella13

@ -0,0 +1,11 @@
VITE_BASE_URL=http://172.21.32.13:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'

11
.env.hella14

@ -0,0 +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}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'

11
.env.hella15

@ -0,0 +1,11 @@
VITE_BASE_URL=https://scp.faway-hella.com:81/api/admin-api
VITE_BASE_URL_IMAGE=https://scp.faway-hella.com:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com'

11
.env.hella16

@ -0,0 +1,11 @@
VITE_BASE_URL=https://scptest.faway-hella.com:81/api/admin-api
VITE_BASE_URL_IMAGE=https://scptest.faway-hella.com:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com'

12
.env.hella8

@ -0,0 +1,12 @@
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"成都","value":2}]'
# 是否是测试环境
VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'

11
.env.hella9

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

11
.env.production

@ -1,4 +1,7 @@
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app
# VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:23111
VITE_BASE_URL=https://tmsapp.hongxianggroup.com.cn
VITE_BASE_URL_IMAGE=https://tmsapp.hongxianggroup.com.cn
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_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'

14
.env.test

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

10
package.json

@ -11,10 +11,16 @@
"test:mp-weixin": "uni build -p mp-weixin",
"test:app": "uni build -p app",
"test:custom": "uni build -p",
"prod": "uni build --mode production",
"prod:mp-weixin": "uni build -p mp-weixin --mode production",
"prod:app": "uni build -p app --mode production",
"prod:custom": "uni build -p --mode production"
"prod:custom": "uni build -p --mode production",
"prod": "uni build --mode production",
"hella8": "uni build --mode hella8",
"hella9": "uni build --mode hella9",
"hella13": "uni build --mode hella13",
"hella14": "uni build --mode hella14",
"hella15": "uni build --mode hella15",
"hella16": "uni build --mode hella16"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001",

56
src/api/http.ts

@ -20,7 +20,16 @@ const instance = axios.create({
resolve(res)
},
fail: (error : any) => {
reject(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);
// console.log("系统异常",message)
}
})
})
@ -34,10 +43,11 @@ const instance = axios.create({
instance.interceptors.request.use((config) => {
const { method, params, url } = config
// 附带鉴权的token
const tenantId = 1
// const tenantId = 1
var tenantId = uni.getStorageSync('tenantId')
const headers : any = {
token: getAccessToken(),
"tenant-id":tenantId,
"tenant-id": tenantId,
'Authorization': 'Bearer ' + getAccessToken()
}
if (uni.getStorageSync('openId')) {
@ -66,11 +76,12 @@ instance.interceptors.request.use((config) => {
*
*/
instance.interceptors.response.use((v) => {
const code = v.data?.code || 200
if (code === 401) {
// alert('即将跳转登录页。。。', '登录过期')
// setTimeout(redirectHome, 1500)
removeToken()
if (v) {
if (v.statusCode == 200) {
if (v.data.code == 0) {
// return v.data
return Promise.resolve(v.data)
}else if(v.data.code == 404){
uni.showModal({
title: '系统提示',
content: '登录状态已过期,您可以继续留在该页面,或者重新登录',
@ -82,29 +93,20 @@ instance.interceptors.response.use((v) => {
}
}
})
return v.data
} else if (code === 500) {
uni.showToast({
title: v.data.msg,
icon: 'none'
})
return v.data
} else if (code !== 200) {
uni.showToast({
title: v.data.msg,
icon: 'none'
})
return v.data
} else {
// return v.data
return Promise.reject("系统异常:" + v.data.msg)
}
// @ts-ignore
if ((v.status || v.statusCode) === 200) {
return v.data
}else{
} else {
return Promise.reject("系统异常:" + v.data.msg)
}
} else {
return Promise.reject("系统异常:" + v.data.msg)
}
return Promise.reject(v)
},error=>{
}, error => {
console.log(error)
uni.showToast({
title: '网络错误',

60
src/api/request2.js

@ -16,6 +16,7 @@ export function login(username, password, code, uuid) {
password,
code,
uuid,
tenantName
}
return http.post('/system/auth/login', data)
}
@ -285,7 +286,7 @@ export function getMesPackInfo(code) {
*
*/
export function getBasicLocationByCode(code) {
var parmas = {
var params = {
code: code,
pageNo: 1,
pageSize: 100
@ -730,7 +731,7 @@ export function cancleTakePutawayJob(id) {
* @param {*} params
*/
export function putawayJobSubmit(params) {
return http.put("/wms/putaway-job-main/execute" + params)
return http.put("/wms/putaway-job-main/execute", params)
}
/**
* 采购上架申请 获取任务列表
@ -1420,6 +1421,14 @@ export function productDismantleJobSubmit() {
export function productDismantleRecordSubmit(params) {
return http.put("/wms/purchasereceipt-job-main/abandon",params)
}
/**
* 拒收接口
* @param {*} id
*
*/
export function productDismantleJobClose(params) {
return http.put("/wms/purchasereceipt-job-main/refusal?id="+params)
}
/**
* 制品发货 任务
* status 任务状态
@ -2118,11 +2127,13 @@ export function productionReturnRecordSubmit(params) {
* @param {*}
*/
export function getUnPlannedIssueRequestList(params) {
return request({
url: baseApi + "/wms/unplannedissue-request-detail/senior",
method: "post",
data: params,
});
// return request({
// url: baseApi + "/wms/unplannedissue-request-detail/senior",
// method: "post",
// data: params,
// });
return http.post("/wms/unplannedissue-request-detail/senior",params)
}
/**
@ -2379,7 +2390,7 @@ export function mergePackageRecordSubmit(params) {
*/
export function overPackageRecordSubmit(params) {
return http.post("/wms/packageover-main/createe" ,params)
return http.post("/wms/packageover-main/create" ,params)
}
/**
@ -2393,6 +2404,21 @@ export function getManagementPrecision(params) {
return http.post("/wms/rule/getPrecisionStrategyByItemCodes" ,params)
}
// 装配收货详情--打印功能
export function getPrintProductReceiptList(params) {
return http.get("/wms/barbasic/getBarbasicByPackingNumber" ,{params})
}
// 根据库存余额获取包装信息进行打印标签 H5
export function getBalanceToPackage(params) {
return http.get("/wms/package/getBalanceToPackage" ,{params})
}
// 批量打印标签 H5
export function batchPrintingLable(params) {
return http.post("/wms/package/batchPrintingLable" ,params)
}
/**
* 查询库存通过多种条件 高级筛选
* @param {*}
@ -2528,6 +2554,20 @@ export function getOverPageJobDetail(id) {
* 翻包任务 提交
* @param {*} params
*/
export function overPageSubmit(params) {
return http.put("/wms/packageover-job-main/execute")
export function overPageSubmit(data) {
return http.put("/wms/packageover-job-main/execute",data)
}
export function getPackageLabel(packageCode) {
var data = {
name: name,
pageNo: 1,
pageSize: 10,
sort:"",
filters:[{
action: "==",
column:"relateNumber",
value: packageCode
}]
}
return http.post("/wms/barbasic/senior",data)
}

8
src/common/balance.js

@ -84,16 +84,19 @@ export function getPrecisionStrategyList(itemList, callback) {
};
getPrecisionStrategy(itemList).then(res => {
console.log(111,res.data)
if (res.data == null) {
result.success = false
result.message = '未查询到管理精度信息'
} else {
result.list = res.data;
}
console.log('haha',result)
callback(result);
}).catch(error => {
result.success = false;
result.message = error;
console.log('hehe',result)
callback(result);
})
}
@ -133,17 +136,21 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
}
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) {
let result = {
list: [],
success: true,
message: ''
};
let params = {
itemCodes: [label.itemCode],
locationCode: locationCode
};
// let jsonParem = JSON.stringify(param)
getManagementPrecision(params).then(res => {
console.log("成功"+res)
let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) {
case 'BY_PACKAGING':
@ -172,6 +179,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento
break;
}
}).catch(error => {
console.log("失败"+error)
let result = {
success: false,
message: error

2
src/common/calc.js

@ -1,5 +1,5 @@
/* 解决js计算精度问题 */
import { Decimal } from 'decimal.js';//引入
import Decimal from 'decimal.js'
class Calc {
add(num1,num2) {
return new Decimal(num1).add(new Decimal(num2)).toNumber()

16
src/common/detail.js

@ -34,8 +34,8 @@ export function getTreeDataSource(dataList) {
items.forEach(r =>
r.subList.forEach(s => {
s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber)
s.packList.forEach(pac=>{
pac.scaned=false;
s.packList.forEach(pac => {
pac.scaned = false;
})
})
)
@ -61,7 +61,7 @@ export function getDataSource(subList) {
}
})
return items;
}
}
export function createItemInfo(detail) {
let item = {
@ -104,8 +104,10 @@ export function calcHandleQty(detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
item.qty = calc.add(item.qty, detail.qty);
}
}
@ -118,10 +120,10 @@ export function calcTreeHandleQty(detailSource) {
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
if(detail.packList.length>0){
if (detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList){
if(pack!=undefined&&pack.scaned){
for (let pack of detail.packList) {
if (pack != undefined && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}

2
src/common/directory.js

@ -568,5 +568,3 @@ export function getPackUnitName(value) {
return resultInfo
}
locationAreaTypeList

5
src/common/record.js

@ -36,6 +36,8 @@ export function createDetailInfo(balance, pack) {
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail;
}
@ -43,10 +45,13 @@ export function createDetailInfo(balance, pack) {
//计算实际数量
export function calcHandleQty(detailSource) {
for (let item of detailSource) {
console.log('qqqqqqqqq')
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
console.log('bbbbbb')
for (let detail of item.subList) {
if(detail!=undefined){
console.log(detail)
if(detail.scaned){
item.handleQty = calc.add(item.handleQty,detail.handleQty);
}

98
src/common/style/new_style.css

@ -184,18 +184,20 @@ uni-page-head .uni-page-head__title {
text-align: center;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
opacity: 0.8;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.scan_float image {
width: 40rpx;
height: 40rpx;
margin-top: 10rpx;
}
.scan_float view {
color: #fff;
font-size: .725rem;
margin-top: -8rpx;
}
.top_card {
@ -218,7 +220,9 @@ uni-page-head .uni-page-head__title {
padding: 0 0rpx;
width: 100%;
box-sizing: border-box;
float: left;
background:#EEF4FA;
padding:20rpx;
border-radius: 10rpx;
}
.cell_box {
@ -231,6 +235,7 @@ uni-page-head .uni-page-head__title {
padding: 0 20rpx;
/* margin: 0 0 20rpx; */
text-align: center;
flex:1
}
.cell_box .cell_long {
@ -240,7 +245,8 @@ uni-page-head .uni-page-head__title {
.cell_box .cell_info view {
font-size: 0.9375rem;
margin-bottom: 10rpx;
color: #7B8195;
color: #515562;
word-wrap:break-word
}
.cell_box .cell_info .text_black {
@ -310,7 +316,7 @@ uni-page-head .uni-page-head__title {
}
.cen_card .cell_box .cell_info .text_lightblue {
font-size: 0.925rem;
font-size:26rpx;
}
.bot_card {
@ -1394,13 +1400,13 @@ uni-page-head .uni-page-head__title {
}
.msg_list {
padding-top: 20rpx;
}
.msg_list .uni-list-chat__header {
.msg_list ::v-deep .u-card__head--left__thumb{
width: 60rpx !important;
height: 60rpx !important;
background-color: #3d7eff;
padding:12rpx;
background-color: #3d7eff!important;
border-color: transparent !important;
border-radius: 6rpx !important;
}
@ -1426,9 +1432,8 @@ uni-page-head .uni-page-head__title {
.msg_list .uni-list-chat__content-title {
font-size: .9rem !important;
}
.msg_list .hasread .uni-list-chat__header {
background-color: #ccc;
::v-deep .msg_list .hasread .u-card__head--left__thumb {
background-color: #ccc!important;
}
/* index */
@ -2031,9 +2036,8 @@ button::after {
}
.card_itemCode {
font-size: 38rpx;
font-size: 32rpx;
font-weight: bold;
font-weight: 500;
/* padding: 5rpx 10rpx; */
/* width: 210rpx; */
word-wrap: break-word;
@ -2042,7 +2046,7 @@ button::after {
.card_itemName {
color: #909399;
font-size: 30rpx;
font-size: 26rpx;
/* padding: 5rpx 10rpx; */
/* width: 210rpx; */
word-wrap: break-word;
@ -2070,23 +2074,27 @@ button::after {
.card_content {
font-size: 32rpx;
padding: 5px;
color:#2E3A63;
margin-left:20rpx
}
.card_icon_normal {
width: 45rpx;
height: 45rpx;
vertical-align: middle
width: 30rpx;
height: 30rpx;
vertical-align: middle;
margin-right:12rpx
}
.card_packing_code {
color: #3315EB;
padding: 5px;
color: #1677FF;
font-size: 26rpx;
font-style: italic;
}
.card_batch {
color: #9747FF;
padding: 5px;
font-size: 26rpx;
font-style: italic;
}
.card_container {
@ -2101,23 +2109,23 @@ button::after {
}
.card_business {
color: #F1A532;
padding: 5px;
color: #F1A532; font-size: 26rpx; font-style: italic;
}
.card_business_content {
font-size: 32rpx;
padding: 5px;
font-size: 32rpx; color:#2E3A63; margin-left:20rpx
}
.card_location {
color: #DA8910;
padding: 5px;
font-size: 26rpx;
font-style: italic;
}
.card_to_location {
color: #329362;
padding: 5px;
font-size: 26rpx;
font-style: italic;
}
.card_location_content {
@ -2151,12 +2159,14 @@ button::after {
.scan_view {
/* #0CC2B6 20% */
background: linear-gradient(90deg, rgba(12, 194, 182, 0.2) 0%, rgba(12, 194, 182, 0) 100%)
background: linear-gradient(90deg, rgba(12, 194, 182, 0.2) 0%, rgba(12, 194, 182, 0.05) 100%);
border-radius:14rpx;
padding:10rpx 20rpx 16rpx
}
.card_view {
font-size: 32rpx;
padding: 5rpx;
margin-top:14rpx
}
/*
@ -2199,30 +2209,28 @@ button::after {
.task_top {
margin: 0rpx 10rpx;
background-color: #fff;
vertical-align: middle;
}
.task_item {
margin: 0rpx 10rpx;
margin-top: 10rpx;
background-color: #fff;
padding:20rpx 0px
}
.task_card {
padding: 12rpx;
padding:0px 20rpx;
background-color: #fff;
border-radius: 10rpx;
margin: 12rpx;
}
.task_number {
font-size: 35rpx;
font-size: 36rpx;
font-weight: 600;
/* bold */
}
.task_text {
font-size: 30rpx;
margin: 5rpx 0rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -2281,21 +2289,22 @@ button::after {
background-color: #fff;
width: 100%;
border-radius: 8rpx 8rpx 0rpx 0rpx;
padding: 15rpx;
padding:0px 30rpx;
}
.pop_detail .item {
padding-top: 5rpx;
padding-bottom: 5rpx;
margin-left: 10rpx;
margin-right: 10rpx;
/* margin-left: 10rpx; */
/* margin-right: 10rpx; */
display: flex;
flex-direction: row;
-webkit-justify-content: space-between;
justify-content: space-between;
align-items:center
}
.pop_detail .item_title {
@ -2460,7 +2469,7 @@ button[disabled] {
.center {
display: flex;
flex-direction: row;
justify-content: center;
justify-content: flex-end;
align-items: center;
}
@ -2473,6 +2482,7 @@ button[disabled] {
.text_recommend {
color: #0A84FF;
font-size: 38rpx;
font-weight:bold
}
.text_balance {
@ -2506,7 +2516,7 @@ button[disabled] {
align-items: center;
padding: 0px;
color: #909399;
font-size: 30rpx;
font-size:26rpx;
}
.std_uom {
@ -2518,7 +2528,7 @@ button[disabled] {
.uom {
color: #909399;
font-size: 30rpx;
font-size: 26rpx;
margin-left: 5rpx;
margin-right: 5rpx;
display: flex;
@ -2667,8 +2677,9 @@ button[disabled] {
align-self: stretch;
/* 颜色/白色 */
background: #FFFFFF;
background:rgba(60, 156, 255, 1);
box-sizing: border-box;
color:white;
/* 颜色/边框 */
border: 1px solid #E7E6E4;
z-index: 3;
@ -2774,7 +2785,6 @@ button[disabled] {
}
.split_line {
background-color: #e0e0e0;
background-color: rgba(230,230,230,0.5);
height: 1px;
margin: 10rpx;
}

48
src/common/style/pdabasic.css

@ -253,7 +253,6 @@
font-size: 28rpx;
background: rgba(95, 203, 148, 0.2);
color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
@ -282,8 +281,9 @@
/* 关闭 */
.other {
background-color: #808080;
color: #FFFFFF;
/* background-color: #808080; */
color: #b4a5ff;
font-size: 26rpx;
border-radius: 10rpx;
}
@ -329,16 +329,19 @@
.inventory_status_insp {
color: #F9AE3D;
margin-right: 10rpx;
font-size:26rpx
}
.inventory_status_ok {
color: #67C23A;
margin-right: 10rpx;
font-size:26rpx
}
.inventory_status_nok {
color: #FF2424;
margin-right: 10rpx;
font-size:26rpx
}
.inventory_status_hold {
@ -480,10 +483,9 @@ export function getItemTypeStyle(val) {
.detail-list {
background-color: #fff;
padding:5rpx 10rpx;
/* margin: 20rpx; */
/* border-radius: 16rpx; */
/* overflow: hidden; */
margin:20rpx 20rpx;
padding:0px 20rpx;
border-radius: 16rpx;
}
.detail-content {
@ -721,19 +723,27 @@ page {
flex-direction: column;
width: 100%;
height: 100%;
/* background-color: #fff; */
background-color: #f5f5f5;
}
.page-header {
background-color: #fff;
background-color: rgb(60, 156, 255) !important;
font-size: 35rpx;
padding: 10rpx 20rpx;
padding: 10rpx 20rpx 20rpx;
}
.page-header-box{
background-color: #fff !important;
padding:0px 20rpx 20rpx;
border-radius: 12rpx;
}
.page-header .header_item {
/* padding-left: 10rpx; */
padding: 5rpx 10rpx;
font-size:32rpx ;
font-size:28rpx ;
color:#777E94;
}
.page-header .header_item text{
color:#011C43;
}
.page-header .header_job_top {
@ -742,7 +752,6 @@ page {
.page-main {
flex: 1;
position: relative;
background: #fff;
}
.page-main-scroll {
@ -760,3 +769,16 @@ page {
background: #e0e0e0;
}
.choose-box1{
background: white;
padding:10rpx 20rpx
}
.choose-item1{
border: 1px solid rgba(230, 230, 230, 1);
padding: 20rpx;
display: flex
}
.choose-text1{
flex:1
}

136
src/components/my-paging/my-paging.vue

@ -3,10 +3,7 @@
<!-- 这边统一设置z-paging在页面中使用时就不用重复写 -->
<!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query -->
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 -->
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList"
:useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps"
:loading-more-loading-text="{'en':'英文的加载中','zh-cn':'中文的加载中','zh-hant-cn':'繁体的加载中'}">
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :loading-more-loading-text="{ en: '英文的加载中', 'zh-cn': '中文的加载中', 'zh-hant-cn': '繁体的加载中' }">
<!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 -->
<template #top>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" -->
@ -20,25 +17,25 @@
<slot name="bottom" />
</template>
<template #empty v-if="$slots.empty" >
<template #empty v-if="$slots.empty">
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="empty" -->
<slot name="empty" />
</template>
<!-- 这个是插入虚拟列表/内置列表的cell -->
<template #cell="{item,index}">
<slot name="cell" :item="item" :index="index"/>
<template #cell="{ item, index }">
<slot name="cell" :item="item" :index="index" />
</template>
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view页面那边就不用再写下面两行了 -->
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher"此时不用获取refresherStatus会自动使用z-paging自带的下拉刷新view) -->
<template #refresher="{refresherStatus}">
<template #refresher="{ refresherStatus }">
<!-- <custom-refresher :status="refresherStatus" /> -->
</template>
<!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> -->
<uni-load-more status="normore" />
<u-loadmore status="normore" />
</template>
<!-- 这里接收页面传进来的普通slot如列表数据等 -->
@ -46,94 +43,97 @@
</z-paging>
</template>
<script>
export default {
name: "my-paging",
data() {
return {
list: []
};
},
props: {
//v-modellist
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
const props = defineProps({
value: {
type: Array,
default: function() {
return [];
default() {
return []
}
},
//使
// 使
useVirtualList: {
type: Boolean,
default: false
},
//z-paging()use-virtual-listtruetrue
// z-paging()use-virtual-listtruetrue
useInnerList: {
type: Boolean,
default: false
},
//cellkeynvuenvueuse-inner-list
// cellkeynvuenvueuse-inner-list
cellKeyName: {
type: String,
default: ''
},
//innerList
// innerList
innerListStyle: {
type: Object,
default: function() {
return {};
default() {
return {}
}
},
//()127celldom()
// ()127celldom()
preloadPage: {
type: [Number, String],
default: 12
},
//cellfixedcellcelldynamicdynamicfixed
// cellfixedcellcelldynamicdynamicfixed
cellHeightMode: {
type: String,
default: 'fixed'
},
//scroll60
// scroll60
virtualScrollFps: {
type: [Number, String],
default: 60
},
},
watch: {
//v-modez-paging
value(newVal) {
this.list = newVal;
},
// #ifdef VUE3
modelValue(newVal) {
this.list = newVal;
},
// #endif
//z-paging
list(newVal) {
//emit inputv-model
this.$emit('input', newVal);
}
})
const list = ref([])
const paging = ref()
// v-modez-paging
watch(
() => props.value,
(newVal) => {
list.value = newVal
}
)
// #ifdef VUE3
watch(
() => props.modelValue,
(newVal) => {
list.value = newVal
}
)
// #endif
watch(
() => list.value,
(newVal) => {
// emit inputv-model
emit('input', newVal)
// #ifdef VUE3
this.$emit('update:modelValue', newVal);
emit('update:modelValue', newVal)
// #endif
}
},
methods: {
//z-paging@queryemit
queryList(pageNo, pageSize) {
console.log("queryList",pageNo)
)
// z-paging@queryemit
const queryList = (pageNo, pageSize) => {
console.log('queryList', pageNo)
// this.$emit('query', pageNo, pageSize);
},
//reloadz-paging
reload(data) {
this.$refs.paging.reload(data);
},
//completez-paging
complete(data) {
this.$refs.paging.complete(data);
},
/*
}
// reloadz-paging
const reload = (data) => {
paging.value.reload(data)
}
// completez-paging
const complete = (data) => {
paging.value.complete(data)
}
/*
//使mixins使
//updatePageScrollTopz-paging
updatePageScrollTop(data){
@ -148,10 +148,12 @@
this.$refs.paging.doChatRecordLoadMore();
}
*/
}
}
//
const emit = defineEmits(['input', 'update:modelValue'])
defineExpose({
reload,
complete
})
</script>
<style>
</style>
<style></style>

116
src/manifest.json

@ -1,28 +1,28 @@
{
"name" : "富维汽车镜",
"appid" : "__UNI__DA78BC9",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"name": "富维汽车镜",
"appid": "__UNI__DA78BC9",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules" : {},
"modules": {},
/* */
"distribute" : {
"distribute": {
/* android */
"android" : {
"permissions" : [
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -41,42 +41,74 @@
]
},
/* ios */
"ios" : {
"dSYMs" : false
"ios": {
"dSYMs": false
},
/* SDK */
"sdkConfigs" : {
"ad" : {}
"sdkConfigs": {
"ad": {}
},
"nativePlugins": {
"TestModule": {
"__plugin_info__": {
"name": "TestModule",
"description": "打印",
"platforms": "Android",
"url": "",
"android_package_name": "",
"ios_bundle_id": "",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {}
}
}
}
},
"nativePlugins": {
"TestModule": {
"__plugin_info__": {
"name": "TestModule",
"description": "打印",
"platforms": "Android",
"url": "",
"android_package_name": "",
"ios_bundle_id": "",
"isCloud": false,
"bought": -1,
"pid": "",
"parameters": {}
}
}
}
},
/* */
"quickapp" : {},
"quickapp": {},
/* */
"mp-weixin" : {
"appid" : "wx6176535b0b0153f0",
"setting" : {
"urlCheck" : false
"mp-weixin": {
"appid": "wx6176535b0b0153f0",
"setting": {
"urlCheck": false
},
"usingComponents" : true
"usingComponents": true
},
"mp-alipay" : {
"usingComponents" : true
"mp-alipay": {
"usingComponents": true
},
"mp-baidu" : {
"usingComponents" : true
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao" : {
"usingComponents" : true
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics" : {
"enable" : false
"uniStatistics": {
"enable": false
},
"vueVersion" : "3",
"h5" : {
"template" : "index.html",
"devServer" : {
"port" : 9020
"vueVersion": "3",
"h5": {
"template": "index.html",
"devServer": {
"port": 9020
}
}
}

116
src/mycomponents/balance/balance.vue

@ -1,60 +1,37 @@
<template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; ">
<view class="uni-flex uni-row space-between" style="align-items: center">
<view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode">
</to-location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
</view>
<view class="uni-flex uni-row center">
<view class="uni-flex uni-row u-align-start">
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)"
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack"
:isShowStatus='isShowStatus'>
</compare-qty>
<qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; width: 20px;" @click="copy">复制</text>
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view>
</view>
</view>
<!-- <u-line></u-line> -->
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
pack,
location,
toLocation,
batch,
qty,
recommendQty,
compareQty,
},
data() {
return {
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
}
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -82,27 +59,12 @@
isShowToLocation: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -111,23 +73,11 @@
})
}
})
// #endif
},
copyPro() {
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -136,14 +86,10 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
}
const isDevlement = () => {
return config.isDevelopment
}
</script>
<style>
</style>
<style></style>

51
src/mycomponents/balance/balanceSelect.vue

@ -1,7 +1,7 @@
<!--发料任务卡片-->
<template>
<!-- <page-meta root-font-size="18px"></page-meta> -->
<uni-popup ref="popupItems" type="center">
<u-popup v-model='show' mode='center'>
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;">
<item :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;"
@ -9,45 +9,28 @@
<balance :dataContent="item"></balance>
</view>
</scroll-view>
</uni-popup>
</u-popup>
</template>
<script>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
} from 'vue'
import item from '@/mycomponents/item/item.vue'
import balance from '@/mycomponents/balance/balance.vue'
export default {
name: "balanceSelect",
emits: ['onSelectItem'],
components: {
item,
balance
},
data() {
return {
balanceItems: [],
};
},
//
props: {
// datacontent: {
// type: Object,
// value: null
// }
},
methods: {
openPopup(items) {
this.balanceItems = items;
this.$refs['popupItems'].open("center");
},
callback(item) {
this.$emit("onSelectItem", item);
this.$refs['popupItems'].close();
},
const balanceItems = ref([])
const openPopup = (items) => {
balanceItems.value = items;
show.value = true
}
const callback = (item) => {
emit("onSelectItem", item);
show.value = false
}
const emit = defineEmits(['onSelectItem'])
defineExpose({openPopup})
</script>
<style scoped lang="scss">

18
src/mycomponents/balance/batch.vue

@ -1,23 +1,17 @@
<template>
<view class="card_view ">
<text class="card_batch card_content ">批次</text>
<text class="card_content ">{{batch}}</text>
<view class="card_view">
<text class="card_batch">批次</text>
<text class="card_content">{{batch}}</text>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
<script setup lang="ts">
const props = defineProps({
batch: {
type: String,
default: ""
}
},
}
})
</script>
<style>

37
src/mycomponents/balance/bussinessType.vue

@ -1,37 +1,26 @@
<template>
<view class="business_view">
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text>
<text class="card_business_content">{{number}}</text>
<view class="card_view">
<text class="card_business">{{ businessTypeDesc(bussinessType) }}</text>
<text class="card_business_content">{{ number }}</text>
</view>
</template>
<script>
import {
getBusinessTypeDesc
} from '@/common/directory.js';
export default {
data() {
return {}
},
props: {
<script setup lang="ts">
import { getBusinessTypeDesc } from '@/common/directory.js'
const props = defineProps({
bussinessType: {
type: String,
default: ""
default: ''
},
number: {
type: String,
default: ""
default: ''
}
},
methods:{
businessTypeDesc(type){
})
const businessTypeDesc = (type) => {
return getBusinessTypeDesc(type)
}
}
}
}
</script>
<style>
</style>
<style></style>

56
src/mycomponents/balance/handleBalance.vue

@ -1,45 +1,29 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff">
<view class="space_between center">
<view style="word-break: break-all;width: 60%;">
<view style="word-break: break-all; width: 60%">
<pack title="外包装" v-if="detail.parentPackingNumber != undefined && detail.parentPackingNumber != ''" :packingCode="detail.parentPackingNumber"></pack>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view style="word-break: break-all;">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" :isShowStatus='isShowStatus'
:isShowStdPack="true"></recommend-qty>
<view style="word-break: break-all">
<recommend-qty v-if="detail.record == null || detail.record == undefined" :dataContent="detail" :isShowStatus="isShowStatus" :isShowStdPack="true"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus='isShowStatus'
:isShowStdPack="true">
</compare-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus="isShowStatus" :isShowStdPack="true"> </compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
const props = defineProps({
detail: {
type: Object,
default: {}
@ -59,25 +43,17 @@
isShowStatus: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
})
</script>
<style>
.recommend {
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
}
</style>

18
src/mycomponents/balance/location.vue

@ -1,18 +1,12 @@
<template>
<view class="card_view ">
<text class="card_location card_content ">{{title}}</text>
<view class="card_view">
<text class="card_location">{{title}}</text>
<text class="card_content ">{{locationCode}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {}
},
props: {
<script setup lang="ts">
const props = defineProps({
locationCode: {
type: String,
default: ''
@ -22,9 +16,7 @@
default: '库位'
},
},
}
})
</script>
<style>

31
src/mycomponents/balance/pack.vue

@ -1,34 +1,21 @@
<template>
<view class="card_view">
<text class="card_packing_code card_content ">包装</text>
<text class="card_content ">{{packingCode}}</text>
<text class="card_packing_code card_content">{{ title }}</text>
<text class="card_content">{{ packingCode }}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
props: {
<script setup lang="ts">
const props = defineProps({
packingCode: {
type: String,
default: ''
},
},
watch: {
},
methods: {
}
title: {
type: String,
default: '包装'
}
})
</script>
<style>
</style>
<style></style>

35
src/mycomponents/balance/productionLabel.vue

@ -1,26 +1,15 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowFromLocation="isShowLocation"></balance>
<view :class="dataContent.scaned ? 'scan_view' : ''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance>
<production-info :dataContent="packageContent"></production-info>
</view>
</template>
<script>
import balance from '@/mycomponents/balance/balance.vue'
import productionInfo from '@/mycomponents/production/productionInfo.vue'
<script setup lang="ts">
import balance from '@/mycomponents/balance/balance.vue'
import productionInfo from '@/mycomponents/production/productionInfo.vue'
export default {
components: {
balance,
productionInfo
},
data() {
return {
}
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -45,15 +34,7 @@
type: Boolean,
default: true
}
},
watch: {
},
methods: {
}
}
})
</script>
<style>
</style>
<style></style>

60
src/mycomponents/balance/recommendBalance.vue

@ -1,10 +1,8 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;">
<view class="uni-flex uni-row space-between center ">
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" >
<view style=" width: 25rpx;color: #32C1E8;">
推荐
</view>
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #fff">
<view class="uni-flex uni-row space-between center">
<view class="uni-flex uni-row" style="width: 60%">
<view style="width: 20rpx; color: #1677ff; margin-right: 20rpx; font-size: 24rpx"> 推荐 </view>
<view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
@ -12,38 +10,21 @@
</view>
</view>
<view style="word-break: break-all">
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false">
</compare-qty>
<recommend-qty v-if="detail.Records == null || detail.Records.length == 0" :dataContent="detail" :isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> </compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
}
},
props: {
const props = defineProps({
detail: {
type: Object,
default: {}
@ -59,26 +40,17 @@
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
})
</script>
<style>
.recommend {
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
}
</style>

18
src/mycomponents/balance/toLocation.vue

@ -1,30 +1,20 @@
<template>
<view class="card_view ">
<text class="card_to_location card_content ">{{title}}</text>
<text class="card_to_location">{{title}}</text>
<text class="card_content ">{{locationCode}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {}
},
props: {
<script setup lang="ts">
const props = defineProps({
locationCode: {
type: String,
default: ''
},
title: {
type: String,
default: '库位'
},
},
}
})
</script>
<style>

64
src/mycomponents/button/requestButton.vue

@ -4,53 +4,43 @@
<image src="@/static/icons_ui/icon_add.svg"></image>
<view>{{btnName}}</view>
</view>
<!-- <movable-area>
<movable-view class="max" direction="all">扫描</movable-view>
</movable-area> -->
</view>
</template>
<script>
export default {
data() {
return {
x: 0,
y: 0,
old: {
x: 0,
y: 0
}
}
},
props: {
<script setup lang="ts">
import {
ref,
nextTick
} from 'vue'
const props = defineProps({
btnName: {
type: String,
default: '创建'
},
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
},
tap: function(e) {
this.x = this.old.x
this.y = this.old.y
this.$nextTick(function() {
this.x = 30
this.y = 30
})
},
onChange: function(e) {
this.old.x = e.detail.x
this.old.y = e.detail.y
const x = ref(0)
const y = ref(0)
const old= ref({
x: 0,
y: 0
})
const goScan=(content)=> {
emit("goScan", '');
}
},
const tap=(e) =>{
x.value = old.value.x
y.value = old.value.y
nextTick(function() {
x.value = 30
y.value = 30
})
}
const onChange=(e) =>{
old.value.x = e.detail.x
old.value.y = e.detail.y
}
//
const emit = defineEmits(['goScan'])
</script>
<style>

32
src/mycomponents/common/comBlankView.vue

@ -3,29 +3,23 @@
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image>
<button @click="goScan">
<image src="@/static/icons_ui/icon_add.svg"></image>
去扫描
{{ title }}
</button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
}
}
<script setup lang="ts">
const props = defineProps({
title: {
type: String,
default: '去扫描'
}
})
const goScan = (content) => {
emit('goScan', '')
}
//
const emit = defineEmits(['goScan'])
</script>
<style>
</style>
<style></style>

27
src/mycomponents/common/comEmptyView.vue

@ -4,36 +4,11 @@
<view class="">
<image class="default_nodata" src="@/static/icons_ui/default_data.png"></image>
</view>
<!--
<view class="" style="display: flex;flex-direction: column;
align-items: center;">
<view class="" >
<image class="nodata" src="/static/icons_ui/default_data.png"></image>
</view>
<view style="font-size: 40rpx;color: #909193;">
暂无数据
</view>
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
<script setup lang="ts">
}
}
</script>

92
src/mycomponents/common/comListItem.vue

@ -1,27 +1,25 @@
<template>
<view class="">
<view class="uni-flex uni-column">
<view class="item" v-for="(item,index) in dataList">
<text class="item_title">{{item.title}} : </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{getTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{getUomInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{getInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{getSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{getRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{getInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{getLocationTypeName(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{handleGetTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{handleGetUomInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{handleGetInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{handleGetSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{handleGetRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{handleGetInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{handleGetLocationTypeName(item.content)}} </text>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {
dateFormat
} from '@/common/basic.js';
@ -38,69 +36,49 @@
getLocationTypeName
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
watch: {
// dataContent: {
// handler(newName, oldName) {
// },
// immediate: true,
// deep: true
// }
},
props: {
const props = defineProps({
dataList: {
type: Array,
default: []
}
},
methods: {
avaliable(value) {
})
const avaliable=(value)=> {
return value == "TRUE" ? "可用" : "不可用"
},
boolean(value) {
}
const boolean=(value)=> {
return value == "TRUE" ? "是" : "否"
},
formatDate(val) {
}
const formatDate=(val)=> {
return dateFormat(val)
},
getTransferModeName(value){
}
const handleGetTransferModeName=(value)=>{
return getTransferModeName(value)
},
getLocationTypeNameList(value){
}
const handleGetLocationTypeNameList=(value)=>{
return getLocationTypeNameList(value)
},
getDirectoryItemArray(value){
}
const handleGetDirectoryItemArray=(value)=>{
return getDirectoryItemArray(value)
},
getUomInfo(value){
}
const handleGetUomInfo=(value)=>{
return getUomInfo(value).label
},
getInspectType(value){
}
const handleGetInspectType=(value)=>{
return getInspectType(value)
},
getSampleMethod(value){
}
const handleGetSampleMethod=(value)=>{
return getSampleMethod(value)
},
getRequestStateInfo(value){
}
const handleGetRequestStateInfo=(value)=>{
return getRequestStateInfo(value).label
},
getInventoryStatusName(value){
return getInventoryStatusName(value)
},
getLocationTypeName(value){
return getLocationTypeName(value)
}
const handleGetInventoryStatusName=(value)=>{
return getInventoryStatusName(value)
}
const handleGetLocationTypeName=(value)=>{
return getLocationTypeName(value)
}
</script>
<style>

490
src/mycomponents/common/comMessage.vue

@ -1,26 +1,23 @@
<template name="show-modal">
<view>
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false"
:showConfirmButton="false" ref="modal">
<u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
<view class="slot-content">
<slot name="icon">
<image class="icon" :src="icon" />
</slot>
<slot name="content">
<rich-text class="content" :nodes="content">
</rich-text>
<rich-text class="content" :nodes="content"> </rich-text>
</slot>
<view class='split_line'></view>
<view class="split_line"></view>
<slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text>
<text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view>
<u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose">
<text :style="{'color':confirmColor}">{{confirmText}}</text>
<text v-if="showConfirmCountdown">({{seconds}}s关闭)</text>
<text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view>
</view>
</slot>
@ -30,293 +27,284 @@
</template>
<script setup lang="ts">
/**
/**
* modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */
import {
ref,
getCurrentInstance
} from 'vue'
const timer = ref(null)
const show = ref(false) //
const iconType = ref('消息')
const icon = ref('../../static/icons/error-circle.svg')
const title = ref('')
const content = ref('') //
const cancelText = ref('取消') //
const confirmText = ref('确定') //
const showCancel = ref(true) // true
const confirmColor = ref('#007aff') //
const cancelColor = ref(null) //
const showConfirmButton = ref(true) //
const showConfirmCountdown = ref(true) //
const showCancelButton = ref(true) //
const showClose = ref(false)
const confirm = ref(false) // true
const cancel = ref(false) // true
const isDisabled = ref(true) // true
const seconds = ref(0)
const success = () => {
}
const open = () => {
show.value = true;
isDisabled.value = true;
}
const close = () => {
import { ref, getCurrentInstance } from 'vue'
const timer = ref(null)
const show = ref(false) //
const iconType = ref('消息')
const icon = ref('../../static/icons/error-circle.svg')
const title = ref('')
const content = ref('') //
const cancelText = ref('取消') //
const confirmText = ref('确定') //
const showCancel = ref(true) // true
const confirmColor = ref('#007aff') //
const cancelColor = ref(null) //
const showConfirmButton = ref(true) //
const showConfirmCountdown = ref(true) //
const showCancelButton = ref(true) //
const showClose = ref(false)
const confirm = ref(false) // true
const cancel = ref(false) // true
const isDisabled = ref(true) // true
const seconds = ref(0)
const success = ref(() => {})
const open = () => {
show.value = true
isDisabled.value = true
}
const close = () => {
show.value = false
isDisabled.value = false;
}
const confirmClose = () => {
isDisabled.value = false
}
const confirmClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
// console.log('')
if (show.value) {
show.value = false;
clearInterval(timer.value) //timer
success({
show.value = false
clearInterval(timer.value) // timer
success.value({
// cancel: false,
confirm: true,
});
}
confirm: true
})
}
const cancelClose = () => {
}
const cancelClose = () => {
if (!isDisabled.value) return
isDisabled.value = false
clearInterval(timer.value) //timer
clearInterval(timer.value) // timer
show.value = false
success({
success.value({
// cancel: true,
confirm: false,
});
}
// (+)
const showMessage = (mContent, callback) => {
showConfirmCountdownModal("消息", mContent, callback);
}
// (+)
const showSuccessMessage = (mContent, callback) => {
showConfirmCountdownModal("成功", mContent, callback);
}
// (
const showErrorMessage = (mContent, callback) => {
console.log(333)
showConfirmModal("失败", mContent, callback);
}
// (
const showBreakMessage = (mContent, callback) => {
showNoButtonModal("失败", mContent, callback);
}
// (+
const showQuestionMessage = (mContent, callback) => {
showSelectModal("疑问", mContent, callback);
}
// (+)
const showWarningMessage = (mContent, callback) => {
showConfirmCountdownModal("警告", mContent, callback);
}
// (+)
const showConfirmCountdownFailModal = (mContent, callback) => {
showConfirmCountdownModal("失败", mContent, callback);
}
// (
const showConfirmMessageModal = (mContent, callback) => {
showConfirmModal("消息", mContent, callback);
}
// (
const showConfirmSuccessModall = (mContent, callback) => {
showConfirmModal("成功", mContent, callback);
}
// (
const showConfirmWarningModal = (mContent, callback) => {
showConfirmModal("警告", mContent, callback);
}
// (
const showConfirmQuestionModal = (mContent, callback) => {
showConfirmModal("疑问", mContent, callback);
}
// (
const showNoButtonModal = (mIconType, mContent, callback) => {
confirm: false
})
}
// (+)
const showMessage = (mContent, callback) => {
showConfirmCountdownModal('消息', mContent, callback)
}
// (+)
const showSuccessMessage = (mContent, callback) => {
showConfirmCountdownModal('成功', mContent, callback)
}
// (
const showErrorMessage = (mContent, callback) => {
showConfirmModal('失败', mContent, callback)
}
// (
const showBreakMessage = (mContent, callback) => {
showNoButtonModal('失败', mContent, callback)
}
// (+
const showQuestionMessage = (mContent, callback) => {
showSelectModal('疑问', mContent, callback)
}
// (+)
const showWarningMessage = (mContent, callback) => {
showConfirmCountdownModal('警告', mContent, callback)
}
// (+)
const showConfirmCountdownFailModal = (mContent, callback) => {
showConfirmCountdownModal('失败', mContent, callback)
}
// (
const showConfirmMessageModal = (mContent, callback) => {
showConfirmModal('消息', mContent, callback)
}
// (
const showConfirmSuccessModall = (mContent, callback) => {
showConfirmModal('成功', mContent, callback)
}
// (
const showConfirmWarningModal = (mContent, callback) => {
showConfirmModal('警告', mContent, callback)
}
// (
const showConfirmQuestionModal = (mContent, callback) => {
showConfirmModal('疑问', mContent, callback)
}
// (
const showNoButtonModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showConfirmButton: false,
showCancelButton: false,
success: function(res) {
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
callback(true)
} else {
callback(false);
callback(false)
}
}
}
});
}
// (
const showConfirmModal = (mIconType, mContent, callback) => {
console.log(222)
})
}
// (
const showConfirmModal = (mIconType, mContent, callback) => {
console.log(11)
showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
success: function(res) {
success(res) {
console.log(11, res)
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
callback(true)
} else {
callback(false);
}
callback(false)
}
}
});
}
})
}
// (+
const showSelectMessageModal = (mContent, callback) => {
showSelectModal("消息", mContent, callback);
}
// (+
const showSelectMessageModal = (mContent, callback) => {
showSelectModal('消息', mContent, callback)
}
// (+
const showSelectSuccessModal = (mContent, callback) => {
showSelectModal("成功", mContent, callback);
}
// (+
const showSelectSuccessModal = (mContent, callback) => {
showSelectModal('成功', mContent, callback)
}
// (+
const showSelectFailModal = (mContent, callback) => {
showSelectModal("失败", mContent, callback);
}
// (+
const showSelectFailModal = (mContent, callback) => {
showSelectModal('失败', mContent, callback)
}
// (+
const showSelectWarningModal = (mContent, callback) => {
showSelectModal("警告", mContent, callback);
}
// (+
const showSelectWarningModal = (mContent, callback) => {
showSelectModal('警告', mContent, callback)
}
// (+
const showSelectModal = (mIconType, mContent, callback) => {
// (+
const showSelectModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
success: function(res) {
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
callback(true)
console.log('用户点击确定')
} else {
callback(false);
callback(false)
console.log('用户点击取消')
}
}
}
});
}
})
}
// (+)
const showConfirmCountdownQuestionModal = (mContent, callback) => {
showConfirmCountdownModal("疑问", mContent, callback);
}
// (+)
const showConfirmCountdownQuestionModal = (mContent, callback) => {
showConfirmCountdownModal('疑问', mContent, callback)
}
// (+)
const showConfirmCountdownModal = (mIconType, mContent, callback) => {
// (+)
const showConfirmCountdownModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
showConfirmCountdown: true,
success: function(res) {
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
callback(true)
} else {
callback(false);
callback(false)
}
}
}
});
}
})
}
// (++)
const showSelectCountdownMessageModal = (mContent, callback) => {
showSelectCountdownModal("消息", mContent, callback);
}
// (++)
const showSelectCountdownMessageModal = (mContent, callback) => {
showSelectCountdownModal('消息', mContent, callback)
}
// (++)
const showSelectCountdownSuccessModal = (mContent, callback) => {
showSelectCountdownModal("成功", mContent, callback);
}
// (++)
const showSelectCountdownSuccessModal = (mContent, callback) => {
showSelectCountdownModal('成功', mContent, callback)
}
// (++)
const showSelectCountdownFailModal = (mContent, callback) => {
showSelectCountdownModal("失败", mContent, callback);
}
// (++)
const showSelectCountdownFailModal = (mContent, callback) => {
showSelectCountdownModal('失败', mContent, callback)
}
// (++)
const showSelectCountdownWarningModal = (mContent, callback) => {
showSelectCountdownModal("警告", mContent, callback);
}
// (++)
const showSelectCountdownWarningModal = (mContent, callback) => {
showSelectCountdownModal('警告', mContent, callback)
}
// (++)
const showSelectCountdownQuestionModal = (mContent, callback) => {
showSelectCountdownModal("疑问", mContent, callback);
}
// (++)
const showSelectCountdownQuestionModal = (mContent, callback) => {
showSelectCountdownModal('疑问', mContent, callback)
}
// (++)
const showSelectCountdownModal = (mIconType, mContent, callback) => {
// (++)
const showSelectCountdownModal = (mIconType, mContent, callback) => {
showModal({
iconType: mIconType,
content: mContent,
showConfirmCountdown: true,
success: function(res) {
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
callback(true)
console.log('用户点击确定')
} else {
callback(false);
callback(false)
console.log('用户点击取消')
}
}
}
});
}
})
}
//
const showModal = (data) => {
//
const showModal = (data) => {
if (data.iconType) {
iconType.value = data.iconType
switch (data.iconType) {
case '消息':
icon.value = '/static/icons/error-circle.svg';
break;
icon.value = '/static/icons/error-circle.svg'
break
case '成功':
icon.value = '/static/icons/checkmark-circle.svg';
break;
icon.value = '/static/icons/checkmark-circle.svg'
break
case '失败':
icon.value = '/static/icons/close-circle.svg';
break;
icon.value = '/static/icons/close-circle.svg'
break
case '警告':
icon.value = '/static/icons/warning.svg';
break;
icon.value = '/static/icons/warning.svg'
break
case '疑问':
icon.value = '/static/icons/question-circle.svg';
break;
icon.value = '/static/icons/question-circle.svg'
break
default:
break;
break
}
}
// image
@ -374,63 +362,87 @@
} else {
showCancelButton.value = true
}
if (data.success) {
success = data.success
success.value = data.success
} else {
success = () => {}
success.value = () => {}
}
setTimeout(res => {
open();
setTimeout((res) => {
open()
}, 500)
if (showConfirmCountdown.value) {
startTimer();
}
startTimer()
}
}
const startTimer = () => {
seconds.value = 3;
const startTimer = () => {
seconds.value = 3
clearInterval(timer.value)
timer.value = setInterval(() => {
seconds.value--
// console.log("", this.seconds);
if (seconds.value <= 0) {
timeUp()
return
}
}, 1000)
}
}
const timeUp = () => {
const timeUp = () => {
// clearInterval(this.timer)
console.log('时间到')
confirmClose();
}
defineExpose({ showErrorMessage }) // open
confirmClose()
}
defineExpose({
confirmClose,
cancelClose,
showSuccessMessage,
showErrorMessage,
showBreakMessage,
showQuestionMessage,
showWarningMessage,
showConfirmCountdownFailModal,
showConfirmMessageModal,
showConfirmSuccessModall,
showConfirmWarningModal,
showConfirmQuestionModal,
showNoButtonModal,
showConfirmModal,
showSelectMessageModal,
showSelectSuccessModal,
showSelectFailModal,
showSelectWarningModal,
showSelectModal,
showConfirmCountdownQuestionModal,
showConfirmCountdownModal,
showSelectCountdownMessageModal,
showSelectCountdownSuccessModal,
showSelectCountdownFailModal,
showSelectCountdownWarningModal,
showSelectCountdownQuestionModal,
showMessage,
showModal
})
</script>
<style lang="scss" scoped>
.slot-content {
.slot-content {
font-size: 36rpx;
display: flex; //
flex-direction: column; //
align-items: center; //
// background-image: url()
}
}
.icon {
.icon {
width: 70rpx;
height: 70rpx;
opacity: 1; //
margin-top: 16px;
}
}
.title {
.title {
font-size: 35rpx;
}
}
.content {
.content {
width: 100%;
margin-top: 16px;
margin-bottom: 16px;
@ -438,9 +450,9 @@
margin-right: 8px;
font-size: 32rpx;
text-align: center;
}
}
.cance_button {
.cance_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
@ -448,9 +460,9 @@
display: flex;
justify-content: center;
align-items: center;
}
}
.confirm_button {
.confirm_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
@ -458,13 +470,13 @@
display: flex;
justify-content: center;
align-items: center;
}
}
.confirm_text {
.confirm_text {
// color: $uni-color-primary;
}
}
.def_text {
.def_text {
color: $uni-color-primary;
}
}
</style>

25
src/mycomponents/common/comPopup.vue

@ -10,26 +10,13 @@
</view>
</template>
<script>
export default {
emits: ["onClose"],
components: {
},
props: {
},
data() {
return {
}
},
methods: {
closeScanPopup() {
this.$emit("onClose", );
}
}
<script setup lang="ts">
const closeScanPopup = () => {
emit("onClose", );
}
//
const emit = defineEmits(['onClose'])
</script>
<style>

79
src/mycomponents/container/targetContainer.vue

@ -1,68 +1,57 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
<text style="font-size: 35rpx">{{ title }} </text>
<view class="uni-flex u-col-center" @click="showLocation">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{containerCode}}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
<text style="color: #3fbaff; font-size: 35rpx" v-if="containerCode == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="color: #3fbaff; font-size: 35rpx">&nbsp {{ containerCode }}</text>
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image>
</view>
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer>
<winScanContainer ref="scanContainer" :title="title" @getContainer="getContainer"></winScanContainer>
</view>
</template>
<script>
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue"
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue'
export default {
components: {
winScanContainer
},
data() {
return {
defaultContainerCode: ""
}
},
props: {
const defaultContainerCode = ref('')
const props = defineProps({
title: {
type: String,
default: "需求库位"
default: '需求库位'
},
containerCode: {
type: String,
default: ""
default: ''
},
isShowEdit: {
type: Boolean,
default: true
},
},
watch: {
containerCode: {
handler(newName, oldName) {
if (this.containerCode != "") {
this.defaultContainerCode = this.containerCode;
}
})
watch(
() => props.containerCode,
(val) => {
if (val != '') {
defaultContainerCode.value = val
}
},
{
immediate: true,
deep: true
}
},
methods: {
showLocation() {
this.$refs.scanContainer.openScanPopup();
},
//
getContainer(containerInfo) {
this.$emit("getContainer", containerInfo)
}
}
}
)
const showLocation = () => {
scanContainer.value.openScanPopup()
}
//
const getContainer = (containerInfo) => {
emit('getContainer', containerInfo)
}
//
const emit = defineEmits(['getContainer'])
</script>
<style>
</style>
<style></style>

212
src/mycomponents/detail/comDetailCard.vue

@ -1,51 +1,30 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<view class="" style="background-color: #fff">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty>
</template>
<view class="" v-for="(item,index) in dataContent.subList" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"
style='padding:0px 0px 5px 0px;align-items: center;'>
<recommend :detail="item" :isShowToLocation="false">
</recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<recommend :detail="item" :isShowToLocation="false"> </recommend>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
export default {
emits: ['openDetail', "updateData"],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: null
@ -69,95 +48,98 @@
locationAreaTypeList: {
type: Array,
default: null
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
}
})
const option = ref([])
const showItem = ref({})
const editItem = ref({})
const locatonItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const comMessageRef = ref()
const collapse = ref()
const qtyEdit = ref()
const dataContent = ref(props.dataContent)
dataContent.value.subList.forEach((item) => {
item.show = false
})
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse.value != undefined && collapse.value != null) {
nextTick((res) => {
collapse.value.init()
})
}
}
},
{
immediate: true,
deep: true
}
},
data() {
return {
option: [],
showItem: {},
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: []
)
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation)
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
nextTick((res) => {
collapse.value.init()
})
})
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
if (text == '详情') {
detail(item)
} else if (text == '编辑') {
edit(item)
} else if (text == '库位') {
showLocation(item)
} else if (text == '移除') {
remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
}
const edit = (item) => {
editItem.value = item
qtyEdit.value.openEditPopup(item.balance, item.handleQty)
}
const detail = (item) => {
emit('openDetail', item)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = null;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
}
item.handleQty = null
emit('remove', item)
}
})
}
const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
const showLocation = () => {
locatonItem.value = item
scanLocationCode.value.openScanPopup()
}
//
const getLocation = () => {
locatonItem.value.LocationCode = code
emit('updateData')
}
//
const emit = defineEmits(['openDetail', 'remove', 'updateData'])
</script>
<style>
</style>
<style></style>

214
src/mycomponents/detail/comJobDetailCard.vue

@ -1,53 +1,28 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<view class="" style="background-color: #fff">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="true"></itemCompareQty>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true" style="flex: 1"></itemCompareQty>
</template>
<package-list :dataContent="dataContent.subList"
:isEdit="settingParam.allowModifyQty=='TRUE'"
:settingParam="settingParam"
@collapseChange="collapseChange"
@updateData="updateData"
></package-list>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="message"></comMessage>
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty == 'TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData"></package-list>
</u-collapse-item>
</u-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import packageList from '@/mycomponents/package/packageList.vue'
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js'
export default {
emits: ["updateData"],
components: {
itemCompareQty,
recommend,
recommendQtyEdit,
jobDetailPopup,
receiptDetailInfoPopup,
detailList,
packageList
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: null
@ -59,103 +34,92 @@
locationAreaTypeList: {
type: Object,
default: null
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
locatonItem: {},
detailOptions: [],
scanOptions: []
})
const showItem = ref({})
const editItem = ref({
record: {}
})
const locatonItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const comMessageRef = ref()
const collapse = ref()
const receiptEdit = ref()
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse.value != undefined && collapse.value != null) {
nextTick((res) => {
collapse.value.init()
})
}
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
{
deep: true
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
)
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation)
}
})
},
updated() {
console.log('updated')
},
methods: {
collapseChange(){
const collapseChange = () => {
setTimeout(() => {
this.resizeCollapse();
resizeCollapse()
}, 500)
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.resize()
});
this.$forceUpdate();
},
refreshCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
}
const resizeCollapse = (object) => {
nextTick(() => {
collapse.value.init()
})
r.resize();
}
const refreshCollapse = () => {
nextTick((r) => {
collapse.value.forEach((r) => {
r.childrens.forEach((i) => {
i.init()
})
});
this.$forceUpdate();
},
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
r.init()
})
})
}
const swipeClick = (e, item) => {
if (e.content.text == '编辑') {
edit(item)
} else if (e.content.text == '移除') {
remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
}
const edit = (item) => {
editItem = item
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
updateData(){
this.$emit('updateData')
}
}
emit('remove', item)
}
})
}
const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
const updateData = () => {
emit('updateData')
}
//
const emit = defineEmits(['remove', 'updateData'])
</script>
<style>
</style>
<style></style>

201
src/mycomponents/detail/comRequestDetailCard.vue

@ -1,52 +1,29 @@
<template>
<view class="" style="background-color: #fff;">
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem">
</comReturnRequestInfo> -->
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<view class="" style="background-color: #fff">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty
:dataContent="dataContent"
:handleQty="Number(dataContent.handleQty)"
:isShowStdPack="false">
</item-compare-qty>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" style="flex: 1"> </item-compare-qty>
</template>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack"
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in dataContent.subList" :key="index" :options="item.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item)">
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack" :isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<comMessage ref="message"></comMessage>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, watch, nextTick } from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
import { getDetailOption, getDetailEditRemoveOption, getDetailRemoveOption } from '@/common/array.js'
export default {
emits: ['openDetail'],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
comReturnRequestInfo
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -66,85 +43,93 @@
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
dataContent(newVal) {
var test =this.dataContent
this.requestItem = newVal.subList[0];
},
},
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: [],
requestItem:{}
})
const option = ref([])
const showItem = ref({})
const editItem = ref({
record: {}
})
const detailOptions = ref([])
const scanOptions = ref([])
const requestItem = ref({})
const qtyEdit = ref()
const comMessageRef = ref()
const dataContent = ref([])
const collapse = ref()
dataContent.value = props.dataContent
dataContent.value.subList.forEach((item) => {
item.show = false
})
onMounted(() => {
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
if (scanOptions.value.length == 0) {
scanOptions.value = getDetailEditRemoveOption()
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
})
//
watch(
() => props.dataContent,
(val) => {
requestItem.value = val.subList[0]
dataContent.value = val
dataContent.value.subList.forEach((item) => {
item.show = false
})
nextTick(() => {
collapse.value.init()
})
},
{
immediate: true,
deep: true
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
)
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (text == '详情') {
detail(item)
} else if (text == '编辑') {
edit(item)
} else if (text == '移除') {
remove(item)
}
}
const edit = (item) => {
editItem.value = item
qtyEdit.value.openEditPopup(item.balance, item.record.qty)
}
const detail = (item) => {
emit('openDetail', item)
}
const remove = (item) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
}
}
emit('remove', item)
}
})
}
const confirm = (qty) => {
editItem.value.record.qty = qty
emit('updateData')
}
//
const emit = defineEmits(['openDetail', 'remove', 'updateData'])
</script>
<style>
::v-deep .u-arrow-down-icon {
margin-right: 0px !important;
}
</style>

30
src/mycomponents/detail/detailBalanceInfo.vue

@ -15,12 +15,12 @@
<text class="item_title">数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUomInfo(dataContent.uom)}}</text>
<text class="text_wrap">{{handleGetUomInfo(dataContent.uom)}}</text>
</view>
</view>
<view class="item">
<text class="item_title">库存状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
<text class="text_wrap">{{handleGetInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">来源库位 : </text>
@ -29,37 +29,25 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
})
const handleGetInventoryStatusInfo=(value)=> {
return getInventoryStatusName(value)
},
getUomInfo(value){
return getUomInfo(value).label
}
}
const handleGetUomInfo=(value)=>{
return getUomInfo(value).label
}
</script>
<style>

67
src/mycomponents/detail/detailCommonInfo.vue

@ -1,65 +1,48 @@
<template>
<view class="pop_detail" style="height:80%">
<view class="pop_detail" style="height: 80%">
<view class="u-p-t-20 u-p-b-20">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
</view>
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<detail-item-info :dataContent="dataContent"></detail-item-info>
<view class='split_line'></view>
<view class="split_line"></view>
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info>
<view class='split_line'></view>
<view v-if="dataContent.record!=undefined">
<detail-handle-info :dataContent="dataContent">
</detail-handle-info>
<view class='split_line'></view>
<view class="split_line"></view>
<view v-if="dataContent.record != undefined">
<detail-handle-info :dataContent="dataContent"> </detail-handle-info>
<view class="split_line"></view>
</view>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailRecommendInfo,
detailHandleInfo
},
data() {
return {}
},
<script setup lang="ts">
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue'
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
})
const closePopup = () => {
emit('onClose')
}
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

21
src/mycomponents/detail/detailHandleInfo.vue

@ -29,32 +29,19 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
})
const getInventoryStatusInfo=(value)=> {
return getInventoryStatusName(value).label
},
}
}
</script>

25
src/mycomponents/detail/detailItemInfo.vue

@ -10,35 +10,22 @@
</view>
<view class="item">
<text class="item_title">数量 : </text>
<text class="text_wrap">{{dataContent.qty}}{{getUomInfo(dataContent.uom)}} </text>
<text class="text_wrap">{{dataContent.qty}}{{handleGetUomInfo(dataContent.uom)}} </text>
</view>
</view>
</template>
<script>
import{getUomInfo} from "@/common/directory.js"
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
<script setup lang="ts">
import { getUomInfo } from "@/common/directory.js"
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
getUomInfo(value){
})
const handleGetUomInfo = (value) => {
return getUomInfo(value).label
}
}
}
</script>
<style>

24
src/mycomponents/detail/detailPackageInfo.vue

@ -27,37 +27,19 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
})
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUomInfo(value){
return getUomInfo(value).label
}
}
}
</script>
<style>

29
src/mycomponents/detail/detailRecommendInfo.vue

@ -15,12 +15,12 @@
<text class="item_title">明细数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUomInfo(dataContent.uom)}}</text>
<text class="text_wrap">{{handleGegetUomInfo(dataContent.uom)}}</text>
</view>
</view>
<view class="item">
<text class="item_title">明细状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
<text class="text_wrap">{{handleGetInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">来源库位 : </text>
@ -33,36 +33,23 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
getInventoryStatusName,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
})
const handleGetInventoryStatusInfo = (value) => {
return getInventoryStatusName(value)
},
getUomInfo(value){
return getUomInfo(value).label
}
}
const handleGegetUomInfo = (value) => {
return getUomInfo(value).label
}
</script>

89
src/mycomponents/detail/jobDetailPopup.vue

@ -1,79 +1,66 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent='dataContent'></detail-common-info>
</uni-popup>
<u-popup v-model="show" mode="bottom">
<detail-common-info :dataContent="dataContent"></detail-common-info>
</u-popup>
</view>
</template>
<script>
import {
getInventoryStatusName,
getPackUnitInfo
} from '@/common/directory.js';
<script setup lang="ts">
import { ref } from 'vue'
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js'
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {}
}
},
props: {
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
const props = defineProps({
title: {
type: String,
default: ""
},
},
methods: {
openScanPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
default: ''
}
})
const show = ref(false)
const dataContent = ref('')
const openScanPopup = (val) => {
dataContent.value = val
setTimeout((res) => {
show.value = true
}, 500)
},
closeScanPopup() {
this.$refs.popup.close()
},
getInventoryStatusInfo(value) {
}
const closeScanPopup = () => {
show.value = false
}
const getInventoryStatusInfo = (value) => {
return getInventoryStatusName(value).label
},
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
}
const getPackUnit = (uom) => {
const item = getPackUnitInfo(uom)
if (item == '') {
return uom;
} else {
return item.label
}
}
}
return uom
}
return item.label
}
</script>
<style>
.popup_box {
.popup_box {
width: 500rpx;
height: 500rpx;
}
}
.item_big_title {
color: #2196F3;
.item_big_title {
color: #2196f3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
}
.item {
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
}
.item_title {
.item_title {
color: #000000;
font-size: 32rpx;
}
}
</style>

56
src/mycomponents/detail/recordDetailCommonInfo.vue

@ -1,60 +1,42 @@
<template>
<view class="pop_detail" style="height:80%">
<view class='split_line'></view>
<scroll-view style="height:320px ">
<scroll-view style="height:320px ">
<view class="pop_detail" style="height: 80%">
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<view class='split_line'></view>
<view class="split_line"></view>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<!-- 包装 -->
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> -->
</scroll-view>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
detailItemInfo,
detailPackageInfo,
detailBalanceInfo
},
data() {
return {}
},
<script setup lang="ts">
import { ref } from 'vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
})
const closePopup = () => {
emit('onClose')
}
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

77
src/mycomponents/detail/recordDetailPopup.vue

@ -1,71 +1,52 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<u-popup v-model="show" mode="bottom">
<view class="pop_detail" style="height: 80%">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<view class='split_line'></view>
<view class="split_line"></view>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<view class='split_line'></view>
<view class="split_line"></view>
<!-- 包装 -->
<detail-package-info :dataContent="dataContent.package"></detail-package-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
</u-popup>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
<script setup lang="ts">
import { ref } from 'vue'
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailPackageInfo,
detailBalanceInfo
},
data() {
return {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
})
const show = ref(false)
const dataContent = ref(props.dataContent)
const openPopup = (val) => {
dataContent.value = val
setTimeout((res) => {
show.value = true
}, 500)
},
closePopup() {
this.$refs.popup.close()
},
}
}
}
const closePopup = () => {
show.value = false
}
defineExpose({ openPopup, closePopup })
</script>
<style>
</style>
<style></style>

62
src/mycomponents/detail/requestDetailCommonInfo.vue

@ -1,12 +1,14 @@
<template>
<view class="pop_detail" style="height:80%">
<view class="pop_detail" style="height: 80%">
<view class="u-p-t-20 u-p-b-20">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
</view>
<view class="split_line u-m-b-10"></view>
<scroll-view style="height: 320px" scroll-y>
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<view class='split_line'></view>
<view class="split_line u-m-t-10 u-m-b-10"></view>
<!-- 包装 -->
<!-- 库存余额 -->
@ -16,50 +18,30 @@
</slot>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
<view class="u-flex u-row-center u-m-t-20 u-p-b-20">
<view class="close_button" @click="closePopup">关闭</view>
</view>
</view>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
requestDetailBasicInfo,
detailRecommendInfo,
detailItemInfo,
detailBalanceInfo
},
data() {
return {}
},
<script setup lang="ts">
import comItem from '@/mycomponents/item/item.vue'
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
})
const closePopup = () => {
emit('onClose')
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

40
src/mycomponents/item/item.vue

@ -1,46 +1,26 @@
<template>
<view>
<view class="uni-flex u-col-center space-between">
<view >
<view class="uni-flex u-col-center space-between u-p-t-20">
<view>
<view class="card_itemCode" :class="openPopup(dataContent)">
{{dataContent.itemCode}}
{{ dataContent.itemCode }}
</view>
<view class="card_itemName">
{{dataContent.itemName}}
<view class="card_itemName u-m-t-10">
{{ dataContent.itemName }}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
};
},
//
props: {
<script setup lang="ts">
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
watch: {
},
methods: {
openPopup(val) {
// console.log(JSON.stringify(val));
},
},
}
})
const openPopup = (val) => {}
</script>
<style>
</style>
<style></style>

54
src/mycomponents/item/itemCompareQty.vue

@ -1,41 +1,25 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;">
<view>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color: #fff">
<view style="flex: 1">
<item :dataContent="dataContent"></item>
</view>
<view style="word-break: break-all;width: 30%;display: flex;justify-content:flex-end;margin-right: 10rpx;">
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true"
:objTextStyle='objTextStyle'></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit">
</compare-qty>
<view style="word-break: break-all; display: flex; justify-content: flex-end; margin-right: 10rpx">
<recommend-qty v-if="handleQty == 0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true" :objTextStyle="objTextStyle"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> </compare-qty>
</view>
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
<script setup lang="ts">
import { ref, getCurrentInstance, watch } from 'vue'
import item from '@/mycomponents/item/item.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
item,
recommendQty,
compareQty,
balanceQty
},
data() {
return {
};
},
//
props: {
const { proxy } = getCurrentInstance()
const props = defineProps({
type: {
type: String,
default: 'recommend' //recommend: compare:
default: 'recommend' // recommend: compare:
},
dataContent: {
type: Object,
@ -53,15 +37,7 @@
type: Object,
default: null
}
},
watch: {
},
methods: {
},
}
})
</script>
<style>
</style>
<style></style>

45
src/mycomponents/item/itemInfo.vue

@ -1,15 +1,15 @@
<!--包装组件-->
<template>
<view class="">
<view class="uni-flex space-between padding_10" style="background-color: #fff;" >
<view class="uni-flex space-between padding_10" style="background-color: #fff; padding: 20rpx">
<view>
<view class="font_xl text_black text_bold " style="font-size: 38rpx;">
<view class="font_xl text_black text_bold" style="font-size: 38rpx">
{{ itemdetail.code }}
</view>
<view class="" style="font-size: 32rpx;">
<view class="" style="font-size: 32rpx">
{{ itemdetail.name }}
</view>
<view class="" style="font-size: 32rpx;">
<view class="" style="font-size: 32rpx">
{{ itemdetail.desc1 }}
{{ itemdetail.desc2 }}
</view>
@ -21,38 +21,23 @@
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup>
</view>
</template>
<script>
import itemStatus from '@/mycomponents/item/itemStatus.vue';
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue';
export default {
name: "comItem",
components: {
itemInfoPopup,
itemStatus
},
data() {
return {
<script setup lang="ts">
import { ref } from 'vue'
import itemStatus from '@/mycomponents/item/itemStatus.vue'
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue'
};
},
//
props: {
const props = defineProps({
itemdetail: {
type: Object,
value: null
}
},
methods: {
showHint() {
this.$refs.showHint.openScanPopup()
}
}
}
})
const showHint = ref()
const handleShowHint = () => {
showHint.value.openScanPopup()
}
</script>
<style>
</style>
<style></style>

152
src/mycomponents/item/itemInfoPopup.vue

@ -1,28 +1,24 @@
<template>
<view class="">
<uni-popup ref="popup">
<u-popup v-model="show" mode="center">
<view class="uni-flex uni-column pop_detail">
<view class="uni-flex space-between u-col-center"
style="padding-bottom: 15rpx;">
<view class="text_ellipsis" v-if="number" style="font-size: 35rpx;flex: 3;">
编号:{{number}}
</view>
<view class="uni-flex space-between u-col-center" style="padding-bottom: 15rpx">
<view class="text_ellipsis" v-if="number" style="font-size: 35rpx; flex: 3"> 编号:{{ number }} </view>
<view class="text_ellipsis" v-else style="font-size: 40rpx;">
<view class="text_ellipsis" v-else style="font-size: 40rpx">
<view class="">
{{itemCode}}
{{ itemCode }}
</view>
<view class="">
{{itemDesc}}
{{ itemDesc }}
</view>
</view>
<view class="uni-center" style="flex: 1;">
<view v-if="jobStatus==2" class="task_state_doing">
<view class="uni-center" style="flex: 1">
<view v-if="jobStatus == 2" class="task_state_doing">
<text>执行中</text>
</view>
<view v-if="jobStatus==1" class="task_state_un-doing">
<view v-if="jobStatus == 1" class="task_state_un-doing">
<text>待执行</text>
</view>
</view>
@ -37,123 +33,109 @@
</view>
</view> -->
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="" v-for="(item, index) in dataList">
<view class="item" v-if="(item.title!='worker')" v-show="(item.title!='date')">
<text class="item_title">{{item.title}} : </text>
<text class="text_wrap">{{item.content}} </text>
<view class="item" v-if="item.title != 'worker'" v-show="item.title != 'date'">
<text class="item_title">{{ item.title }} : </text>
<text class="text_wrap">{{ item.content }} </text>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowbottom" style="margin-top: 10rpx;margin-bottom: 10rpx;width: 100%;display: flex;"
class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center " style="flex: 1; overflow: hidden;">
<view class="split_line"></view>
<view v-if="isShowbottom" style="margin-top: 10rpx; margin-bottom: 10rpx; width: 100%; display: flex" class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center" style="flex: 1; overflow: hidden">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text class="text_ellipsis">{{getContent("worker")}}</text>
<text class="text_ellipsis">{{ getContent('worker') }}</text>
</view>
<view class="uni-flex uni-row u-col-center " style="flex: 3;justify-content: flex-end;overflow: hidden;">
<view class="uni-flex uni-row u-col-center" style="flex: 3; justify-content: flex-end; overflow: hidden">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{formatDate(getContent("date"))}}</text>
<text>{{ formatDate(getContent('date')) }}</text>
</view>
</view>
</view>
<view class="uni-flex u-row-center ">
<image src="/static/icons/icons_close-circle.svg"
mode=""
class="icons_close"
@click="closeScanPopup()"
></image>
</view>
</uni-popup>
<view class="uni-flex u-row-center">
<image src="/static/icons/icons_close-circle.svg" mode="" class="icons_close" @click="closeScanPopup()"> </image>
</view>
</u-popup>
</view>
</template>
<script>
import {
dateFormat,
} from '@/common/basic.js';
export default {
mounted() {
},
<script setup lang="ts">
import { ref } from 'vue'
import { dateFormat } from '@/common/basic.js'
props: {
const props = defineProps({
title: {
type: String,
default: ""
default: ''
},
dataContent: {
type: Object,
default: {}
},
number:{
number: {
type: String,
default: ""
default: ''
},
jobStatus:{
jobStatus: {
type: Number,
default: -1
},
dataList:{
dataList: {
type: Object,
default: []
},
worker:{
worker: {
type: String,
default: ""
default: ''
},
date:{
date: {
type: String,
default: ""
default: ''
},
itemCode:{
itemCode: {
type: String,
default: ""
default: ''
},
itemDesc:{
itemDesc: {
type: String,
default: ""
default: ''
},
isShowbottom:{
isShowbottom: {
type: Boolean,
default: true
}
},
methods: {
openScanPopup() {
this.$refs.popup.open('center')
},
closeScanPopup() {
this.$refs.popup.close()
},
startEdit() {
this.$refs.receiptCountEdit.openScanPopup();
},
formatDate(val) {
})
const receiptCountEdit = ref()
const show = ref(false)
const openScanPopup = () => {
show.value = true
}
const closeScanPopup = () => {
show.value = false
}
const startEdit = () => {
receiptCountEdit.value.openScanPopup()
}
const formatDate = (val) => {
return dateFormat(val)
},
getContent(title){
let items = this.dataList.filter(r => {
if (r.title==title) {
return r;
}
const getContent = (title) => {
const items = props.dataList.filter((r) => {
if (r.title == title) {
return r
}
})
if(items!=null&&items.length>0){
return items[0].content;
}
}
}
if (items != null && items.length > 0) {
return items[0].content
}
}
defineExpose({
openScanPopup,
closeScanPopup
})
</script>
<style>
</style>
<style></style>

42
src/mycomponents/item/itemQty.vue

@ -1,34 +1,20 @@
<template>
<view class="uni-flex uni-row space-between center" style="background-color:#fff; margin-left: 15px;">
<view>
<view class="uni-flex uni-row space-between center" style="width: 100%">
<view style="flex: 1">
<item :dataContent="dataContent"></item>
</view>
<view>
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack">
</compare-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> </compare-qty>
</view>
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
item,
balanceQty,
compareQty
},
data() {
return {
<script setup lang="ts">
import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
};
},
//
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -44,16 +30,8 @@
showStdPack: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
},
}
})
</script>
<style>
</style>
<style></style>

26
src/mycomponents/job/jobBottom.vue

@ -1,6 +1,6 @@
<template>
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" -->
<view class="task_item">
<view class="u-p-t-20 u-p-b-20">
<view class="uni-flex space-between u-col-center">
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
@ -14,35 +14,19 @@
</view>
</template>
<script>
<script setup lang="ts">
import {
dateFormat
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
watch: {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
formatDate: function(val) {
})
const formatDate = (val) => {
return dateFormat(val)
}
}
}
</script>
<style lang="scss">

21
src/mycomponents/job/jobComMainCard.vue

@ -10,30 +10,15 @@
</view>
</template>
<script>
<script setup lang="ts">
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
export default {
components: {
jobTop,
jobBottom,
},
data() {
return {};
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
})
</script>
<style lang="scss">

31
src/mycomponents/job/jobComMainCardAsn.vue

@ -3,39 +3,22 @@
<view class="task_card">
<jobTopAsn :dataContent="dataContent"></jobTopAsn>
<slot></slot>
<view class='split_line'></view>
<view class="split_line"></view>
<job-bottom :dataContent="dataContent"></job-bottom>
</view>
</view>
</template>
<script>
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
<script setup lang="ts">
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
export default {
components: {
jobTopAsn,
jobBottom,
},
data() {
return {
};
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
})
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

70
src/mycomponents/job/jobComMainDetailCard.vue

@ -1,46 +1,32 @@
<template>
<view class="task_item">
<view class="task_text" style="border-top: 1px solid #dedede;padding-top: 20rpx;margin-top: 20rpx;">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false"
:objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}"></itemCompareQty>
<div class="u-p-l-10">
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between">
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
<view class="">
<view class="task_text" style="border-top: 1px solid #dedede; padding-top: 20rpx">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" :objTextStyle="{ fontWeight: 'bold', fontSize: '40rpx' }"></itemCompareQty>
<div>
<pack v-if="isShowPack && dataContent.packingNumber != null" :packingCode="dataContent.packingNumber"> </pack>
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between u-p-b-16">
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> </to-location>
</div>
<view class="card_view" v-if="isShowDeliverType">
<text class="card_packing_code card_content">发货类型</text>
<text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text>
</view>
</div>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
export default {
components: {
pack,
location,
toLocation,
batch,
jobComMainCard,
itemCompareQty,
},
data() {
return {};
},
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -65,15 +51,11 @@
type: Boolean,
default: true
},
},
methods: {
}
isShowDeliverType: {
type: Boolean,
default: false
}
})
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

60
src/mycomponents/job/jobCommonInfo.vue

@ -1,62 +1,44 @@
<template>
<view class="pop_detail" style="height:80%">
<view class="pop_detail" style="height: 80%">
<job-top :dataContent="dataContent"></job-top>
<view class='split_line'></view>
<scroll-view style="height:400px ">
<view class="split_line"></view>
<scroll-view style="height: 400px" scroll-y>
<slot>
<!-- 每个任务的详情 -->
</slot>
<job-request-info :dataContent="dataContent"></job-request-info>
<view class='split_line'></view>
<view class="split_line"></view>
<job-person-info :dataContent="dataContent"></job-person-info>
<view class='split_line'></view>
<view class="split_line"></view>
<job-setting-info :dataContent="dataContent"></job-setting-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue'
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue'
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue'
export default {
emits: ['onClose'],
components: {
jobTop,
jobBottom,
jobPersonInfo,
jobSettingInfo,
jobRequestInfo
},
data() {
return {}
},
<script setup lang="ts">
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue'
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue'
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue'
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
})
const closePopup = () => {
emit('onClose')
}
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
//
const emit = defineEmits(['onClose'])
</script>
<style>
</style>
<style></style>

93
src/mycomponents/job/jobDetailPopup.vue

@ -1,79 +1,70 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent='dataContent' @onClose="closeScanPopup()" ></detail-common-info>
</uni-popup>
<u-popup mode="bottom" v-model="show">
<detail-common-info :dataContent="dataContent" @onClose="closeScanPopup()"></detail-common-info>
</u-popup>
</view>
</template>
<script>
import {
getInventoryStatusName,
getPackUnitInfo
} from '@/common/directory.js';
<script setup lang="ts">
import { ref } from 'vue'
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js'
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {}
}
},
props: {
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
const dataContent = ref({})
const show = ref(false)
const props = defineProps({
title: {
type: String,
default: ""
},
},
methods: {
openScanPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
default: ''
}
})
const openScanPopup = (val) => {
dataContent.value = val
setTimeout((res) => {
show.value = true
}, 500)
},
closeScanPopup() {
this.$refs.popup.close()
},
getInventoryStatusInfo(value) {
}
const closeScanPopup = () => {
show.value = false
}
const getInventoryStatusInfo = (value) => {
return getInventoryStatusName(value).label
},
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
}
const getPackUnit = (uom) => {
const item = getPackUnitInfo(uom)
if (item == '') {
return uom;
} else {
return item.name
}
}
}
return uom
}
return item.name
}
defineExpose({
openScanPopup,
closeScanPopup
})
</script>
<style>
.popup_box {
.popup_box {
width: 500rpx;
height: 500rpx;
}
}
.item_big_title {
color: #2196F3;
.item_big_title {
color: #2196f3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
}
.item {
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
}
.item_title {
.item_title {
color: #000000;
font-size: 32rpx;
}
}
</style>

229
src/mycomponents/job/jobFilter.vue

@ -1,54 +1,46 @@
<template>
<uni-popup ref="popup">
<u-popup v-model="show" @click="show = false" mode="right" width="450rpx">
<view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center"
style="background-color: white;width: 200px; height:auto;padding: 20rpx;z-index: 99;position: relative;">
<view class="uni-flex space-between u-col-center" style="width: 100%;">
<view class="" style="font-size: 32rpx;">
只看当天
</view>
<view class="uni-flex uni-column center" style="background-color: white; width: 200px; height: auto; padding: 20rpx; z-index: 100; position: relative; top: 100rpx; right: 20rpx; left: 30rpx; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); border-radius: 10rpx">
<view class="uni-flex space-between u-col-center" style="width: 100%">
<view class="" style="font-size: 32rpx"> 只看当天 </view>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch>
</view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
只看待处理
</view>
<view class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 只看待处理 </view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch>
</view>
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 生产线 </view>
<u-input style="margin-left: 20rpx" v-model="productionLineCode" :border="true" placeholder="请输入生产线" @confirm="productionLineCodeConfirm" />
</view>
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 来源库位 </view>
<u-input style="margin-left: 20rpx" v-model="fromLocationCode" :border="true" placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</view>
<view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after"
@click="scanOtherClick">扫描ASN单号</button>
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after" @click="scanOtherClick">扫描ASN单号</button>
</view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx;">
<button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button>
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowJob">
<button class="filter_button" hover-class="filter_button_after" @click="scanNumberClick">扫描任务编号</button>
</view>
</view>
</view>
</uni-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number>
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number>
</u-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode="getScanNumber"></win-scan-job-number>
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode="getScanAsNumber"></win-scan-asn-number>
</template>
<script>
import {
getTodayDate
} from '@/common/basic.js';
<script setup lang="ts">
import { ref, getCurrentInstance, watch } from 'vue'
import { getTodayDate } from '@/common/basic.js'
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue"
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
import winScanJobNumber from '@/mycomponents/scan/winScanJobNumber.vue'
import winScanAsnNumber from '@/mycomponents/scan/winScanAsnNumber.vue'
export default {
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"],
components: {
winScanJobNumber,
winScanAsnNumber
},
props: {
const props = defineProps({
checkedToday: {
type: Boolean,
default: false
@ -59,97 +51,116 @@
},
otherTitle: {
type: String,
default: ""
default: ''
},
isShowAsn:{
isShowAsn: {
type: Boolean,
default: false
}
},
data() {
return {
dataContent: {},
checkedTodayModel:false,
checkedWaitModel:false,
}
},
watch: {
checkedToday: {
handler(newName, oldName) {
this.checkedTodayModel = this.checkedToday
},
immediate: true,
deep: true
},
checkedWaitTask: {
handler(newName, oldName) {
this.checkedWaitModel = this.checkedWaitTask
},
immediate: true,
deep: true
}
},
mounted() {
},
methods: {
//
maskClick() {
//
this.closeScanPopup();
},
openFilter() {
this.$refs['popup'].open("right");
},
closeScanPopup() {
this.$refs.popup.close()
isShowJob: {
type: Boolean,
default: true
},
switchChangeToday(isOn) {
let creationTime = '';
if (isOn) {
creationTime = getTodayDate();
}
this.$emit("switchChangeToday", isOn, creationTime)
this.closeScanPopup()
isShowFromLocationCode: {
type: Boolean,
default: false
},
switchChangeWait(isOn) {
let status = "1,2";
if(isOn){
status="1"
isShowProductionLineCode: {
type: Boolean,
default: false
}
this.$emit("switchChangeWait", isOn, status)
this.closeScanPopup()
},
})
const dataContent = ref({})
const checkedTodayModel = ref(false)
const checkedWaitModel = ref(false)
const productionLineCode = ref('') // 线
const fromLocationCode = ref('') //
const show = ref(false)
const scanNumber = ref()
const scanAsnNumber = ref()
//
watch(
() => props.checkedToday,
(newVal) => {
checkedTodayModel.value = newVal
console.log(checkedTodayModel.value)
},
{ immediate: true, deep: true }
)
watch(
() => props.checkedWaitTask,
(newVal) => {
checkedWaitModel.value = newVal
},
{ immediate: true, deep: true }
)
// 线
scanNumberClick() {
this.$refs.scanNumber.openScanPopup();
},
scanOtherClick() {
this.$refs.scanAsnNumber.openScanPopup();
},
const productionLineCodeConfirm = () => {
emit('productionLineCode', productionLineCode.value)
}
//
getScanAsNumber(val) {
this.$emit("onScanAsnNumber", val)
this.$refs.scanAsnNumber.closeScanPopup();
this.closeScanPopup();
},
getScanNumber(val) {
this.$emit("onScanNumber", val)
this.$refs.scanNumber.closeScanPopup();
this.closeScanPopup();
},
const fromLocationCodeConfirm = () => {
emit('fromLocationCode', fromLocationCode.value)
}
//
const maskClick = () => {
//
closeScanPopup()
}
const openFilter = () => {
show.value = true
}
const closeScanPopup = () => {
show.value = false
}
const switchChangeToday = (isOn) => {
let creationTime = ''
if (isOn) {
creationTime = getTodayDate()
}
emit('switchChangeToday', isOn, creationTime)
closeScanPopup()
}
const switchChangeWait = (isOn) => {
let status = '1,2'
if (isOn) {
status = '1'
}
emit('switchChangeWait', isOn, status)
closeScanPopup()
}
const scanNumberClick = () => {
scanNumber.value.openScanPopup()
}
const scanOtherClick = () => {
scanAsnNumber.value.openScanPopup()
}
const getScanAsNumber = (val) => {
emit('onScanAsnNumber', val)
scanAsnNumber.value.closeScanPopup()
closeScanPopup()
}
const getScanNumber = (val) => {
emit('onScanNumber', val)
scanNumber.value.closeScanPopup()
closeScanPopup()
}
const emit = defineEmits(['switchChangeToday', 'switchChangeWait', 'onScanNumber', 'onScanAsnNumber', 'productionLineCode', 'fromLocationCode'])
defineExpose({ openFilter })
</script>
<style lang="scss">
.maskbox {
.maskbox {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
}
::v-deep .u-drawer-right {
background-color: rgba(0, 0, 0, 0) !important;
}
</style>

20
src/mycomponents/job/jobNumber.vue

@ -5,27 +5,13 @@
</view>
</template>
<script>
export default {
components: {},
data() {
return {
};
},
watch: {
},
props: {
<script setup lang="ts">
const props = defineProps({
number: {
type: String,
default: ''
},
},
methods: {}
}
})
</script>
<style lang="scss">

27
src/mycomponents/job/jobPersonInfo.vue

@ -8,7 +8,7 @@
</view>
<view class="item">
<text class="item_title">承接时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.acceptTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.acceptTime)}} </text>
</view>
<view class="item">
<text class="item_title">创建人 : </text>
@ -16,7 +16,7 @@
</view>
<view class="item">
<text class="item_title">创建时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.createTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.createTime)}} </text>
</view>
<view class="item">
<text class="item_title">完成人 : </text>
@ -24,39 +24,26 @@
</view>
<view class="item">
<text class="item_title">完成时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.completeTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.completeTime)}} </text>
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {dateFormat} from "@/common/basic.js"
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
dateFormat(value){
})
const handleDateFormat = (value) => {
return dateFormat(value)
}
}
}
</script>
<style>

62
src/mycomponents/job/jobRequestInfo.vue

@ -8,11 +8,11 @@
</view>
<view class="item">
<text class="item_title">申请时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.requestTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.requestTime)}} </text>
</view>
<view class="item">
<text class="item_title">要求截至时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.requestDueTime)}} </text>
<text class="text_wrap">{{handleDateFormat(dataContent.requestDueTime)}} </text>
</view>
<view class="item">
<text class="item_title">从仓库代码 : </text>
@ -24,26 +24,37 @@
</view>
<view class="item">
<text class="item_title">出库库存状态范围 : </text>
<text class="text_wrap">{{getInventoryStatusDesc(getDirectoryItemArray(dataContent.outInventoryStatuses))}} </text>
<text
class="text_wrap">{{handleGetInventoryStatusDesc(handleGetDirectoryItemArray(dataContent.outInventoryStatuses))}}
</text>
</view>
<view class="item">
<text class="item_title">入库库存状态范围 : </text>
<text class="text_wrap">{{getInventoryStatusDesc(getDirectoryItemArray(dataContent.inInventoryStatuses))}} </text>
<text
class="text_wrap">{{handleGetInventoryStatusDesc(handleGetDirectoryItemArray(dataContent.inInventoryStatuses))}}
</text>
</view>
<view class="item">
<text class="item_title">从库位类型范围 : </text>
<text class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(dataContent.fromLocationTypes))}} </text>
<text
class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(dataContent.fromLocationTypes))}}
</text>
</view>
<view class="item">
<text class="item_title">到库位类型范围 : </text>
<text class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(dataContent.toLocationTypes))}} </text>
<text
class="text_wrap">{{handleGetLocationTypeNameList(handleGetDirectoryItemArray(dataContent.toLocationTypes))}}
</text>
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
} from 'vue'
import {
dateFormat,
getDirectoryItemArray,
@ -53,41 +64,24 @@
getInventoryStatusDesc,
getLocationTypeNameList
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
list:["OK"]
}
},
mounted() {},
props: {
const list = ref(["OK"])
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
dateFormat(value){
})
const handleDateFormat = (value) => {
return dateFormat(value)
},
getInventoryStatusDesc(value){
}
const handleGetInventoryStatusDesc = (value) => {
return getInventoryStatusDesc(value)
},
getDirectoryItemArray(value){
return getDirectoryItemArray(value)
},
getLocationTypeNameList(value){
return getLocationTypeNameList(value)
}
const handleGetDirectoryItemArray = (value) => {
return getDirectoryItemArray(value)
}
const handleGetLocationTypeNameList = (value) => {
return getLocationTypeNameList(value)
}
</script>

23
src/mycomponents/job/jobSettingInfo.vue

@ -44,32 +44,17 @@
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
mounted() {},
props: {
<script setup lang="ts">
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
methods: {
converter(val) {
})
const converter = (val) => {
// return ''
return val == "TRUE" ? '是' : '否'
}
}
}
</script>
<style>

34
src/mycomponents/job/jobStatus.vue

@ -1,42 +1,28 @@
<template>
<view >
<view>
<text :class="statusStyle(jobStatus)">
{{ jobStatusInfo.label}}
</text>
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
} from 'vue'
import {
getJobStateInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
jobStatusInfo: {}
};
},
watch: {},
props: {
const props = defineProps({
jobStatus: {
type: String,
default: ""
}
},
mounted() {},
methods: {
statusStyle(value) {
this.jobStatusInfo = getJobStateInfo(value);
})
const jobStatusInfo = ref({})
const statusStyle = (value) => {
jobStatusInfo.value = getJobStateInfo(value);
return getJobStateInfo(value).remark
},
}
}
</script>

31
src/mycomponents/job/jobTop.vue

@ -1,5 +1,5 @@
<template>
<view class="task_top">
<view class="task_item">
<view class="uni-flex space-between u-col-center align-center" >
<job-number :number="dataContent.number"></job-number>
<job-status :jobStatus="dataContent.status"></job-status>
@ -7,34 +7,21 @@
</view>
</template>
<script>
<script setup lang="ts">
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
export default {
components: {
jobNumber,
jobStatus
},
data() {
return {
};
},
watch: {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
},
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
})
const openDetail = (item) => {
emit("openDetail", dataContent.value);
}
//
const emit = defineEmits(['openDetail'])
</script>
<style lang="scss">

42
src/mycomponents/job/jobTopAsn.vue

@ -1,42 +1,28 @@
<template>
<view class="task_top">
<view class="uni-flex space-between u-col-center align-center" >
<job-number v-if="dataContent.asnNumber==null || dataContent.asnNumber==''" :number="dataContent.requestNumber"></job-number>
<view class="task_item">
<view class="uni-flex space-between u-col-center align-center">
<job-number v-if="dataContent.asnNumber == null || dataContent.asnNumber == ''" :number="dataContent.requestNumber"></job-number>
<job-number v-else :number="dataContent.asnNumber"></job-number>
<job-status :jobStatus="dataContent.status"></job-status>
</view>
</view>
</template>
<script>
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
export default {
components: {
jobNumber,
jobStatus
},
data() {
return {
<script setup lang="ts">
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
};
},
watch: {},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
},
},
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
}
})
const openDetail = (item) => {
emit('openDetail', props.dataContent)
}
//
const emit = defineEmits(['openDetail'])
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

65
src/mycomponents/jobList/jobList.vue

@ -0,0 +1,65 @@
<template>
<view class="wyf">
<u-popup v-model="show" mode="center" width="600rpx">
<view class="container">
<u-card :title="item.title" v-for="(item, index) in list" :key="item.id" margin="20rpx" :head-style="{ padding: '20rpx' }" :foot-style="{ padding: '0rpx' }">
<template v-slot:body>
<view class=""> 物料代码{{ item.itemCode }} </view>
<view class=""> 物料名称{{ item.itemName }} </view>
</template>
<template v-slot:foot>
<!-- <button class="go" >Go</button> -->
<u-button type="primary" @click="selectItem(item, index)" style="width: 200rpx; height: 60rpx">Go</u-button>
</template>
</u-card>
</view>
</u-popup>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const list = ref([])
const show = ref(false)
const openList = (listParmas) => {
list.value = listParmas
show.value = true
}
const selectItem = (item, index) => {
emit('selectItem', item)
}
//
const emit = defineEmits(['selectItem'])
defineExpose({
openList
})
</script>
<style lang="scss" scoped>
.container {
display: flex;
justify-content: center;
align-items: center;
.list {
width: 80%;
max-height: 80vh;
overflow-y: auto;
border-radius: 10px !important;
.slot-image {
width: 40rpx;
}
.go {
color: rgb(60, 156, 255);
}
}
}
.list ::v-deep .uni-list--border {
border: 1rpx solid #e5e5e5;
}
</style>

47
src/mycomponents/location/location.vue

@ -1,55 +1,42 @@
<template>
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-row space-between u-col-center" >
<view class="location_view" >
<view class="" style="background-color: #fff">
<view class="uni-flex uni-row space-between u-col-center">
<view class="location_view">
<text class="card_location"> 库位 </text>
<text> {{locationCode}}</text>
<text> {{ locationCode }}</text>
</view>
<view class="" v-if="recommendQty>0">
<count :countType="'recommend_handle_no_pack'"
:recommendQty="recommendQty"
:handledQty="handledQty"
:uom="uom"></count>
<view class="" v-if="recommendQty > 0">
<count :countType="'recommend_handle_no_pack'" :recommendQty="recommendQty" :handledQty="handledQty" :uom="uom"></count>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data(){
return {
}
},
props: {
locationInfo:{
<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
locationInfo: {
type: Object,
default: {}
},
locationCode:{
locationCode: {
type: String,
default: ''
},
recommendQty:{
recommendQty: {
type: Number,
default: 0
},
handledQty:{
handledQty: {
type: Number,
default: 0
},
uom:{
uom: {
type: String,
default: ''
}
},
}
})
</script>
<style>
</style>
<style></style>

126
src/mycomponents/location/locationCompare.vue

@ -1,63 +1,51 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view class="flex uni-row" v-if="isShowEdit" >
<view >
<text style="font-size: 30rpx;">{{title}}</text>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
<view class="uni-flex u-row u-col-center" @click="showLocation">
<view class="flex u-row" v-if="isShowEdit">
<view>
<text style="font-size: 30rpx">{{ title }}</text>
<text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text>
<text v-if="locationCode" style="font-size: 25rpx;color:#3FBAFF;">&nbsp/&nbsp{{locationCode}}</text>
<text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ recommendLocationCode }}</text>
<text v-if="locationCode" style="font-size: 25rpx; color: #3fbaff">&nbsp/&nbsp{{ locationCode }}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
<image style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
<image style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
</view>
<view class="" v-else>
<view >
<text style="font-size: 30rpx;">{{title}}</text>
<text style="font-size: 25rpx;color:#3FBAFF;">&nbsp {{recommendLocationCode}}</text>
<view>
<text style="font-size: 30rpx">{{ title }}</text>
<text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ recommendLocationCode }}</text>
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
</view>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text>
<view class="uni-flex uni-row center" style="vertical-align: center" v-if="isDevlement()">
<!-- <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> -->
<image style="width: 26rpx; height: 26rpx; margin-top: 6rpx" src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" />
</view>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
<script>
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import config from '@/static/config.js'
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import config from '@/static/config.js'
export default {
components: {
winScanLocation
},
data() {
return {
defaultlocationCode: ""
}
},
props: {
const defaultlocationCode = ref('')
const props = defineProps({
title: {
type: String,
default: "需求库位"
default: '需求库位'
},
recommendLocationCode: {
type: String,
default: ""
default: ''
},
locationCode: {
type: String,
default: ""
default: ''
},
isShowEdit: {
type: Boolean,
@ -67,44 +55,21 @@
type: Array,
default: null
}
},
watch: {
// locationCode: {
// handler(newName, oldName) {
// if (this.locationCode != "") {
// this.defaultlocationCode = this.locationCode;
// }
// },
// immediate: true,
// deep: true
// }
},
methods: {
showLocation() {
if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup();
})
const scanLocationCode = ref()
const showLocation = () => {
if (props.isShowEdit) {
scanLocationCode.value.openScanPopup()
}
},
//
getLocation(location, code) {
this.$emit("getLocation", location, code)
},
copy() {
}
//
const getLocation = (location, code) => {
emit('getLocation', location, code)
}
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = this.recommendLocationCode;
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制库位成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const content = props.recommendLocationCode
uni.setClipboardData({
data: content,
success: () => {
@ -113,14 +78,13 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
}
const isDevlement = () => {
return config.isDevelopment
}
//
const emit = defineEmits(['getLocation'])
</script>
<style>
</style>
<style></style>

30
src/mycomponents/location/locationDetail.vue

@ -1,13 +1,13 @@
<template>
<view class="cen_card" style="background-color: #fff;">
<view class="cen_card" style="background-color: #eef4fa">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">仓库</view>
<view>{{dataContent.warehouseCode}}</view>
<view>{{ dataContent.warehouseCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库区</view>
<view>{{dataContent.areaCode }}</view>
<view>{{ dataContent.areaCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库位组</view>
@ -21,27 +21,15 @@
</view>
</template>
<script>
export default {
name: 'comItemLocationCenter',
components: {},
props: {
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
data() {
return {}
},
created() {
},
methods: {
}
}
})
</script>
<style>
</style>
<style></style>

43
src/mycomponents/location/locationInfo.vue

@ -1,45 +1,32 @@
<!--库位组件-->
<template>
<view class="" >
<view class="" style="background-color: #fff;">
<view class="uni-flex space-between" style="padding: 20rpx;">
<view class="" >
<text class="font_xl text_black text_bold">{{locationDetail.code}}</text>
<view class="">
<view class="" style="background-color: #fff">
<view class="uni-flex space-between" style="padding: 20rpx">
<view class="">
<text class="font_xl text_black text_bold">{{ locationDetail.code }}</text>
</view>
<view class="">
<location-status :type="locationDetail.type" ></location-status>
<location-status :type="locationDetail.type"></location-status>
</view>
</view>
<view class="" style="padding: 0px 20rpx">
<location-detail-com :dataContent="locationDetail"></location-detail-com>
</view>
<location-detail :dataContent="locationDetail"></location-detail>
</view>
</view>
</template>
<script>
import locationDetail from '@/mycomponents/location/locationDetail.vue'
import locationStatus from '@/mycomponents/location/locationStatus.vue'
export default {
name: "comlocation",
components: {
locationDetail,
locationStatus,
},
data() {
return {
<script setup lang="ts">
import locationDetailCom from '@/mycomponents/location/locationDetail.vue'
import locationStatus from '@/mycomponents/location/locationStatus.vue'
};
},
//
props: {
const props = defineProps({
locationDetail: {
type: Object,
value: null
}
},
methods:{
}
}
})
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

44
src/mycomponents/location/locationStatus.vue

@ -1,46 +1,30 @@
<template>
<view class="">
<text :class="statusStyle(type)" style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(type)}}</text>
<text :class="statusStyle(type)" style="padding-top: 5rpx; padding-bottom: 5rpx; padding-left: 15rpx; padding-right: 15rpx">{{ statusDesc(type) }}</text>
</view>
</template>
<script>
import {
getLocationTypeInfo
} from '@/common/directory.js';
export default {
components: {
<script setup lang="ts">
import { getLocationTypeInfo } from '@/common/directory.js'
},
data() {
return {
};
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {},
default: {}
},
type: {
type: String,
default: "",
},
},
default: ''
}
})
methods: {
statusDesc(code) {
const statusDesc = (code) => {
return getLocationTypeInfo(code).label
},
statusStyle(code) {
return getLocationTypeInfo(code).remark;
}
},
}
}
const statusStyle = (code) => {
return getLocationTypeInfo(code).remark
}
</script>
<style>
</style>
<style></style>

78
src/mycomponents/location/requiredLocation.vue

@ -1,43 +1,30 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view>
{{title}}
<view style="font-size: 30rpx">
{{ title }}
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text>
<text style="font-size: 25rpx; color: #3fbaff" v-if="locationCode == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="font-size: 25rpx; color: #3fbaff">&nbsp {{ locationCode }}</text>
</view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
<image v-if="isShowEdit" style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
<script>
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
<script setup lang="ts">
import { ref } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default {
components: {
winScanLocation
},
data() {
return {
defaultlocationCode: ""
}
},
props: {
const props = defineProps({
title: {
type: String,
default: "需求库位"
default: '需求库位'
},
locationCode: {
type: String,
default: ""
default: ''
},
isShowEdit: {
type: Boolean,
@ -47,33 +34,20 @@
type: Array,
default: null
}
},
watch: {
// locationCode: {
// handler(newName, oldName) {
// if (this.locationCode != "") {
// this.defaultlocationCode = this.locationCode;
// }
// },
// immediate: true,
// deep: true
// }
},
methods: {
showLocation() {
if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup();
})
const scanLocationCode = ref()
const showLocation = () => {
if (props.isShowEdit) {
scanLocationCode.value.openScanPopup()
}
}
//
const getLocation = (location, code) => {
emit('getLocation', location, code)
}
},
//
getLocation(location, code) {
this.$emit("getLocation", location, code)
}
}
}
//
const emit = defineEmits(['getLocation'])
</script>
<style>
</style>
<style></style>

89
src/mycomponents/package/packageCard.vue

@ -6,7 +6,8 @@
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> -->
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
@ -14,23 +15,23 @@
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
</view>
<view class="uni-flex uni-row" style="word-break: break-all;">
<view class="uni-flex uni-row " style="word-break: break-all;align-items:center">
<!-- ||dataContent.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="dataContent.handleQty==null || dataContent.handleQty==undefined" :dataContent="dataContent"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<recommend-qty v-if="dataContent.handleQty==null || dataContent.handleQty==undefined"
:dataContent="dataContent" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(dataContent.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text>
<view v-if="isDevlement()">
<image style='width: 26rpx;height: 26rpx;margin-top: 44rpx;' src="/static/icons/icon_copy.svg" alt="" @click="copy"/>
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
@ -39,24 +40,7 @@
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: null
@ -89,28 +73,13 @@
locationTitle: {
type: String,
default: '库位'
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
@ -119,23 +88,12 @@
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
@ -144,12 +102,9 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
const isDevlement = () => {
return config.isDevelopment;
}
</script>

315
src/mycomponents/package/packageDetailPopup.vue

@ -1,204 +1,227 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<u-popup mode="bottom" v-model="show">
<view class="pop_detail" style="height: 80%">
<com-item :dataContent="dataContent"></com-item>
<view class='split_line'></view>
<scroll-view style="height:320px ">
<view v-for="(item, index) in dataList" style="width: 100%;">
<view class="split_line"></view>
<scroll-view style="height: 320px" scroll-y>
<view v-for="(item, index) in dataList" style="width: 100%">
<view class="item">
<text class="item_title">{{item.item_title}} </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}}</text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text class="item_title">{{ item.item_title }} </text>
<text v-if="item.type == '' || item.type == undefined" class="text_wrap">{{ item.content }}</text>
<text v-else-if="item.type == 'dateTime'" class="text_wrap">{{ formatDate(item.content) }} </text>
</view>
</view>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20">
<view class="close_button" @click="closePopup"> 关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
</u-popup>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import { dateFormat } from '@/common/basic.js';
export default {
emits: ['onClose'],
components: {
comItem
},
data() {
return {
dataContent: {
type: Object,
default: {}
},
dataList: []
}
},
<script setup lang="ts">
import { ref } from 'vue'
import comItem from '@/mycomponents/item/item.vue'
import { dateFormat } from '@/common/basic.js'
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
this.getDataList();
setTimeout(res => {
this.$refs.popup.open('bottom')
const dataContent = ref({})
const dataList = ref([])
const show = ref(false)
const openPopup = (val) => {
dataContent.value = val
getDataList()
setTimeout((res) => {
show.value = true
}, 500)
},
closePopup(val) {
this.$refs.popup.close('bottom')
// this.$emit('onClose')
},
getDataList() {
// console.log(JSON.stringify(this.dataContent));
this.dataList.length = 0;
this.dataList.push(...[{
}
const closePopup = () => {
show.value = false
}
const getDataList = () => {
// console.log(JSON.stringify( dataContent));
dataList.value.length = 0
dataList.value.push(
...[
{
item_title: '包装号',
content: this.dataContent.number
}, {
content: dataContent.value.number
},
{
item_title: '物料代码',
content: this.dataContent.itemCode
}, {
content: dataContent.value.itemCode
},
{
item_title: '物品名称',
content: this.dataContent.itemName
}, {
content: dataContent.value.itemName
},
{
item_title: '物品描述1',
content: this.dataContent.itemDesc1
}, {
content: dataContent.value.itemDesc1
},
{
item_title: '物品描述2',
content: this.dataContent.itemDesc2
}, {
content: dataContent.value.itemDesc2
},
{
item_title: '批次',
content: this.dataContent.batch
}, {
content: dataContent.value.batch
},
{
item_title: '替代批次',
content: this.dataContent.altBatch
}, {
content: dataContent.value.altBatch
},
{
item_title: '生产日期',
content: this.dataContent.produceDate,
type:"dateTime"
}, {
content: dataContent.value.produceDate,
type: 'dateTime'
},
{
item_title: '有效日期',
content: this.dataContent.validityDays,
type:"dateTime"
}, {
content: dataContent.value.validityDays,
type: 'dateTime'
},
{
item_title: '失效日期',
content: this.dataContent.expireDate,
type:"dateTime"
}, {
content: dataContent.value.expireDate,
type: 'dateTime'
},
{
item_title: '计量单位',
content: this.dataContent.uom,
type:"uom"
}, {
content: dataContent.value.uom,
type: 'uom'
},
{
item_title: '数量',
content: this.dataContent.qty
}, {
content: dataContent.value.qty
},
{
item_title: '替代计量单位',
content: this.dataContent.altUom
}, {
content: dataContent.value.altUom
},
{
item_title: '替代数量',
content: this.dataContent.altQty
}, {
content: dataContent.value.altQty
},
{
item_title: '转换率',
content: this.dataContent.convertRate
}, {
content: dataContent.value.convertRate
},
{
item_title: '标包数量',
content: this.dataContent.packQty
}, {
content: dataContent.value.packQty
},
{
item_title: '标包单位',
content: this.dataContent.packUnit
}, {
content: dataContent.value.packUnit
},
{
item_title: '仓库代码',
content: this.dataContent.toWarehouseCode
}, {
content: dataContent.value.toWarehouseCode
},
{
item_title: '月台代码',
content: this.dataContent.toDockCode
}, {
content: dataContent.value.toDockCode
},
{
item_title: '库位代码',
content: this.dataContent.toLocationCode
}, {
content: dataContent.value.toLocationCode
},
{
item_title: '供应商代码',
content: this.dataContent.supplierCode
}, {
content: dataContent.value.supplierCode
},
{
item_title: '供应商物品代码',
content: this.dataContent.supplierItemCode
}, {
content: dataContent.value.supplierItemCode
},
{
item_title: '采购订单号',
content: this.dataContent.poNumber
}, {
content: dataContent.value.poNumber
},
{
item_title: '采购订单行',
content: this.dataContent.poLine
}, {
content: dataContent.value.poLine
},
{
item_title: '采购计划单号',
content: this.dataContent.rpNumber
}, {
content: dataContent.value.rpNumber
},
{
item_title: '发货单号',
content: this.dataContent.asnNumber
}, {
content: dataContent.value.asnNumber
},
{
item_title: '生产订单号',
content: this.dataContent.woNumber
}, {
content: dataContent.value.woNumber
},
{
item_title: '生产订单行',
content: this.dataContent.woLine
}, {
content: dataContent.value.woLine
},
{
item_title: '生产线代码',
content: this.dataContent.productionLineCode
}, {
content: dataContent.value.productionLineCode
},
{
item_title: '班组代码',
content: this.dataContent.teamCode
}, {
content: dataContent.value.teamCode
},
{
item_title: '班次代码',
content: this.dataContent.shiftCode
}, {
content: dataContent.value.shiftCode
},
{
item_title: '客户代码',
content: this.dataContent.customerCode
}, {
content: dataContent.value.customerCode
},
{
item_title: '客户月台代码',
content: this.dataContent.customerDockCode
}, {
content: dataContent.value.customerDockCode
},
{
item_title: '客户物品代码',
content: this.dataContent.customerItemCode
}, {
content: dataContent.value.customerItemCode
},
{
item_title: '销售订单号',
content: this.dataContent.soNumber
}, {
content: dataContent.value.soNumber
},
{
item_title: '销售订单行',
content: this.dataContent.soLine
}, {
content: dataContent.value.soLine
},
{
item_title: '质量等级',
content: this.dataContent.eqLevel
}, {
content: dataContent.value.eqLevel
},
{
item_title: '货主代码',
content: this.dataContent.ownerCode
}, {
content: dataContent.value.ownerCode
},
{
item_title: '重量',
content: this.dataContent.weight
}, {
item_title: '面积',
content: this.dataContent.area
}, {
item_title: '体积',
content: this.dataContent.volume
}]);
content: dataContent.value.weight
},
formatDate(val) {
return dateFormat(val)
{
item_title: '面积',
content: dataContent.value.area
},
}
{
item_title: '体积',
content: dataContent.value.volume
}
]
)
}
const formatDate = (val) => {
return dateFormat(val)
}
defineExpose({
openPopup,
closePopup
})
</script>
<style>
</style>
<style></style>

198
src/mycomponents/package/packageList.vue

@ -1,34 +1,37 @@
<template>
<view class="">
<view class="" v-for="(item,index) in dataContent" :key="item.id">
<uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false">
<u-collapse ref="collapse2" >
<u-collapse-item :disabled="false" @change="collapseChange">
<template v-slot:title>
<package-card :dataContent="item" :isShowLocation="false"
:isShowFromLocation="isShowFromLocation"></package-card>
:isShowFromLocation="isShowFromLocation" style='flex:1'></package-card>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id"
style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action>
<uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options"
@click="swipeClick($event,pack)">
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
<u-swipe-action :show="item.show" :index="index" v-for="(cur,key) in item.packList"
:key="index" :options="(cur.scaned&&isEdit)?editAndRemoveOptions : cur.scaned? removeOptions:options"
bg-color='rgba(255,255,255,0)'
@click="(...event)=>swipeClick($event,cur)"
>
<package-card :dataContent="cur" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></package-card>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
</view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="comMessage"></comMessage>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
onMounted,
nextTick
} from 'vue'
import config from '@/static/config.js'
import packageCard from '@/mycomponents/package/packageCard.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
@ -37,26 +40,17 @@
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ["collapseChange", "updateData"],
components: {
packageCard,
recommendQtyEdit
},
data() {
return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
props: {
const editItem = ref({})
const options = ref([])
const removeOptions = ref([])
const editAndRemoveOptions = ref([])
const comMessageRef = ref()
const collapse2 = ref()
onMounted(() => {
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value = getEditRemoveOption()
});
const props = defineProps({
dataContent: {
type: Object,
default: null
@ -98,67 +92,68 @@
type: Boolean,
default: false
}
},
watch: {
},
methods: {
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
})
const dataContent = ref(props.dataContent)
dataContent.value.forEach(item=>{
item.packList.forEach(cur=>{
cur.show = false
})
})
console.log(dataContent.value)
const swipeClick=(params,cur)=> {
let text = ''
if(cur.scaned&&props.isEdit){
text = editAndRemoveOptions[params[1]].text
// (cur.scaned&&isEdit)?editAndRemoveOptions : cur.scaned? removeOptions:options
}else{
if(cur.scaned){
text = removeOptions[params[1]].text
}else{
text = options[params[1]].text
}
},
remove(item) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
}
if (text == "编辑") {
edit(cur)
} else if (text == "移除") {
remove(cur)
}
}
const remove=(item)=> {
comMessageRef.value.showQuestionMessage("确定移除扫描信息?", res => {
if (res) {
item.scaned = false
item.handleQty = null;
this.$emit('updateData')
this.$forceUpdate()
emit('updateData')
}
});
},
}
const edit=(item)=> {
editItem.value = item;
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
collapseChange() {
this.$emit("collapseChange");
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse2.forEach(r => {
}
const collapseChange=()=> {
resizeCollapse();
emit("collapseChange");
}
const resizeCollapse=()=> {
nextTick(()=>{
collapse2.value.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
r.init();
})
});
this.$forceUpdate();
},
}
copy() {
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
var content = "HPQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
@ -167,23 +162,12 @@
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const copyPro = () =>{
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
@ -192,18 +176,16 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit("updateData")
}
const isDevlement=()=> {
return config.isDevelopment;
}
const confirm=(qty)=> {
editItem.value.handleQty = qty;
emit("updateData")
}
//
const emit = defineEmits(['collapseChange', 'updateData'])
</script>
<style>

89
src/mycomponents/package/packageRecordCard.vue

@ -6,7 +6,8 @@
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> -->
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
@ -15,21 +16,22 @@
</to-location>
</view>
<view class="uni-flex uni-row" style="word-break: break-all;">
<qty v-if="true" :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<qty v-if="true" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus">
</qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowPack="isShowPack">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text>
<!-- <text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text> -->
<image style='width: 26rpx;height: 26rpx;' src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" />
</view>
</view>
</view>
</view>
</template>
<script>
<script setup lang="ts">
import qty from '@/mycomponents/qty/qty.vue'
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
@ -40,26 +42,7 @@
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty,
balanceQty,
qty
},
data() {
return {
}
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -100,28 +83,13 @@
showPack: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
@ -130,23 +98,12 @@
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({
data: content,
success: () => {
@ -155,12 +112,10 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
const isDevlement = () => {
return config.isDevelopment;
}
</script>

154
src/mycomponents/package/packageRecordList.vue

@ -1,29 +1,33 @@
<template>
<view class="">
<view class="" v-for="(item,index) in dataContent" :key="item.id">
<uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false">
<u-collapse ref="collapse2">
<u-collapse-item :disabled="false" @change="collapseChange">
<template v-slot:title>
<packageRecordCard :dataContent="item" :isShowLocation="false"
:isShowFromLocation="false"></packageRecordCard>
:isShowFromLocation="false" style='flex:1'></packageRecordCard>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action-item :right-options="editAndRemoveOptions"
@click="swipeClick($event,pack)">
<packageRecordCard :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
<u-swipe-action :show="item.show" :index="index" v-for="(item,index) in item.packList"
:key="index" :options="editAndRemoveOptions" bg-color='rgba(255,255,255,0)'
@click="(...event) =>swipeClick(event,item)">
<packageRecordCard :dataContent="item" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></packageRecordCard>
</uni-swipe-action-item>
</view>
</uni-collapse-item>
</uni-collapse>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
</view>
</template>
<script>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
onMounted,
nextTick
} from 'vue'
import config from '@/static/config.js'
import packageRecordCard from '@/mycomponents/package/packageRecordCard.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
@ -32,26 +36,12 @@
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ["collapseChange"],
components: {
packageRecordCard,
balanceQtyEdit
},
data() {
return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions:[]
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions =getEditRemoveOption()
},
props: {
onMounted(()=>{
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value =getEditRemoveOption()
})
const props = defineProps({
dataContent: {
type: Object,
default: null
@ -94,52 +84,43 @@
default: false
}
},
watch: {
},
methods: {
swipeClick(e, item) {
})
const editItem = ref({})
const options = ref([])
const removeOptions = ref([])
const editAndRemoveOptions = ref([])
const collapse2 = ref([])
const dataContent = ref(props.dataContent)
dataContent.value.forEach(item=>{
item.packList.forEach(cur=>{
cur.show= false
})
})
const swipeClick=(e, item) =>{
if (e.content.text == "编辑") {
// this.edit(item)
}
},
// edit(item) {
// this.editItem = item;
// this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty);
// },
collapseChange() {
this.$emit("collapseChange");
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse2.forEach(r => {
}
const collapseChange=()=> {
emit("collapseChange");
resizeCollapse();
}
const resizeCollapse=()=> {
nextTick(r => {
collapse2.value.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
r.init();
})
});
this.$forceUpdate();
},
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const copy=()=> {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + props.detail.itemCode + ";P" + props.detail.packingNumber + ";B" + props.detail
.batch + ";Q" + props.detail.qty
uni.setClipboardData({
data: content,
success: () => {
@ -148,23 +129,11 @@
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const copyPro=()=> {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + props.detail.itemCode + ";P" + props.detail.packingNumber + ";B" + props.detail
.batch + ";Q" + props.detail.qty
uni.setClipboardData({
data: content,
success: () => {
@ -173,18 +142,17 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
},
confirm(qty){
this.editItem.qty =qty;
this.$emit('updateData')
}
const isDevlement=()=> {
return config.isDevelopment;
}
const confirm=(qty)=>{
editItem.value.qty =qty;
emit('updateData')
}
//
const emit = defineEmits(['collapseChange', 'updateData'])
</script>
<style>

60
src/mycomponents/package/packageTarget.vue

@ -1,57 +1,41 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;background-color: #fff;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx; background-color: #fff">
<text style="font-size: 30rpx">{{ title }} </text>
<view class="uni-flex u-col-center" @click="showPack">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="packingNumber==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{packingNumber}}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"
></image>
<text style="color: #3fbaff; font-size: 25rpx" v-if="packingNumber == '' && isShowEdit == true">&nbsp 请扫描</text>
<text style="color: #3fbaff; font-size: 25rpx">&nbsp {{ packingNumber }}</text>
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ"></win-scan-pack>
<win-scan-pack ref="scanPopup" @getResult="getScanResult" headerType="HPQ"></win-scan-pack>
</view>
</template>
<script>
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
components: {
winScanPack
},
data() {
return {
}
},
props: {
<script setup lang="ts">
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
const props = defineProps({
title: {
type: String,
default: "需求库位"
default: '需求库位'
},
packingNumber: {
type: String,
default: ""
default: ''
},
isShowEdit: {
type: Boolean,
default: true
}
},
})
const showPack = () => {
scanPopup.value.openScanPopup()
}
const getScanResult = (result) => {
emit('getScanResult', result)
}
watch: {
},
methods: {
showPack() {
this.$refs.scanPopup.openScanPopup();
},
getScanResult(result) {
this.$emit("getScanResult", result)
}
}
}
//
const emit = defineEmits(['result'])
</script>
<style>
</style>
<style></style>

140
src/mycomponents/popup/selectList.vue

@ -1,110 +1,90 @@
<template>
<uni-popup ref="popupItems">
<u-popup v-model="isShow" mode="center">
<com-popup @onClose="closePopup">
<view class="uni-center" style="position: relative;height:900rpx ;">
<view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;">
选择物料
<view class="uni-center" style="position: relative; height: 900rpx; width: 600rpx">
<view class="" style="position: absolute; font-size: 38rpx; height: 50rpx; margin-top: 10rpx; margin-bottom: 10rpx; left: 0; top: 0; right: 0"> 选择物料 </view>
<u-line />
<view class="" style="position: absolute; height: 720rpx; font-size: 40rpx; top: 70rpx; bottom: 80rpx; left: 0; right: 0">
<view style="margin: 15rpx; text-align: left" v-for="(item, index) in showList" :key="index">
<view class="" style="padding: 10rpx; font-size: 30rpx" @click="selectItem(item)"> ({{ index + 1 }}) 物料: {{ item.itemCode }} </view>
<u-line />
</view>
<u-line/>
<view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;">
<view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" >
<view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)">
({{index+1}}) 物料: {{item.itemCode}}
</view>
<u-line/>
</view>
</view>
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;">
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" >
<view class="">
当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }}
</view>
<view class="" style="position: absolute; height: 80rpx; left: 0; bottom: 0; right: 0">
<view class="flex uni-center" style="width: 100%; justify-content: center; margin-top: 10rpx; margin-bottom: 10rpx">
<view class=""> 当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }} </view>
</view>
<view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view>
</view>
</view>
</com-popup>
</uni-popup>
</u-popup>
</template>
<script>
import {
getCustomerItemList
} from '@/api/request2.js';
import comPopup from '@/mycomponents/common/comPopup.vue'
export default {
emits: ["selectedItem"],
components: {
comPopup,
},
props: {
},
data() {
return {
showList: [],
pageCurrent:1,
pageSize:10,
total:0
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { getCustomerItemList } from '@/api/request2.js'
import comPopup from '@/mycomponents/common/comPopup.vue'
}
},
methods: {
queryList(lineCode){
var filters =[]
const showList = ref([])
const pageCurrent = ref(1)
const pageSize = ref(10)
const total = ref(0)
const isShow = ref(false)
const queryList = (lineCode) => {
const filters = []
filters.push({
column: "customerCode",
action: "==",
column: 'customerCode',
action: '==',
value: lineCode
})
var params = {
filters: filters,
pageNo: this.pageCurrent,
pageSize: this.pageSize,
const params = {
filters,
pageNo: pageCurrent.value,
pageSize: pageSize.value
}
getCustomerItemList(params).then(res => {
getCustomerItemList(params)
.then((res) => {
if (res.data != null && res.data.list.length > 0) {
this.showList = res.data.list;
this.total = res.data.total;
this.$forceUpdate()
this.$refs['popupItems'].open("center");
showList.value = res.data.list
total.value = res.data.total
isShow.value = true
} else {
//线
// 线
// this.showErrorMessage('线' + lineCode + '');
this.$refs['popupItems'].open("center");
isShow.value = true
}
}).catch(error => {
})
.catch((error) => {
// this.showErrorMessage(error);
})
},
openPopup(items) {
this.showList = items;
this.$refs['popupItems'].open("center");
},
closePopup() {
this.$refs.popupItems.close()
},
selectItem(item) {
this.$emit("selectedItem", item);
this.$refs['popupItems'].close();
},
change(e){
this.pageCurrent = e.current
console.log("分页",e.current)
}
}
const openPopup = (items) => {
showList.value = items
isShow.value = true
}
const closePopup = () => {
isShow.value = false
}
const selectItem = (item) => {
emit('selectedItem', item)
isShow.value = false
}
const change = (e) => {
pageCurrent.value = e.current
}
}
}
//
const emit = defineEmits(['selectedItem'])
defineExpose({
queryList
})
</script>
<style>
.fixed-bottom {
.fixed-bottom {
position: fixed;
bottom: 0;
width: 100%;
@ -112,5 +92,5 @@
background-color: #fff;
padding: 10px 0;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
}
</style>

34
src/mycomponents/production/productionInfo.vue

@ -1,39 +1,21 @@
<template>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">生产线</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.productionLineCode}}</text>
<text style="color: #606266; font-size: 13px">生产线</text>
<text style="color: #606266; font-size: 13px">{{ dataContent.productionLineCode }}</text>
</view>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">生产日期</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.produceDate}}</text>
<text style="color: #606266; font-size: 13px">生产日期</text>
<text style="color: #606266; font-size: 13px">{{ dataContent.produceDate }}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
props: {
<script setup lang="ts">
const props = defineProps({
dataContent: {
type: Object,
default: {}
}
},
watch: {
},
methods: {
}
}
})
</script>
<style>
</style>
<style></style>

30
src/mycomponents/qty/balanceQty.vue

@ -6,7 +6,6 @@
{{Number(dataContent.qty)}}
</text>
</view>
<!-- v-if="dataContent.packQty==undefined" -->
<uom :uom="dataContent.uom"></uom>
</view>
<view class="uni-flex uni-row center">
@ -15,26 +14,10 @@
</view>
</template>
<script>
import packQty from '@/mycomponents/qty/packQty.vue'
<script setup lang="ts">
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
packQty,
uom,
status,
packUnit
},
data() {
return {
};
},
//
props: {
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
@ -62,14 +45,7 @@
type: Boolean,
default: true
}
},
watch: {
},
methods: {
},
}
})
</script>
<style lang="scss">

255
src/mycomponents/qty/balanceQtyEdit.vue

@ -1,64 +1,57 @@
<template>
<view class="">
<uni-popup ref="popup">
<u-popup v-model="show" mode="bottom">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="" style="padding: 10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
<view class="" style="font-size: 35rpx">
{{ title }}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text>
<view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white; height: 60%">
<view class="uni-flex uni-column">
<view class="uni-flex uni-row space-between padding title">
<text>包装数量 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box>
<uom :uom="dataContent.uom"></uom>
<!-- <uom :uom="dataContent.packUnit"></uom> -->
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box>
<!-- <uom :uom="dataContent.uom"></uom> -->
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.packQty)}}</text>
<text>{{ Number(dataContent.packQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" />
<view class="uni-flex uni-row uni-center" style="align-items: center">
<input class="qty_input" v-model="allQty" :focus="true" type="number" @confirm="confirm()" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center"
style="padding-left: 30rpx;">
<view class="split_line"></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" style="padding-left: 30rpx">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus"
:allowEdit='allowEditStatus' @updateStatus="updateStatus">
</balanceStatus>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="allowEditStatus" @updateStatus="updateStatus"> </balanceStatus>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
</view>
</view>
</view>
@ -67,44 +60,20 @@
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</u-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
export default {
components: {
uom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 0,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
originalInventoryStatus: "",
dataContent: {},
handleQty: 0,
maxlength: 10
}
},
watch: {
},
created() {
},
<script setup lang="ts">
import { ref, getCurrentInstance, watch } from 'vue'
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
props: {
const props = defineProps({
title: {
type: String,
default: "编辑数量"
default: '编辑数量'
},
settingParam: {
type: Object,
@ -118,88 +87,108 @@
type: Boolean,
default: false
}
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
})
const allQty = ref(0)
const stdCount = ref(0)
const inventoryStatus = ref('')
const originalInventoryStatus = ref('')
const dataContent = ref({})
const maxlength = ref(10)
const show = ref(false)
const comMessageRef = ref()
const toInventoryStatus = ref()
watch(
() => allQty.value,
(newVal) => {
if (newVal % Number(dataContent.value.packQty) > 0) {
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty)) + 1
} else {
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty))
}
}
)
const checkNum = (e) => {
const { value } = e.detail
const dot = value.indexOf('.') //
const reg = /^[0-9]+$/ //
if (dot > -1) {
this.maxlength = dot + 7; //
maxlength.value = dot + 7 //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
if (reg.test(value)) {
//
maxlength.value = 10
}
},
openEditPopup(item, handleQty) {
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus
this.originalInventoryStatus =this.dataContent.inventoryStatus;
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = handleQty
setTimeout(res => {
this.$refs.popup.open('bottom')
}
const openEditPopup = (item, handleQty) => {
dataContent.value = item
inventoryStatus.value = dataContent.value.inventoryStatus
originalInventoryStatus.value = dataContent.value.inventoryStatus
toInventoryStatus.value = dataContent.value.toInventoryStatus
allQty.value = handleQty
setTimeout((res) => {
show.value = true
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.dataContent.inventoryStatus = this.originalInventoryStatus;
this.closeEditPopup();
},
calcQty(val) {
if (val > 0) {
this.allQty = val * Number(this.dataContent.packQty);
}
const closeEditPopup = () => {
show.value = false
}
const confirm = () => {
setValue()
}
const cancel = () => {
dataContent.value.inventoryStatus = originalInventoryStatus.value
closeEditPopup()
}
const calcQty = (e) => {
if (e.value > 0) {
allQty.value = e.value * Number(dataContent.value.packQty)
}
}
const setValue = () => {
const balanceQty = Number(dataContent.value.balanceQty)
if (allQty.value == 0) {
comMessageRef.value.showErrorMessage('数量必须大于0', (res) => {
if (res) {
allQty.value = balanceQty
}
},
setValue() {
var balanceQty = Number(this.dataContent.balanceQty);
if (this.allQty == 0) {
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0',
res => {
this.allQty = balanceQty;
})
} else if (this.allQty > balanceQty) {
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']',
res => {
this.allQty = balanceQty;
} else if (allQty.value > balanceQty) {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于库存数量[${balanceQty}]`, (res) => {
if (res) {
allQty.value = balanceQty
}
})
} else {
this.callback();
}
},
callback() {
let qty = Number(this.allQty);
this.dataContent.handleQty = qty;
if (this.allowEditStatus) //,
{
this.dataContent.toInventoryStatus = this.inventoryStatus;
}
this.$emit("confirm", qty);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
console.log(this.inventoryStatus)
}
}
}
callback()
}
}
const callback = () => {
const qty = Number(allQty.value)
dataContent.value.handleQty = qty
if (props.allowEditStatus) {
// ,
dataContent.value.toInventoryStatus = inventoryStatus.value
}
emit('confirm', qty)
closeEditPopup()
}
const updateStatus = (value) => {
inventoryStatus.value = value
}
//
const emit = defineEmits(['confirm', 'clearResult'])
defineExpose({ openEditPopup, closeEditPopup })
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
}
.hide_border {
.hide_border {
button {
border: none;
}
@ -207,9 +196,9 @@
button::after {
border: none;
}
}
}
.title {
.title {
font-size: 30rpx;
}
}
</style>

47
src/mycomponents/qty/compareQty.vue

@ -1,10 +1,10 @@
<template>
<view >
<view>
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view class="uni-flex uni-row ">
<view class="u-flex u-row center">
<view class="u-flex u-row ">
<view v-if="Number(handleQty)!=0">
<view v-if="isShowRecommendQty">
<view v-if="isShowRecommendQty" style='font-weight:bold'>
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
</view>
@ -30,36 +30,22 @@
</view>
<uom :uom="dataContent.uom">
</uom>
<!-- <uom v-show="Number(handleQty)!=0||(isShowRecommendQty&&Number(recommendQty)>0)" :uom="dataContent.uom">
</uom> -->
</view>
<view>
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
<!-- <std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> -->
</view>
</view>
</template>
<script>
<script setup lang="ts">
import {
watch
} from 'vue'
// import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
// packQty,
packUnit,
uom,
status
},
data() {
return {
};
},
//
props: {
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
@ -91,18 +77,15 @@
type: Boolean,
default: true
}
},
watch: {
handleQty: {
handler(newName, oldName) {},
})
watch(
() => props.handleQty,
(val : boolean) => {},
{
immediate: true,
deep: true
}
},
methods: {
},
}
)
</script>
<style lang="scss">

321
src/mycomponents/qty/countQtyEdit.vue

@ -1,127 +1,85 @@
<template>
<view class="">
<uni-popup ref="popup">
<u-popup v-model="show" mode="bottom">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="" style="padding: 10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
<view class="" style="font-size: 35rpx">
{{ title }}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white; height: 60%">
<view class="uni-flex uni-column">
<view class="uni-flex uni-row space-between padding title">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box>
<!-- <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box> -->
<u-number-box v-model="stdCount" @change="calcQty($event, stdCount)" :focus="false"></u-number-box>
<view class="std_pack">
{{getPackUnitInfo(dataContent.packUnit)}}
{{ handleGetPackUnitInfo(dataContent.packUnit) }}
</view>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.packQty)}}</text>
<text>{{ Number(dataContent.packQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@mousedown="mousedown" @input="checkNum" :maxlength="maxlength" />
<view class="uni-flex uni-row uni-center" style="align-items: center">
<input class="qty_input" v-model="allQty" :focus="true" type="number" @mousedown="mousedown" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowBalance"
class="uni-flex uni-row space-between padding title u-col-center">
<view class="split_line"></view>
<view v-if="isShowBalance" class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title"
style="align-items: center; padding-left: 30rpx;">
<view class="split_line"></view>
<view v-if="isShowStatus" class="uni-flex uni-row space-between title" style="align-items: center; padding-left: 30rpx">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit='true'
@updateStatus="updateStatus" @onOpen="clickState">
</balanceStatus>
<view class="uni-flex uni-row uni-center" style="align-items: center">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="true" @updateStatus="updateStatus" @onOpen="clickState"> </balanceStatus>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after"
@click="confirm()">确认({{seconds}}s关闭)</button>
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after"
@click="confirm()">确认</button>
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认({{ seconds }}s关闭)</button>
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</u-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import {
getPackUnitInfo
} from "@/common/directory.js"
import {
getInventoryStatusName
} from '@/common/directory.js';
export default {
components: {
uom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 0,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
dataContent: {},
handleQty: 0,
seconds: 0,
timer: {},
showConfirmCountdown: false,
detailList: [],
maxlength: 10,
mode: 'add' //add edit
}
},
watch: {
},
created() {
},
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import { getPackUnitInfo, getInventoryStatusName } from '@/common/directory.js'
props: {
const props = defineProps({
title: {
type: String,
default: "编辑数量"
default: '编辑数量'
},
settingParam: {
type: Object,
@ -138,122 +96,133 @@
allowEditStatus: {
type: Boolean,
default: false
},
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
}
})
const allQty = ref(0)
const stdCount = ref(0)
const stateData = ref(0)
const balanceQty = ref(0)
const inventoryStatus = ref('')
const dataContent = ref({})
const handleQty = ref(0)
const seconds = ref(0)
const timer = ref({})
const showConfirmCountdown = ref(false)
const detailList = ref([])
const maxlength = ref(10)
const show = ref(false)
const mode = ref('add') // add edit
const checkNum = (e) => {
const { value } = e.detail
const dot = value.indexOf('.') //
const reg = /^[0-9]+$/ //
if (dot > -1) {
this.maxlength = dot + 7; //
maxlength.value = dot + 7 //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
if (reg.test(value)) {
//
maxlength.value = 10
}
},
//
openEditPopup(item, detailList) {
this.initData(item, detailList);
// this.dataContent = item
// this.inventoryStatus = this.dataContent.inventoryStatus;
// this.allQty = Number(this.dataContent.qty)
// this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty);
// this.detailList = detailList
this.showConfirmCountdown = false;
this.mode = 'edit';
setTimeout(res => {
this.$refs.popup.open('bottom')
}
const openEditPopup = (item, detailList) => {
initData(item, detailList)
showConfirmCountdown.value = false
mode.value = 'edit'
setTimeout((res) => {
show.value = true
}, 500)
clearInterval(this.timer)
},
clearInterval(timer.value)
}
//
openEditPopupShowSeconds(item, detailList) {
this.initData(item, detailList);
this.showConfirmCountdown = true;
this.mode = 'add';
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.startTimer()
},
//
initData(item, detailList) {
this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.handleQty);
this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty);
this.detailList = detailList;
},
mousedown() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
},
clickState() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
},
closeEditPopup() {
clearInterval(this.timer)
this.$emit("close");
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.closeEditPopup();
},
startTimer() {
this.seconds = 3;
clearInterval(this.timer)
this.timer = setInterval(() => {
this.seconds--
if (this.seconds <= 0) {
this.confirm();
const openEditPopupShowSeconds = (item, detailList) => {
initData(item, detailList)
showConfirmCountdown.value = true
mode.value = 'add'
setTimeout((res) => {
show.value = true
}, 500)
startTimer()
}
const initData = (item, detailListParams) => {
dataContent.value = item
inventoryStatus.value = dataContent.value.inventoryStatus
allQty.value = Number(dataContent.value.handleQty)
stdCount.value = Math.ceil(allQty.value / dataContent.value.packQty)
detailList.value = detailListParams
}
const mousedown = () => {
showConfirmCountdown.value = false
clearInterval(timer.value)
}
const clickState = () => {
showConfirmCountdown.value = false
clearInterval(timer.value)
}
const closeEditPopup = () => {
clearInterval(timer.value)
emit('close')
show.value = false
}
const confirm = () => {
setValue()
}
const cancel = () => {
closeEditPopup()
}
const startTimer = () => {
seconds.value = 3
clearInterval(timer.value)
timer.value = setInterval(() => {
seconds.value--
if (seconds.value <= 0) {
confirm()
// this.cancel()
return
}
}, 1000)
},
calcQty(val) {
}
const calcQty = (val) => {
if (val > 0) {
this.allQty = val * Number(this.dataContent.packQty);
allQty.value = val * Number(dataContent.value.packQty)
}
},
}
setValue() {
this.dataContent.handleQty = Number(this.allQty)
this.$emit("confirm", Number(this.allQty), this.inventoryStatus, this.mode);
this.closeEditPopup();
},
const setValue = () => {
dataContent.value.handleQty = Number(allQty.value)
emit('confirm', Number(allQty.value), inventoryStatus.value, mode.value)
closeEditPopup()
}
updateStatus(value) {
this.inventoryStatus = value
},
const updateStatus = (value) => {
inventoryStatus.value = value
}
getPackUnitInfo(value) {
const handleGetPackUnitInfo = (value) => {
return getPackUnitInfo(value).name
}
}
}
}
//
const emit = defineEmits(['close', 'confirm'])
defineExpose({
openEditPopupShowSeconds,
openEditPopup
})
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
}
.hide_border {
.hide_border {
button {
border: none;
}
@ -261,9 +230,9 @@
button::after {
border: none;
}
}
}
.title {
.title {
font-size: 30rpx;
}
}
</style>

20
src/mycomponents/qty/packQty.vue

@ -5,30 +5,20 @@
</text>
</view>
</template>
<script>
<script setup lang="ts">
import {
getPackUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
//
props: {
const props = defineProps({
dataContent: {
packQty: 1000,
uom: "EA",
},
},
methods: {
getPackUnit(packUnit) {
}
})
const getPackUnit = (packUnit) => {
let std = getPackUnitInfo(packUnit);
return std == "" ? packUnit : std.label;
}
}
}
</script>

27
src/mycomponents/qty/packUnit.vue

@ -2,46 +2,35 @@
<view class="std_pack" v-if="dataContent.packQty!=undefined">
<text>
<!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} -->
{{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}})
{{getPackUnit(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUom(dataContent.uom)}})
</text>
</view>
</template>
<script>
<script setup lang="ts">
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
const props = defineProps({
dataContent: {
packQty: 1000,
uom: "EA",
},
},
methods: {
getUomInfo(uom) {
}
})
const getUom = (uom) => {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
},
}
getPackUnitName(packUnit) {
const getPackUnit = (packUnit) => {
let unit = getPackUnitName(packUnit);
return unit;
}
}
}
</script>

42
src/mycomponents/qty/qty.vue

@ -1,9 +1,9 @@
<template>
<view class="center uni-column">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status>
<view class="uni-flex uni-row">
<view class="text_default center">
{{Number(dataContent.qty)}}
{{ Number(dataContent.qty) }}
</view>
<uom :uom="dataContent.uom"></uom>
</view>
@ -13,27 +13,13 @@
</view>
</view>
</template>
<script setup lang="ts">
import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
<script>
import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
packQty,
status,
uom,
packUnit
},
data() {
return {
};
},
//
props: {
const props = defineProps({
dataContent: {
type: Object,
default: null
@ -49,16 +35,8 @@
isShowPackUnit: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
},
}
})
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

34
src/mycomponents/qty/recommendQty.vue

@ -2,43 +2,23 @@
<view>
<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view class="u-flex u-row center">
<view class="text_recommend " :style='objTextStyle'>
{{Number(dataContent.qty)}}
</view>
<!-- /{{Number(dataContent.packQty)}} -->
<!-- v-show="!isShowStdPack" -->
<uom :uom="dataContent.uom"></uom>
</view>
<view>
<!-- {{dataContent}} -->
<pack-unit :dataContent="dataContent"></pack-unit>
<!-- <std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> -->
</view>
</view>
</template>
<script>
// import packQty from '@/mycomponents/qty/packQty.vue'
<script setup lang="ts">
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
// packQty,
packUnit,
uom,
status
},
data() {
return {
};
},
//
props: {
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
@ -70,14 +50,8 @@
type: Object,
default: null
}
},
watch: {
},
methods: {
})
},
}
</script>
<style lang="scss">

270
src/mycomponents/qty/recommendQtyEdit.vue

@ -1,28 +1,27 @@
<template>
<view class="">
<uni-popup ref="popup">
<u-popup v-model="show" mode="bottom">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="" style="padding: 10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
<view class="" style="font-size: 35rpx">
{{ title }}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image>
</view>
<view class='split_line'></view>
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<view class="split_line"></view>
<view class="uni-flex uni-column" style="background-color: white; height: 60%">
<view class="uni-flex uni-column">
<view class="uni-flex uni-row space-between padding title">
<text>包装个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box>
{{getPackUnitName(dataContent.packUnit)}}
<!-- <uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box> -->
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box>
{{ handleGetPackUnitName(dataContent.packUnit) }}
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>包装规格 : </text>
<view class="uni-flex u-col-center uni-row">
@ -30,17 +29,15 @@
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>总数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="false" type="number"
@input="checkNum" @confirm="confirm()" :maxlength="maxlength" />
<view class="uni-flex uni-row uni-center" style="align-items: center">
<input class="qty_input" v-model="allQty" :focus="false" type="number" @input="checkNum" @confirm="confirm()" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
</view>
</view>
</view>
@ -49,51 +46,22 @@
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</u-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
uom,
stdUom,
packUnit
},
data() {
return {
allQty: 0,
stdCount: 0,
labelQty: 0,
recommendQty: 0,
maxlength: 10
}
},
watch: {
// handleQty: {
// handler(newval, oldval) {
// this.allQty = Number(this.handleQty)
// },
// immediate: true,
// deep: true
// }
},
created() {
},
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import { getUomInfo, getPackUnitName } from '@/common/directory.js'
import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
props: {
const props = defineProps({
title: {
type: String,
default: "编辑数量"
default: '编辑数量'
},
dataContent: {
type: Object,
@ -106,121 +74,119 @@
settingParam: {
type: Object,
default: null
},
},
methods: {
getPackUnitName(packUnit) {
let unit = getPackUnitName(packUnit);
return unit;
},
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
}
})
const allQty = ref(0)
const stdCount = ref(0)
const labelQty = ref(0)
const recommendQty = ref(0)
const maxlength = ref(0)
const show = ref(false)
const comMessageRef = ref()
const dataContent = ref(props.dataContent)
const handleGetPackUnitName = (packUnit) => {
const unit = getPackUnitName(packUnit)
return unit
}
const checkNum = (e) => {
const { value } = e.detail
const dot = value.indexOf('.') //
const reg = /^[0-9]+$/ //
if (dot > -1) {
this.maxlength = dot + 7; //
maxlength.value = dot + 7 //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
if (reg.test(value)) {
//
maxlength.value = 10
}
},
openEditPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom')
}
const openEditPopup = () => {
setTimeout((res) => {
show.value = true
}, 500)
},
openTaskEditPopup(recommendQty, handleQty, labelQty) {
this.recommendQty = Number(recommendQty);
this.labelQty = Number(labelQty);
this.allQty = Number(handleQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}
const openTaskEditPopup = (recommendQtyParams, handleQty, labelQtyParams) => {
// dataContent.value =
recommendQty.value = Number(recommendQtyParams)
labelQty.value = Number(labelQtyParams)
allQty.value = Number(handleQty)
setTimeout((res) => {
show.value = true
}, 500)
},
openRecordEditPopup(labelQty) {
this.recommendQty = 0;
this.labelQty = Number(labelQty);
this.allQty = Number(labelQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}
const openRecordEditPopup = (labelQtyParams, item) => {
dataContent.value = item
recommendQty.value = 0
labelQty.value = Number(labelQtyParams)
allQty.value = Number(labelQtyParams)
setTimeout((res) => {
show.value = true
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.closeEditPopup();
},
calcQty(val) {
if (val > 0) {
this.allQty = val * this.dataContent.packQty;
}
},
setValue() {
}
const closeEditPopup = () => {
show.value = false
}
const confirm = () => {
setValue()
}
const cancel = () => {
closeEditPopup()
}
const calcQty = (e) => {
if (e.value > 0) {
allQty.value = e.value * dataContent.value.packQty
}
}
const setValue = () => {
// var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty);
if (this.allQty > this.labelQty) {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' +
this.labelQty +
']',
res => {
this.allQty = this.labelQty;
if (allQty.value > labelQty.value) {
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于标签数量[${labelQty.value}]`, (res) => {
allQty.value = labelQty.value
})
} else if (recommendQty.value != 0) {
if (allQty.value > recommendQty.value) {
if (props.settingParam.allowBiggerQty != null && props.settingParam.allowBiggerQty == 'TRUE') {
callback()
} else {
if (this.recommendQty != 0) {
if (this.allQty > this.recommendQty) {
if (this.settingParam.allowBiggerQty != null && this.settingParam.allowBiggerQty ==
"TRUE") {
this.callback();
} else {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于推荐数量[' +
this.recommendQty +
']',
res => {
this.allQty = this.labelQty;
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于推荐数量[${recommendQty.value}]`, (res) => {
allQty.value = labelQty.value
})
}
} else if (this.allQty < this.recommendQty) {
if (this.settingParam.allowSmallerQty != null && this.settingParam.allowSmallerQty ==
"TRUE") {
this.callback();
} else if (allQty.value < recommendQty.value) {
if (props.settingParam.allowSmallerQty != null && props.settingParam.allowSmallerQty == 'TRUE') {
callback()
} else {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许小于推荐数量[' +
this.recommendQty +
']',
res => {
this.allQty = this.labelQty;
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许小于推荐数量[${recommendQty.value}]`, (res) => {
allQty.value = labelQty.value
})
}
} else {
this.callback();
callback()
}
} else {
this.callback();
}
}
},
callback() {
this.$emit("confirm", Number(this.allQty));
this.closeEditPopup();
}
}
}
callback()
}
}
const callback = () => {
emit('confirm', Number(allQty.value))
closeEditPopup()
}
//
const emit = defineEmits(['confirm'])
defineExpose({ openTaskEditPopup, openRecordEditPopup })
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
}
.hide_border {
.hide_border {
button {
border: none;
}
@ -228,9 +194,9 @@
button::after {
border: none;
}
}
}
.title {
.title {
font-size: 30rpx;
}
}
</style>

20
src/mycomponents/qty/stdUom.vue

@ -5,25 +5,17 @@
</template>
<script>
<script setup lang="ts">
import {
getPackUnitInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
const props = defineProps({
uom: {
type: String,
default: ''
},
},
methods: {
getPackUnit(uom) {
}
})
const getPackUnit = (uom) => {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
@ -31,8 +23,6 @@
return item.label
}
}
}
}
</script>

20
src/mycomponents/qty/uom.vue

@ -1,29 +1,21 @@
<template>
<view class="uom">
{{getUomInfo(uom)}}
{{getUom(uom)}}
</view>
</template>
<script>
<script setup lang="ts">
import {
getUomInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
const props = defineProps({
uom: {
type: String,
default: ''
},
},
methods: {
getUomInfo(uom) {
})
const getUom = (uom) => {
let item = getUomInfo(uom);
if (item == '') {
return uom;
@ -31,8 +23,6 @@
return item.label
}
}
}
}
</script>

126
src/mycomponents/recommend/recommend.vue

@ -1,62 +1,40 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;">
<view class="uni-flex uni-row space-between" style="align-items: center">
<view :class="detail.scaned ? 'scan_view' : ''" class="u-p-t-1 u-p-b-20">
<view class="uni-flex uni-row space-between u-p-t-20" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<view style="word-break: break-all">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
</container> -->
<pack v-if="isShowPack && detail.packingNumber!=null" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<pack v-if="isShowPack && detail.packingNumber != null" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch && detail.batch != null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</to-location>
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </to-location>
</view>
<view style="word-break: break-all;" class="uni-flex uni-row center">
<view style="word-break: break-all" class="uni-flex uni-row center">
<!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<recommend-qty v-if="detail.handleQty == null || detail.handleQty == undefined" :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; width: 20px; " @click="copy">复制</text>
<!-- <text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> -->
<view v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view>
</view>
</view>
</view>
</template>
<script>
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
<script setup lang="ts">
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
const props = defineProps({
detail: {
type: Object,
default: {}
@ -89,28 +67,12 @@
locationTitle: {
type: String,
default: '库位'
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -119,23 +81,11 @@
})
}
})
// #endif
},
copyPro() {
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -144,14 +94,10 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
}
const isDevlement = () => {
return config.isDevelopment
}
</script>
<style>
</style>
<style></style>

109
src/mycomponents/recommend/recommendCount.vue

@ -1,55 +1,36 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between ">
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff">
<view class="uni-flex uni-row space-between">
<!-- uni-inline-item 暂时拿掉-->
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</location>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location>
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </location>
</view>
<view class="uni-flex uni-row center">
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty> -->
<!-- {{detail.scaned}} -->
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)"
:isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned==true"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" :isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned == true" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty>
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()">
<text style="font-size: 24rpx; color: #2979ff" @click="copy">复制采购</text>
<text style="font-size: 24rpx; color: #2979ff" @click="copyPro">|制品</text>
</view>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
const props = defineProps({
detail: {
type: Object,
default: {}
@ -79,27 +60,11 @@
type: Boolean,
default: true
}
},
watch: {
},
methods: {
copy() {
})
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -108,23 +73,11 @@
})
}
})
// #endif
},
copyPro() {
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -133,14 +86,10 @@
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
}
const isDevlement = () => {
return config.isDevelopment
}
</script>
<style>
</style>
<style></style>

62
src/mycomponents/record/record.vue

@ -1,5 +1,5 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between uni-inline-item">
<view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
@ -7,45 +7,25 @@
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view>
<view>
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
</compare-qty>
<qty v-if="dataContent.record == null || dataContent.record == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" :handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </compare-qty>
</view>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue'
export default {
components: {
pack,
location,
batch,
qty,
recommendQty,
compareQty,
bussinessType,
},
data() {
return {
<script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue'
}
},
props: {
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -76,21 +56,13 @@
},
fromInventoryStatus: {
type: String,
default: ""
default: ''
},
toInventoryStatus: {
type: String,
default: ""
},
},
watch: {
},
methods: {
}
default: ''
}
})
</script>
<style>
</style>
<style></style>

231
src/mycomponents/record/recordComDetailCard.vue

@ -1,65 +1,34 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<view class="" style="background-color: #fff">
<u-collapse ref="collapse1">
<u-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<u-swipe-action :show="false" style="width: 90%" :options="removeOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => removeItem(event, dataContent)">
<item-qty :dataContent="dataContent" :isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</u-swipe-action>
</template>
<!-- <view class='split_line'></view> -->
<view class="" v-for="(detail,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation">
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <view class='split_line'></view> -->
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<!-- <balance-detail-popup ref="balanceDetailPopup"></balance-detail-popup> -->
<comMessage ref="comMessage"></comMessage>
<u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance>
</u-swipe-action>
</u-collapse-item>
</u-collapse>
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm"></balance-qty-edit>
<record-detail-popup ref="recordDetailPopupRef"></record-detail-popup>
<com-message ref="comMessageRef" />
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'
import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
<script setup lang="ts">
import { ref, onMounted, nextTick, watch } from 'vue'
import itemQty from '@/mycomponents/item/itemQty.vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
balance,
balanceQtyEdit,
balanceDetailPopup,
purchaseLabel,
location,
recordDetailPopup
// winListHint
},
props: {
import { getDetailOption, getDetailEditRemoveOption, getClearOption } from '@/common/array.js'
const props = defineProps({
dataContent: {
type: Object,
default: {}
@ -87,93 +56,95 @@
isShowBalanceQty: {
type: Boolean,
default: false
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
})
const collapse1 = ref()
//
watch(
() => props.dataContent,
(val) => {
if (val.subList.length > 0) {
if (collapse1.value != undefined && collapse1.value != null) {
nextTick((res) => {
collapse1.value.init()
})
}
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getClearOption();
},
methods: {
removeItem(e, dataContent) {
if (e.content.text == "清空") {
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?",
res => {
{ immediate: true, deep: true }
)
const option = ref([])
const title = ref('推荐详情')
const showItem = ref({})
const editItem = ref({})
const detailOptions = ref([])
const scanOptions = ref([])
const removeOptions = ref([])
const dataList = ref([])
const comMessageRef = ref('')
const balanceQtyEditRef = ref('')
const recordDetailPopupRef = ref('')
const dataContent = ref(props.dataContent)
dataContent.value.subList.forEach((item) => {
item.show = false
})
onMounted(() => {
detailOptions.value = getDetailOption()
scanOptions.value = getDetailEditRemoveOption()
removeOptions.value = getClearOption()
})
const removeItem = (params, dataContent) => {
const { text } = removeOptions.value[params[1]]
if (text == '清空') {
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息?', (res) => {
if (res) {
this.$emit('removeItem')
// this.$emit('removeItem', this.dataContent)
emit('removeItem')
}
});
})
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
const swipeClick = (params, item) => {
let text = ''
if (item.scaned) {
text = scanOptions.value[params[1]].text
} else {
text = detailOptions.value[params[1]].text
}
},
edit(item) {
this.editItem = item;
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.handleQty);
},
detail(item) {
this.showItem = item;
this.$refs.recordDetailPopup.openPopup(item);
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (text == '详情') {
detail(item)
} else if (text == '编辑') {
edit(item)
} else if (text == '移除') {
remove(item, params[0])
}
}
const edit = (item) => {
editItem.value = item
balanceQtyEditRef.value.openEditPopup(editItem.value, editItem.value.handleQty)
}
const detail = (item) => {
showItem.value = item
recordDetailPopupRef.value.openPopup(item)
}
const remove = (item, index) => {
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息', (res) => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
dataContent.value.subList.splice(index, 1)
emit('removePack')
}
});
},
})
}
const confirm = (qty) => {
editItem.value.handleQty = qty
emit('updateData')
}
confirm(qty) {
// this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
//
const emit = defineEmits(['updateData', 'removePack'])
</script>
<style>
::v-deep .u-arrow-down-icon {
margin-right: 0px !important;
}
</style>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save