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. 50
      src/api/http.ts
  12. 60
      src/api/request2.js
  13. 8
      src/common/balance.js
  14. 2
      src/common/calc.js
  15. 4
      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. 98
      src/components/my-paging/my-paging.vue
  21. 32
      src/manifest.json
  22. 96
      src/mycomponents/balance/balance.vue
  23. 51
      src/mycomponents/balance/balanceSelect.vue
  24. 14
      src/mycomponents/balance/batch.vue
  25. 31
      src/mycomponents/balance/bussinessType.vue
  26. 42
      src/mycomponents/balance/handleBalance.vue
  27. 16
      src/mycomponents/balance/location.vue
  28. 29
      src/mycomponents/balance/pack.vue
  29. 29
      src/mycomponents/balance/productionLabel.vue
  30. 44
      src/mycomponents/balance/recommendBalance.vue
  31. 18
      src/mycomponents/balance/toLocation.vue
  32. 64
      src/mycomponents/button/requestButton.vue
  33. 30
      src/mycomponents/common/comBlankView.vue
  34. 27
      src/mycomponents/common/comEmptyView.vue
  35. 92
      src/mycomponents/common/comListItem.vue
  36. 210
      src/mycomponents/common/comMessage.vue
  37. 25
      src/mycomponents/common/comPopup.vue
  38. 75
      src/mycomponents/container/targetContainer.vue
  39. 202
      src/mycomponents/detail/comDetailCard.vue
  40. 200
      src/mycomponents/detail/comJobDetailCard.vue
  41. 189
      src/mycomponents/detail/comRequestDetailCard.vue
  42. 30
      src/mycomponents/detail/detailBalanceInfo.vue
  43. 55
      src/mycomponents/detail/detailCommonInfo.vue
  44. 21
      src/mycomponents/detail/detailHandleInfo.vue
  45. 23
      src/mycomponents/detail/detailItemInfo.vue
  46. 24
      src/mycomponents/detail/detailPackageInfo.vue
  47. 29
      src/mycomponents/detail/detailRecommendInfo.vue
  48. 69
      src/mycomponents/detail/jobDetailPopup.vue
  49. 48
      src/mycomponents/detail/recordDetailCommonInfo.vue
  50. 63
      src/mycomponents/detail/recordDetailPopup.vue
  51. 48
      src/mycomponents/detail/requestDetailCommonInfo.vue
  52. 34
      src/mycomponents/item/item.vue
  53. 46
      src/mycomponents/item/itemCompareQty.vue
  54. 43
      src/mycomponents/item/itemInfo.vue
  55. 114
      src/mycomponents/item/itemInfoPopup.vue
  56. 36
      src/mycomponents/item/itemQty.vue
  57. 26
      src/mycomponents/job/jobBottom.vue
  58. 21
      src/mycomponents/job/jobComMainCard.vue
  59. 27
      src/mycomponents/job/jobComMainCardAsn.vue
  60. 56
      src/mycomponents/job/jobComMainDetailCard.vue
  61. 48
      src/mycomponents/job/jobCommonInfo.vue
  62. 73
      src/mycomponents/job/jobDetailPopup.vue
  63. 215
      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. 32
      src/mycomponents/job/jobStatus.vue
  69. 31
      src/mycomponents/job/jobTop.vue
  70. 32
      src/mycomponents/job/jobTopAsn.vue
  71. 65
      src/mycomponents/jobList/jobList.vue
  72. 29
      src/mycomponents/location/location.vue
  73. 114
      src/mycomponents/location/locationCompare.vue
  74. 26
      src/mycomponents/location/locationDetail.vue
  75. 33
      src/mycomponents/location/locationInfo.vue
  76. 42
      src/mycomponents/location/locationStatus.vue
  77. 74
      src/mycomponents/location/requiredLocation.vue
  78. 89
      src/mycomponents/package/packageCard.vue
  79. 305
      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. 56
      src/mycomponents/package/packageTarget.vue
  84. 124
      src/mycomponents/popup/selectList.vue
  85. 34
      src/mycomponents/production/productionInfo.vue
  86. 30
      src/mycomponents/qty/balanceQty.vue
  87. 219
      src/mycomponents/qty/balanceQtyEdit.vue
  88. 45
      src/mycomponents/qty/compareQty.vue
  89. 279
      src/mycomponents/qty/countQtyEdit.vue
  90. 20
      src/mycomponents/qty/packQty.vue
  91. 27
      src/mycomponents/qty/packUnit.vue
  92. 32
      src/mycomponents/qty/qty.vue
  93. 34
      src/mycomponents/qty/recommendQty.vue
  94. 236
      src/mycomponents/qty/recommendQtyEdit.vue
  95. 20
      src/mycomponents/qty/stdUom.vue
  96. 20
      src/mycomponents/qty/uom.vue
  97. 102
      src/mycomponents/recommend/recommend.vue
  98. 89
      src/mycomponents/recommend/recommendCount.vue
  99. 46
      src/mycomponents/record/record.vue
  100. 217
      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://localhost:12080/admin-api VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api # 是否是测试环境
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=http://172.21.32.14:81/api/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api # 租户配置 VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]'
# VITE_BASE_URL_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_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:mp-weixin": "uni build -p mp-weixin",
"test:app": "uni build -p app", "test:app": "uni build -p app",
"test:custom": "uni build -p", "test:custom": "uni build -p",
"prod": "uni build --mode production",
"prod:mp-weixin": "uni build -p mp-weixin --mode production", "prod:mp-weixin": "uni build -p mp-weixin --mode production",
"prod:app": "uni build -p app --mode production", "prod:app": "uni build -p app --mode production",
"prod:custom": "uni build -p --mode production" "prod:custom": "uni build -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": { "dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3060920221114001", "@dcloudio/uni-app": "3.0.0-alpha-3060920221114001",

50
src/api/http.ts

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

60
src/api/request2.js

@ -16,6 +16,7 @@ export function login(username, password, code, uuid) {
password, password,
code, code,
uuid, uuid,
tenantName
} }
return http.post('/system/auth/login', data) return http.post('/system/auth/login', data)
} }
@ -285,7 +286,7 @@ export function getMesPackInfo(code) {
* *
*/ */
export function getBasicLocationByCode(code) { export function getBasicLocationByCode(code) {
var parmas = { var params = {
code: code, code: code,
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 100
@ -730,7 +731,7 @@ export function cancleTakePutawayJob(id) {
* @param {*} params * @param {*} params
*/ */
export function putawayJobSubmit(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) { export function productDismantleRecordSubmit(params) {
return http.put("/wms/purchasereceipt-job-main/abandon",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 任务状态 * status 任务状态
@ -2118,11 +2127,13 @@ export function productionReturnRecordSubmit(params) {
* @param {*} * @param {*}
*/ */
export function getUnPlannedIssueRequestList(params) { export function getUnPlannedIssueRequestList(params) {
return request({ // return request({
url: baseApi + "/wms/unplannedissue-request-detail/senior", // url: baseApi + "/wms/unplannedissue-request-detail/senior",
method: "post", // method: "post",
data: params, // data: params,
}); // });
return http.post("/wms/unplannedissue-request-detail/senior",params)
} }
/** /**
@ -2379,7 +2390,7 @@ export function mergePackageRecordSubmit(params) {
*/ */
export function overPackageRecordSubmit(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) 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 {*} * @param {*}
@ -2528,6 +2554,20 @@ export function getOverPageJobDetail(id) {
* 翻包任务 提交 * 翻包任务 提交
* @param {*} params * @param {*} params
*/ */
export function overPageSubmit(params) { export function overPageSubmit(data) {
return http.put("/wms/packageover-job-main/execute") 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 => { getPrecisionStrategy(itemList).then(res => {
console.log(111,res.data)
if (res.data == null) { if (res.data == null) {
result.success = false result.success = false
result.message = '未查询到管理精度信息' result.message = '未查询到管理精度信息'
} else { } else {
result.list = res.data; result.list = res.data;
} }
console.log('haha',result)
callback(result); callback(result);
}).catch(error => { }).catch(error => {
result.success = false; result.success = false;
result.message = error; result.message = error;
console.log('hehe',result)
callback(result); callback(result);
}) })
} }
@ -133,17 +136,21 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
} }
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) { export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) {
let result = { let result = {
list: [], list: [],
success: true, success: true,
message: '' message: ''
}; };
let params = { let params = {
itemCodes: [label.itemCode], itemCodes: [label.itemCode],
locationCode: locationCode locationCode: locationCode
}; };
// let jsonParem = JSON.stringify(param) // let jsonParem = JSON.stringify(param)
getManagementPrecision(params).then(res => { getManagementPrecision(params).then(res => {
console.log("成功"+res)
let managementPrecision = res.data[0].ManagementPrecision; let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) { switch (managementPrecision) {
case 'BY_PACKAGING': case 'BY_PACKAGING':
@ -172,6 +179,7 @@ export function getBalanceByManagementPrecision(label, locationCode, fromInvento
break; break;
} }
}).catch(error => { }).catch(error => {
console.log("失败"+error)
let result = { let result = {
success: false, success: false,
message: error message: error

2
src/common/calc.js

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

4
src/common/detail.js

@ -104,8 +104,10 @@ export function calcHandleQty(detailSource) {
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) { 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.handleQty = calc.add(item.handleQty, detail.handleQty);
}
item.qty = calc.add(item.qty, detail.qty); item.qty = calc.add(item.qty, detail.qty);
} }
} }

2
src/common/directory.js

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

5
src/common/record.js

@ -36,6 +36,8 @@ export function createDetailInfo(balance, pack) {
detail.packUnit = pack.packUnit detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ; detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack; detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail; return detail;
} }
@ -43,10 +45,13 @@ export function createDetailInfo(balance, pack) {
//计算实际数量 //计算实际数量
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
console.log('qqqqqqqqq')
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber();
console.log('bbbbbb')
for (let detail of item.subList) { for (let detail of item.subList) {
if(detail!=undefined){ if(detail!=undefined){
console.log(detail)
if(detail.scaned){ if(detail.scaned){
item.handleQty = calc.add(item.handleQty,detail.handleQty); 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; text-align: center;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
opacity: 0.8; opacity: 0.8;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
} }
.scan_float image { .scan_float image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-top: 10rpx;
} }
.scan_float view { .scan_float view {
color: #fff; color: #fff;
font-size: .725rem; font-size: .725rem;
margin-top: -8rpx;
} }
.top_card { .top_card {
@ -218,7 +220,9 @@ uni-page-head .uni-page-head__title {
padding: 0 0rpx; padding: 0 0rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
float: left; background:#EEF4FA;
padding:20rpx;
border-radius: 10rpx;
} }
.cell_box { .cell_box {
@ -231,6 +235,7 @@ uni-page-head .uni-page-head__title {
padding: 0 20rpx; padding: 0 20rpx;
/* margin: 0 0 20rpx; */ /* margin: 0 0 20rpx; */
text-align: center; text-align: center;
flex:1
} }
.cell_box .cell_long { .cell_box .cell_long {
@ -240,7 +245,8 @@ uni-page-head .uni-page-head__title {
.cell_box .cell_info view { .cell_box .cell_info view {
font-size: 0.9375rem; font-size: 0.9375rem;
margin-bottom: 10rpx; margin-bottom: 10rpx;
color: #7B8195; color: #515562;
word-wrap:break-word
} }
.cell_box .cell_info .text_black { .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 { .cen_card .cell_box .cell_info .text_lightblue {
font-size: 0.925rem; font-size:26rpx;
} }
.bot_card { .bot_card {
@ -1394,13 +1400,13 @@ uni-page-head .uni-page-head__title {
} }
.msg_list { .msg_list {
padding-top: 20rpx;
} }
.msg_list .uni-list-chat__header { .msg_list ::v-deep .u-card__head--left__thumb{
width: 60rpx !important; width: 60rpx !important;
height: 60rpx !important; height: 60rpx !important;
background-color: #3d7eff; padding:12rpx;
background-color: #3d7eff!important;
border-color: transparent !important; border-color: transparent !important;
border-radius: 6rpx !important; border-radius: 6rpx !important;
} }
@ -1426,9 +1432,8 @@ uni-page-head .uni-page-head__title {
.msg_list .uni-list-chat__content-title { .msg_list .uni-list-chat__content-title {
font-size: .9rem !important; font-size: .9rem !important;
} }
::v-deep .msg_list .hasread .u-card__head--left__thumb {
.msg_list .hasread .uni-list-chat__header { background-color: #ccc!important;
background-color: #ccc;
} }
/* index */ /* index */
@ -2031,9 +2036,8 @@ button::after {
} }
.card_itemCode { .card_itemCode {
font-size: 38rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
font-weight: 500;
/* padding: 5rpx 10rpx; */ /* padding: 5rpx 10rpx; */
/* width: 210rpx; */ /* width: 210rpx; */
word-wrap: break-word; word-wrap: break-word;
@ -2042,7 +2046,7 @@ button::after {
.card_itemName { .card_itemName {
color: #909399; color: #909399;
font-size: 30rpx; font-size: 26rpx;
/* padding: 5rpx 10rpx; */ /* padding: 5rpx 10rpx; */
/* width: 210rpx; */ /* width: 210rpx; */
word-wrap: break-word; word-wrap: break-word;
@ -2070,23 +2074,27 @@ button::after {
.card_content { .card_content {
font-size: 32rpx; font-size: 32rpx;
padding: 5px; color:#2E3A63;
margin-left:20rpx
} }
.card_icon_normal { .card_icon_normal {
width: 45rpx; width: 30rpx;
height: 45rpx; height: 30rpx;
vertical-align: middle vertical-align: middle;
margin-right:12rpx
} }
.card_packing_code { .card_packing_code {
color: #3315EB; color: #1677FF;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_batch { .card_batch {
color: #9747FF; color: #9747FF;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_container { .card_container {
@ -2101,23 +2109,23 @@ button::after {
} }
.card_business { .card_business {
color: #F1A532; color: #F1A532; font-size: 26rpx; font-style: italic;
padding: 5px;
} }
.card_business_content { .card_business_content {
font-size: 32rpx; font-size: 32rpx; color:#2E3A63; margin-left:20rpx
padding: 5px;
} }
.card_location { .card_location {
color: #DA8910; color: #DA8910;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_to_location { .card_to_location {
color: #329362; color: #329362;
padding: 5px; font-size: 26rpx;
font-style: italic;
} }
.card_location_content { .card_location_content {
@ -2151,12 +2159,14 @@ button::after {
.scan_view { .scan_view {
/* #0CC2B6 20% */ /* #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 { .card_view {
font-size: 32rpx; font-size: 32rpx;
padding: 5rpx; margin-top:14rpx
} }
/* /*
@ -2199,30 +2209,28 @@ button::after {
.task_top { .task_top {
margin: 0rpx 10rpx; margin: 0rpx 10rpx;
background-color: #fff; background-color: #fff;
vertical-align: middle;
} }
.task_item { .task_item {
margin: 0rpx 10rpx;
margin-top: 10rpx;
background-color: #fff; background-color: #fff;
padding:20rpx 0px
} }
.task_card { .task_card {
padding: 12rpx; padding:0px 20rpx;
background-color: #fff; background-color: #fff;
border-radius: 10rpx; border-radius: 10rpx;
margin: 12rpx;
} }
.task_number { .task_number {
font-size: 35rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
/* bold */ /* bold */
} }
.task_text { .task_text {
font-size: 30rpx; font-size: 30rpx;
margin: 5rpx 0rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -2281,21 +2289,22 @@ button::after {
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
border-radius: 8rpx 8rpx 0rpx 0rpx; border-radius: 8rpx 8rpx 0rpx 0rpx;
padding: 15rpx; padding:0px 30rpx;
} }
.pop_detail .item { .pop_detail .item {
padding-top: 5rpx; padding-top: 5rpx;
padding-bottom: 5rpx; padding-bottom: 5rpx;
margin-left: 10rpx; /* margin-left: 10rpx; */
margin-right: 10rpx; /* margin-right: 10rpx; */
display: flex; display: flex;
flex-direction: row; flex-direction: row;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
align-items:center
} }
.pop_detail .item_title { .pop_detail .item_title {
@ -2460,7 +2469,7 @@ button[disabled] {
.center { .center {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: flex-end;
align-items: center; align-items: center;
} }
@ -2473,6 +2482,7 @@ button[disabled] {
.text_recommend { .text_recommend {
color: #0A84FF; color: #0A84FF;
font-size: 38rpx; font-size: 38rpx;
font-weight:bold
} }
.text_balance { .text_balance {
@ -2506,7 +2516,7 @@ button[disabled] {
align-items: center; align-items: center;
padding: 0px; padding: 0px;
color: #909399; color: #909399;
font-size: 30rpx; font-size:26rpx;
} }
.std_uom { .std_uom {
@ -2518,7 +2528,7 @@ button[disabled] {
.uom { .uom {
color: #909399; color: #909399;
font-size: 30rpx; font-size: 26rpx;
margin-left: 5rpx; margin-left: 5rpx;
margin-right: 5rpx; margin-right: 5rpx;
display: flex; display: flex;
@ -2667,8 +2677,9 @@ button[disabled] {
align-self: stretch; align-self: stretch;
/* 颜色/白色 */ /* 颜色/白色 */
background: #FFFFFF; background:rgba(60, 156, 255, 1);
box-sizing: border-box; box-sizing: border-box;
color:white;
/* 颜色/边框 */ /* 颜色/边框 */
border: 1px solid #E7E6E4; border: 1px solid #E7E6E4;
z-index: 3; z-index: 3;
@ -2774,7 +2785,6 @@ button[disabled] {
} }
.split_line { .split_line {
background-color: #e0e0e0; background-color: rgba(230,230,230,0.5);
height: 1px; height: 1px;
margin: 10rpx;
} }

48
src/common/style/pdabasic.css

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

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

@ -3,10 +3,7 @@
<!-- 这边统一设置z-paging在页面中使用时就不用重复写 --> <!-- 这边统一设置z-paging在页面中使用时就不用重复写 -->
<!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> <!-- 如果要在这里设置极简写法这里的ref不能设置为paging设置为其他名即可因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query -->
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可与minimalism-demo.vue中的一致并且不用再从这个组件转发到页面只要遵循上一行的规则即可 --> <!-- 极简写法在下方设置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" <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': '繁体的加载中' }">
: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固定在顶部 --> <!-- 这里插入一个view到z-paging中并且这个view会被z-paging标记为top固定在顶部 -->
<template #top> <template #top>
<!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" --> <!-- 这里接收页面传进来的slot这样相当于将页面传进来的slot传给z-paging的slot="top" -->
@ -38,7 +35,7 @@
<!-- 自定义没有更多数据view --> <!-- 自定义没有更多数据view -->
<template #loadingMoreNoMore> <template #loadingMoreNoMore>
<!-- <custom-nomore></custom-nomore> --> <!-- <custom-nomore></custom-nomore> -->
<uni-load-more status="normore" /> <u-loadmore status="normore" />
</template> </template>
<!-- 这里接收页面传进来的普通slot如列表数据等 --> <!-- 这里接收页面传进来的普通slot如列表数据等 -->
@ -46,20 +43,15 @@
</z-paging> </z-paging>
</template> </template>
<script> <script setup lang="ts">
export default { import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
name: "my-paging", import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
data() {
return { const props = defineProps({
list: []
};
},
props: {
//v-modellist
value: { value: {
type: Array, type: Array,
default: function() { default() {
return []; return []
} }
}, },
// 使 // 使
@ -80,8 +72,8 @@
// innerList // innerList
innerListStyle: { innerListStyle: {
type: Object, type: Object,
default: function() { default() {
return {}; return {}
} }
}, },
// ()127celldom() // ()127celldom()
@ -98,41 +90,49 @@
virtualScrollFps: { virtualScrollFps: {
type: [Number, String], type: [Number, String],
default: 60 default: 60
}, }
}, })
watch: { const list = ref([])
const paging = ref()
// v-modez-paging // v-modez-paging
value(newVal) { watch(
this.list = newVal; () => props.value,
}, (newVal) => {
list.value = newVal
}
)
// #ifdef VUE3 // #ifdef VUE3
modelValue(newVal) { watch(
this.list = newVal; () => props.modelValue,
}, (newVal) => {
list.value = newVal
}
)
// #endif // #endif
//z-paging watch(
list(newVal) { () => list.value,
(newVal) => {
// emit inputv-model // emit inputv-model
this.$emit('input', newVal); emit('input', newVal)
// #ifdef VUE3 // #ifdef VUE3
this.$emit('update:modelValue', newVal); emit('update:modelValue', newVal)
// #endif // #endif
} }
}, )
methods: {
// z-paging@queryemit // z-paging@queryemit
queryList(pageNo, pageSize) { const queryList = (pageNo, pageSize) => {
console.log("queryList",pageNo) console.log('queryList', pageNo)
// this.$emit('query', pageNo, pageSize); // this.$emit('query', pageNo, pageSize);
}, }
// reloadz-paging // reloadz-paging
reload(data) { const reload = (data) => {
this.$refs.paging.reload(data); paging.value.reload(data)
}, }
// completez-paging // completez-paging
complete(data) { const complete = (data) => {
this.$refs.paging.complete(data); paging.value.complete(data)
}, }
/* /*
//使mixins使 //使mixins使
//updatePageScrollTopz-paging //updatePageScrollTopz-paging
@ -148,10 +148,12 @@
this.$refs.paging.doChatRecordLoadMore(); this.$refs.paging.doChatRecordLoadMore();
} }
*/ */
} //
} const emit = defineEmits(['input', 'update:modelValue'])
defineExpose({
reload,
complete
})
</script> </script>
<style> <style></style>
</style>

32
src/manifest.json

@ -47,6 +47,38 @@
/* SDK */ /* SDK */
"sdkConfigs": { "sdkConfigs": {
"ad": {} "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": {}
}
} }
} }
}, },

96
src/mycomponents/balance/balance.vue

@ -1,60 +1,37 @@
<template> <template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; "> <view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center"> <view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view> <view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> <location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> <to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
</to-location>
</view> </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" <!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> --> :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent" <qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
: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>
<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()"> <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> <image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view> </view>
</view> </view>
</view> </view>
<!-- <u-line></u-line> --> <!-- <u-line></u-line> -->
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue' import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue' import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js' import config from '@/static/config.js'
export default { const props = defineProps({
components: {
pack,
location,
toLocation,
batch,
qty,
recommendQty,
compareQty,
},
data() {
return {
}
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -82,27 +59,12 @@
isShowToLocation: { isShowToLocation: {
type: Boolean, type: Boolean,
default: false 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 const copy = () => {
// #ifndef H5 // 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({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {
@ -111,23 +73,11 @@
}) })
} }
}) })
// #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'
})
} }
) const copyPro = () => {
// #endif // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
// #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({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {
@ -136,14 +86,10 @@
}) })
} }
}) })
// #endif
},
isDevlement() {
return config.isDevelopment;
}
} }
const isDevlement = () => {
return config.isDevelopment
} }
</script> </script>
<style> <style></style>
</style>

51
src/mycomponents/balance/balanceSelect.vue

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

14
src/mycomponents/balance/batch.vue

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

31
src/mycomponents/balance/bussinessType.vue

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

42
src/mycomponents/balance/handleBalance.vue

@ -1,45 +1,29 @@
<template> <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 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> <pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch> <batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> <location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view> </view>
<view style="word-break: break-all;"> <view style="word-break: break-all">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" :isShowStatus='isShowStatus' <recommend-qty v-if="detail.record == null || detail.record == undefined" :dataContent="detail" :isShowStatus="isShowStatus" :isShowStdPack="true"></recommend-qty>
:isShowStdPack="true"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus='isShowStatus' <compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus="isShowStatus" :isShowStdPack="true"> </compare-qty>
:isShowStdPack="true">
</compare-qty>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
export default { const props = defineProps({
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: { detail: {
type: Object, type: Object,
default: {} default: {}
@ -59,15 +43,8 @@
isShowStatus: { isShowStatus: {
type: Boolean, type: Boolean,
default: true default: true
},
},
watch: {
},
methods: {
}
} }
})
</script> </script>
<style> <style>
@ -78,6 +55,5 @@
width: 10px; width: 10px;
height: 30px; height: 30px;
opacity: 1; opacity: 1;
} }
</style> </style>

16
src/mycomponents/balance/location.vue

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

29
src/mycomponents/balance/pack.vue

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

29
src/mycomponents/balance/productionLabel.vue

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

44
src/mycomponents/balance/recommendBalance.vue

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

18
src/mycomponents/balance/toLocation.vue

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

64
src/mycomponents/button/requestButton.vue

@ -4,53 +4,43 @@
<image src="@/static/icons_ui/icon_add.svg"></image> <image src="@/static/icons_ui/icon_add.svg"></image>
<view>{{btnName}}</view> <view>{{btnName}}</view>
</view> </view>
<!-- <movable-area>
<movable-view class="max" direction="all">扫描</movable-view>
</movable-area> -->
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { import {
data() { ref,
return { nextTick
x: 0, } from 'vue'
y: 0, const props = defineProps({
old: {
x: 0,
y: 0
}
}
},
props: {
btnName: { btnName: {
type: String, type: String,
default: '创建' 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
}) })
}, const x = ref(0)
onChange: function(e) { const y = ref(0)
this.old.x = e.detail.x const old= ref({
this.old.y = e.detail.y 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> </script>
<style> <style>

30
src/mycomponents/common/comBlankView.vue

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

27
src/mycomponents/common/comEmptyView.vue

@ -4,36 +4,11 @@
<view class=""> <view class="">
<image class="default_nodata" src="@/static/icons_ui/default_data.png"></image> <image class="default_nodata" src="@/static/icons_ui/default_data.png"></image>
</view> </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> </view>
</template> </template>
<script> <script setup lang="ts">
export default {
data() {
return {
}
},
created() {
},
methods: {
}
}
</script> </script>

92
src/mycomponents/common/comListItem.vue

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

210
src/mycomponents/common/comMessage.vue

@ -1,25 +1,22 @@
<template name="show-modal"> <template name="show-modal">
<view> <view>
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false" <u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
:showConfirmButton="false" ref="modal">
<view class="slot-content"> <view class="slot-content">
<slot name="icon"> <slot name="icon">
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<slot name="content"> <slot name="content">
<rich-text class="content" :nodes="content"> <rich-text class="content" :nodes="content"> </rich-text>
</rich-text>
</slot> </slot>
<view class='split_line'></view> <view class="split_line"></view>
<slot name="button"> <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"> <view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text> <text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view> </view>
<u-line direction="col" length="100%"></u-line> <u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose"> <view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose">
<text :style="{'color':confirmColor}">{{confirmText}}</text> <text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text> <text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view> </view>
</view> </view>
@ -34,10 +31,8 @@
* modal 模态框 * modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作 * @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */ * */
import { import { ref, getCurrentInstance } from 'vue'
ref,
getCurrentInstance
} from 'vue'
const timer = ref(null) const timer = ref(null)
const show = ref(false) // const show = ref(false) //
const iconType = ref('消息') const iconType = ref('消息')
@ -57,28 +52,26 @@
const cancel = ref(false) // true const cancel = ref(false) // true
const isDisabled = ref(true) // true const isDisabled = ref(true) // true
const seconds = ref(0) const seconds = ref(0)
const success = () => { const success = ref(() => {})
}
const open = () => { const open = () => {
show.value = true; show.value = true
isDisabled.value = true; isDisabled.value = true
} }
const close = () => { const close = () => {
show.value = false show.value = false
isDisabled.value = false; isDisabled.value = false
} }
const confirmClose = () => { const confirmClose = () => {
if (!isDisabled.value) return if (!isDisabled.value) return
isDisabled.value = false isDisabled.value = false
// console.log('') // console.log('')
if (show.value) { if (show.value) {
show.value = false; show.value = false
clearInterval(timer.value) // timer clearInterval(timer.value) // timer
success({ success.value({
// cancel: false, // cancel: false,
confirm: true, confirm: true
}); })
} }
} }
const cancelClose = () => { const cancelClose = () => {
@ -86,65 +79,62 @@
isDisabled.value = false isDisabled.value = false
clearInterval(timer.value) // timer clearInterval(timer.value) // timer
show.value = false show.value = false
success({ success.value({
// cancel: true, // cancel: true,
confirm: false, confirm: false
}); })
} }
// (+) // (+)
const showMessage = (mContent, callback) => { const showMessage = (mContent, callback) => {
showConfirmCountdownModal("消息", mContent, callback); showConfirmCountdownModal('消息', mContent, callback)
} }
// (+) // (+)
const showSuccessMessage = (mContent, callback) => { const showSuccessMessage = (mContent, callback) => {
showConfirmCountdownModal("成功", mContent, callback); showConfirmCountdownModal('成功', mContent, callback)
} }
// ( // (
const showErrorMessage = (mContent, callback) => { const showErrorMessage = (mContent, callback) => {
showConfirmModal('失败', mContent, callback)
console.log(333)
showConfirmModal("失败", mContent, callback);
} }
// ( // (
const showBreakMessage = (mContent, callback) => { const showBreakMessage = (mContent, callback) => {
showNoButtonModal("失败", mContent, callback); showNoButtonModal('失败', mContent, callback)
} }
// (+ // (+
const showQuestionMessage = (mContent, callback) => { const showQuestionMessage = (mContent, callback) => {
showSelectModal("疑问", mContent, callback); showSelectModal('疑问', mContent, callback)
} }
// (+) // (+)
const showWarningMessage = (mContent, callback) => { const showWarningMessage = (mContent, callback) => {
showConfirmCountdownModal("警告", mContent, callback); showConfirmCountdownModal('警告', mContent, callback)
} }
// (+) // (+)
const showConfirmCountdownFailModal = (mContent, callback) => { const showConfirmCountdownFailModal = (mContent, callback) => {
showConfirmCountdownModal("失败", mContent, callback); showConfirmCountdownModal('失败', mContent, callback)
} }
// ( // (
const showConfirmMessageModal = (mContent, callback) => { const showConfirmMessageModal = (mContent, callback) => {
showConfirmModal("消息", mContent, callback); showConfirmModal('消息', mContent, callback)
} }
// ( // (
const showConfirmSuccessModall = (mContent, callback) => { const showConfirmSuccessModall = (mContent, callback) => {
showConfirmModal("成功", mContent, callback); showConfirmModal('成功', mContent, callback)
} }
// ( // (
const showConfirmWarningModal = (mContent, callback) => { const showConfirmWarningModal = (mContent, callback) => {
showConfirmModal("警告", mContent, callback); showConfirmModal('警告', mContent, callback)
} }
// ( // (
const showConfirmQuestionModal = (mContent, callback) => { const showConfirmQuestionModal = (mContent, callback) => {
showConfirmModal("疑问", mContent, callback); showConfirmModal('疑问', mContent, callback)
} }
// ( // (
@ -154,56 +144,55 @@
content: mContent, content: mContent,
showConfirmButton: false, showConfirmButton: false,
showCancelButton: false, showCancelButton: false,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
} else { } else {
callback(false); callback(false)
} }
} }
} }
}); })
} }
// ( // (
const showConfirmModal = (mIconType, mContent, callback) => { const showConfirmModal = (mIconType, mContent, callback) => {
console.log(222) console.log(11)
showModal({ showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
success: function(res) { success(res) {
console.log(11, res)
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
} else { } else {
callback(false); callback(false)
} }
} }
} }
}); })
} }
// (+ // (+
const showSelectMessageModal = (mContent, callback) => { const showSelectMessageModal = (mContent, callback) => {
showSelectModal("消息", mContent, callback); showSelectModal('消息', mContent, callback)
} }
// (+ // (+
const showSelectSuccessModal = (mContent, callback) => { const showSelectSuccessModal = (mContent, callback) => {
showSelectModal("成功", mContent, callback); showSelectModal('成功', mContent, callback)
} }
// (+ // (+
const showSelectFailModal = (mContent, callback) => { const showSelectFailModal = (mContent, callback) => {
showSelectModal("失败", mContent, callback); showSelectModal('失败', mContent, callback)
} }
// (+ // (+
const showSelectWarningModal = (mContent, callback) => { const showSelectWarningModal = (mContent, callback) => {
showSelectModal("警告", mContent, callback); showSelectModal('警告', mContent, callback)
} }
// (+ // (+
@ -211,24 +200,23 @@
showModal({ showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
} }
// (+) // (+)
const showConfirmCountdownQuestionModal = (mContent, callback) => { const showConfirmCountdownQuestionModal = (mContent, callback) => {
showConfirmCountdownModal("疑问", mContent, callback); showConfirmCountdownModal('疑问', mContent, callback)
} }
// (+) // (+)
@ -238,41 +226,41 @@
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
} else { } else {
callback(false); callback(false)
} }
} }
} }
}); })
} }
// (++) // (++)
const showSelectCountdownMessageModal = (mContent, callback) => { const showSelectCountdownMessageModal = (mContent, callback) => {
showSelectCountdownModal("消息", mContent, callback); showSelectCountdownModal('消息', mContent, callback)
} }
// (++) // (++)
const showSelectCountdownSuccessModal = (mContent, callback) => { const showSelectCountdownSuccessModal = (mContent, callback) => {
showSelectCountdownModal("成功", mContent, callback); showSelectCountdownModal('成功', mContent, callback)
} }
// (++) // (++)
const showSelectCountdownFailModal = (mContent, callback) => { const showSelectCountdownFailModal = (mContent, callback) => {
showSelectCountdownModal("失败", mContent, callback); showSelectCountdownModal('失败', mContent, callback)
} }
// (++) // (++)
const showSelectCountdownWarningModal = (mContent, callback) => { const showSelectCountdownWarningModal = (mContent, callback) => {
showSelectCountdownModal("警告", mContent, callback); showSelectCountdownModal('警告', mContent, callback)
} }
// (++) // (++)
const showSelectCountdownQuestionModal = (mContent, callback) => { const showSelectCountdownQuestionModal = (mContent, callback) => {
showSelectCountdownModal("疑问", mContent, callback); showSelectCountdownModal('疑问', mContent, callback)
} }
// (++) // (++)
@ -281,18 +269,18 @@
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
} }
// //
@ -301,22 +289,22 @@
iconType.value = data.iconType iconType.value = data.iconType
switch (data.iconType) { switch (data.iconType) {
case '消息': case '消息':
icon.value = '/static/icons/error-circle.svg'; icon.value = '/static/icons/error-circle.svg'
break; break
case '成功': case '成功':
icon.value = '/static/icons/checkmark-circle.svg'; icon.value = '/static/icons/checkmark-circle.svg'
break; break
case '失败': case '失败':
icon.value = '/static/icons/close-circle.svg'; icon.value = '/static/icons/close-circle.svg'
break; break
case '警告': case '警告':
icon.value = '/static/icons/warning.svg'; icon.value = '/static/icons/warning.svg'
break; break
case '疑问': case '疑问':
icon.value = '/static/icons/question-circle.svg'; icon.value = '/static/icons/question-circle.svg'
break; break
default: default:
break; break
} }
} }
// image // image
@ -374,41 +362,65 @@
} else { } else {
showCancelButton.value = true showCancelButton.value = true
} }
if (data.success) { if (data.success) {
success = data.success success.value = data.success
} else { } else {
success = () => {} success.value = () => {}
} }
setTimeout(res => { setTimeout((res) => {
open(); open()
}, 500) }, 500)
if (showConfirmCountdown.value) { if (showConfirmCountdown.value) {
startTimer(); startTimer()
} }
} }
const startTimer = () => { const startTimer = () => {
seconds.value = 3; seconds.value = 3
clearInterval(timer.value) clearInterval(timer.value)
timer.value = setInterval(() => { timer.value = setInterval(() => {
seconds.value-- seconds.value--
// console.log("", this.seconds); // console.log("", this.seconds);
if (seconds.value <= 0) { if (seconds.value <= 0) {
timeUp() timeUp()
return
} }
}, 1000) }, 1000)
} }
const timeUp = () => { const timeUp = () => {
// clearInterval(this.timer) // clearInterval(this.timer)
console.log('时间到') confirmClose()
confirmClose(); }
} defineExpose({
defineExpose({ showErrorMessage }) // open 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.slot-content { .slot-content {

25
src/mycomponents/common/comPopup.vue

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

75
src/mycomponents/container/targetContainer.vue

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

202
src/mycomponents/detail/comDetailCard.vue

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

200
src/mycomponents/detail/comJobDetailCard.vue

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

189
src/mycomponents/detail/comRequestDetailCard.vue

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

30
src/mycomponents/detail/detailBalanceInfo.vue

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

55
src/mycomponents/detail/detailCommonInfo.vue

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

21
src/mycomponents/detail/detailHandleInfo.vue

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

23
src/mycomponents/detail/detailItemInfo.vue

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

24
src/mycomponents/detail/detailPackageInfo.vue

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

29
src/mycomponents/detail/detailRecommendInfo.vue

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

69
src/mycomponents/detail/jobDetailPopup.vue

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

48
src/mycomponents/detail/recordDetailCommonInfo.vue

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

63
src/mycomponents/detail/recordDetailPopup.vue

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

48
src/mycomponents/detail/requestDetailCommonInfo.vue

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

34
src/mycomponents/item/item.vue

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

46
src/mycomponents/item/itemCompareQty.vue

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

43
src/mycomponents/item/itemInfo.vue

@ -1,15 +1,15 @@
<!--包装组件--> <!--包装组件-->
<template> <template>
<view class=""> <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>
<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 }} {{ itemdetail.code }}
</view> </view>
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx">
{{ itemdetail.name }} {{ itemdetail.name }}
</view> </view>
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx">
{{ itemdetail.desc1 }} {{ itemdetail.desc1 }}
{{ itemdetail.desc2 }} {{ itemdetail.desc2 }}
</view> </view>
@ -21,38 +21,23 @@
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup> <itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import itemStatus from '@/mycomponents/item/itemStatus.vue'; import { ref } from 'vue'
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue'; import itemStatus from '@/mycomponents/item/itemStatus.vue'
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue'
export default {
name: "comItem",
components: {
itemInfoPopup,
itemStatus
},
data() {
return {
}; const props = defineProps({
},
//
props: {
itemdetail: { itemdetail: {
type: Object, type: Object,
value: null value: null
} }
}, })
methods: { const showHint = ref()
showHint() { const handleShowHint = () => {
this.$refs.showHint.openScanPopup() showHint.value.openScanPopup()
}
}
} }
</script> </script>
<style> <style></style>
</style>

114
src/mycomponents/item/itemInfoPopup.vue

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

36
src/mycomponents/item/itemQty.vue

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

26
src/mycomponents/job/jobBottom.vue

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

21
src/mycomponents/job/jobComMainCard.vue

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

27
src/mycomponents/job/jobComMainCardAsn.vue

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

56
src/mycomponents/job/jobComMainDetailCard.vue

@ -1,25 +1,24 @@
<template> <template>
<view class="task_item"> <view class="">
<view class="task_text" style="border-top: 1px solid #dedede;padding-top: 20rpx;margin-top: 20rpx;"> <view class="task_text" style="border-top: 1px solid #dedede; padding-top: 20rpx">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" :objTextStyle="{ fontWeight: 'bold', fontSize: '40rpx' }"></itemCompareQty>
:objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}"></itemCompareQty> <div>
<div class="u-p-l-10"> <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> <batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between"> <div class="u-flex justify-between u-p-b-16">
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> <location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
</location> <to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> </to-location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
</div> </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> </div>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue' import toLocation from '@/mycomponents/balance/toLocation.vue'
@ -27,20 +26,7 @@
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
export default { const props = defineProps({
components: {
pack,
location,
toLocation,
batch,
jobComMainCard,
itemCompareQty,
},
data() {
return {};
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -65,15 +51,11 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
}, isShowDeliverType: {
type: Boolean,
default: false
methods: {
}
} }
})
</script> </script>
<style lang="scss"> <style lang="scss"></style>
</style>

48
src/mycomponents/job/jobCommonInfo.vue

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

73
src/mycomponents/job/jobDetailPopup.vue

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

215
src/mycomponents/job/jobFilter.vue

@ -1,54 +1,46 @@
<template> <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="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center" <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">
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="uni-flex space-between u-col-center" style="width: 100%;"> <view class="" style="font-size: 32rpx"> 只看当天 </view>
<view class="" style="font-size: 32rpx;">
只看当天
</view>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch> <u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch>
</view> </view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> <view class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx">
<view class="" style="font-size: 32rpx"> 只看待处理 </view>
<view class="" style="font-size: 32rpx;">
只看待处理
</view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch> <u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch>
</view> </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="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn"> <view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after" <button class="filter_button" hover-class="filter_button_after" @click="scanOtherClick">扫描ASN单号</button>
@click="scanOtherClick">扫描ASN单号</button>
</view> </view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx;"> <view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowJob">
<button class="filter_button" hover-class="filter_button_after" <button class="filter_button" hover-class="filter_button_after" @click="scanNumberClick">扫描任务编号</button>
@click="scanNumberClick">扫描任务编号</button>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </u-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number> <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> <win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode="getScanAsNumber"></win-scan-asn-number>
</template> </template>
<script> <script setup lang="ts">
import { import { ref, getCurrentInstance, watch } from 'vue'
getTodayDate import { getTodayDate } from '@/common/basic.js'
} from '@/common/basic.js';
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue"
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default { import winScanJobNumber from '@/mycomponents/scan/winScanJobNumber.vue'
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"], import winScanAsnNumber from '@/mycomponents/scan/winScanAsnNumber.vue'
components: {
winScanJobNumber,
winScanAsnNumber
},
props: { const props = defineProps({
checkedToday: { checkedToday: {
type: Boolean, type: Boolean,
default: false default: false
@ -59,89 +51,104 @@
}, },
otherTitle: { otherTitle: {
type: String, type: String,
default: "" default: ''
}, },
isShowAsn: { isShowAsn: {
type: Boolean, type: Boolean,
default: false default: false
}
},
data() {
return {
dataContent: {},
checkedTodayModel:false,
checkedWaitModel:false,
}
},
watch: {
checkedToday: {
handler(newName, oldName) {
this.checkedTodayModel = this.checkedToday
}, },
immediate: true, isShowJob: {
deep: true type: Boolean,
default: true
}, },
checkedWaitTask: { isShowFromLocationCode: {
handler(newName, oldName) { type: Boolean,
this.checkedWaitModel = this.checkedWaitTask default: false
}, },
immediate: true, isShowProductionLineCode: {
deep: true type: Boolean,
default: false
}
})
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 }
)
// 线
const productionLineCodeConfirm = () => {
emit('productionLineCode', productionLineCode.value)
}
//
const fromLocationCodeConfirm = () => {
emit('fromLocationCode', fromLocationCode.value)
} }
},
mounted() {
},
methods: {
// //
maskClick() { const maskClick = () => {
// //
this.closeScanPopup(); closeScanPopup()
}, }
openFilter() { const openFilter = () => {
this.$refs['popup'].open("right"); show.value = true
}, }
closeScanPopup() { const closeScanPopup = () => {
this.$refs.popup.close() show.value = false
}, }
switchChangeToday(isOn) { const switchChangeToday = (isOn) => {
let creationTime = ''
let creationTime = '';
if (isOn) { if (isOn) {
creationTime = getTodayDate(); creationTime = getTodayDate()
} }
emit('switchChangeToday', isOn, creationTime)
this.$emit("switchChangeToday", isOn, creationTime) closeScanPopup()
this.closeScanPopup() }
}, const switchChangeWait = (isOn) => {
switchChangeWait(isOn) { let status = '1,2'
let status = "1,2";
if (isOn) { if (isOn) {
status="1" status = '1'
} }
this.$emit("switchChangeWait", isOn, status) emit('switchChangeWait', isOn, status)
this.closeScanPopup() closeScanPopup()
},
scanNumberClick() {
this.$refs.scanNumber.openScanPopup();
},
scanOtherClick() {
this.$refs.scanAsnNumber.openScanPopup();
},
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 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> </script>
<style lang="scss"> <style lang="scss">
.maskbox { .maskbox {
@ -152,4 +159,8 @@
height: 100vh; height: 100vh;
z-index: 0; z-index: 0;
} }
::v-deep .u-drawer-right {
background-color: rgba(0, 0, 0, 0) !important;
}
</style> </style>

20
src/mycomponents/job/jobNumber.vue

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

27
src/mycomponents/job/jobPersonInfo.vue

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

62
src/mycomponents/job/jobRequestInfo.vue

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

23
src/mycomponents/job/jobSettingInfo.vue

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

32
src/mycomponents/job/jobStatus.vue

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

31
src/mycomponents/job/jobTop.vue

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

32
src/mycomponents/job/jobTopAsn.vue

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

29
src/mycomponents/location/location.vue

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

114
src/mycomponents/location/locationCompare.vue

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

26
src/mycomponents/location/locationDetail.vue

@ -1,5 +1,5 @@
<template> <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_box uni-flex uni-row">
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">仓库</view> <view class="text_lightblue">仓库</view>
@ -21,27 +21,15 @@
</view> </view>
</template> </template>
<script> <script setup lang="ts">
export default { import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue'
name: 'comItemLocationCenter',
components: {}, const props = defineProps({
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
} }
}, })
data() {
return {}
},
created() {
},
methods: {
}
}
</script> </script>
<style> <style></style>
</style>

33
src/mycomponents/location/locationInfo.vue

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

42
src/mycomponents/location/locationStatus.vue

@ -1,46 +1,30 @@
<template> <template>
<view class=""> <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> </view>
</template> </template>
<script> <script setup lang="ts">
import { import { getLocationTypeInfo } from '@/common/directory.js'
getLocationTypeInfo
} from '@/common/directory.js';
export default {
components: {
}, const props = defineProps({
data() {
return {
};
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {}, default: {}
}, },
type: { type: {
type: String, type: String,
default: "", default: ''
}, }
}, })
methods: { const statusDesc = (code) => {
statusDesc(code) {
return getLocationTypeInfo(code).label return getLocationTypeInfo(code).label
},
statusStyle(code) {
return getLocationTypeInfo(code).remark;
},
} }
const statusStyle = (code) => {
return getLocationTypeInfo(code).remark
} }
</script> </script>
<style> <style></style>
</style>

74
src/mycomponents/location/requiredLocation.vue

@ -1,43 +1,30 @@
<template> <template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx; <view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
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="uni-flex uni-row u-col-center" @click="showLocation">
<view> <view style="font-size: 30rpx">
{{ title }} {{ title }}
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> --> <!-- <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: 25rpx; 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">&nbsp {{ locationCode }}</text>
</view> </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> </view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import { ref } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default { const props = defineProps({
components: {
winScanLocation
},
data() {
return {
defaultlocationCode: ""
}
},
props: {
title: { title: {
type: String, type: String,
default: "需求库位" default: '需求库位'
}, },
locationCode: { locationCode: {
type: String, type: String,
default: "" default: ''
}, },
isShowEdit: { isShowEdit: {
type: Boolean, type: Boolean,
@ -47,33 +34,20 @@
type: Array, type: Array,
default: null default: null
} }
}, })
const scanLocationCode = ref()
watch: { const showLocation = () => {
// locationCode: { if (props.isShowEdit) {
// handler(newName, oldName) { scanLocationCode.value.openScanPopup()
// if (this.locationCode != "") {
// this.defaultlocationCode = this.locationCode;
// }
// },
// immediate: true,
// deep: true
// }
},
methods: {
showLocation() {
if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup();
}
},
//
getLocation(location, code) {
this.$emit("getLocation", location, code)
} }
} }
//
const getLocation = (location, code) => {
emit('getLocation', location, code)
} }
//
const emit = defineEmits(['getLocation'])
</script> </script>
<style> <style></style>
</style>

89
src/mycomponents/package/packageCard.vue

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

305
src/mycomponents/package/packageDetailPopup.vue

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

198
src/mycomponents/package/packageList.vue

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

89
src/mycomponents/package/packageRecordCard.vue

@ -6,7 +6,8 @@
<view style="word-break: break-all;"> <view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber"> <!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> --> </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> <batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> <location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location> </location>
@ -15,21 +16,22 @@
</to-location> </to-location>
</view> </view>
<view class="uni-flex uni-row" style="word-break: break-all;"> <view class="uni-flex uni-row" style="word-break: break-all;">
<qty v-if="true" :dataContent="dataContent" <qty v-if="true" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus">
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> </qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowPack="isShowPack"> :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowPack="isShowPack">
</compare-qty> </compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> <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>
</view> </view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import qty from '@/mycomponents/qty/qty.vue' import qty from '@/mycomponents/qty/qty.vue'
import container from '@/mycomponents/container/container.vue' import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
@ -40,26 +42,7 @@
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js' import config from '@/static/config.js'
import balanceQty from '@/mycomponents/qty/balanceQty.vue' import balanceQty from '@/mycomponents/qty/balanceQty.vue'
const props = defineProps({
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty,
balanceQty,
qty
},
data() {
return {
}
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -100,28 +83,13 @@
showPack: { showPack: {
type: Boolean, type: Boolean,
default: false 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 const copy = () => {
// #ifndef H5 // 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({ uni.setClipboardData({
data: content, data: content,
success: () => { 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'
})
} }
) const copyPro = () => {
// #endif // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
// #ifndef H5 var content = "HMQ;V1.0;I" + props.dataContent.itemCode + ";P" + props.dataContent.packingNumber + ";B" + props.dataContent
.batch + ";Q" + props.dataContent.qty
uni.setClipboardData({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {
@ -155,12 +112,10 @@
}) })
} }
}) })
// #endif
},
isDevlement() {
return config.isDevelopment;
}
} }
const isDevlement = () => {
return config.isDevelopment;
} }
</script> </script>

154
src/mycomponents/package/packageRecordList.vue

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

56
src/mycomponents/package/packageTarget.vue

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

124
src/mycomponents/popup/selectList.vue

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

34
src/mycomponents/production/productionInfo.vue

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

30
src/mycomponents/qty/balanceQty.vue

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

219
src/mycomponents/qty/balanceQtyEdit.vue

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

45
src/mycomponents/qty/compareQty.vue

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

279
src/mycomponents/qty/countQtyEdit.vue

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

20
src/mycomponents/qty/packQty.vue

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

27
src/mycomponents/qty/packUnit.vue

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

32
src/mycomponents/qty/qty.vue

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

34
src/mycomponents/qty/recommendQty.vue

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

236
src/mycomponents/qty/recommendQtyEdit.vue

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

20
src/mycomponents/qty/stdUom.vue

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

20
src/mycomponents/qty/uom.vue

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

102
src/mycomponents/recommend/recommend.vue

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

89
src/mycomponents/recommend/recommendCount.vue

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

46
src/mycomponents/record/record.vue

@ -7,20 +7,16 @@
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location> <location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view> </view>
<view> <view>
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" <qty v-if="dataContent.record == null || dataContent.record == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack"></qty>
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
</compare-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" :handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </compare-qty>
</view> </view>
</view> </view>
<view class='split_line'></view> <view class="split_line"></view>
</view> </view>
</template> </template>
<script> <script setup lang="ts">
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
@ -29,23 +25,7 @@
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue' import bussinessType from '@/mycomponents/balance/bussinessType.vue'
export default { const props = defineProps({
components: {
pack,
location,
batch,
qty,
recommendQty,
compareQty,
bussinessType,
},
data() {
return {
}
},
props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: {}
@ -76,21 +56,13 @@
}, },
fromInventoryStatus: { fromInventoryStatus: {
type: String, type: String,
default: "" default: ''
}, },
toInventoryStatus: { toInventoryStatus: {
type: String, type: String,
default: "" default: ''
},
},
watch: {
},
methods: {
}
} }
})
</script> </script>
<style> <style></style>
</style>

217
src/mycomponents/record/recordComDetailCard.vue

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

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

Loading…
Cancel
Save