zhang_li
6 months ago
811 changed files with 58887 additions and 113650 deletions
@ -1,4 +1,10 @@ |
|||
#VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api |
|||
#VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api |
|||
|
|||
VITE_BASE_URL=http://localhost:12080/admin-api |
|||
#VITE_BASE_URL=http://dev.ccwin-in.com:25203/api/admin-api |
|||
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api |
|||
VITE_BASE_URL=http://localhost:12080/admin-api
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' |
|||
|
|||
# 是否是测试环境 |
|||
VITE_isDevelopment=true |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' |
@ -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' |
@ -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' |
@ -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' |
@ -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' |
@ -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' |
@ -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' |
@ -1,4 +1,7 @@ |
|||
# VITE_BASE_URL=http://dev.ccwin-in.com:23111/app |
|||
# VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:23111 |
|||
VITE_BASE_URL=https://tmsapp.hongxianggroup.com.cn |
|||
VITE_BASE_URL_IMAGE=https://tmsapp.hongxianggroup.com.cn |
|||
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"长春","value":1},{"text":"成都","value":2}]' |
|||
|
|||
# 是否是测试环境 |
|||
VITE_isDevelopment=false |
|||
|
|||
# 积木报表请求路径 |
|||
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
|||
|
@ -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' |
|||
|
@ -1,157 +1,159 @@ |
|||
<!-- 基于z-paging封装个性化分页组件演示,可减少大量重复代码 --> |
|||
<template> |
|||
<!-- 这边统一设置z-paging,在页面中使用时就不用重复写 --> |
|||
<!-- 如果要在这里设置极简写法,这里的ref不能设置为paging,设置为其他名即可,因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> |
|||
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可,与minimalism-demo.vue中的一致,并且不用再从这个组件转发到页面,只要遵循上一行的规则即可 --> |
|||
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" |
|||
:useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" |
|||
:loading-more-loading-text="{'en':'英文的加载中','zh-cn':'中文的加载中','zh-hant-cn':'繁体的加载中'}"> |
|||
<!-- 这边统一设置z-paging,在页面中使用时就不用重复写 --> |
|||
<!-- 如果要在这里设置极简写法,这里的ref不能设置为paging,设置为其他名即可,因为极简写法会修改/调用第一个包含了ref="paging"的付view中的list和query --> |
|||
<!-- 极简写法在下方设置autowire-list-name="xxx" autowire-query-name="xxx"即可,与minimalism-demo.vue中的一致,并且不用再从这个组件转发到页面,只要遵循上一行的规则即可 --> |
|||
<z-paging ref="paging" v-model="list" fixed auto-show-back-to-top refresher-threshold="160rpx" @query="queryList" :useVirtualList="useVirtualList" :useInnerList="useInnerList" :cellKeyName="cellKeyName" :innerListStyle="innerListStyle" :preloadPage="preloadPage" :cellHeightMode="cellHeightMode" :virtualScrollFps="virtualScrollFps" :loading-more-loading-text="{ en: '英文的加载中', 'zh-cn': '中文的加载中', 'zh-hant-cn': '繁体的加载中' }"> |
|||
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为top固定在顶部 --> |
|||
<template #top> |
|||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="top"了 --> |
|||
<slot name="top" /> |
|||
</template> |
|||
|
|||
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为top固定在顶部 --> |
|||
<template #top> |
|||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="top"了 --> |
|||
<slot name="top" /> |
|||
</template> |
|||
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为bottom固定在顶部 --> |
|||
<!-- vue3中用v-slot:bottom --> |
|||
<template #bottom> |
|||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="bottom"了 --> |
|||
<slot name="bottom" /> |
|||
</template> |
|||
|
|||
<!-- 这里插入一个view到z-paging中,并且这个view会被z-paging标记为bottom固定在顶部 --> |
|||
<!-- vue3中用v-slot:bottom --> |
|||
<template #bottom> |
|||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="bottom"了 --> |
|||
<slot name="bottom" /> |
|||
</template> |
|||
<template #empty v-if="$slots.empty"> |
|||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="empty"了 --> |
|||
<slot name="empty" /> |
|||
</template> |
|||
|
|||
<template #empty v-if="$slots.empty" > |
|||
<!-- 这里接收页面传进来的slot,这样相当于将页面传进来的slot传给z-paging的slot="empty"了 --> |
|||
<slot name="empty" /> |
|||
</template> |
|||
<!-- 这个是插入虚拟列表/内置列表的cell --> |
|||
<template #cell="{ item, index }"> |
|||
<slot name="cell" :item="item" :index="index" /> |
|||
</template> |
|||
|
|||
<!-- 这个是插入虚拟列表/内置列表的cell --> |
|||
<template #cell="{item,index}"> |
|||
<slot name="cell" :item="item" :index="index"/> |
|||
</template> |
|||
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view,页面那边就不用再写下面两行了 --> |
|||
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher",此时不用获取refresherStatus,会自动使用z-paging自带的下拉刷新view) --> |
|||
<template #refresher="{ refresherStatus }"> |
|||
<!-- <custom-refresher :status="refresherStatus" /> --> |
|||
</template> |
|||
<!-- 自定义没有更多数据view --> |
|||
<template #loadingMoreNoMore> |
|||
<!-- <custom-nomore></custom-nomore> --> |
|||
<u-loadmore status="normore" /> |
|||
</template> |
|||
|
|||
<!-- 这里通过slot统一自定义了下拉刷新view和没有更多数据view,页面那边就不用再写下面两行了 --> |
|||
<!-- 自定义下拉刷新view(如果use-custom-refresher为true且不设置下面的slot="refresher",此时不用获取refresherStatus,会自动使用z-paging自带的下拉刷新view) --> |
|||
<template #refresher="{refresherStatus}"> |
|||
<!-- <custom-refresher :status="refresherStatus" /> --> |
|||
</template> |
|||
<!-- 自定义没有更多数据view --> |
|||
<template #loadingMoreNoMore> |
|||
<!-- <custom-nomore></custom-nomore> --> |
|||
<uni-load-more status="normore" /> |
|||
</template> |
|||
|
|||
<!-- 这里接收页面传进来的普通slot,如列表数据等 --> |
|||
<slot /> |
|||
</z-paging> |
|||
<!-- 这里接收页面传进来的普通slot,如列表数据等 --> |
|||
<slot /> |
|||
</z-paging> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "my-paging", |
|||
data() { |
|||
return { |
|||
list: [] |
|||
}; |
|||
}, |
|||
props: { |
|||
//用于接收父组件v-model所绑定的list的值 |
|||
value: { |
|||
type: Array, |
|||
default: function() { |
|||
return []; |
|||
} |
|||
}, |
|||
//是否使用虚拟列表,默认为否 |
|||
useVirtualList: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
//是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true |
|||
useInnerList: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
//内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 |
|||
cellKeyName: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
//innerList样式 |
|||
innerListStyle: { |
|||
type: Object, |
|||
default: function() { |
|||
return {}; |
|||
} |
|||
}, |
|||
//预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各7页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 |
|||
preloadPage: { |
|||
type: [Number, String], |
|||
default: 12 |
|||
}, |
|||
//虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 |
|||
cellHeightMode: { |
|||
type: String, |
|||
default: 'fixed' |
|||
}, |
|||
//虚拟列表scroll取样帧率,默认为60,过高可能出现卡顿等问题 |
|||
virtualScrollFps: { |
|||
type: [Number, String], |
|||
default: 60 |
|||
}, |
|||
}, |
|||
watch: { |
|||
//监听页面v-mode传过来的值,同时传给z-paging |
|||
value(newVal) { |
|||
this.list = newVal; |
|||
}, |
|||
// #ifdef VUE3 |
|||
modelValue(newVal) { |
|||
this.list = newVal; |
|||
}, |
|||
// #endif |
|||
//监听z-paging给当前组件的值,同时传给页面 |
|||
list(newVal) { |
|||
//通过emit input修改页面中v-model绑定的值 |
|||
this.$emit('input', newVal); |
|||
// #ifdef VUE3 |
|||
this.$emit('update:modelValue', newVal); |
|||
// #endif |
|||
} |
|||
}, |
|||
methods: { |
|||
//监听z-paging的@query方法,通过emit传递给页面 |
|||
queryList(pageNo, pageSize) { |
|||
console.log("queryList",pageNo) |
|||
// this.$emit('query', pageNo, pageSize); |
|||
}, |
|||
//接收页面触发的reload方法,传给z-paging |
|||
reload(data) { |
|||
this.$refs.paging.reload(data); |
|||
}, |
|||
//接收页面触发的complete方法,传给z-paging |
|||
complete(data) { |
|||
this.$refs.paging.complete(data); |
|||
}, |
|||
/* |
|||
//如果是使用页面滚动,则需要添加以下三行,注意页面那边要引入mixins,与使用页面滚动示例写法相同。 |
|||
//接收页面触发的updatePageScrollTop方法,传给z-paging |
|||
updatePageScrollTop(data){ |
|||
this.$refs.paging.updatePageScrollTop(data); |
|||
}, |
|||
//接收页面触发的pageReachBottom方法,传给z-paging |
|||
pageReachBottom(){ |
|||
this.$refs.paging.pageReachBottom(); |
|||
}, |
|||
//接收页面触发的doChatRecordLoadMore方法,传给z-paging |
|||
doChatRecordLoadMore() { |
|||
this.$refs.paging.doChatRecordLoadMore(); |
|||
} |
|||
*/ |
|||
} |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
|||
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|||
|
|||
const props = defineProps({ |
|||
value: { |
|||
type: Array, |
|||
default() { |
|||
return [] |
|||
} |
|||
}, |
|||
// 是否使用虚拟列表,默认为否 |
|||
useVirtualList: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true |
|||
useInnerList: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
// 内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 |
|||
cellKeyName: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
// innerList样式 |
|||
innerListStyle: { |
|||
type: Object, |
|||
default() { |
|||
return {} |
|||
} |
|||
}, |
|||
// 预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各7页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 |
|||
preloadPage: { |
|||
type: [Number, String], |
|||
default: 12 |
|||
}, |
|||
// 虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 |
|||
cellHeightMode: { |
|||
type: String, |
|||
default: 'fixed' |
|||
}, |
|||
// 虚拟列表scroll取样帧率,默认为60,过高可能出现卡顿等问题 |
|||
virtualScrollFps: { |
|||
type: [Number, String], |
|||
default: 60 |
|||
} |
|||
}) |
|||
const list = ref([]) |
|||
const paging = ref() |
|||
// 监听页面v-mode传过来的值,同时传给z-paging |
|||
watch( |
|||
() => props.value, |
|||
(newVal) => { |
|||
list.value = newVal |
|||
} |
|||
) |
|||
// #ifdef VUE3 |
|||
watch( |
|||
() => props.modelValue, |
|||
(newVal) => { |
|||
list.value = newVal |
|||
} |
|||
) |
|||
// #endif |
|||
watch( |
|||
() => list.value, |
|||
(newVal) => { |
|||
// 通过emit input修改页面中v-model绑定的值 |
|||
emit('input', newVal) |
|||
// #ifdef VUE3 |
|||
emit('update:modelValue', newVal) |
|||
// #endif |
|||
} |
|||
) |
|||
|
|||
// 监听z-paging的@query方法,通过emit传递给页面 |
|||
const queryList = (pageNo, pageSize) => { |
|||
console.log('queryList', pageNo) |
|||
// this.$emit('query', pageNo, pageSize); |
|||
} |
|||
// 接收页面触发的reload方法,传给z-paging |
|||
const reload = (data) => { |
|||
paging.value.reload(data) |
|||
} |
|||
// 接收页面触发的complete方法,传给z-paging |
|||
const complete = (data) => { |
|||
paging.value.complete(data) |
|||
} |
|||
/* |
|||
//如果是使用页面滚动,则需要添加以下三行,注意页面那边要引入mixins,与使用页面滚动示例写法相同。 |
|||
//接收页面触发的updatePageScrollTop方法,传给z-paging |
|||
updatePageScrollTop(data){ |
|||
this.$refs.paging.updatePageScrollTop(data); |
|||
}, |
|||
//接收页面触发的pageReachBottom方法,传给z-paging |
|||
pageReachBottom(){ |
|||
this.$refs.paging.pageReachBottom(); |
|||
}, |
|||
//接收页面触发的doChatRecordLoadMore方法,传给z-paging |
|||
doChatRecordLoadMore() { |
|||
this.$refs.paging.doChatRecordLoadMore(); |
|||
} |
|||
*/ |
|||
// 传递给父类 |
|||
const emit = defineEmits(['input', 'update:modelValue']) |
|||
defineExpose({ |
|||
reload, |
|||
complete |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,82 +1,114 @@ |
|||
{ |
|||
"name" : "富维汽车镜", |
|||
"appid" : "__UNI__DA78BC9", |
|||
"description" : "", |
|||
"versionName" : "1.0.0", |
|||
"versionCode" : "100", |
|||
"transformPx" : false, |
|||
/* 5+App特有相关 */ |
|||
"app-plus" : { |
|||
"usingComponents" : true, |
|||
"nvueStyleCompiler" : "uni-app", |
|||
"compilerVersion" : 3, |
|||
"splashscreen" : { |
|||
"alwaysShowBeforeRender" : true, |
|||
"waiting" : true, |
|||
"autoclose" : true, |
|||
"delay" : 0 |
|||
}, |
|||
/* 模块配置 */ |
|||
"modules" : {}, |
|||
/* 应用发布信息 */ |
|||
"distribute" : { |
|||
/* android打包配置 */ |
|||
"android" : { |
|||
"permissions" : [ |
|||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
|||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
|||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
|||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
|||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
|||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
|||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
|||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
|||
"<uses-feature android:name=\"android.hardware.camera\"/>", |
|||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
|||
] |
|||
}, |
|||
/* ios打包配置 */ |
|||
"ios" : { |
|||
"dSYMs" : false |
|||
}, |
|||
/* SDK配置 */ |
|||
"sdkConfigs" : { |
|||
"ad" : {} |
|||
} |
|||
} |
|||
}, |
|||
/* 快应用特有相关 */ |
|||
"quickapp" : {}, |
|||
/* 小程序特有相关 */ |
|||
"mp-weixin" : { |
|||
"appid" : "wx6176535b0b0153f0", |
|||
"setting" : { |
|||
"urlCheck" : false |
|||
}, |
|||
"usingComponents" : true |
|||
}, |
|||
"mp-alipay" : { |
|||
"usingComponents" : true |
|||
}, |
|||
"mp-baidu" : { |
|||
"usingComponents" : true |
|||
}, |
|||
"mp-toutiao" : { |
|||
"usingComponents" : true |
|||
}, |
|||
"uniStatistics" : { |
|||
"enable" : false |
|||
}, |
|||
"vueVersion" : "3", |
|||
"h5" : { |
|||
"template" : "index.html", |
|||
"devServer" : { |
|||
"port" : 9020 |
|||
} |
|||
} |
|||
"name": "富维汽车镜", |
|||
"appid": "__UNI__DA78BC9", |
|||
"description": "", |
|||
"versionName": "1.0.0", |
|||
"versionCode": "100", |
|||
"transformPx": false, |
|||
/* 5+App特有相关 */ |
|||
"app-plus": { |
|||
"usingComponents": true, |
|||
"nvueStyleCompiler": "uni-app", |
|||
"compilerVersion": 3, |
|||
"splashscreen": { |
|||
"alwaysShowBeforeRender": true, |
|||
"waiting": true, |
|||
"autoclose": true, |
|||
"delay": 0 |
|||
}, |
|||
/* 模块配置 */ |
|||
"modules": {}, |
|||
/* 应用发布信息 */ |
|||
"distribute": { |
|||
/* android打包配置 */ |
|||
"android": { |
|||
"permissions": [ |
|||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
|||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
|||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
|||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
|||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
|||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
|||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
|||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
|||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
|||
"<uses-feature android:name=\"android.hardware.camera\"/>", |
|||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
|||
] |
|||
}, |
|||
/* ios打包配置 */ |
|||
"ios": { |
|||
"dSYMs": false |
|||
}, |
|||
/* SDK配置 */ |
|||
"sdkConfigs": { |
|||
"ad": {} |
|||
}, |
|||
"nativePlugins": { |
|||
"TestModule": { |
|||
"__plugin_info__": { |
|||
"name": "TestModule", |
|||
"description": "打印", |
|||
"platforms": "Android", |
|||
"url": "", |
|||
"android_package_name": "", |
|||
"ios_bundle_id": "", |
|||
"isCloud": false, |
|||
"bought": -1, |
|||
"pid": "", |
|||
"parameters": {} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"nativePlugins": { |
|||
"TestModule": { |
|||
"__plugin_info__": { |
|||
"name": "TestModule", |
|||
"description": "打印", |
|||
"platforms": "Android", |
|||
"url": "", |
|||
"android_package_name": "", |
|||
"ios_bundle_id": "", |
|||
"isCloud": false, |
|||
"bought": -1, |
|||
"pid": "", |
|||
"parameters": {} |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
/* 快应用特有相关 */ |
|||
"quickapp": {}, |
|||
/* 小程序特有相关 */ |
|||
"mp-weixin": { |
|||
"appid": "wx6176535b0b0153f0", |
|||
"setting": { |
|||
"urlCheck": false |
|||
}, |
|||
"usingComponents": true |
|||
}, |
|||
"mp-alipay": { |
|||
"usingComponents": true |
|||
}, |
|||
"mp-baidu": { |
|||
"usingComponents": true |
|||
}, |
|||
"mp-toutiao": { |
|||
"usingComponents": true |
|||
}, |
|||
"uniStatistics": { |
|||
"enable": false |
|||
}, |
|||
"vueVersion": "3", |
|||
"h5": { |
|||
"template": "index.html", |
|||
"devServer": { |
|||
"port": 9020 |
|||
} |
|||
} |
|||
} |
@ -1,149 +1,95 @@ |
|||
<template> |
|||
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; "> |
|||
<view class="uni-flex uni-row space-between" style="align-items: center"> |
|||
<view> |
|||
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> |
|||
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> |
|||
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> |
|||
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> |
|||
</to-location> |
|||
</view> |
|||
<view class="uni-flex uni-row center"> |
|||
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" |
|||
<view :class="dataContent.scaned ? 'scan_view' : ''"> |
|||
<view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx"> |
|||
<view> |
|||
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> |
|||
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> |
|||
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> |
|||
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location> |
|||
</view> |
|||
<view class="uni-flex uni-row u-align-start"> |
|||
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" |
|||
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> --> |
|||
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent" |
|||
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)" |
|||
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack" |
|||
:isShowStatus='isShowStatus'> |
|||
</compare-qty> |
|||
<qty v-if="dataContent.handleQty == 0 || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"> </compare-qty> |
|||
|
|||
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()"> |
|||
<text style="font-size: 30rpx;color: #2979ff; width: 20px;" @click="copy">复制</text> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<!-- <u-line></u-line> --> |
|||
</view> |
|||
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()"> |
|||
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <u-line></u-line> --> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import qty from '@/mycomponents/qty/qty.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import config from '@/static/config.js' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
toLocation, |
|||
batch, |
|||
qty, |
|||
recommendQty, |
|||
compareQty, |
|||
}, |
|||
<script setup lang="ts"> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import qty from '@/mycomponents/qty/qty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import config from '@/static/config.js' |
|||
|
|||
data() { |
|||
return { |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}) |
|||
const copy = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = `HPQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}` |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
}, |
|||
watch: { |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const copyPro = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}` |
|||
|
|||
}, |
|||
methods: { |
|||
copy() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + |
|||
this.dataContent.batch + ";Q" + this.dataContent.qty |
|||
// #ifdef H5 |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
copyPro() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + |
|||
this.dataContent.batch + ";Q" + this.dataContent.qty |
|||
// #ifdef H5 |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
isDevlement() { |
|||
return config.isDevelopment; |
|||
} |
|||
} |
|||
} |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const isDevlement = () => { |
|||
return config.isDevelopment |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,37 +1,26 @@ |
|||
<template> |
|||
<view class="business_view"> |
|||
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text> |
|||
<text class="card_business_content">{{number}}</text> |
|||
</view> |
|||
<view class="card_view"> |
|||
<text class="card_business">{{ businessTypeDesc(bussinessType) }}</text> |
|||
<text class="card_business_content">{{ number }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getBusinessTypeDesc |
|||
} from '@/common/directory.js'; |
|||
export default { |
|||
data() { |
|||
return {} |
|||
}, |
|||
props: { |
|||
bussinessType: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
number: { |
|||
type: String, |
|||
default: "" |
|||
} |
|||
}, |
|||
methods:{ |
|||
businessTypeDesc(type){ |
|||
return getBusinessTypeDesc(type) |
|||
} |
|||
<script setup lang="ts"> |
|||
import { getBusinessTypeDesc } from '@/common/directory.js' |
|||
|
|||
} |
|||
|
|||
} |
|||
const props = defineProps({ |
|||
bussinessType: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
number: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}) |
|||
const businessTypeDesc = (type) => { |
|||
return getBusinessTypeDesc(type) |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,83 +1,59 @@ |
|||
<template> |
|||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;"> |
|||
<view class="space_between center"> |
|||
<view style="word-break: break-all;width: 60%;"> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
|||
</view> |
|||
<view style="word-break: break-all;"> |
|||
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" :isShowStatus='isShowStatus' |
|||
:isShowStdPack="true"></recommend-qty> |
|||
|
|||
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus='isShowStatus' |
|||
:isShowStdPack="true"> |
|||
</compare-qty> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff"> |
|||
<view class="space_between center"> |
|||
<view style="word-break: break-all; width: 60%"> |
|||
<pack title="外包装" v-if="detail.parentPackingNumber != undefined && detail.parentPackingNumber != ''" :packingCode="detail.parentPackingNumber"></pack> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
|||
</view> |
|||
<view style="word-break: break-all"> |
|||
<recommend-qty v-if="detail.record == null || detail.record == undefined" :dataContent="detail" :isShowStatus="isShowStatus" :isShowStdPack="true"></recommend-qty> |
|||
|
|||
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty" :isShowStatus="isShowStatus" :isShowStdPack="true"> </compare-qty> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
batch, |
|||
recommendQty, |
|||
compareQty |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
const props = defineProps({ |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
.recommend { |
|||
position: absolute; |
|||
left: 25px; |
|||
top: 70px; |
|||
width: 10px; |
|||
height: 30px; |
|||
opacity: 1; |
|||
|
|||
} |
|||
.recommend { |
|||
position: absolute; |
|||
left: 25px; |
|||
top: 70px; |
|||
width: 10px; |
|||
height: 30px; |
|||
opacity: 1; |
|||
} |
|||
</style> |
@ -1,34 +1,21 @@ |
|||
<template> |
|||
<view class="card_view"> |
|||
<text class="card_packing_code card_content ">包装</text> |
|||
<text class="card_content ">{{packingCode}}</text> |
|||
</view> |
|||
<view class="card_view"> |
|||
<text class="card_packing_code card_content">{{ title }}</text> |
|||
<text class="card_content">{{ packingCode }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: { |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
packingCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
packingCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
title: { |
|||
type: String, |
|||
default: '包装' |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,59 +1,40 @@ |
|||
<template> |
|||
<view :class="dataContent.scaned?'scan_view':''"> |
|||
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" |
|||
:isShowFromLocation="isShowLocation"></balance> |
|||
<production-info :dataContent="packageContent"></production-info> |
|||
</view> |
|||
<view :class="dataContent.scaned ? 'scan_view' : ''"> |
|||
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance> |
|||
<production-info :dataContent="packageContent"></production-info> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import balance from '@/mycomponents/balance/balance.vue' |
|||
import productionInfo from '@/mycomponents/production/productionInfo.vue' |
|||
<script setup lang="ts"> |
|||
import balance from '@/mycomponents/balance/balance.vue' |
|||
import productionInfo from '@/mycomponents/production/productionInfo.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
balance, |
|||
productionInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
packageContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
packageContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,84 +1,56 @@ |
|||
<template> |
|||
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;"> |
|||
<view class="uni-flex uni-row space-between center "> |
|||
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" > |
|||
<view style=" width: 25rpx;color: #32C1E8;"> |
|||
推荐 |
|||
</view> |
|||
<view style="word-break: break-all"> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
|||
</view> |
|||
</view> |
|||
<view style="word-break: break-all"> |
|||
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail" |
|||
:isShowStdPack="false" :isShowStatus="false"></recommend-qty> |
|||
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)" |
|||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> |
|||
</compare-qty> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #fff"> |
|||
<view class="uni-flex uni-row space-between center"> |
|||
<view class="uni-flex uni-row" style="width: 60%"> |
|||
<view style="width: 20rpx; color: #1677ff; margin-right: 20rpx; font-size: 24rpx"> 推荐 </view> |
|||
<view style="word-break: break-all"> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> |
|||
</view> |
|||
</view> |
|||
<view style="word-break: break-all"> |
|||
<recommend-qty v-if="detail.Records == null || detail.Records.length == 0" :dataContent="detail" :isShowStdPack="false" :isShowStatus="false"></recommend-qty> |
|||
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false"> </compare-qty> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
batch, |
|||
recommendQty, |
|||
compareQty |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
|
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
const props = defineProps({ |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
.recommend { |
|||
position: absolute; |
|||
left: 25px; |
|||
top: 70px; |
|||
width: 10px; |
|||
height: 30px; |
|||
opacity: 1; |
|||
|
|||
} |
|||
.recommend { |
|||
position: absolute; |
|||
left: 25px; |
|||
top: 70px; |
|||
width: 10px; |
|||
height: 30px; |
|||
opacity: 1; |
|||
} |
|||
</style> |
|||
|
@ -1,31 +1,25 @@ |
|||
<template> |
|||
<view class="default_goscan"> |
|||
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image> |
|||
<button @click="goScan"> |
|||
<image src="@/static/icons_ui/icon_add.svg"></image> |
|||
去扫描 |
|||
</button> |
|||
</view> |
|||
<view class="default_goscan"> |
|||
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image> |
|||
<button @click="goScan"> |
|||
<image src="@/static/icons_ui/icon_add.svg"></image> |
|||
{{ title }} |
|||
</button> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
goScan(content) { |
|||
this.$emit("goScan", ''); |
|||
} |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '去扫描' |
|||
} |
|||
}) |
|||
const goScan = (content) => { |
|||
emit('goScan', '') |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['goScan']) |
|||
</script> |
|||
|
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,470 +1,482 @@ |
|||
<template name="show-modal"> |
|||
<view> |
|||
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false" |
|||
:showConfirmButton="false" ref="modal"> |
|||
<view class="slot-content"> |
|||
<slot name="icon"> |
|||
<image class="icon" :src="icon" /> |
|||
</slot> |
|||
<slot name="content"> |
|||
<rich-text class="content" :nodes="content"> |
|||
</rich-text> |
|||
|
|||
</slot> |
|||
<view class='split_line'></view> |
|||
<slot name="button"> |
|||
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> |
|||
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> |
|||
<text :style="{'color':cancelColor}">{{ cancelText }}</text> |
|||
</view> |
|||
<u-line direction="col" length="100%"></u-line> |
|||
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose"> |
|||
<text :style="{'color':confirmColor}">{{confirmText}}</text> |
|||
<text v-if="showConfirmCountdown">({{seconds}}s关闭)</text> |
|||
</view> |
|||
</view> |
|||
</slot> |
|||
</view> |
|||
</u-modal> |
|||
</view> |
|||
<view> |
|||
<u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal"> |
|||
<view class="slot-content"> |
|||
<slot name="icon"> |
|||
<image class="icon" :src="icon" /> |
|||
</slot> |
|||
<slot name="content"> |
|||
<rich-text class="content" :nodes="content"> </rich-text> |
|||
</slot> |
|||
<view class="split_line"></view> |
|||
<slot name="button"> |
|||
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px"> |
|||
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> |
|||
<text :style="{ color: cancelColor }">{{ cancelText }}</text> |
|||
</view> |
|||
<u-line direction="col" length="100%"></u-line> |
|||
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose"> |
|||
<text :style="{ color: confirmColor }">{{ confirmText }}</text> |
|||
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text> |
|||
</view> |
|||
</view> |
|||
</slot> |
|||
</view> |
|||
</u-modal> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
/** |
|||
* modal 模态框 |
|||
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作 |
|||
* */ |
|||
import { |
|||
ref, |
|||
getCurrentInstance |
|||
} from 'vue' |
|||
const timer = ref(null) |
|||
const show = ref(false) // 是否显示 |
|||
const iconType = ref('消息') |
|||
const icon = ref('../../static/icons/error-circle.svg') |
|||
const title = ref('') |
|||
const content = ref('') // 提示内容 |
|||
const cancelText = ref('取消') // 取消按钮的文字 |
|||
const confirmText = ref('确定') // 确认按钮文字 |
|||
const showCancel = ref(true) // 是否显示取消按钮,默认为 true |
|||
const confirmColor = ref('#007aff') // 确定按钮颜色 |
|||
const cancelColor = ref(null) // 取消按钮颜色 |
|||
const showConfirmButton = ref(true) // 是否显示确认按钮 |
|||
const showConfirmCountdown = ref(true) // 是否显示确定倒计时 |
|||
const showCancelButton = ref(true) // 是否显示取消按钮 |
|||
const showClose = ref(false) |
|||
const confirm = ref(false) //为 true 时,表示用户点击了确定按钮 |
|||
const cancel = ref(false) //为 true 时,表示用户点击了取消 |
|||
const isDisabled = ref(true) //为 true 时,表示用户可以点击,反之则不可以 |
|||
const seconds = ref(0) |
|||
const success = () => { |
|||
|
|||
} |
|||
const open = () => { |
|||
show.value = true; |
|||
isDisabled.value = true; |
|||
} |
|||
const close = () => { |
|||
show.value = false |
|||
isDisabled.value = false; |
|||
} |
|||
const confirmClose = () => { |
|||
if (!isDisabled.value) return |
|||
isDisabled.value = false |
|||
// console.log('确定点击') |
|||
if (show.value) { |
|||
show.value = false; |
|||
clearInterval(timer.value) //清空timer |
|||
success({ |
|||
// cancel: false, |
|||
confirm: true, |
|||
}); |
|||
} |
|||
} |
|||
const cancelClose = () => { |
|||
if (!isDisabled.value) return |
|||
isDisabled.value = false |
|||
clearInterval(timer.value) //清空timer |
|||
show.value = false |
|||
success({ |
|||
// cancel: true, |
|||
confirm: false, |
|||
}); |
|||
} |
|||
// 打开消息弹框(确定+倒计时) |
|||
const showMessage = (mContent, callback) => { |
|||
showConfirmCountdownModal("消息", mContent, callback); |
|||
} |
|||
// 打开成功弹框(确定+倒计时) |
|||
const showSuccessMessage = (mContent, callback) => { |
|||
showConfirmCountdownModal("成功", mContent, callback); |
|||
} |
|||
// 打开失败弹框(确定) |
|||
const showErrorMessage = (mContent, callback) => { |
|||
|
|||
console.log(333) |
|||
showConfirmModal("失败", mContent, callback); |
|||
} |
|||
|
|||
// 显示崩溃消息(无确定) |
|||
const showBreakMessage = (mContent, callback) => { |
|||
showNoButtonModal("失败", mContent, callback); |
|||
} |
|||
|
|||
// 打开疑问弹框(取消+确定) |
|||
const showQuestionMessage = (mContent, callback) => { |
|||
showSelectModal("疑问", mContent, callback); |
|||
} |
|||
|
|||
// 打开警告弹框(确定+倒计时) |
|||
const showWarningMessage = (mContent, callback) => { |
|||
showConfirmCountdownModal("警告", mContent, callback); |
|||
} |
|||
|
|||
// 打开失败弹框(确定+倒计时) |
|||
const showConfirmCountdownFailModal = (mContent, callback) => { |
|||
showConfirmCountdownModal("失败", mContent, callback); |
|||
} |
|||
|
|||
// 打开消息弹框(确定) |
|||
const showConfirmMessageModal = (mContent, callback) => { |
|||
showConfirmModal("消息", mContent, callback); |
|||
} |
|||
|
|||
// 打开成功弹框(确定) |
|||
const showConfirmSuccessModall = (mContent, callback) => { |
|||
showConfirmModal("成功", mContent, callback); |
|||
} |
|||
|
|||
|
|||
// 打开警告弹框(确定) |
|||
const showConfirmWarningModal = (mContent, callback) => { |
|||
showConfirmModal("警告", mContent, callback); |
|||
} |
|||
|
|||
// 打开疑问弹框(确定) |
|||
const showConfirmQuestionModal = (mContent, callback) => { |
|||
showConfirmModal("疑问", mContent, callback); |
|||
} |
|||
|
|||
// 初始化弹框并打开(确定) |
|||
const showNoButtonModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showConfirmButton: false, |
|||
showCancelButton: false, |
|||
success: function(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true); |
|||
} else { |
|||
callback(false); |
|||
} |
|||
} |
|||
|
|||
} |
|||
}); |
|||
} |
|||
// 初始化弹框并打开(确定) |
|||
const showConfirmModal = (mIconType, mContent, callback) => { |
|||
console.log(222) |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showCancelButton: false, |
|||
success: function(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true); |
|||
} else { |
|||
callback(false); |
|||
} |
|||
} |
|||
|
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 打开消息弹框(取消+确定) |
|||
const showSelectMessageModal = (mContent, callback) => { |
|||
showSelectModal("消息", mContent, callback); |
|||
} |
|||
|
|||
// 打开成功弹框(取消+确定) |
|||
const showSelectSuccessModal = (mContent, callback) => { |
|||
showSelectModal("成功", mContent, callback); |
|||
} |
|||
|
|||
// 打开失败弹框(取消+确定) |
|||
const showSelectFailModal = (mContent, callback) => { |
|||
showSelectModal("失败", mContent, callback); |
|||
} |
|||
|
|||
// 打开警告弹框(取消+确定) |
|||
const showSelectWarningModal = (mContent, callback) => { |
|||
showSelectModal("警告", mContent, callback); |
|||
} |
|||
|
|||
// 初始化弹框并打开(取消+确定) |
|||
const showSelectModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
success: function(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true); |
|||
console.log('用户点击确定') |
|||
} else { |
|||
callback(false); |
|||
console.log('用户点击取消') |
|||
} |
|||
} |
|||
|
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 打开疑问弹框(确定+倒计时) |
|||
const showConfirmCountdownQuestionModal = (mContent, callback) => { |
|||
showConfirmCountdownModal("疑问", mContent, callback); |
|||
} |
|||
|
|||
// 初始化弹框并打开(确定+倒计时) |
|||
const showConfirmCountdownModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showCancelButton: false, |
|||
showConfirmCountdown: true, |
|||
success: function(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true); |
|||
} else { |
|||
callback(false); |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 打开消息弹框(取消+确定+倒计时) |
|||
const showSelectCountdownMessageModal = (mContent, callback) => { |
|||
showSelectCountdownModal("消息", mContent, callback); |
|||
} |
|||
|
|||
// 打开成功弹框(取消+确定+倒计时) |
|||
const showSelectCountdownSuccessModal = (mContent, callback) => { |
|||
showSelectCountdownModal("成功", mContent, callback); |
|||
} |
|||
|
|||
// 打开失败弹框(取消+确定+倒计时) |
|||
const showSelectCountdownFailModal = (mContent, callback) => { |
|||
showSelectCountdownModal("失败", mContent, callback); |
|||
} |
|||
|
|||
// 打开警告弹框(取消+确定+倒计时) |
|||
const showSelectCountdownWarningModal = (mContent, callback) => { |
|||
showSelectCountdownModal("警告", mContent, callback); |
|||
} |
|||
|
|||
// 打开疑问弹框(取消+确定+倒计时) |
|||
const showSelectCountdownQuestionModal = (mContent, callback) => { |
|||
showSelectCountdownModal("疑问", mContent, callback); |
|||
} |
|||
|
|||
// 初始化弹框并打开(取消+确定+倒计时) |
|||
const showSelectCountdownModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showConfirmCountdown: true, |
|||
success: function(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true); |
|||
console.log('用户点击确定') |
|||
} else { |
|||
callback(false); |
|||
console.log('用户点击取消') |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 初始化弹框并打开 |
|||
const showModal = (data) => { |
|||
if (data.iconType) { |
|||
iconType.value = data.iconType |
|||
switch (data.iconType) { |
|||
case '消息': |
|||
icon.value = '/static/icons/error-circle.svg'; |
|||
break; |
|||
case '成功': |
|||
icon.value = '/static/icons/checkmark-circle.svg'; |
|||
break; |
|||
case '失败': |
|||
icon.value = '/static/icons/close-circle.svg'; |
|||
break; |
|||
case '警告': |
|||
icon.value = '/static/icons/warning.svg'; |
|||
break; |
|||
case '疑问': |
|||
icon.value = '/static/icons/question-circle.svg'; |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
} |
|||
// image |
|||
if (data.title) { |
|||
title.value = data.title |
|||
} |
|||
if (data.content) { |
|||
content.value = data.content |
|||
} else { |
|||
content.value = '' |
|||
} |
|||
if (data.cancelText) { |
|||
cancelText.value = data.cancelText |
|||
} else { |
|||
cancelText.value = '取消' |
|||
} |
|||
if (data.confirmText) { |
|||
confirmText.value = data.confirmText |
|||
} else { |
|||
confirmText.value = '确定' |
|||
} |
|||
|
|||
if (data.showCancel === false || data.showCancel === true) { |
|||
showCancel.value = data.showCancel |
|||
} else { |
|||
showCancel.value = true |
|||
} |
|||
|
|||
if (data.confirmColor) { |
|||
confirmColor.value = data.confirmColor |
|||
} else { |
|||
confirmColor.value = '#007aff' |
|||
} |
|||
|
|||
if (data.cancelColor) { |
|||
cancelColor.value = data.cancelColor |
|||
} else { |
|||
cancelColor.value = '#666F83' |
|||
} |
|||
|
|||
if (data.showConfirmButton === false || data.showConfirmButton === true) { |
|||
showConfirmButton.value = data.showConfirmButton |
|||
} else { |
|||
showConfirmButton.value = true |
|||
} |
|||
|
|||
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) { |
|||
showConfirmCountdown.value = data.showConfirmCountdown |
|||
} else { |
|||
showConfirmCountdown.value = false |
|||
} |
|||
|
|||
if (data.showCancelButton === false || data.showCancelButton === true) { |
|||
showCancelButton.value = data.showCancelButton |
|||
} else { |
|||
showCancelButton.value = true |
|||
} |
|||
|
|||
if (data.success) { |
|||
success = data.success |
|||
} else { |
|||
success = () => {} |
|||
} |
|||
setTimeout(res => { |
|||
open(); |
|||
}, 500) |
|||
if (showConfirmCountdown.value) { |
|||
startTimer(); |
|||
} |
|||
|
|||
} |
|||
|
|||
const startTimer = () => { |
|||
seconds.value = 3; |
|||
clearInterval(timer.value) |
|||
timer.value = setInterval(() => { |
|||
seconds.value-- |
|||
// console.log("倒计时时间", this.seconds); |
|||
if (seconds.value <= 0) { |
|||
timeUp() |
|||
return |
|||
} |
|||
}, 1000) |
|||
} |
|||
|
|||
const timeUp = () => { |
|||
// clearInterval(this.timer) |
|||
console.log('时间到') |
|||
confirmClose(); |
|||
} |
|||
defineExpose({ showErrorMessage }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
/** |
|||
* modal 模态框 |
|||
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作 |
|||
* */ |
|||
import { ref, getCurrentInstance } from 'vue' |
|||
|
|||
const timer = ref(null) |
|||
const show = ref(false) // 是否显示 |
|||
const iconType = ref('消息') |
|||
const icon = ref('../../static/icons/error-circle.svg') |
|||
const title = ref('') |
|||
const content = ref('') // 提示内容 |
|||
const cancelText = ref('取消') // 取消按钮的文字 |
|||
const confirmText = ref('确定') // 确认按钮文字 |
|||
const showCancel = ref(true) // 是否显示取消按钮,默认为 true |
|||
const confirmColor = ref('#007aff') // 确定按钮颜色 |
|||
const cancelColor = ref(null) // 取消按钮颜色 |
|||
const showConfirmButton = ref(true) // 是否显示确认按钮 |
|||
const showConfirmCountdown = ref(true) // 是否显示确定倒计时 |
|||
const showCancelButton = ref(true) // 是否显示取消按钮 |
|||
const showClose = ref(false) |
|||
const confirm = ref(false) // 为 true 时,表示用户点击了确定按钮 |
|||
const cancel = ref(false) // 为 true 时,表示用户点击了取消 |
|||
const isDisabled = ref(true) // 为 true 时,表示用户可以点击,反之则不可以 |
|||
const seconds = ref(0) |
|||
const success = ref(() => {}) |
|||
const open = () => { |
|||
show.value = true |
|||
isDisabled.value = true |
|||
} |
|||
const close = () => { |
|||
show.value = false |
|||
isDisabled.value = false |
|||
} |
|||
const confirmClose = () => { |
|||
if (!isDisabled.value) return |
|||
isDisabled.value = false |
|||
// console.log('确定点击') |
|||
if (show.value) { |
|||
show.value = false |
|||
clearInterval(timer.value) // 清空timer |
|||
success.value({ |
|||
// cancel: false, |
|||
confirm: true |
|||
}) |
|||
} |
|||
} |
|||
const cancelClose = () => { |
|||
if (!isDisabled.value) return |
|||
isDisabled.value = false |
|||
clearInterval(timer.value) // 清空timer |
|||
show.value = false |
|||
success.value({ |
|||
// cancel: true, |
|||
confirm: false |
|||
}) |
|||
} |
|||
// 打开消息弹框(确定+倒计时) |
|||
const showMessage = (mContent, callback) => { |
|||
showConfirmCountdownModal('消息', mContent, callback) |
|||
} |
|||
// 打开成功弹框(确定+倒计时) |
|||
const showSuccessMessage = (mContent, callback) => { |
|||
showConfirmCountdownModal('成功', mContent, callback) |
|||
} |
|||
// 打开失败弹框(确定) |
|||
const showErrorMessage = (mContent, callback) => { |
|||
showConfirmModal('失败', mContent, callback) |
|||
} |
|||
|
|||
// 显示崩溃消息(无确定) |
|||
const showBreakMessage = (mContent, callback) => { |
|||
showNoButtonModal('失败', mContent, callback) |
|||
} |
|||
|
|||
// 打开疑问弹框(取消+确定) |
|||
const showQuestionMessage = (mContent, callback) => { |
|||
showSelectModal('疑问', mContent, callback) |
|||
} |
|||
|
|||
// 打开警告弹框(确定+倒计时) |
|||
const showWarningMessage = (mContent, callback) => { |
|||
showConfirmCountdownModal('警告', mContent, callback) |
|||
} |
|||
|
|||
// 打开失败弹框(确定+倒计时) |
|||
const showConfirmCountdownFailModal = (mContent, callback) => { |
|||
showConfirmCountdownModal('失败', mContent, callback) |
|||
} |
|||
|
|||
// 打开消息弹框(确定) |
|||
const showConfirmMessageModal = (mContent, callback) => { |
|||
showConfirmModal('消息', mContent, callback) |
|||
} |
|||
|
|||
// 打开成功弹框(确定) |
|||
const showConfirmSuccessModall = (mContent, callback) => { |
|||
showConfirmModal('成功', mContent, callback) |
|||
} |
|||
|
|||
// 打开警告弹框(确定) |
|||
const showConfirmWarningModal = (mContent, callback) => { |
|||
showConfirmModal('警告', mContent, callback) |
|||
} |
|||
|
|||
// 打开疑问弹框(确定) |
|||
const showConfirmQuestionModal = (mContent, callback) => { |
|||
showConfirmModal('疑问', mContent, callback) |
|||
} |
|||
|
|||
// 初始化弹框并打开(确定) |
|||
const showNoButtonModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showConfirmButton: false, |
|||
showCancelButton: false, |
|||
success(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true) |
|||
} else { |
|||
callback(false) |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
// 初始化弹框并打开(确定) |
|||
const showConfirmModal = (mIconType, mContent, callback) => { |
|||
console.log(11) |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showCancelButton: false, |
|||
success(res) { |
|||
console.log(11, res) |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true) |
|||
} else { |
|||
callback(false) |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 打开消息弹框(取消+确定) |
|||
const showSelectMessageModal = (mContent, callback) => { |
|||
showSelectModal('消息', mContent, callback) |
|||
} |
|||
|
|||
// 打开成功弹框(取消+确定) |
|||
const showSelectSuccessModal = (mContent, callback) => { |
|||
showSelectModal('成功', mContent, callback) |
|||
} |
|||
|
|||
// 打开失败弹框(取消+确定) |
|||
const showSelectFailModal = (mContent, callback) => { |
|||
showSelectModal('失败', mContent, callback) |
|||
} |
|||
|
|||
// 打开警告弹框(取消+确定) |
|||
const showSelectWarningModal = (mContent, callback) => { |
|||
showSelectModal('警告', mContent, callback) |
|||
} |
|||
|
|||
// 初始化弹框并打开(取消+确定) |
|||
const showSelectModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
success(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true) |
|||
console.log('用户点击确定') |
|||
} else { |
|||
callback(false) |
|||
console.log('用户点击取消') |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 打开疑问弹框(确定+倒计时) |
|||
const showConfirmCountdownQuestionModal = (mContent, callback) => { |
|||
showConfirmCountdownModal('疑问', mContent, callback) |
|||
} |
|||
|
|||
// 初始化弹框并打开(确定+倒计时) |
|||
const showConfirmCountdownModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showCancelButton: false, |
|||
showConfirmCountdown: true, |
|||
success(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true) |
|||
} else { |
|||
callback(false) |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 打开消息弹框(取消+确定+倒计时) |
|||
const showSelectCountdownMessageModal = (mContent, callback) => { |
|||
showSelectCountdownModal('消息', mContent, callback) |
|||
} |
|||
|
|||
// 打开成功弹框(取消+确定+倒计时) |
|||
const showSelectCountdownSuccessModal = (mContent, callback) => { |
|||
showSelectCountdownModal('成功', mContent, callback) |
|||
} |
|||
|
|||
// 打开失败弹框(取消+确定+倒计时) |
|||
const showSelectCountdownFailModal = (mContent, callback) => { |
|||
showSelectCountdownModal('失败', mContent, callback) |
|||
} |
|||
|
|||
// 打开警告弹框(取消+确定+倒计时) |
|||
const showSelectCountdownWarningModal = (mContent, callback) => { |
|||
showSelectCountdownModal('警告', mContent, callback) |
|||
} |
|||
|
|||
// 打开疑问弹框(取消+确定+倒计时) |
|||
const showSelectCountdownQuestionModal = (mContent, callback) => { |
|||
showSelectCountdownModal('疑问', mContent, callback) |
|||
} |
|||
|
|||
// 初始化弹框并打开(取消+确定+倒计时) |
|||
const showSelectCountdownModal = (mIconType, mContent, callback) => { |
|||
showModal({ |
|||
iconType: mIconType, |
|||
content: mContent, |
|||
showConfirmCountdown: true, |
|||
success(res) { |
|||
if (callback != undefined) { |
|||
if (res.confirm == true) { |
|||
callback(true) |
|||
console.log('用户点击确定') |
|||
} else { |
|||
callback(false) |
|||
console.log('用户点击取消') |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 初始化弹框并打开 |
|||
const showModal = (data) => { |
|||
if (data.iconType) { |
|||
iconType.value = data.iconType |
|||
switch (data.iconType) { |
|||
case '消息': |
|||
icon.value = '/static/icons/error-circle.svg' |
|||
break |
|||
case '成功': |
|||
icon.value = '/static/icons/checkmark-circle.svg' |
|||
break |
|||
case '失败': |
|||
icon.value = '/static/icons/close-circle.svg' |
|||
break |
|||
case '警告': |
|||
icon.value = '/static/icons/warning.svg' |
|||
break |
|||
case '疑问': |
|||
icon.value = '/static/icons/question-circle.svg' |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
} |
|||
// image |
|||
if (data.title) { |
|||
title.value = data.title |
|||
} |
|||
if (data.content) { |
|||
content.value = data.content |
|||
} else { |
|||
content.value = '' |
|||
} |
|||
if (data.cancelText) { |
|||
cancelText.value = data.cancelText |
|||
} else { |
|||
cancelText.value = '取消' |
|||
} |
|||
if (data.confirmText) { |
|||
confirmText.value = data.confirmText |
|||
} else { |
|||
confirmText.value = '确定' |
|||
} |
|||
|
|||
if (data.showCancel === false || data.showCancel === true) { |
|||
showCancel.value = data.showCancel |
|||
} else { |
|||
showCancel.value = true |
|||
} |
|||
|
|||
if (data.confirmColor) { |
|||
confirmColor.value = data.confirmColor |
|||
} else { |
|||
confirmColor.value = '#007aff' |
|||
} |
|||
|
|||
if (data.cancelColor) { |
|||
cancelColor.value = data.cancelColor |
|||
} else { |
|||
cancelColor.value = '#666F83' |
|||
} |
|||
|
|||
if (data.showConfirmButton === false || data.showConfirmButton === true) { |
|||
showConfirmButton.value = data.showConfirmButton |
|||
} else { |
|||
showConfirmButton.value = true |
|||
} |
|||
|
|||
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) { |
|||
showConfirmCountdown.value = data.showConfirmCountdown |
|||
} else { |
|||
showConfirmCountdown.value = false |
|||
} |
|||
|
|||
if (data.showCancelButton === false || data.showCancelButton === true) { |
|||
showCancelButton.value = data.showCancelButton |
|||
} else { |
|||
showCancelButton.value = true |
|||
} |
|||
if (data.success) { |
|||
success.value = data.success |
|||
} else { |
|||
success.value = () => {} |
|||
} |
|||
setTimeout((res) => { |
|||
open() |
|||
}, 500) |
|||
if (showConfirmCountdown.value) { |
|||
startTimer() |
|||
} |
|||
} |
|||
|
|||
const startTimer = () => { |
|||
seconds.value = 3 |
|||
clearInterval(timer.value) |
|||
timer.value = setInterval(() => { |
|||
seconds.value-- |
|||
// console.log("倒计时时间", this.seconds); |
|||
if (seconds.value <= 0) { |
|||
timeUp() |
|||
} |
|||
}, 1000) |
|||
} |
|||
|
|||
const timeUp = () => { |
|||
// clearInterval(this.timer) |
|||
confirmClose() |
|||
} |
|||
defineExpose({ |
|||
confirmClose, |
|||
cancelClose, |
|||
showSuccessMessage, |
|||
showErrorMessage, |
|||
showBreakMessage, |
|||
showQuestionMessage, |
|||
showWarningMessage, |
|||
showConfirmCountdownFailModal, |
|||
showConfirmMessageModal, |
|||
showConfirmSuccessModall, |
|||
showConfirmWarningModal, |
|||
showConfirmQuestionModal, |
|||
showNoButtonModal, |
|||
showConfirmModal, |
|||
showSelectMessageModal, |
|||
showSelectSuccessModal, |
|||
showSelectFailModal, |
|||
showSelectWarningModal, |
|||
showSelectModal, |
|||
showConfirmCountdownQuestionModal, |
|||
showConfirmCountdownModal, |
|||
showSelectCountdownMessageModal, |
|||
showSelectCountdownSuccessModal, |
|||
showSelectCountdownFailModal, |
|||
showSelectCountdownWarningModal, |
|||
showSelectCountdownQuestionModal, |
|||
showMessage, |
|||
showModal |
|||
}) |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.slot-content { |
|||
font-size: 36rpx; |
|||
display: flex; //弹性布局 |
|||
flex-direction: column; //垂直排列 |
|||
align-items: center; //子元素居中 |
|||
// background-image: url() |
|||
} |
|||
|
|||
.icon { |
|||
width: 70rpx; |
|||
height: 70rpx; |
|||
opacity: 1; //透明度 |
|||
margin-top: 16px; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 35rpx; |
|||
} |
|||
|
|||
.content { |
|||
width: 100%; |
|||
margin-top: 16px; |
|||
margin-bottom: 16px; |
|||
margin-left: 8px; |
|||
margin-right: 8px; |
|||
font-size: 32rpx; |
|||
text-align: center; |
|||
} |
|||
|
|||
.cance_button { |
|||
width: 100%; |
|||
margin-top: 10px; |
|||
margin-bottom: 10px; |
|||
font-size: 32rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.confirm_button { |
|||
width: 100%; |
|||
margin-top: 10px; |
|||
margin-bottom: 10px; |
|||
font-size: 32rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.confirm_text { |
|||
// color: $uni-color-primary; |
|||
} |
|||
|
|||
.def_text { |
|||
color: $uni-color-primary; |
|||
} |
|||
.slot-content { |
|||
font-size: 36rpx; |
|||
display: flex; //弹性布局 |
|||
flex-direction: column; //垂直排列 |
|||
align-items: center; //子元素居中 |
|||
// background-image: url() |
|||
} |
|||
|
|||
.icon { |
|||
width: 70rpx; |
|||
height: 70rpx; |
|||
opacity: 1; //透明度 |
|||
margin-top: 16px; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 35rpx; |
|||
} |
|||
|
|||
.content { |
|||
width: 100%; |
|||
margin-top: 16px; |
|||
margin-bottom: 16px; |
|||
margin-left: 8px; |
|||
margin-right: 8px; |
|||
font-size: 32rpx; |
|||
text-align: center; |
|||
} |
|||
|
|||
.cance_button { |
|||
width: 100%; |
|||
margin-top: 10px; |
|||
margin-bottom: 10px; |
|||
font-size: 32rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.confirm_button { |
|||
width: 100%; |
|||
margin-top: 10px; |
|||
margin-bottom: 10px; |
|||
font-size: 32rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
} |
|||
|
|||
.confirm_text { |
|||
// color: $uni-color-primary; |
|||
} |
|||
|
|||
.def_text { |
|||
color: $uni-color-primary; |
|||
} |
|||
</style> |
@ -1,68 +1,57 @@ |
|||
<template> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
|||
padding-bottom: 15rpx; |
|||
padding-left: 10rpx; |
|||
padding-right: 10rpx; |
|||
font-size:32rpx;"> |
|||
<text style="font-size: 35rpx;">{{title}} </text> |
|||
<view class="uni-flex u-col-center" @click="showLocation"> |
|||
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">  请扫描</text> |
|||
<text style="color:#3FBAFF; font-size: 35rpx;">  {{containerCode}}</text> |
|||
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer> |
|||
</view> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx"> |
|||
<text style="font-size: 35rpx">{{ title }} </text> |
|||
<view class="uni-flex u-col-center" @click="showLocation"> |
|||
<text style="color: #3fbaff; font-size: 35rpx" v-if="containerCode == '' && isShowEdit == true">  请扫描</text> |
|||
<text style="color: #3fbaff; font-size: 35rpx">  {{ containerCode }}</text> |
|||
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<winScanContainer ref="scanContainer" :title="title" @getContainer="getContainer"></winScanContainer> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue" |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
|||
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
winScanContainer |
|||
}, |
|||
data() { |
|||
return { |
|||
defaultContainerCode: "" |
|||
} |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "需求库位" |
|||
}, |
|||
containerCode: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
}, |
|||
const defaultContainerCode = ref('') |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '需求库位' |
|||
}, |
|||
containerCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
watch( |
|||
() => props.containerCode, |
|||
(val) => { |
|||
if (val != '') { |
|||
defaultContainerCode.value = val |
|||
} |
|||
}, |
|||
{ |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
) |
|||
|
|||
watch: { |
|||
containerCode: { |
|||
handler(newName, oldName) { |
|||
if (this.containerCode != "") { |
|||
this.defaultContainerCode = this.containerCode; |
|||
} |
|||
}, |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
}, |
|||
methods: { |
|||
showLocation() { |
|||
this.$refs.scanContainer.openScanPopup(); |
|||
}, |
|||
//扫描源库位 |
|||
getContainer(containerInfo) { |
|||
this.$emit("getContainer", containerInfo) |
|||
} |
|||
} |
|||
} |
|||
const showLocation = () => { |
|||
scanContainer.value.openScanPopup() |
|||
} |
|||
// 扫描源库位 |
|||
const getContainer = (containerInfo) => { |
|||
emit('getContainer', containerInfo) |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['getContainer']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,163 +1,145 @@ |
|||
<template> |
|||
<view class="" style="background-color: #fff;"> |
|||
<uni-collapse ref="collapse1" @change=""> |
|||
<uni-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
|||
:isShowStdPack="false"> |
|||
</item-compare-qty> |
|||
</template> |
|||
|
|||
<view class="" v-for="(item,index) in dataContent.subList" :key="index"> |
|||
<uni-swipe-action ref="swipeAction"> |
|||
<uni-swipe-action-item @click="swipeClick($event,item)" |
|||
:right-options="item.scaned?scanOptions:detailOptions" |
|||
style='padding:0px 0px 5px 0px;align-items: center;'> |
|||
<recommend :detail="item" :isShowToLocation="false"> |
|||
</recommend> |
|||
</uni-swipe-action-item> |
|||
</uni-swipe-action> |
|||
</view> |
|||
</uni-collapse-item> |
|||
</uni-collapse> |
|||
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
|||
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' |
|||
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|||
<comMessage ref="message"></comMessage> |
|||
</view> |
|||
<view class="" style="background-color: #fff"> |
|||
<u-collapse ref="collapse"> |
|||
<u-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false" style="width: 100%"> </item-compare-qty> |
|||
</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)"> |
|||
<recommend :detail="item" :isShowToLocation="false"> </recommend> |
|||
</u-swipe-action> |
|||
</u-collapse-item> |
|||
</u-collapse> |
|||
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
|||
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|||
import { |
|||
getDetailOption, |
|||
getPurchaseReceiptOption |
|||
} from '@/common/array.js'; |
|||
|
|||
export default { |
|||
emits: ['openDetail', "updateData"], |
|||
components: { |
|||
itemCompareQty, |
|||
recommend, |
|||
balanceQtyEdit, |
|||
winScanLocation |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Array, |
|||
default: null |
|||
}, |
|||
}, |
|||
watch: { |
|||
dataContent: { |
|||
handler(newName, oldName) { |
|||
if (this.dataContent.subList.length > 0) { |
|||
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { |
|||
this.$nextTick(res => { |
|||
this.$refs.collapse1.resize() |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
option: [], |
|||
showItem: {}, |
|||
locatonItem: {}, |
|||
editItem: {}, |
|||
detailOptions: [], |
|||
scanOptions: [] |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
if (this.detailOptions.length == 0) { |
|||
this.detailOptions = getDetailOption(); |
|||
} |
|||
if (this.scanOptions.length == 0) { |
|||
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam |
|||
.allowModifyLocation) |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
swipeClick(e, item) { |
|||
if (e.content.text == "详情") { |
|||
this.detail(item) |
|||
} else if (e.content.text == "编辑") { |
|||
this.edit(item) |
|||
} else if (e.content.text == "库位") { |
|||
this.showLocation(item) |
|||
} else if (e.content.text == "移除") { |
|||
this.remove(item) |
|||
} |
|||
}, |
|||
edit(item) { |
|||
this.editItem = item; |
|||
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty); |
|||
}, |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|||
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
|||
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js' |
|||
|
|||
detail(item) { |
|||
this.$emit('openDetail', item); |
|||
// this.showItem = item; |
|||
// this.$refs.jobDetailPopup.openPopup(item) |
|||
}, |
|||
remove(item) { |
|||
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|||
res => { |
|||
if (res) { |
|||
item.scaned = false |
|||
item.balance = {} |
|||
item.handleQty = null; |
|||
this.$forceUpdate() |
|||
this.$emit('remove', item) |
|||
} |
|||
}); |
|||
}, |
|||
confirm(qty) { |
|||
this.editItem.handleQty = qty; |
|||
this.$emit('updateData') |
|||
}, |
|||
showLocation(item) { |
|||
this.locatonItem = item; |
|||
this.$refs.scanLocationCode.openScanPopup(); |
|||
}, |
|||
//扫描源库位 |
|||
getLocation(location, code) { |
|||
this.locatonItem.toLocationCode = code; |
|||
this.$emit('updateData') |
|||
}, |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Array, |
|||
default: null |
|||
} |
|||
}) |
|||
const option = ref([]) |
|||
const showItem = ref({}) |
|||
const editItem = ref({}) |
|||
const locatonItem = ref({}) |
|||
const detailOptions = ref([]) |
|||
const scanOptions = ref([]) |
|||
const comMessageRef = ref() |
|||
const collapse = ref() |
|||
const qtyEdit = ref() |
|||
const dataContent = ref(props.dataContent) |
|||
dataContent.value.subList.forEach((item) => { |
|||
item.show = false |
|||
}) |
|||
// 监视属性 |
|||
watch( |
|||
() => props.dataContent, |
|||
(val) => { |
|||
if (val.subList.length > 0) { |
|||
if (collapse.value != undefined && collapse.value != null) { |
|||
nextTick((res) => { |
|||
collapse.value.init() |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
) |
|||
onMounted(() => { |
|||
if (detailOptions.value.length == 0) { |
|||
detailOptions.value = getDetailOption() |
|||
} |
|||
if (scanOptions.value.length == 0) { |
|||
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation) |
|||
} |
|||
nextTick((res) => { |
|||
collapse.value.init() |
|||
}) |
|||
}) |
|||
const swipeClick = (params, item) => { |
|||
let text = '' |
|||
if (item.scaned) { |
|||
text = scanOptions.value[params[1]].text |
|||
} else { |
|||
text = detailOptions.value[params[1]].text |
|||
} |
|||
if (text == '详情') { |
|||
detail(item) |
|||
} else if (text == '编辑') { |
|||
edit(item) |
|||
} else if (text == '库位') { |
|||
showLocation(item) |
|||
} else if (text == '移除') { |
|||
remove(item) |
|||
} |
|||
} |
|||
const edit = (item) => { |
|||
editItem.value = item |
|||
qtyEdit.value.openEditPopup(item.balance, item.handleQty) |
|||
} |
|||
const detail = (item) => { |
|||
emit('openDetail', item) |
|||
} |
|||
const remove = (item) => { |
|||
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { |
|||
if (res) { |
|||
item.scaned = false |
|||
item.balance = {} |
|||
item.handleQty = null |
|||
emit('remove', item) |
|||
} |
|||
}) |
|||
} |
|||
const confirm = (qty) => { |
|||
editItem.value.handleQty = qty |
|||
emit('updateData') |
|||
} |
|||
const showLocation = () => { |
|||
locatonItem.value = item |
|||
scanLocationCode.value.openScanPopup() |
|||
} |
|||
// 扫描源库位 |
|||
const getLocation = () => { |
|||
locatonItem.value.LocationCode = code |
|||
emit('updateData') |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['openDetail', 'remove', 'updateData']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,161 +1,125 @@ |
|||
<template> |
|||
<view class="" style="background-color: #fff;"> |
|||
<uni-collapse ref="collapse"> |
|||
<uni-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
|||
:isShowPackUnit="true"></itemCompareQty> |
|||
</template> |
|||
<package-list :dataContent="dataContent.subList" |
|||
:isEdit="settingParam.allowModifyQty=='TRUE'" |
|||
:settingParam="settingParam" |
|||
@collapseChange="collapseChange" |
|||
@updateData="updateData" |
|||
></package-list> |
|||
</uni-collapse-item> |
|||
</uni-collapse> |
|||
|
|||
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> |
|||
</recommend-qty-edit> |
|||
<comMessage ref="message"></comMessage> |
|||
</view> |
|||
<view class="" style="background-color: #fff"> |
|||
<u-collapse ref="collapse"> |
|||
<u-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true" style="flex: 1"></itemCompareQty> |
|||
</template> |
|||
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty == 'TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData"></package-list> |
|||
</u-collapse-item> |
|||
</u-collapse> |
|||
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
|||
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' |
|||
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue' |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import detailList from '@/mycomponents/detail/detailList.vue' |
|||
import packageList from '@/mycomponents/package/packageList.vue' |
|||
|
|||
import { |
|||
getDetailOption, |
|||
getPurchaseReceiptOption |
|||
} from '@/common/array.js'; |
|||
|
|||
export default { |
|||
emits: ["updateData"], |
|||
components: { |
|||
itemCompareQty, |
|||
recommend, |
|||
recommendQtyEdit, |
|||
jobDetailPopup, |
|||
receiptDetailInfoPopup, |
|||
detailList, |
|||
packageList |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
|
|||
|
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
showItem: {}, |
|||
editItem: { |
|||
record: { |
|||
|
|||
} |
|||
}, |
|||
locatonItem: {}, |
|||
detailOptions: [], |
|||
scanOptions: [] |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
if (this.detailOptions.length == 0) { |
|||
this.detailOptions = getDetailOption(); |
|||
} |
|||
if (this.scanOptions.length == 0) { |
|||
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam |
|||
.allowModifyLocation) |
|||
} |
|||
|
|||
|
|||
}, |
|||
|
|||
updated() { |
|||
console.log('updated') |
|||
}, |
|||
|
|||
methods: { |
|||
collapseChange(){ |
|||
setTimeout(() => { |
|||
this.resizeCollapse(); |
|||
}, 500) |
|||
}, |
|||
|
|||
resizeCollapse() { |
|||
this.$nextTick(r => { |
|||
this.$refs.collapse.resize() |
|||
}); |
|||
this.$forceUpdate(); |
|||
}, |
|||
|
|||
|
|||
refreshCollapse() { |
|||
this.$nextTick(r => { |
|||
this.$refs.collapse.forEach(r => { |
|||
r.childrens.forEach(i => { |
|||
i.init(); |
|||
}) |
|||
r.resize(); |
|||
}) |
|||
}); |
|||
this.$forceUpdate(); |
|||
}, |
|||
|
|||
swipeClick(e, item) { |
|||
if (e.content.text == "编辑") { |
|||
this.edit(item) |
|||
} else if (e.content.text == "移除") { |
|||
this.remove(item) |
|||
} |
|||
}, |
|||
edit(item) { |
|||
this.editItem = item; |
|||
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); |
|||
}, |
|||
remove(item) { |
|||
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|||
res => { |
|||
if (res) { |
|||
item.scaned = false |
|||
item.handleQty = null |
|||
this.$forceUpdate() |
|||
this.$emit('remove', item) |
|||
} |
|||
}); |
|||
}, |
|||
confirm(qty) { |
|||
this.editItem.handleQty = qty; |
|||
this.$emit('updateData') |
|||
}, |
|||
updateData(){ |
|||
this.$emit('updateData') |
|||
} |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
|||
import packageList from '@/mycomponents/package/packageList.vue' |
|||
|
|||
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Object, |
|||
default: null |
|||
} |
|||
}) |
|||
const showItem = ref({}) |
|||
const editItem = ref({ |
|||
record: {} |
|||
}) |
|||
const locatonItem = ref({}) |
|||
const detailOptions = ref([]) |
|||
const scanOptions = ref([]) |
|||
const comMessageRef = ref() |
|||
const collapse = ref() |
|||
const receiptEdit = ref() |
|||
// 监视属性 |
|||
watch( |
|||
() => props.dataContent, |
|||
(val) => { |
|||
if (val.subList.length > 0) { |
|||
if (collapse.value != undefined && collapse.value != null) { |
|||
nextTick((res) => { |
|||
collapse.value.init() |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
deep: true |
|||
} |
|||
) |
|||
onMounted(() => { |
|||
if (detailOptions.value.length == 0) { |
|||
detailOptions.value = getDetailOption() |
|||
} |
|||
if (scanOptions.value.length == 0) { |
|||
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, props.settingParam.allowModifyLocation) |
|||
} |
|||
}) |
|||
|
|||
const collapseChange = () => { |
|||
setTimeout(() => { |
|||
resizeCollapse() |
|||
}, 500) |
|||
} |
|||
const resizeCollapse = (object) => { |
|||
nextTick(() => { |
|||
collapse.value.init() |
|||
}) |
|||
} |
|||
const refreshCollapse = () => { |
|||
nextTick((r) => { |
|||
collapse.value.forEach((r) => { |
|||
r.childrens.forEach((i) => { |
|||
i.init() |
|||
}) |
|||
r.init() |
|||
}) |
|||
}) |
|||
} |
|||
const swipeClick = (e, item) => { |
|||
if (e.content.text == '编辑') { |
|||
edit(item) |
|||
} else if (e.content.text == '移除') { |
|||
remove(item) |
|||
} |
|||
} |
|||
const edit = (item) => { |
|||
editItem = item |
|||
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty) |
|||
} |
|||
const remove = (item) => { |
|||
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { |
|||
if (res) { |
|||
item.scaned = false |
|||
item.handleQty = null |
|||
emit('remove', item) |
|||
} |
|||
}) |
|||
} |
|||
const confirm = (qty) => { |
|||
editItem.value.handleQty = qty |
|||
emit('updateData') |
|||
} |
|||
const updateData = () => { |
|||
emit('updateData') |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['remove', 'updateData']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,150 +1,135 @@ |
|||
<template> |
|||
<view class="" style="background-color: #fff;"> |
|||
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem"> |
|||
</comReturnRequestInfo> --> |
|||
<uni-collapse ref="collapse1" @change=""> |
|||
<uni-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<item-compare-qty |
|||
:dataContent="dataContent" |
|||
:handleQty="Number(dataContent.handleQty)" |
|||
:isShowStdPack="false"> |
|||
</item-compare-qty> |
|||
</template> |
|||
<view class="" v-for="(item,index) in dataContent.subList"> |
|||
<uni-swipe-action ref="swipeAction"> |
|||
<uni-swipe-action-item @click="swipeClick($event,item)" |
|||
:right-options="item.scaned?scanOptions:detailOptions"> |
|||
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack" |
|||
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend> |
|||
</uni-swipe-action-item> |
|||
</uni-swipe-action> |
|||
</view> |
|||
</uni-collapse-item> |
|||
</uni-collapse> |
|||
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
|||
<comMessage ref="message"></comMessage> |
|||
</view> |
|||
<view class="" style="background-color: #fff"> |
|||
<u-collapse ref="collapse"> |
|||
<u-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" style="flex: 1"> </item-compare-qty> |
|||
</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)"> |
|||
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack" :isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend> |
|||
</u-swipe-action> |
|||
</u-collapse-item> |
|||
</u-collapse> |
|||
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|||
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue' |
|||
import { |
|||
getDetailOption, |
|||
getDetailEditRemoveOption, |
|||
getDetailRemoveOption |
|||
} from '@/common/array.js'; |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, onMounted, watch, nextTick } from 'vue' |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|||
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue' |
|||
import { getDetailOption, getDetailEditRemoveOption, getDetailRemoveOption } from '@/common/array.js' |
|||
|
|||
export default { |
|||
emits: ['openDetail'], |
|||
components: { |
|||
itemCompareQty, |
|||
recommend, |
|||
balanceQtyEdit, |
|||
comReturnRequestInfo |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
}, |
|||
watch: { |
|||
dataContent(newVal) { |
|||
var test =this.dataContent |
|||
this.requestItem = newVal.subList[0]; |
|||
}, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
option: [], |
|||
showItem: {}, |
|||
editItem: { |
|||
record: { |
|||
|
|||
} |
|||
}, |
|||
detailOptions: [], |
|||
scanOptions: [], |
|||
requestItem:{} |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
if (this.detailOptions.length == 0) { |
|||
this.detailOptions = getDetailOption(); |
|||
} |
|||
if (this.scanOptions.length == 0) { |
|||
this.scanOptions = getDetailEditRemoveOption(); |
|||
// if (this.dataContent.allowModifyQty == 1) { |
|||
// this.scanOptions = getDetailEditRemoveOption(); |
|||
// } else { |
|||
// this.scanOptions = getDetailRemoveOption(); |
|||
// } |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
swipeClick(e, item) { |
|||
if (e.content.text == "详情") { |
|||
this.detail(item) |
|||
} else if (e.content.text == "编辑") { |
|||
this.edit(item) |
|||
} else if (e.content.text == "移除") { |
|||
this.remove(item) |
|||
} |
|||
}, |
|||
edit(item) { |
|||
this.editItem = item; |
|||
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty); |
|||
}, |
|||
|
|||
detail(item) { |
|||
this.$emit('openDetail', item); |
|||
// this.showItem = item; |
|||
// this.$refs.jobDetailPopup.openPopup(item) |
|||
}, |
|||
remove(item) { |
|||
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|||
res => { |
|||
if (res) { |
|||
item.scaned = false |
|||
item.record = {} |
|||
item.balance = {} |
|||
item.inventoryStatus = item.RecommendInventoryStatus |
|||
// item.record.qty = 0; |
|||
this.$forceUpdate() |
|||
this.$emit('remove', item) |
|||
} |
|||
}); |
|||
}, |
|||
confirm(qty) { |
|||
this.editItem.record.qty = qty; |
|||
this.$emit('updateData') |
|||
} |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
const option = ref([]) |
|||
const showItem = ref({}) |
|||
const editItem = ref({ |
|||
record: {} |
|||
}) |
|||
const detailOptions = ref([]) |
|||
const scanOptions = ref([]) |
|||
const requestItem = ref({}) |
|||
const qtyEdit = ref() |
|||
const comMessageRef = ref() |
|||
const dataContent = ref([]) |
|||
const collapse = ref() |
|||
dataContent.value = props.dataContent |
|||
dataContent.value.subList.forEach((item) => { |
|||
item.show = false |
|||
}) |
|||
onMounted(() => { |
|||
if (detailOptions.value.length == 0) { |
|||
detailOptions.value = getDetailOption() |
|||
} |
|||
if (scanOptions.value.length == 0) { |
|||
scanOptions.value = getDetailEditRemoveOption() |
|||
} |
|||
}) |
|||
// 监视属性 |
|||
watch( |
|||
() => props.dataContent, |
|||
(val) => { |
|||
requestItem.value = val.subList[0] |
|||
dataContent.value = val |
|||
dataContent.value.subList.forEach((item) => { |
|||
item.show = false |
|||
}) |
|||
nextTick(() => { |
|||
collapse.value.init() |
|||
}) |
|||
}, |
|||
{ |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
) |
|||
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) |
|||
} else if (text == '编辑') { |
|||
edit(item) |
|||
} else if (text == '移除') { |
|||
remove(item) |
|||
} |
|||
} |
|||
const edit = (item) => { |
|||
editItem.value = item |
|||
qtyEdit.value.openEditPopup(item.balance, item.record.qty) |
|||
} |
|||
const detail = (item) => { |
|||
emit('openDetail', item) |
|||
} |
|||
const remove = (item) => { |
|||
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { |
|||
if (res) { |
|||
item.scaned = false |
|||
item.record = {} |
|||
item.balance = {} |
|||
item.inventoryStatus = item.RecommendInventoryStatus |
|||
emit('remove', item) |
|||
} |
|||
}) |
|||
} |
|||
const confirm = (qty) => { |
|||
editItem.value.record.qty = qty |
|||
emit('updateData') |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['openDetail', 'remove', 'updateData']) |
|||
</script> |
|||
|
|||
<style> |
|||
::v-deep .u-arrow-down-icon { |
|||
margin-right: 0px !important; |
|||
} |
|||
</style> |
|||
|
@ -1,65 +1,48 @@ |
|||
<template> |
|||
<view class="pop_detail" style="height:80%"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<view class='split_line'></view> |
|||
<scroll-view style="height:320px "> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<view class='split_line'></view> |
|||
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info> |
|||
<view class='split_line'></view> |
|||
<view v-if="dataContent.record!=undefined"> |
|||
<detail-handle-info :dataContent="dataContent"> |
|||
</detail-handle-info> |
|||
<view class='split_line'></view> |
|||
</view> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<view class="u-p-t-20 u-p-b-20"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<scroll-view style="height: 320px" scroll-y> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<view class="split_line"></view> |
|||
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info> |
|||
<view class="split_line"></view> |
|||
<view v-if="dataContent.record != undefined"> |
|||
<detail-handle-info :dataContent="dataContent"> </detail-handle-info> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup"> 关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
|||
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue' |
|||
|
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
comItem, |
|||
detailItemInfo, |
|||
detailRecommendInfo, |
|||
detailHandleInfo |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
closePopup() { |
|||
this.$emit('onClose') |
|||
}, |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
|||
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const closePopup = () => { |
|||
emit('onClose') |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['onClose']) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,79 +1,66 @@ |
|||
<template> |
|||
<view class=""> |
|||
<uni-popup ref="popup"> |
|||
<detail-common-info :dataContent='dataContent'></detail-common-info> |
|||
</uni-popup> |
|||
</view> |
|||
<view class=""> |
|||
<u-popup v-model="show" mode="bottom"> |
|||
<detail-common-info :dataContent="dataContent"></detail-common-info> |
|||
</u-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getInventoryStatusName, |
|||
getPackUnitInfo |
|||
} from '@/common/directory.js'; |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js' |
|||
|
|||
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
|||
export default { |
|||
components: { |
|||
detailCommonInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
dataContent: {} |
|||
} |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
|||
|
|||
}, |
|||
methods: { |
|||
openScanPopup(val) { |
|||
this.dataContent = val; |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 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 props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}) |
|||
const show = ref(false) |
|||
const dataContent = ref('') |
|||
const openScanPopup = (val) => { |
|||
dataContent.value = val |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
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> |
|||
|
|||
<style> |
|||
.popup_box { |
|||
width: 500rpx; |
|||
height: 500rpx; |
|||
} |
|||
.popup_box { |
|||
width: 500rpx; |
|||
height: 500rpx; |
|||
} |
|||
|
|||
.item_big_title { |
|||
color: #2196F3; |
|||
font-size: 35rpx; |
|||
margin-top: 15rpx; |
|||
margin-bottom: 15rpx; |
|||
} |
|||
.item_big_title { |
|||
color: #2196f3; |
|||
font-size: 35rpx; |
|||
margin-top: 15rpx; |
|||
margin-bottom: 15rpx; |
|||
} |
|||
|
|||
.item { |
|||
padding-top: 5rpx; |
|||
padding-bottom: 5rpx; |
|||
} |
|||
.item { |
|||
padding-top: 5rpx; |
|||
padding-bottom: 5rpx; |
|||
} |
|||
|
|||
.item_title { |
|||
color: #000000; |
|||
font-size: 32rpx; |
|||
} |
|||
.item_title { |
|||
color: #000000; |
|||
font-size: 32rpx; |
|||
} |
|||
</style> |
|||
|
@ -1,60 +1,42 @@ |
|||
<template> |
|||
<view class="pop_detail" style="height:80%"> |
|||
<view class='split_line'></view> |
|||
<scroll-view style="height:320px "> |
|||
<scroll-view style="height:320px "> |
|||
<!-- 物品 --> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
|||
<view class='split_line'></view> |
|||
<!-- 库存余额 --> |
|||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|||
<!-- 包装 --> |
|||
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> --> |
|||
</scroll-view> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<view class="split_line"></view> |
|||
<scroll-view style="height: 320px" scroll-y> |
|||
<!-- 物品 --> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
|||
<view class="split_line"></view> |
|||
<!-- 库存余额 --> |
|||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|||
<!-- 包装 --> |
|||
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> --> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup"> 关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
|||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
|||
|
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
detailItemInfo, |
|||
detailPackageInfo, |
|||
detailBalanceInfo |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
closePopup() { |
|||
this.$emit('onClose') |
|||
}, |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
|||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const closePopup = () => { |
|||
emit('onClose') |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['onClose']) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,71 +1,52 @@ |
|||
<template> |
|||
<uni-popup ref="popup"> |
|||
<view class="pop_detail" style="height:80%"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<view class='split_line'></view> |
|||
<scroll-view style="height:320px "> |
|||
<!-- 物品 --> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<view class='split_line'></view> |
|||
<!-- 库存余额 --> |
|||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|||
<view class='split_line'></view> |
|||
<!-- 包装 --> |
|||
<detail-package-info :dataContent="dataContent.package"></detail-package-info> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</uni-popup> |
|||
<u-popup v-model="show" mode="bottom"> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<view class="split_line"></view> |
|||
<scroll-view style="height: 320px" scroll-y> |
|||
<!-- 物品 --> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<view class="split_line"></view> |
|||
<!-- 库存余额 --> |
|||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|||
<view class="split_line"></view> |
|||
<!-- 包装 --> |
|||
<detail-package-info :dataContent="dataContent.package"></detail-package-info> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup"> 关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
</template> |
|||
|
|||
<script> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
|||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
|||
|
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
comItem, |
|||
detailItemInfo, |
|||
detailPackageInfo, |
|||
detailBalanceInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
} |
|||
}, |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
openPopup(val) { |
|||
this.dataContent = val; |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
}, |
|||
closePopup() { |
|||
this.$refs.popup.close() |
|||
}, |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue' |
|||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const show = ref(false) |
|||
const dataContent = ref(props.dataContent) |
|||
const openPopup = (val) => { |
|||
dataContent.value = val |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
const closePopup = () => { |
|||
show.value = false |
|||
} |
|||
defineExpose({ openPopup, closePopup }) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,65 +1,47 @@ |
|||
<template> |
|||
<view class="pop_detail" style="height:80%"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<view class='split_line'></view> |
|||
<scroll-view style="height:320px "> |
|||
<!-- 物品 --> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
|||
<view class='split_line'></view> |
|||
<!-- 包装 --> |
|||
|
|||
<!-- 库存余额 --> |
|||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<view class="u-p-t-20 u-p-b-20"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
</view> |
|||
<view class="split_line u-m-b-10"></view> |
|||
<scroll-view style="height: 320px" scroll-y> |
|||
<!-- 物品 --> |
|||
<detail-item-info :dataContent="dataContent"></detail-item-info> |
|||
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> --> |
|||
<view class="split_line u-m-t-10 u-m-b-10"></view> |
|||
<!-- 包装 --> |
|||
|
|||
<!-- 库存余额 --> |
|||
<detail-balance-info :dataContent="dataContent"></detail-balance-info> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
</scroll-view> |
|||
|
|||
<view class="u-flex u-row-center u-m-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup">关闭</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue' |
|||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
comItem, |
|||
requestDetailBasicInfo, |
|||
detailRecommendInfo, |
|||
detailItemInfo, |
|||
detailBalanceInfo |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
closePopup() { |
|||
this.$emit('onClose') |
|||
}, |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue' |
|||
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue' |
|||
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue' |
|||
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const closePopup = () => { |
|||
emit('onClose') |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['onClose']) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,46 +1,26 @@ |
|||
<template> |
|||
<view> |
|||
<view class="uni-flex u-col-center space-between"> |
|||
<view > |
|||
<view class="card_itemCode" :class="openPopup(dataContent)"> |
|||
{{dataContent.itemCode}} |
|||
</view> |
|||
<view class="card_itemName"> |
|||
{{dataContent.itemName}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view> |
|||
<view class="uni-flex u-col-center space-between u-p-t-20"> |
|||
<view> |
|||
<view class="card_itemCode" :class="openPopup(dataContent)"> |
|||
{{ dataContent.itemCode }} |
|||
</view> |
|||
<view class="card_itemName u-m-t-10"> |
|||
{{ dataContent.itemName }} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
openPopup(val) { |
|||
|
|||
// console.log(JSON.stringify(val)); |
|||
}, |
|||
}, |
|||
} |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const openPopup = (val) => {} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,67 +1,43 @@ |
|||
<template> |
|||
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff; margin-left: 10px;"> |
|||
<view> |
|||
<item :dataContent="dataContent"></item> |
|||
</view> |
|||
<view style="word-break: break-all;width: 30%;display: flex;justify-content:flex-end;margin-right: 10rpx;"> |
|||
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true" |
|||
:objTextStyle='objTextStyle'></recommend-qty> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" |
|||
:handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> |
|||
</compare-qty> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color: #fff"> |
|||
<view style="flex: 1"> |
|||
<item :dataContent="dataContent"></item> |
|||
</view> |
|||
<view style="word-break: break-all; display: flex; justify-content: flex-end; margin-right: 10rpx"> |
|||
<recommend-qty v-if="handleQty == 0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true" :objTextStyle="objTextStyle"></recommend-qty> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> </compare-qty> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import item from '@/mycomponents/item/item.vue' |
|||
import qty from '@/mycomponents/qty/qty.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import balanceQty from '@/mycomponents/qty/balanceQty.vue' |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, watch } from 'vue' |
|||
import item from '@/mycomponents/item/item.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
item, |
|||
recommendQty, |
|||
compareQty, |
|||
balanceQty |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
type: { |
|||
type: String, |
|||
default: 'recommend' //recommend:推荐 compare:对比 |
|||
}, |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
isShowPackUnit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
objTextStyle: { |
|||
type: Object, |
|||
default: null |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
}, |
|||
} |
|||
const { proxy } = getCurrentInstance() |
|||
const props = defineProps({ |
|||
type: { |
|||
type: String, |
|||
default: 'recommend' // recommend:推荐 compare:对比 |
|||
}, |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
isShowPackUnit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
objTextStyle: { |
|||
type: Object, |
|||
default: null |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,58 +1,43 @@ |
|||
<!--包装组件--> |
|||
<template> |
|||
<view class=""> |
|||
<view class="uni-flex space-between padding_10" style="background-color: #fff;" > |
|||
<view> |
|||
<view class="font_xl text_black text_bold " style="font-size: 38rpx;"> |
|||
{{ itemdetail.code }} |
|||
</view> |
|||
<view class="" style="font-size: 32rpx;"> |
|||
{{ itemdetail.name }} |
|||
</view> |
|||
<view class="" style="font-size: 32rpx;"> |
|||
{{ itemdetail.desc1 }} |
|||
{{ itemdetail.desc2 }} |
|||
</view> |
|||
</view> |
|||
<view class=""> |
|||
<item-status :status="itemdetail.status"></item-status> |
|||
</view> |
|||
</view> |
|||
|
|||
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup> |
|||
</view> |
|||
<view class=""> |
|||
<view class="uni-flex space-between padding_10" style="background-color: #fff; padding: 20rpx"> |
|||
<view> |
|||
<view class="font_xl text_black text_bold" style="font-size: 38rpx"> |
|||
{{ itemdetail.code }} |
|||
</view> |
|||
<view class="" style="font-size: 32rpx"> |
|||
{{ itemdetail.name }} |
|||
</view> |
|||
<view class="" style="font-size: 32rpx"> |
|||
{{ itemdetail.desc1 }} |
|||
{{ itemdetail.desc2 }} |
|||
</view> |
|||
</view> |
|||
<view class=""> |
|||
<item-status :status="itemdetail.status"></item-status> |
|||
</view> |
|||
</view> |
|||
|
|||
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import itemStatus from '@/mycomponents/item/itemStatus.vue'; |
|||
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue'; |
|||
|
|||
export default { |
|||
name: "comItem", |
|||
components: { |
|||
itemInfoPopup, |
|||
itemStatus |
|||
}, |
|||
data() { |
|||
return { |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import itemStatus from '@/mycomponents/item/itemStatus.vue' |
|||
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue' |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
itemdetail: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
methods: { |
|||
showHint() { |
|||
this.$refs.showHint.openScanPopup() |
|||
} |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
itemdetail: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}) |
|||
const showHint = ref() |
|||
const handleShowHint = () => { |
|||
showHint.value.openScanPopup() |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,59 +1,37 @@ |
|||
<template> |
|||
<view class="uni-flex uni-row space-between center" style="background-color:#fff; margin-left: 15px;"> |
|||
<view> |
|||
<item :dataContent="dataContent"></item> |
|||
</view> |
|||
<view> |
|||
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" |
|||
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> |
|||
</compare-qty> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row space-between center" style="width: 100%"> |
|||
<view style="flex: 1"> |
|||
<item :dataContent="dataContent"></item> |
|||
</view> |
|||
<view> |
|||
<balance-qty v-if="isShowBalanceQty" :dataContent="dataContent"></balance-qty> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> </compare-qty> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
import item from '@/mycomponents/item/item.vue' |
|||
import balanceQty from '@/mycomponents/qty/balanceQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
<script setup lang="ts"> |
|||
import item from '@/mycomponents/item/item.vue' |
|||
import balanceQty from '@/mycomponents/qty/balanceQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
item, |
|||
balanceQty, |
|||
compareQty |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
isShowBalanceQty: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
showStdPack: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
}, |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
isShowBalanceQty: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
showStdPack: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,41 +1,24 @@ |
|||
<template> |
|||
<view> |
|||
<view class="task_card"> |
|||
<jobTopAsn :dataContent="dataContent"></jobTopAsn> |
|||
<slot></slot> |
|||
<view class='split_line'></view> |
|||
<job-bottom :dataContent="dataContent"></job-bottom> |
|||
</view> |
|||
</view> |
|||
<view> |
|||
<view class="task_card"> |
|||
<jobTopAsn :dataContent="dataContent"></jobTopAsn> |
|||
<slot></slot> |
|||
<view class="split_line"></view> |
|||
<job-bottom :dataContent="dataContent"></job-bottom> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' |
|||
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
|||
<script setup lang="ts"> |
|||
import jobTopAsn from '@/mycomponents/job/jobTopAsn.vue' |
|||
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
jobTopAsn, |
|||
jobBottom, |
|||
}, |
|||
data() { |
|||
return { |
|||
}; |
|||
}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
|
|||
</style> |
|||
<style lang="scss"></style> |
|||
|
@ -1,79 +1,61 @@ |
|||
<template> |
|||
<view class="task_item"> |
|||
<view class="task_text" style="border-top: 1px solid #dedede;padding-top: 20rpx;margin-top: 20rpx;"> |
|||
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" |
|||
:objTextStyle="{'fontWeight':'bold','fontSize':'40rpx'}"></itemCompareQty> |
|||
<div class="u-p-l-10"> |
|||
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"> |
|||
</pack> |
|||
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch> |
|||
<div class="u-flex justify-between"> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> |
|||
</location> |
|||
<!-- <to-location></to-location> --> |
|||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> |
|||
</to-location> |
|||
</div> |
|||
</div> |
|||
</view> |
|||
</view> |
|||
<view class=""> |
|||
<view class="task_text" style="border-top: 1px solid #dedede; padding-top: 20rpx"> |
|||
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="false" :objTextStyle="{ fontWeight: 'bold', fontSize: '40rpx' }"></itemCompareQty> |
|||
<div> |
|||
<pack v-if="isShowPack && dataContent.packingNumber != null" :packingCode="dataContent.packingNumber"> </pack> |
|||
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch> |
|||
<div class="u-flex justify-between u-p-b-16"> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location> |
|||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode"> </to-location> |
|||
</div> |
|||
<view class="card_view" v-if="isShowDeliverType"> |
|||
<text class="card_packing_code card_content">发货类型</text> |
|||
<text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text> |
|||
</view> |
|||
</div> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
toLocation, |
|||
batch, |
|||
jobComMainCard, |
|||
itemCompareQty, |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowContainer: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
}, |
|||
|
|||
|
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' |
|||
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowContainer: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowDeliverType: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
|
|||
</style> |
|||
<style lang="scss"></style> |
|||
|
@ -1,62 +1,44 @@ |
|||
<template> |
|||
<view class="pop_detail" style="height:80%"> |
|||
<job-top :dataContent="dataContent"></job-top> |
|||
<view class='split_line'></view> |
|||
<scroll-view style="height:400px "> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
<job-request-info :dataContent="dataContent"></job-request-info> |
|||
<view class='split_line'></view> |
|||
<job-person-info :dataContent="dataContent"></job-person-info> |
|||
<view class='split_line'></view> |
|||
<job-setting-info :dataContent="dataContent"></job-setting-info> |
|||
</scroll-view> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<job-top :dataContent="dataContent"></job-top> |
|||
<view class="split_line"></view> |
|||
<scroll-view style="height: 400px" scroll-y> |
|||
<slot> |
|||
<!-- 每个任务的详情 --> |
|||
</slot> |
|||
<job-request-info :dataContent="dataContent"></job-request-info> |
|||
<view class="split_line"></view> |
|||
<job-person-info :dataContent="dataContent"></job-person-info> |
|||
<view class="split_line"></view> |
|||
<job-setting-info :dataContent="dataContent"></job-setting-info> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup"> 关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import jobTop from '@/mycomponents/job/jobTop.vue' |
|||
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
|||
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue' |
|||
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue' |
|||
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue' |
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
jobTop, |
|||
jobBottom, |
|||
jobPersonInfo, |
|||
jobSettingInfo, |
|||
jobRequestInfo |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
<script setup lang="ts"> |
|||
import jobTop from '@/mycomponents/job/jobTop.vue' |
|||
import jobBottom from '@/mycomponents/job/jobBottom.vue' |
|||
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue' |
|||
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue' |
|||
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue' |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const closePopup = () => { |
|||
emit('onClose') |
|||
} |
|||
|
|||
methods: { |
|||
closePopup() { |
|||
this.$emit('onClose') |
|||
}, |
|||
} |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['onClose']) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,79 +1,70 @@ |
|||
<template> |
|||
<view class=""> |
|||
<uni-popup ref="popup"> |
|||
<detail-common-info :dataContent='dataContent' @onClose="closeScanPopup()" ></detail-common-info> |
|||
</uni-popup> |
|||
</view> |
|||
<view class=""> |
|||
<u-popup mode="bottom" v-model="show"> |
|||
<detail-common-info :dataContent="dataContent" @onClose="closeScanPopup()"></detail-common-info> |
|||
</u-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getInventoryStatusName, |
|||
getPackUnitInfo |
|||
} from '@/common/directory.js'; |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import { getInventoryStatusName, getPackUnitInfo } from '@/common/directory.js' |
|||
|
|||
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
|||
export default { |
|||
components: { |
|||
detailCommonInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
dataContent: {} |
|||
} |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
|||
|
|||
}, |
|||
methods: { |
|||
openScanPopup(val) { |
|||
this.dataContent = val; |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 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 dataContent = ref({}) |
|||
const show = ref(false) |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}) |
|||
const openScanPopup = (val) => { |
|||
dataContent.value = val |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
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> |
|||
|
|||
<style> |
|||
.popup_box { |
|||
width: 500rpx; |
|||
height: 500rpx; |
|||
} |
|||
.popup_box { |
|||
width: 500rpx; |
|||
height: 500rpx; |
|||
} |
|||
|
|||
.item_big_title { |
|||
color: #2196F3; |
|||
font-size: 35rpx; |
|||
margin-top: 15rpx; |
|||
margin-bottom: 15rpx; |
|||
} |
|||
.item_big_title { |
|||
color: #2196f3; |
|||
font-size: 35rpx; |
|||
margin-top: 15rpx; |
|||
margin-bottom: 15rpx; |
|||
} |
|||
|
|||
.item { |
|||
padding-top: 5rpx; |
|||
padding-bottom: 5rpx; |
|||
} |
|||
.item { |
|||
padding-top: 5rpx; |
|||
padding-bottom: 5rpx; |
|||
} |
|||
|
|||
.item_title { |
|||
color: #000000; |
|||
font-size: 32rpx; |
|||
} |
|||
.item_title { |
|||
color: #000000; |
|||
font-size: 32rpx; |
|||
} |
|||
</style> |
|||
|
@ -1,155 +1,166 @@ |
|||
<template> |
|||
<uni-popup ref="popup"> |
|||
<view class="maskbox" @tap="maskClick"></view> |
|||
<view class="uni-flex uni-column center" |
|||
style="background-color: white;width: 200px; height:auto;padding: 20rpx;z-index: 99;position: relative;"> |
|||
<view class="uni-flex space-between u-col-center" style="width: 100%;"> |
|||
<view class="" style="font-size: 32rpx;"> |
|||
只看当天 |
|||
</view> |
|||
<u-popup v-model="show" @click="show = false" mode="right" width="450rpx"> |
|||
<view class="maskbox" @tap="maskClick"></view> |
|||
<view class="uni-flex uni-column center" style="background-color: white; width: 200px; height: auto; padding: 20rpx; z-index: 100; position: relative; top: 100rpx; right: 20rpx; left: 30rpx; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); border-radius: 10rpx"> |
|||
<view class="uni-flex space-between u-col-center" style="width: 100%"> |
|||
<view class="" style="font-size: 32rpx"> 只看当天 </view> |
|||
|
|||
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch> |
|||
</view> |
|||
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> |
|||
|
|||
<view class="" style="font-size: 32rpx;"> |
|||
只看待处理 |
|||
</view> |
|||
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch> |
|||
</view> |
|||
<view class=""> |
|||
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn"> |
|||
<button class="filter_button" hover-class="filter_button_after" |
|||
@click="scanOtherClick">扫描ASN单号</button> |
|||
</view> |
|||
<view class="uni-flex u-row-center" style="margin-top: 30rpx;"> |
|||
<button class="filter_button" hover-class="filter_button_after" |
|||
@click="scanNumberClick">扫描任务编号</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</uni-popup> |
|||
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number> |
|||
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number> |
|||
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch> |
|||
</view> |
|||
<view class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx"> |
|||
<view class="" style="font-size: 32rpx"> 只看待处理 </view> |
|||
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch> |
|||
</view> |
|||
<view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx"> |
|||
<view class="" style="font-size: 32rpx"> 生产线 </view> |
|||
<u-input style="margin-left: 20rpx" v-model="productionLineCode" :border="true" placeholder="请输入生产线" @confirm="productionLineCodeConfirm" /> |
|||
</view> |
|||
<view v-if="isShowFromLocationCode" class="uni-flex space-between u-col-center" style="width: 100%; margin-top: 30rpx"> |
|||
<view class="" style="font-size: 32rpx"> 来源库位 </view> |
|||
<u-input style="margin-left: 20rpx" v-model="fromLocationCode" :border="true" placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" /> |
|||
</view> |
|||
<view class=""> |
|||
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowAsn"> |
|||
<button class="filter_button" hover-class="filter_button_after" @click="scanOtherClick">扫描ASN单号</button> |
|||
</view> |
|||
<view class="uni-flex u-row-center" style="margin-top: 30rpx" v-if="isShowJob"> |
|||
<button class="filter_button" hover-class="filter_button_after" @click="scanNumberClick">扫描任务编号</button> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode="getScanNumber"></win-scan-job-number> |
|||
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode="getScanAsNumber"></win-scan-asn-number> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getTodayDate |
|||
} from '@/common/basic.js'; |
|||
|
|||
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue" |
|||
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue" |
|||
|
|||
export default { |
|||
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"], |
|||
components: { |
|||
winScanJobNumber, |
|||
winScanAsnNumber |
|||
}, |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, watch } from 'vue' |
|||
import { getTodayDate } from '@/common/basic.js' |
|||
|
|||
props: { |
|||
checkedToday: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
checkedWaitTask: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
otherTitle: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
isShowAsn:{ |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dataContent: {}, |
|||
checkedTodayModel:false, |
|||
checkedWaitModel:false, |
|||
} |
|||
}, |
|||
watch: { |
|||
checkedToday: { |
|||
handler(newName, oldName) { |
|||
this.checkedTodayModel = this.checkedToday |
|||
}, |
|||
immediate: true, |
|||
deep: true |
|||
}, |
|||
checkedWaitTask: { |
|||
handler(newName, oldName) { |
|||
this.checkedWaitModel = this.checkedWaitTask |
|||
}, |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
// 点击遮罩 |
|||
maskClick() { |
|||
// 如果不允许点击遮罩,直接返回 |
|||
this.closeScanPopup(); |
|||
}, |
|||
openFilter() { |
|||
this.$refs['popup'].open("right"); |
|||
}, |
|||
closeScanPopup() { |
|||
this.$refs.popup.close() |
|||
}, |
|||
switchChangeToday(isOn) { |
|||
import winScanJobNumber from '@/mycomponents/scan/winScanJobNumber.vue' |
|||
import winScanAsnNumber from '@/mycomponents/scan/winScanAsnNumber.vue' |
|||
|
|||
let creationTime = ''; |
|||
if (isOn) { |
|||
creationTime = getTodayDate(); |
|||
} |
|||
const props = defineProps({ |
|||
checkedToday: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
checkedWaitTask: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
otherTitle: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isShowAsn: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isShowJob: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocationCode: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isShowProductionLineCode: { |
|||
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 } |
|||
) |
|||
// 生产线 |
|||
|
|||
this.$emit("switchChangeToday", isOn, creationTime) |
|||
this.closeScanPopup() |
|||
}, |
|||
switchChangeWait(isOn) { |
|||
let status = "1,2"; |
|||
if(isOn){ |
|||
status="1" |
|||
} |
|||
this.$emit("switchChangeWait", isOn, status) |
|||
this.closeScanPopup() |
|||
}, |
|||
const productionLineCodeConfirm = () => { |
|||
emit('productionLineCode', productionLineCode.value) |
|||
} |
|||
// 来源库位 |
|||
|
|||
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 fromLocationCodeConfirm = () => { |
|||
emit('fromLocationCode', fromLocationCode.value) |
|||
} |
|||
// 点击遮罩 |
|||
const maskClick = () => { |
|||
// 如果不允许点击遮罩,直接返回 |
|||
closeScanPopup() |
|||
} |
|||
const openFilter = () => { |
|||
show.value = true |
|||
} |
|||
const closeScanPopup = () => { |
|||
show.value = false |
|||
} |
|||
const switchChangeToday = (isOn) => { |
|||
let creationTime = '' |
|||
if (isOn) { |
|||
creationTime = getTodayDate() |
|||
} |
|||
emit('switchChangeToday', isOn, creationTime) |
|||
closeScanPopup() |
|||
} |
|||
const switchChangeWait = (isOn) => { |
|||
let status = '1,2' |
|||
if (isOn) { |
|||
status = '1' |
|||
} |
|||
emit('switchChangeWait', isOn, status) |
|||
closeScanPopup() |
|||
} |
|||
const scanNumberClick = () => { |
|||
scanNumber.value.openScanPopup() |
|||
} |
|||
const scanOtherClick = () => { |
|||
scanAsnNumber.value.openScanPopup() |
|||
} |
|||
const getScanAsNumber = (val) => { |
|||
emit('onScanAsnNumber', val) |
|||
scanAsnNumber.value.closeScanPopup() |
|||
closeScanPopup() |
|||
} |
|||
const getScanNumber = (val) => { |
|||
emit('onScanNumber', val) |
|||
scanNumber.value.closeScanPopup() |
|||
closeScanPopup() |
|||
} |
|||
const emit = defineEmits(['switchChangeToday', 'switchChangeWait', 'onScanNumber', 'onScanAsnNumber', 'productionLineCode', 'fromLocationCode']) |
|||
defineExpose({ openFilter }) |
|||
</script> |
|||
<style lang="scss"> |
|||
.maskbox { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100vw; |
|||
height: 100vh; |
|||
z-index: 0; |
|||
} |
|||
.maskbox { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
width: 100vw; |
|||
height: 100vh; |
|||
z-index: 0; |
|||
} |
|||
|
|||
::v-deep .u-drawer-right { |
|||
background-color: rgba(0, 0, 0, 0) !important; |
|||
} |
|||
</style> |
|||
|
@ -1,42 +1,28 @@ |
|||
<template> |
|||
<view class="task_top"> |
|||
<view class="uni-flex space-between u-col-center align-center" > |
|||
<job-number v-if="dataContent.asnNumber==null || dataContent.asnNumber==''" :number="dataContent.requestNumber"></job-number> |
|||
<job-number v-else :number="dataContent.asnNumber"></job-number> |
|||
<job-status :jobStatus="dataContent.status"></job-status> |
|||
</view> |
|||
</view> |
|||
<view class="task_item"> |
|||
<view class="uni-flex space-between u-col-center align-center"> |
|||
<job-number v-if="dataContent.asnNumber == null || dataContent.asnNumber == ''" :number="dataContent.requestNumber"></job-number> |
|||
<job-number v-else :number="dataContent.asnNumber"></job-number> |
|||
<job-status :jobStatus="dataContent.status"></job-status> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import jobNumber from '@/mycomponents/job/jobNumber.vue' |
|||
import jobStatus from '@/mycomponents/job/jobStatus.vue' |
|||
export default { |
|||
components: { |
|||
jobNumber, |
|||
jobStatus |
|||
}, |
|||
data() { |
|||
return { |
|||
<script setup lang="ts"> |
|||
import jobNumber from '@/mycomponents/job/jobNumber.vue' |
|||
import jobStatus from '@/mycomponents/job/jobStatus.vue' |
|||
|
|||
}; |
|||
}, |
|||
watch: {}, |
|||
|
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
openDetail(item) { |
|||
this.$emit("openDetail", this.dataContent); |
|||
}, |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
const openDetail = (item) => { |
|||
emit('openDetail', props.dataContent) |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['openDetail']) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
|||
<style lang="scss"></style> |
|||
|
@ -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> |
@ -1,55 +1,42 @@ |
|||
<template> |
|||
<view class="" style="background-color: #fff;"> |
|||
<view class="uni-flex uni-row space-between u-col-center" > |
|||
<view class="location_view" > |
|||
<text class="card_location"> 库位 </text> |
|||
<text> {{locationCode}}</text> |
|||
</view> |
|||
<view class="" v-if="recommendQty>0"> |
|||
<count :countType="'recommend_handle_no_pack'" |
|||
:recommendQty="recommendQty" |
|||
:handledQty="handledQty" |
|||
:uom="uom"></count> |
|||
</view> |
|||
|
|||
</view> |
|||
|
|||
</view> |
|||
<view class="" style="background-color: #fff"> |
|||
<view class="uni-flex uni-row space-between u-col-center"> |
|||
<view class="location_view"> |
|||
<text class="card_location"> 库位 </text> |
|||
<text> {{ locationCode }}</text> |
|||
</view> |
|||
<view class="" v-if="recommendQty > 0"> |
|||
<count :countType="'recommend_handle_no_pack'" :recommendQty="recommendQty" :handledQty="handledQty" :uom="uom"></count> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: { |
|||
}, |
|||
data(){ |
|||
return { |
|||
} |
|||
}, |
|||
props: { |
|||
locationInfo:{ |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
locationCode:{ |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
recommendQty:{ |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
handledQty:{ |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
uom:{ |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}, |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
|
|||
} |
|||
const props = defineProps({ |
|||
locationInfo: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
locationCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
recommendQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
handledQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
uom: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,126 +1,90 @@ |
|||
<template> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
|||
padding-bottom: 15rpx; |
|||
padding-left: 10rpx; |
|||
padding-right: 10rpx; |
|||
font-size:32rpx;"> |
|||
<view class="uni-flex uni-row u-col-center" @click="showLocation"> |
|||
<view class="flex uni-row" v-if="isShowEdit" > |
|||
<view > |
|||
<text style="font-size: 30rpx;">{{title}}</text> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx"> |
|||
<view class="uni-flex u-row u-col-center" @click="showLocation"> |
|||
<view class="flex u-row" v-if="isShowEdit"> |
|||
<view> |
|||
<text style="font-size: 30rpx">{{ title }}</text> |
|||
|
|||
<text style="font-size: 25rpx;color:#3FBAFF;">  {{recommendLocationCode}}</text> |
|||
<text v-if="locationCode" style="font-size: 25rpx;color:#3FBAFF;"> / {{locationCode}}</text> |
|||
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
|||
</view> |
|||
<image style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<view class="" v-else> |
|||
<view > |
|||
<text style="font-size: 30rpx;">{{title}}</text> |
|||
<text style="font-size: 25rpx;color:#3FBAFF;">  {{recommendLocationCode}}</text> |
|||
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
|||
</view> |
|||
</view> |
|||
<text style="font-size: 25rpx; color: #3fbaff">  {{ recommendLocationCode }}</text> |
|||
<text v-if="locationCode" style="font-size: 25rpx; color: #3fbaff"> / {{ locationCode }}</text> |
|||
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
|||
</view> |
|||
<image style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<view class="" v-else> |
|||
<view> |
|||
<text style="font-size: 30rpx">{{ title }}</text> |
|||
<text style="font-size: 25rpx; color: #3fbaff">  {{ recommendLocationCode }}</text> |
|||
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> --> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> |
|||
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> |
|||
</view> |
|||
</view> |
|||
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' |
|||
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|||
</view> |
|||
<view class="uni-flex uni-row center" style="vertical-align: center" v-if="isDevlement()"> |
|||
<!-- <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> --> |
|||
<image style="width: 26rpx; height: 26rpx; margin-top: 6rpx" src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" /> |
|||
</view> |
|||
</view> |
|||
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|||
import config from '@/static/config.js' |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance } from 'vue' |
|||
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
|||
import config from '@/static/config.js' |
|||
|
|||
export default { |
|||
components: { |
|||
winScanLocation |
|||
}, |
|||
data() { |
|||
return { |
|||
defaultlocationCode: "" |
|||
} |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "需求库位" |
|||
}, |
|||
recommendLocationCode: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
locationCode: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Array, |
|||
default: null |
|||
} |
|||
}, |
|||
const defaultlocationCode = ref('') |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '需求库位' |
|||
}, |
|||
recommendLocationCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
locationCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Array, |
|||
default: null |
|||
} |
|||
}) |
|||
const scanLocationCode = ref() |
|||
const showLocation = () => { |
|||
if (props.isShowEdit) { |
|||
scanLocationCode.value.openScanPopup() |
|||
} |
|||
} |
|||
// 扫描源库位 |
|||
const getLocation = (location, code) => { |
|||
emit('getLocation', location, code) |
|||
} |
|||
const copy = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = props.recommendLocationCode |
|||
|
|||
watch: { |
|||
// locationCode: { |
|||
// handler(newName, oldName) { |
|||
// if (this.locationCode != "") { |
|||
// this.defaultlocationCode = this.locationCode; |
|||
// } |
|||
// }, |
|||
// immediate: true, |
|||
// deep: true |
|||
// } |
|||
}, |
|||
methods: { |
|||
showLocation() { |
|||
if (this.isShowEdit) { |
|||
this.$refs.scanLocationCode.openScanPopup(); |
|||
} |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制库位成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const isDevlement = () => { |
|||
return config.isDevelopment |
|||
} |
|||
|
|||
}, |
|||
//扫描源库位 |
|||
getLocation(location, code) { |
|||
this.$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' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制库位成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
isDevlement() { |
|||
return config.isDevelopment; |
|||
} |
|||
} |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['getLocation']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,47 +1,35 @@ |
|||
<template> |
|||
<view class="cen_card" style="background-color: #fff;"> |
|||
<view class="cell_box uni-flex uni-row"> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">仓库</view> |
|||
<view>{{dataContent.warehouseCode}}</view> |
|||
</view> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">库区</view> |
|||
<view>{{dataContent.areaCode }}</view> |
|||
</view> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">库位组</view> |
|||
<view>{{ dataContent.locationGroupCode }}</view> |
|||
</view> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">ERP储位</view> |
|||
<view>{{ dataContent.erpLocationCode }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="cen_card" style="background-color: #eef4fa"> |
|||
<view class="cell_box uni-flex uni-row"> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">仓库</view> |
|||
<view>{{ dataContent.warehouseCode }}</view> |
|||
</view> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">库区</view> |
|||
<view>{{ dataContent.areaCode }}</view> |
|||
</view> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">库位组</view> |
|||
<view>{{ dataContent.locationGroupCode }}</view> |
|||
</view> |
|||
<view class="cell_info"> |
|||
<view class="text_lightblue">ERP储位</view> |
|||
<view>{{ dataContent.erpLocationCode }}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'comItemLocationCenter', |
|||
components: {}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
data() { |
|||
return {} |
|||
}, |
|||
created() { |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, nextTick, onMounted, watch } from 'vue' |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,45 +1,32 @@ |
|||
<!--库位组件--> |
|||
<template> |
|||
<view class="" > |
|||
<view class="" style="background-color: #fff;"> |
|||
<view class="uni-flex space-between" style="padding: 20rpx;"> |
|||
<view class="" > |
|||
<text class="font_xl text_black text_bold">{{locationDetail.code}}</text> |
|||
</view> |
|||
<view class=""> |
|||
<location-status :type="locationDetail.type" ></location-status> |
|||
</view> |
|||
</view> |
|||
<location-detail :dataContent="locationDetail"></location-detail> |
|||
</view> |
|||
</view> |
|||
<view class=""> |
|||
<view class="" style="background-color: #fff"> |
|||
<view class="uni-flex space-between" style="padding: 20rpx"> |
|||
<view class=""> |
|||
<text class="font_xl text_black text_bold">{{ locationDetail.code }}</text> |
|||
</view> |
|||
<view class=""> |
|||
<location-status :type="locationDetail.type"></location-status> |
|||
</view> |
|||
</view> |
|||
<view class="" style="padding: 0px 20rpx"> |
|||
<location-detail-com :dataContent="locationDetail"></location-detail-com> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import locationDetail from '@/mycomponents/location/locationDetail.vue' |
|||
import locationStatus from '@/mycomponents/location/locationStatus.vue' |
|||
export default { |
|||
name: "comlocation", |
|||
components: { |
|||
locationDetail, |
|||
locationStatus, |
|||
}, |
|||
data() { |
|||
return { |
|||
<script setup lang="ts"> |
|||
import locationDetailCom from '@/mycomponents/location/locationDetail.vue' |
|||
import locationStatus from '@/mycomponents/location/locationStatus.vue' |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
locationDetail: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}, |
|||
methods:{ |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
locationDetail: { |
|||
type: Object, |
|||
value: null |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
</style> |
|||
<style scoped lang="scss"></style> |
|||
|
@ -1,46 +1,30 @@ |
|||
<template> |
|||
<view class=""> |
|||
<text :class="statusStyle(type)" style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(type)}}</text> |
|||
</view> |
|||
<view class=""> |
|||
<text :class="statusStyle(type)" style="padding-top: 5rpx; padding-bottom: 5rpx; padding-left: 15rpx; padding-right: 15rpx">{{ statusDesc(type) }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getLocationTypeInfo |
|||
} from '@/common/directory.js'; |
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
|
|||
}; |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {}, |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: "", |
|||
}, |
|||
}, |
|||
|
|||
methods: { |
|||
statusDesc(code) { |
|||
return getLocationTypeInfo(code).label |
|||
}, |
|||
statusStyle(code) { |
|||
|
|||
return getLocationTypeInfo(code).remark; |
|||
|
|||
}, |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import { getLocationTypeInfo } from '@/common/directory.js' |
|||
|
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}) |
|||
|
|||
const statusDesc = (code) => { |
|||
return getLocationTypeInfo(code).label |
|||
} |
|||
|
|||
const statusStyle = (code) => { |
|||
return getLocationTypeInfo(code).remark |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,79 +1,53 @@ |
|||
<template> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
|||
padding-bottom: 15rpx; |
|||
padding-left: 10rpx; |
|||
padding-right: 10rpx; |
|||
font-size:32rpx;"> |
|||
<view class="uni-flex uni-row u-col-center" @click="showLocation"> |
|||
<view> |
|||
{{title}} |
|||
<!-- <text style="font-size: 35rpx;">{{title}}  {{locationCode}} </text> --> |
|||
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">  请扫描</text> |
|||
<text style="font-size: 35rpx;color:#3FBAFF;">  {{locationCode}}</text> |
|||
</view> |
|||
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' |
|||
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|||
</view> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx"> |
|||
<view class="uni-flex uni-row u-col-center" @click="showLocation"> |
|||
<view style="font-size: 30rpx"> |
|||
{{ title }} |
|||
<!-- <text style="font-size: 35rpx;">{{title}}  {{locationCode}} </text> --> |
|||
<text style="font-size: 25rpx; color: #3fbaff" v-if="locationCode == '' && isShowEdit == true">  请扫描</text> |
|||
<text style="font-size: 25rpx; color: #3fbaff">  {{ locationCode }}</text> |
|||
</view> |
|||
<image v-if="isShowEdit" style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
winScanLocation |
|||
}, |
|||
data() { |
|||
return { |
|||
defaultlocationCode: "" |
|||
} |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "需求库位" |
|||
}, |
|||
locationCode: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Array, |
|||
default: null |
|||
} |
|||
}, |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '需求库位' |
|||
}, |
|||
locationCode: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
locationAreaTypeList: { |
|||
type: Array, |
|||
default: null |
|||
} |
|||
}) |
|||
const scanLocationCode = ref() |
|||
const showLocation = () => { |
|||
if (props.isShowEdit) { |
|||
scanLocationCode.value.openScanPopup() |
|||
} |
|||
} |
|||
// 扫描源库位 |
|||
const getLocation = (location, code) => { |
|||
emit('getLocation', location, code) |
|||
} |
|||
|
|||
watch: { |
|||
// locationCode: { |
|||
// handler(newName, oldName) { |
|||
// if (this.locationCode != "") { |
|||
// this.defaultlocationCode = this.locationCode; |
|||
// } |
|||
// }, |
|||
// immediate: true, |
|||
// deep: true |
|||
// } |
|||
}, |
|||
methods: { |
|||
showLocation() { |
|||
if (this.isShowEdit) { |
|||
this.$refs.scanLocationCode.openScanPopup(); |
|||
} |
|||
|
|||
}, |
|||
//扫描源库位 |
|||
getLocation(location, code) { |
|||
this.$emit("getLocation", location, code) |
|||
} |
|||
} |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['getLocation']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,204 +1,227 @@ |
|||
<template> |
|||
<uni-popup ref="popup"> |
|||
<view class="pop_detail" style="height:80%"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<view class='split_line'></view> |
|||
<scroll-view style="height:320px "> |
|||
<view v-for="(item, index) in dataList" style="width: 100%;"> |
|||
<view class="item"> |
|||
<text class="item_title">{{item.item_title}} </text> |
|||
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}}</text> |
|||
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
<u-popup mode="bottom" v-model="show"> |
|||
<view class="pop_detail" style="height: 80%"> |
|||
<com-item :dataContent="dataContent"></com-item> |
|||
<view class="split_line"></view> |
|||
<scroll-view style="height: 320px" scroll-y> |
|||
<view v-for="(item, index) in dataList" style="width: 100%"> |
|||
<view class="item"> |
|||
<text class="item_title">{{ item.item_title }} </text> |
|||
<text v-if="item.type == '' || item.type == undefined" class="text_wrap">{{ item.content }}</text> |
|||
<text v-else-if="item.type == 'dateTime'" class="text_wrap">{{ formatDate(item.content) }} </text> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
<view class="uni-flex u-row-center "> |
|||
<view class="close_button" @click="closePopup"> |
|||
关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</uni-popup> |
|||
<view class="uni-flex u-row-center u-p-t-20 u-p-b-20"> |
|||
<view class="close_button" @click="closePopup"> 关闭</view> |
|||
<!-- button 滚动不好使 --> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
</template> |
|||
|
|||
<script> |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import { dateFormat } from '@/common/basic.js'; |
|||
export default { |
|||
emits: ['onClose'], |
|||
components: { |
|||
comItem |
|||
}, |
|||
data() { |
|||
return { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
dataList: [] |
|||
} |
|||
}, |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue' |
|||
import comItem from '@/mycomponents/item/item.vue' |
|||
import { dateFormat } from '@/common/basic.js' |
|||
|
|||
mounted() {}, |
|||
props: { |
|||
|
|||
}, |
|||
|
|||
methods: { |
|||
openPopup(val) { |
|||
this.dataContent = val; |
|||
this.getDataList(); |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
|
|||
}, |
|||
closePopup(val) { |
|||
this.$refs.popup.close('bottom') |
|||
// this.$emit('onClose') |
|||
}, |
|||
getDataList() { |
|||
// console.log(JSON.stringify(this.dataContent)); |
|||
this.dataList.length = 0; |
|||
this.dataList.push(...[{ |
|||
item_title: '包装号', |
|||
content: this.dataContent.number |
|||
}, { |
|||
item_title: '物料代码', |
|||
content: this.dataContent.itemCode |
|||
}, { |
|||
item_title: '物品名称', |
|||
content: this.dataContent.itemName |
|||
}, { |
|||
item_title: '物品描述1', |
|||
content: this.dataContent.itemDesc1 |
|||
}, { |
|||
item_title: '物品描述2', |
|||
content: this.dataContent.itemDesc2 |
|||
}, { |
|||
item_title: '批次', |
|||
content: this.dataContent.batch |
|||
}, { |
|||
item_title: '替代批次', |
|||
content: this.dataContent.altBatch |
|||
}, { |
|||
item_title: '生产日期', |
|||
content: this.dataContent.produceDate, |
|||
type:"dateTime" |
|||
}, { |
|||
item_title: '有效日期', |
|||
content: this.dataContent.validityDays, |
|||
type:"dateTime" |
|||
}, { |
|||
item_title: '失效日期', |
|||
content: this.dataContent.expireDate, |
|||
type:"dateTime" |
|||
}, { |
|||
item_title: '计量单位', |
|||
content: this.dataContent.uom, |
|||
type:"uom" |
|||
}, { |
|||
item_title: '数量', |
|||
content: this.dataContent.qty |
|||
}, { |
|||
item_title: '替代计量单位', |
|||
content: this.dataContent.altUom |
|||
}, { |
|||
item_title: '替代数量', |
|||
content: this.dataContent.altQty |
|||
}, { |
|||
item_title: '转换率', |
|||
content: this.dataContent.convertRate |
|||
}, { |
|||
item_title: '标包数量', |
|||
content: this.dataContent.packQty |
|||
}, { |
|||
item_title: '标包单位', |
|||
content: this.dataContent.packUnit |
|||
}, { |
|||
item_title: '仓库代码', |
|||
content: this.dataContent.toWarehouseCode |
|||
}, { |
|||
item_title: '月台代码', |
|||
content: this.dataContent.toDockCode |
|||
}, { |
|||
item_title: '库位代码', |
|||
content: this.dataContent.toLocationCode |
|||
}, { |
|||
item_title: '供应商代码', |
|||
content: this.dataContent.supplierCode |
|||
}, { |
|||
item_title: '供应商物品代码', |
|||
content: this.dataContent.supplierItemCode |
|||
}, { |
|||
item_title: '采购订单号', |
|||
content: this.dataContent.poNumber |
|||
}, { |
|||
item_title: '采购订单行', |
|||
content: this.dataContent.poLine |
|||
}, { |
|||
item_title: '采购计划单号', |
|||
content: this.dataContent.rpNumber |
|||
}, { |
|||
item_title: '发货单号', |
|||
content: this.dataContent.asnNumber |
|||
}, { |
|||
item_title: '生产订单号', |
|||
content: this.dataContent.woNumber |
|||
}, { |
|||
item_title: '生产订单行', |
|||
content: this.dataContent.woLine |
|||
}, { |
|||
item_title: '生产线代码', |
|||
content: this.dataContent.productionLineCode |
|||
}, { |
|||
item_title: '班组代码', |
|||
content: this.dataContent.teamCode |
|||
}, { |
|||
item_title: '班次代码', |
|||
content: this.dataContent.shiftCode |
|||
}, { |
|||
item_title: '客户代码', |
|||
content: this.dataContent.customerCode |
|||
}, { |
|||
item_title: '客户月台代码', |
|||
content: this.dataContent.customerDockCode |
|||
}, { |
|||
item_title: '客户物品代码', |
|||
content: this.dataContent.customerItemCode |
|||
}, { |
|||
item_title: '销售订单号', |
|||
content: this.dataContent.soNumber |
|||
}, { |
|||
item_title: '销售订单行', |
|||
content: this.dataContent.soLine |
|||
}, { |
|||
item_title: '质量等级', |
|||
content: this.dataContent.eqLevel |
|||
}, { |
|||
item_title: '货主代码', |
|||
content: this.dataContent.ownerCode |
|||
}, { |
|||
item_title: '重量', |
|||
content: this.dataContent.weight |
|||
}, { |
|||
item_title: '面积', |
|||
content: this.dataContent.area |
|||
}, { |
|||
item_title: '体积', |
|||
content: this.dataContent.volume |
|||
}]); |
|||
}, |
|||
formatDate(val) { |
|||
return dateFormat(val) |
|||
}, |
|||
|
|||
} |
|||
} |
|||
const dataContent = ref({}) |
|||
const dataList = ref([]) |
|||
const show = ref(false) |
|||
const openPopup = (val) => { |
|||
dataContent.value = val |
|||
getDataList() |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
const closePopup = () => { |
|||
show.value = false |
|||
} |
|||
const getDataList = () => { |
|||
// console.log(JSON.stringify( dataContent)); |
|||
dataList.value.length = 0 |
|||
dataList.value.push( |
|||
...[ |
|||
{ |
|||
item_title: '包装号', |
|||
content: dataContent.value.number |
|||
}, |
|||
{ |
|||
item_title: '物料代码', |
|||
content: dataContent.value.itemCode |
|||
}, |
|||
{ |
|||
item_title: '物品名称', |
|||
content: dataContent.value.itemName |
|||
}, |
|||
{ |
|||
item_title: '物品描述1', |
|||
content: dataContent.value.itemDesc1 |
|||
}, |
|||
{ |
|||
item_title: '物品描述2', |
|||
content: dataContent.value.itemDesc2 |
|||
}, |
|||
{ |
|||
item_title: '批次', |
|||
content: dataContent.value.batch |
|||
}, |
|||
{ |
|||
item_title: '替代批次', |
|||
content: dataContent.value.altBatch |
|||
}, |
|||
{ |
|||
item_title: '生产日期', |
|||
content: dataContent.value.produceDate, |
|||
type: 'dateTime' |
|||
}, |
|||
{ |
|||
item_title: '有效日期', |
|||
content: dataContent.value.validityDays, |
|||
type: 'dateTime' |
|||
}, |
|||
{ |
|||
item_title: '失效日期', |
|||
content: dataContent.value.expireDate, |
|||
type: 'dateTime' |
|||
}, |
|||
{ |
|||
item_title: '计量单位', |
|||
content: dataContent.value.uom, |
|||
type: 'uom' |
|||
}, |
|||
{ |
|||
item_title: '数量', |
|||
content: dataContent.value.qty |
|||
}, |
|||
{ |
|||
item_title: '替代计量单位', |
|||
content: dataContent.value.altUom |
|||
}, |
|||
{ |
|||
item_title: '替代数量', |
|||
content: dataContent.value.altQty |
|||
}, |
|||
{ |
|||
item_title: '转换率', |
|||
content: dataContent.value.convertRate |
|||
}, |
|||
{ |
|||
item_title: '标包数量', |
|||
content: dataContent.value.packQty |
|||
}, |
|||
{ |
|||
item_title: '标包单位', |
|||
content: dataContent.value.packUnit |
|||
}, |
|||
{ |
|||
item_title: '仓库代码', |
|||
content: dataContent.value.toWarehouseCode |
|||
}, |
|||
{ |
|||
item_title: '月台代码', |
|||
content: dataContent.value.toDockCode |
|||
}, |
|||
{ |
|||
item_title: '库位代码', |
|||
content: dataContent.value.toLocationCode |
|||
}, |
|||
{ |
|||
item_title: '供应商代码', |
|||
content: dataContent.value.supplierCode |
|||
}, |
|||
{ |
|||
item_title: '供应商物品代码', |
|||
content: dataContent.value.supplierItemCode |
|||
}, |
|||
{ |
|||
item_title: '采购订单号', |
|||
content: dataContent.value.poNumber |
|||
}, |
|||
{ |
|||
item_title: '采购订单行', |
|||
content: dataContent.value.poLine |
|||
}, |
|||
{ |
|||
item_title: '采购计划单号', |
|||
content: dataContent.value.rpNumber |
|||
}, |
|||
{ |
|||
item_title: '发货单号', |
|||
content: dataContent.value.asnNumber |
|||
}, |
|||
{ |
|||
item_title: '生产订单号', |
|||
content: dataContent.value.woNumber |
|||
}, |
|||
{ |
|||
item_title: '生产订单行', |
|||
content: dataContent.value.woLine |
|||
}, |
|||
{ |
|||
item_title: '生产线代码', |
|||
content: dataContent.value.productionLineCode |
|||
}, |
|||
{ |
|||
item_title: '班组代码', |
|||
content: dataContent.value.teamCode |
|||
}, |
|||
{ |
|||
item_title: '班次代码', |
|||
content: dataContent.value.shiftCode |
|||
}, |
|||
{ |
|||
item_title: '客户代码', |
|||
content: dataContent.value.customerCode |
|||
}, |
|||
{ |
|||
item_title: '客户月台代码', |
|||
content: dataContent.value.customerDockCode |
|||
}, |
|||
{ |
|||
item_title: '客户物品代码', |
|||
content: dataContent.value.customerItemCode |
|||
}, |
|||
{ |
|||
item_title: '销售订单号', |
|||
content: dataContent.value.soNumber |
|||
}, |
|||
{ |
|||
item_title: '销售订单行', |
|||
content: dataContent.value.soLine |
|||
}, |
|||
{ |
|||
item_title: '质量等级', |
|||
content: dataContent.value.eqLevel |
|||
}, |
|||
{ |
|||
item_title: '货主代码', |
|||
content: dataContent.value.ownerCode |
|||
}, |
|||
{ |
|||
item_title: '重量', |
|||
content: dataContent.value.weight |
|||
}, |
|||
{ |
|||
item_title: '面积', |
|||
content: dataContent.value.area |
|||
}, |
|||
{ |
|||
item_title: '体积', |
|||
content: dataContent.value.volume |
|||
} |
|||
] |
|||
) |
|||
} |
|||
const formatDate = (val) => { |
|||
return dateFormat(val) |
|||
} |
|||
defineExpose({ |
|||
openPopup, |
|||
closePopup |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
|
|||
</style> |
|||
<style></style> |
|||
|
@ -1,57 +1,41 @@ |
|||
<template> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; |
|||
padding-bottom: 15rpx; |
|||
padding-left: 10rpx; |
|||
padding-right: 10rpx; |
|||
font-size:32rpx;background-color: #fff;"> |
|||
<text style="font-size: 35rpx;">{{title}} </text> |
|||
<view class="uni-flex u-col-center" @click="showPack"> |
|||
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="packingNumber==''&&isShowEdit==true">  请扫描</text> |
|||
<text style="color:#3FBAFF; font-size: 35rpx;">  {{packingNumber}}</text> |
|||
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg" |
|||
></image> |
|||
</view> |
|||
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ"></win-scan-pack> |
|||
</view> |
|||
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx; background-color: #fff"> |
|||
<text style="font-size: 30rpx">{{ title }} </text> |
|||
<view class="uni-flex u-col-center" @click="showPack"> |
|||
<text style="color: #3fbaff; font-size: 25rpx" v-if="packingNumber == '' && isShowEdit == true">  请扫描</text> |
|||
<text style="color: #3fbaff; font-size: 25rpx">  {{ packingNumber }}</text> |
|||
<image v-if="isShowEdit" style="width: 45rpx; height: 45rpx" src="/static/icons/icons_edit.svg"></image> |
|||
</view> |
|||
<win-scan-pack ref="scanPopup" @getResult="getScanResult" headerType="HPQ"></win-scan-pack> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|||
export default { |
|||
components: { |
|||
winScanPack |
|||
}, |
|||
data() { |
|||
return { |
|||
} |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "需求库位" |
|||
}, |
|||
packingNumber: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}, |
|||
<script setup lang="ts"> |
|||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|||
|
|||
watch: { |
|||
}, |
|||
methods: { |
|||
showPack() { |
|||
this.$refs.scanPopup.openScanPopup(); |
|||
}, |
|||
getScanResult(result) { |
|||
this.$emit("getScanResult", result) |
|||
} |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '需求库位' |
|||
}, |
|||
packingNumber: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isShowEdit: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
const showPack = () => { |
|||
scanPopup.value.openScanPopup() |
|||
} |
|||
const getScanResult = (result) => { |
|||
emit('getScanResult', result) |
|||
} |
|||
|
|||
// 传递给父类 |
|||
const emit = defineEmits(['result']) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,116 +1,96 @@ |
|||
<template> |
|||
<uni-popup ref="popupItems"> |
|||
<com-popup @onClose="closePopup"> |
|||
<view class="uni-center" style="position: relative;height:900rpx ;"> |
|||
<view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;"> |
|||
选择物料 |
|||
</view> |
|||
<u-line/> |
|||
<view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;"> |
|||
<view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" > |
|||
<view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)"> |
|||
({{index+1}}) 物料: {{item.itemCode}} |
|||
</view> |
|||
<u-line/> |
|||
</view> |
|||
</view> |
|||
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;"> |
|||
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" > |
|||
<view class=""> |
|||
当前页:{{ pageCurrent }},数据总量:{{ total }}条,每页数据:{{ pageSize }} |
|||
</view> |
|||
|
|||
</view> |
|||
<view class=""> |
|||
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</com-popup> |
|||
</uni-popup> |
|||
<u-popup v-model="isShow" mode="center"> |
|||
<com-popup @onClose="closePopup"> |
|||
<view class="uni-center" style="position: relative; height: 900rpx; width: 600rpx"> |
|||
<view class="" style="position: absolute; font-size: 38rpx; height: 50rpx; margin-top: 10rpx; margin-bottom: 10rpx; left: 0; top: 0; right: 0"> 选择物料 </view> |
|||
<u-line /> |
|||
<view class="" style="position: absolute; height: 720rpx; font-size: 40rpx; top: 70rpx; bottom: 80rpx; left: 0; right: 0"> |
|||
<view style="margin: 15rpx; text-align: left" v-for="(item, index) in showList" :key="index"> |
|||
<view class="" style="padding: 10rpx; font-size: 30rpx" @click="selectItem(item)"> ({{ index + 1 }}) 物料: {{ item.itemCode }} </view> |
|||
<u-line /> |
|||
</view> |
|||
</view> |
|||
<view class="" style="position: absolute; height: 80rpx; left: 0; bottom: 0; right: 0"> |
|||
<view class="flex uni-center" style="width: 100%; justify-content: center; margin-top: 10rpx; margin-bottom: 10rpx"> |
|||
<view class=""> 当前页:{{ pageCurrent }},数据总量:{{ total }}条,每页数据:{{ pageSize }} </view> |
|||
</view> |
|||
<view class=""> |
|||
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</com-popup> |
|||
</u-popup> |
|||
</template> |
|||
|
|||
<script> |
|||
|
|||
import { |
|||
getCustomerItemList |
|||
} from '@/api/request2.js'; |
|||
import comPopup from '@/mycomponents/common/comPopup.vue' |
|||
export default { |
|||
emits: ["selectedItem"], |
|||
components: { |
|||
comPopup, |
|||
}, |
|||
props: { |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, nextTick } from 'vue' |
|||
import { getCustomerItemList } from '@/api/request2.js' |
|||
import comPopup from '@/mycomponents/common/comPopup.vue' |
|||
|
|||
}, |
|||
data() { |
|||
return { |
|||
showList: [], |
|||
pageCurrent:1, |
|||
pageSize:10, |
|||
total:0 |
|||
const showList = ref([]) |
|||
const pageCurrent = ref(1) |
|||
const pageSize = ref(10) |
|||
const total = ref(0) |
|||
const isShow = ref(false) |
|||
const queryList = (lineCode) => { |
|||
const filters = [] |
|||
filters.push({ |
|||
column: 'customerCode', |
|||
action: '==', |
|||
value: lineCode |
|||
}) |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
queryList(lineCode){ |
|||
var filters =[] |
|||
filters.push({ |
|||
column: "customerCode", |
|||
action: "==", |
|||
value: lineCode |
|||
}) |
|||
const params = { |
|||
filters, |
|||
pageNo: pageCurrent.value, |
|||
pageSize: pageSize.value |
|||
} |
|||
getCustomerItemList(params) |
|||
.then((res) => { |
|||
if (res.data != null && res.data.list.length > 0) { |
|||
showList.value = res.data.list |
|||
total.value = res.data.total |
|||
isShow.value = true |
|||
} else { |
|||
// 没有查询到生产线对应的物料信息 |
|||
// this.showErrorMessage('未查找到生产线【' + lineCode + '】对应的物料'); |
|||
isShow.value = true |
|||
} |
|||
}) |
|||
.catch((error) => { |
|||
// this.showErrorMessage(error); |
|||
}) |
|||
} |
|||
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 |
|||
} |
|||
|
|||
var params = { |
|||
filters: filters, |
|||
pageNo: this.pageCurrent, |
|||
pageSize: this.pageSize, |
|||
} |
|||
getCustomerItemList(params).then(res => { |
|||
if (res.data != null && res.data.list.length > 0) { |
|||
this.showList = res.data.list; |
|||
this.total = res.data.total; |
|||
this.$forceUpdate() |
|||
this.$refs['popupItems'].open("center"); |
|||
} else { |
|||
//没有查询到生产线对应的物料信息 |
|||
// this.showErrorMessage('未查找到生产线【' + lineCode + '】对应的物料'); |
|||
this.$refs['popupItems'].open("center"); |
|||
} |
|||
}).catch(error => { |
|||
// this.showErrorMessage(error); |
|||
}) |
|||
}, |
|||
openPopup(items) { |
|||
this.showList = items; |
|||
this.$refs['popupItems'].open("center"); |
|||
}, |
|||
closePopup() { |
|||
this.$refs.popupItems.close() |
|||
}, |
|||
selectItem(item) { |
|||
this.$emit("selectedItem", item); |
|||
this.$refs['popupItems'].close(); |
|||
}, |
|||
change(e){ |
|||
this.pageCurrent = e.current |
|||
console.log("分页",e.current) |
|||
} |
|||
|
|||
} |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['selectedItem']) |
|||
defineExpose({ |
|||
queryList |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
.fixed-bottom { |
|||
position: fixed; |
|||
bottom: 0; |
|||
width: 100%; |
|||
text-align: center; |
|||
background-color: #fff; |
|||
padding: 10px 0; |
|||
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); |
|||
} |
|||
.fixed-bottom { |
|||
position: fixed; |
|||
bottom: 0; |
|||
width: 100%; |
|||
text-align: center; |
|||
background-color: #fff; |
|||
padding: 10px 0; |
|||
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); |
|||
} |
|||
</style> |
|||
|
@ -1,39 +1,21 @@ |
|||
<template> |
|||
<view class="pack_view uni-inline-item"> |
|||
<text style="color: #606266;font-size: 13px;">生产线</text> |
|||
<text style="color: #606266;font-size: 13px;">{{dataContent.productionLineCode}}</text> |
|||
</view> |
|||
<view class="pack_view uni-inline-item"> |
|||
<text style="color: #606266;font-size: 13px;">生产日期</text> |
|||
<text style="color: #606266;font-size: 13px;">{{dataContent.produceDate}}</text> |
|||
</view> |
|||
<view class="pack_view uni-inline-item"> |
|||
<text style="color: #606266; font-size: 13px">生产线</text> |
|||
<text style="color: #606266; font-size: 13px">{{ dataContent.productionLineCode }}</text> |
|||
</view> |
|||
<view class="pack_view uni-inline-item"> |
|||
<text style="color: #606266; font-size: 13px">生产日期</text> |
|||
<text style="color: #606266; font-size: 13px">{{ dataContent.produceDate }}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,215 +1,204 @@ |
|||
<template> |
|||
<view class=""> |
|||
<uni-popup ref="popup"> |
|||
<view class="uni-flex uni-column pop_customer"> |
|||
<view class="" style="padding:10rpx"> |
|||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
|||
<view class="" style="font-size: 35rpx;"> |
|||
{{title}} |
|||
</view> |
|||
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg" |
|||
@click="closeEditPopup"></image> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> |
|||
<view class="uni-flex uni-column "> |
|||
<view class="uni-flex uni-row space-between padding title "> |
|||
<text>标包个数 : </text> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount"> |
|||
</uni-number-box> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
<!-- <uom :uom="dataContent.packUnit"></uom> --> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>标包量 : </text> |
|||
<view class="uni-flex u-col-center uni-row"> |
|||
<text>{{Number(dataContent.packQty)}}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class=""> |
|||
<u-popup v-model="show" mode="bottom"> |
|||
<view class="uni-flex uni-column pop_customer"> |
|||
<view class="" style="padding: 10rpx"> |
|||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
|||
<view class="" style="font-size: 35rpx"> |
|||
{{ title }} |
|||
</view> |
|||
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-column" style="background-color: white; height: 60%"> |
|||
<view class="uni-flex uni-column"> |
|||
<view class="uni-flex uni-row space-between padding title"> |
|||
<text>包装数量 : </text> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box> |
|||
<!-- <uom :uom="dataContent.uom"></uom> --> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>标包量 : </text> |
|||
<view class="uni-flex u-col-center uni-row"> |
|||
<text>{{ Number(dataContent.packQty) }}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<input class="qty_input" v-model="allQty" :focus="true" type="number" |
|||
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" /> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>库存数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" |
|||
style="padding-left: 30rpx;"> |
|||
<text>库存状态 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<balanceStatus ref="balanceStatus" :status="inventoryStatus" |
|||
:allowEdit='allowEditStatus' @updateStatus="updateStatus"> |
|||
</balanceStatus> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row hide_border"> |
|||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|||
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|||
</view> |
|||
</view> |
|||
</uni-popup> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<input class="qty_input" v-model="allQty" :focus="true" type="number" @confirm="confirm()" @input="checkNum" :maxlength="maxlength" /> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>库存数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center" style="padding-left: 30rpx"> |
|||
<text>库存状态 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="allowEditStatus" @updateStatus="updateStatus"> </balanceStatus> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row hide_border"> |
|||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|||
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance, watch } from 'vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
uom, |
|||
balanceStatus, |
|||
}, |
|||
data() { |
|||
return { |
|||
allQty: 0, |
|||
stdCount: 0, |
|||
stateData: 0, |
|||
balanceQty: 0, |
|||
inventoryStatus: "", |
|||
originalInventoryStatus: "", |
|||
dataContent: {}, |
|||
handleQty: 0, |
|||
maxlength: 10 |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
|
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "编辑数量" |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
allowEditStatus: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
methods: { |
|||
checkNum(e) { |
|||
let value = e.detail.value; |
|||
let dot = value.indexOf('.'); //包含小数点 |
|||
let reg = /^[0-9]+$/; //正整数 |
|||
if (dot > -1) { |
|||
this.maxlength = dot + 7; //长度是小数点后两位 |
|||
if (value.length > dot + 7) { |
|||
|
|||
} |
|||
} |
|||
if (reg.test(value)) { //如果是正整数不包含小数点 |
|||
this.maxlength = 10; |
|||
} |
|||
}, |
|||
openEditPopup(item, handleQty) { |
|||
this.dataContent = item |
|||
this.inventoryStatus = this.dataContent.inventoryStatus |
|||
this.originalInventoryStatus =this.dataContent.inventoryStatus; |
|||
this.toInventoryStatus = this.dataContent.toInventoryStatus |
|||
this.allQty = handleQty |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 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); |
|||
} |
|||
}, |
|||
setValue() { |
|||
var balanceQty = Number(this.dataContent.balanceQty); |
|||
if (this.allQty == 0) { |
|||
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0', |
|||
res => { |
|||
this.allQty = balanceQty; |
|||
}) |
|||
} else if (this.allQty > balanceQty) { |
|||
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']', |
|||
res => { |
|||
this.allQty = balanceQty; |
|||
}) |
|||
} else { |
|||
this.callback(); |
|||
} |
|||
}, |
|||
callback() { |
|||
let qty = Number(this.allQty); |
|||
this.dataContent.handleQty = qty; |
|||
if (this.allowEditStatus) //只有编辑了库存状态,才给库存状态赋值 |
|||
{ |
|||
this.dataContent.toInventoryStatus = this.inventoryStatus; |
|||
} |
|||
this.$emit("confirm", qty); |
|||
this.closeEditPopup(); |
|||
}, |
|||
updateStatus(value) { |
|||
this.inventoryStatus = value |
|||
console.log(this.inventoryStatus) |
|||
} |
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '编辑数量' |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
allowEditStatus: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}) |
|||
const allQty = ref(0) |
|||
const stdCount = ref(0) |
|||
const inventoryStatus = ref('') |
|||
const originalInventoryStatus = ref('') |
|||
const dataContent = ref({}) |
|||
const maxlength = ref(10) |
|||
const show = ref(false) |
|||
const comMessageRef = ref() |
|||
const toInventoryStatus = ref() |
|||
watch( |
|||
() => allQty.value, |
|||
(newVal) => { |
|||
if (newVal % Number(dataContent.value.packQty) > 0) { |
|||
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty)) + 1 |
|||
} else { |
|||
stdCount.value = Math.floor(Number(newVal) / Number(dataContent.value.packQty)) |
|||
} |
|||
} |
|||
) |
|||
const checkNum = (e) => { |
|||
const { value } = e.detail |
|||
const dot = value.indexOf('.') // 包含小数点 |
|||
const reg = /^[0-9]+$/ // 正整数 |
|||
if (dot > -1) { |
|||
maxlength.value = dot + 7 // 长度是小数点后两位 |
|||
if (value.length > dot + 7) { |
|||
} |
|||
} |
|||
if (reg.test(value)) { |
|||
// 如果是正整数不包含小数点 |
|||
maxlength.value = 10 |
|||
} |
|||
} |
|||
const openEditPopup = (item, handleQty) => { |
|||
dataContent.value = item |
|||
inventoryStatus.value = dataContent.value.inventoryStatus |
|||
originalInventoryStatus.value = dataContent.value.inventoryStatus |
|||
toInventoryStatus.value = dataContent.value.toInventoryStatus |
|||
allQty.value = handleQty |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
const closeEditPopup = () => { |
|||
show.value = false |
|||
} |
|||
const confirm = () => { |
|||
setValue() |
|||
} |
|||
const cancel = () => { |
|||
dataContent.value.inventoryStatus = originalInventoryStatus.value |
|||
closeEditPopup() |
|||
} |
|||
const calcQty = (e) => { |
|||
if (e.value > 0) { |
|||
allQty.value = e.value * Number(dataContent.value.packQty) |
|||
} |
|||
} |
|||
const setValue = () => { |
|||
const balanceQty = Number(dataContent.value.balanceQty) |
|||
if (allQty.value == 0) { |
|||
comMessageRef.value.showErrorMessage('数量必须大于0', (res) => { |
|||
if (res) { |
|||
allQty.value = balanceQty |
|||
} |
|||
}) |
|||
} else if (allQty.value > balanceQty) { |
|||
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于库存数量[${balanceQty}]`, (res) => { |
|||
if (res) { |
|||
allQty.value = balanceQty |
|||
} |
|||
}) |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
const callback = () => { |
|||
const qty = Number(allQty.value) |
|||
dataContent.value.handleQty = qty |
|||
if (props.allowEditStatus) { |
|||
// 只有编辑了库存状态,才给库存状态赋值 |
|||
dataContent.value.toInventoryStatus = inventoryStatus.value |
|||
} |
|||
emit('confirm', qty) |
|||
closeEditPopup() |
|||
} |
|||
const updateStatus = (value) => { |
|||
inventoryStatus.value = value |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['confirm', 'clearResult']) |
|||
defineExpose({ openEditPopup, closeEditPopup }) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.uni-popup .uni-popup__wrapper { |
|||
width: 100% !important; |
|||
padding: 30rpx; |
|||
} |
|||
.uni-popup .uni-popup__wrapper { |
|||
width: 100% !important; |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.hide_border { |
|||
button { |
|||
border: none; |
|||
} |
|||
.hide_border { |
|||
button { |
|||
border: none; |
|||
} |
|||
|
|||
button::after { |
|||
border: none; |
|||
} |
|||
} |
|||
button::after { |
|||
border: none; |
|||
} |
|||
} |
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
} |
|||
.title { |
|||
font-size: 30rpx; |
|||
} |
|||
</style> |
|||
|
@ -1,269 +1,238 @@ |
|||
<template> |
|||
<view class=""> |
|||
<uni-popup ref="popup"> |
|||
<view class="uni-flex uni-column pop_customer"> |
|||
<view class="" style="padding:10rpx"> |
|||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
|||
<view class="" style="font-size: 35rpx;"> |
|||
{{title}} |
|||
</view> |
|||
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg" |
|||
@click="closeEditPopup"></image> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> |
|||
<view class="uni-flex uni-column "> |
|||
<view class="uni-flex uni-row space-between padding title "> |
|||
<text>标包个数 : </text> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false"> |
|||
</uni-number-box> |
|||
<view class="std_pack"> |
|||
{{getPackUnitInfo(dataContent.packUnit)}} |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>标包量 : </text> |
|||
<view class="uni-flex u-col-center uni-row"> |
|||
<text>{{Number(dataContent.packQty)}}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<input class="qty_input" v-model="allQty" :focus="true" type="number" |
|||
@mousedown="mousedown" @input="checkNum" :maxlength="maxlength" /> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view v-if="isShowBalance" |
|||
class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>库存数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view v-if="isShowStatus" class="uni-flex uni-row space-between title" |
|||
style="align-items: center; padding-left: 30rpx;"> |
|||
<text>库存状态 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit='true' |
|||
@updateStatus="updateStatus" @onOpen="clickState"> |
|||
</balanceStatus> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row hide_border"> |
|||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|||
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after" |
|||
@click="confirm()">确认({{seconds}}s关闭)</button> |
|||
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after" |
|||
@click="confirm()">确认</button> |
|||
</view> |
|||
</view> |
|||
|
|||
</uni-popup> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
<view class=""> |
|||
<u-popup v-model="show" mode="bottom"> |
|||
<view class="uni-flex uni-column pop_customer"> |
|||
<view class="" style="padding: 10rpx"> |
|||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
|||
<view class="" style="font-size: 35rpx"> |
|||
{{ title }} |
|||
</view> |
|||
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-column" style="background-color: white; height: 60%"> |
|||
<view class="uni-flex uni-column"> |
|||
<view class="uni-flex uni-row space-between padding title"> |
|||
<text>标包个数 : </text> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<!-- <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false"> |
|||
</uni-number-box> --> |
|||
<u-number-box v-model="stdCount" @change="calcQty($event, stdCount)" :focus="false"></u-number-box> |
|||
<view class="std_pack"> |
|||
{{ handleGetPackUnitInfo(dataContent.packUnit) }} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>标包量 : </text> |
|||
<view class="uni-flex u-col-center uni-row"> |
|||
<text>{{ Number(dataContent.packQty) }}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<input class="qty_input" v-model="allQty" :focus="true" type="number" @mousedown="mousedown" @input="checkNum" :maxlength="maxlength" /> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view v-if="isShowBalance" class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>库存数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<text class="text_recommend">{{ Number(dataContent.balanceQty) }}</text> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view v-if="isShowStatus" class="uni-flex uni-row space-between title" style="align-items: center; padding-left: 30rpx"> |
|||
<text>库存状态 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit="true" @updateStatus="updateStatus" @onOpen="clickState"> </balanceStatus> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row hide_border"> |
|||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|||
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认({{ seconds }}s关闭)</button> |
|||
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
|||
import { |
|||
getPackUnitInfo |
|||
} from "@/common/directory.js" |
|||
import { |
|||
getInventoryStatusName |
|||
} from '@/common/directory.js'; |
|||
|
|||
export default { |
|||
components: { |
|||
uom, |
|||
balanceStatus, |
|||
}, |
|||
data() { |
|||
return { |
|||
allQty: 0, |
|||
stdCount: 0, |
|||
stateData: 0, |
|||
balanceQty: 0, |
|||
inventoryStatus: "", |
|||
dataContent: {}, |
|||
handleQty: 0, |
|||
seconds: 0, |
|||
timer: {}, |
|||
showConfirmCountdown: false, |
|||
detailList: [], |
|||
maxlength: 10, |
|||
mode: 'add' //add 新增 edit 编辑 |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
|
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "编辑数量" |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBalance: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
allowEditStatus: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
}, |
|||
methods: { |
|||
checkNum(e) { |
|||
let value = e.detail.value; |
|||
let dot = value.indexOf('.'); //包含小数点 |
|||
let reg = /^[0-9]+$/; //正整数 |
|||
if (dot > -1) { |
|||
this.maxlength = dot + 7; //长度是小数点后两位 |
|||
if (value.length > dot + 7) { |
|||
|
|||
} |
|||
} |
|||
if (reg.test(value)) { //如果是正整数不包含小数点 |
|||
this.maxlength = 10; |
|||
} |
|||
}, |
|||
|
|||
//编辑时弹出 |
|||
openEditPopup(item, detailList) { |
|||
this.initData(item, detailList); |
|||
// this.dataContent = item |
|||
// this.inventoryStatus = this.dataContent.inventoryStatus; |
|||
// this.allQty = Number(this.dataContent.qty) |
|||
// this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty); |
|||
// this.detailList = detailList |
|||
this.showConfirmCountdown = false; |
|||
this.mode = 'edit'; |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
clearInterval(this.timer) |
|||
}, |
|||
|
|||
//新增时弹出 |
|||
openEditPopupShowSeconds(item, detailList) { |
|||
this.initData(item, detailList); |
|||
this.showConfirmCountdown = true; |
|||
this.mode = 'add'; |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
this.startTimer() |
|||
}, |
|||
|
|||
initData(item, detailList) { |
|||
this.dataContent = item; |
|||
this.inventoryStatus = this.dataContent.inventoryStatus; |
|||
this.allQty = Number(this.dataContent.handleQty); |
|||
this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty); |
|||
this.detailList = detailList; |
|||
}, |
|||
|
|||
mousedown() { |
|||
this.showConfirmCountdown = false; |
|||
clearInterval(this.timer) |
|||
}, |
|||
|
|||
clickState() { |
|||
this.showConfirmCountdown = false; |
|||
clearInterval(this.timer) |
|||
}, |
|||
|
|||
closeEditPopup() { |
|||
clearInterval(this.timer) |
|||
this.$emit("close"); |
|||
this.$refs.popup.close() |
|||
}, |
|||
confirm() { |
|||
this.setValue(); |
|||
}, |
|||
cancel() { |
|||
this.closeEditPopup(); |
|||
}, |
|||
startTimer() { |
|||
this.seconds = 3; |
|||
clearInterval(this.timer) |
|||
this.timer = setInterval(() => { |
|||
this.seconds-- |
|||
if (this.seconds <= 0) { |
|||
this.confirm(); |
|||
// this.cancel() |
|||
return |
|||
} |
|||
}, 1000) |
|||
}, |
|||
calcQty(val) { |
|||
if (val > 0) { |
|||
this.allQty = val * Number(this.dataContent.packQty); |
|||
} |
|||
}, |
|||
|
|||
setValue() { |
|||
this.dataContent.handleQty = Number(this.allQty) |
|||
this.$emit("confirm", Number(this.allQty), this.inventoryStatus, this.mode); |
|||
this.closeEditPopup(); |
|||
}, |
|||
|
|||
updateStatus(value) { |
|||
this.inventoryStatus = value |
|||
}, |
|||
|
|||
getPackUnitInfo(value) { |
|||
return getPackUnitInfo(value).name |
|||
} |
|||
} |
|||
} |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance } from 'vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' |
|||
import { getPackUnitInfo, getInventoryStatusName } from '@/common/directory.js' |
|||
|
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '编辑数量' |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBalance: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
allowEditStatus: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}) |
|||
const allQty = ref(0) |
|||
const stdCount = ref(0) |
|||
const stateData = ref(0) |
|||
const balanceQty = ref(0) |
|||
const inventoryStatus = ref('') |
|||
const dataContent = ref({}) |
|||
const handleQty = ref(0) |
|||
const seconds = ref(0) |
|||
const timer = ref({}) |
|||
const showConfirmCountdown = ref(false) |
|||
const detailList = ref([]) |
|||
const maxlength = ref(10) |
|||
const show = ref(false) |
|||
const mode = ref('add') // add 新增 edit 编辑 |
|||
const checkNum = (e) => { |
|||
const { value } = e.detail |
|||
const dot = value.indexOf('.') // 包含小数点 |
|||
const reg = /^[0-9]+$/ // 正整数 |
|||
if (dot > -1) { |
|||
maxlength.value = dot + 7 // 长度是小数点后两位 |
|||
if (value.length > dot + 7) { |
|||
} |
|||
} |
|||
if (reg.test(value)) { |
|||
// 如果是正整数不包含小数点 |
|||
maxlength.value = 10 |
|||
} |
|||
} |
|||
|
|||
const openEditPopup = (item, detailList) => { |
|||
initData(item, detailList) |
|||
showConfirmCountdown.value = false |
|||
mode.value = 'edit' |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
clearInterval(timer.value) |
|||
} |
|||
|
|||
// 新增时弹出 |
|||
|
|||
const openEditPopupShowSeconds = (item, detailList) => { |
|||
initData(item, detailList) |
|||
showConfirmCountdown.value = true |
|||
mode.value = 'add' |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
startTimer() |
|||
} |
|||
|
|||
const initData = (item, detailListParams) => { |
|||
dataContent.value = item |
|||
inventoryStatus.value = dataContent.value.inventoryStatus |
|||
allQty.value = Number(dataContent.value.handleQty) |
|||
stdCount.value = Math.ceil(allQty.value / dataContent.value.packQty) |
|||
detailList.value = detailListParams |
|||
} |
|||
|
|||
const mousedown = () => { |
|||
showConfirmCountdown.value = false |
|||
clearInterval(timer.value) |
|||
} |
|||
|
|||
const clickState = () => { |
|||
showConfirmCountdown.value = false |
|||
clearInterval(timer.value) |
|||
} |
|||
|
|||
const closeEditPopup = () => { |
|||
clearInterval(timer.value) |
|||
emit('close') |
|||
show.value = false |
|||
} |
|||
const confirm = () => { |
|||
setValue() |
|||
} |
|||
const cancel = () => { |
|||
closeEditPopup() |
|||
} |
|||
const startTimer = () => { |
|||
seconds.value = 3 |
|||
clearInterval(timer.value) |
|||
timer.value = setInterval(() => { |
|||
seconds.value-- |
|||
if (seconds.value <= 0) { |
|||
confirm() |
|||
// this.cancel() |
|||
} |
|||
}, 1000) |
|||
} |
|||
const calcQty = (val) => { |
|||
if (val > 0) { |
|||
allQty.value = val * Number(dataContent.value.packQty) |
|||
} |
|||
} |
|||
|
|||
const setValue = () => { |
|||
dataContent.value.handleQty = Number(allQty.value) |
|||
emit('confirm', Number(allQty.value), inventoryStatus.value, mode.value) |
|||
closeEditPopup() |
|||
} |
|||
|
|||
const updateStatus = (value) => { |
|||
inventoryStatus.value = value |
|||
} |
|||
|
|||
const handleGetPackUnitInfo = (value) => { |
|||
return getPackUnitInfo(value).name |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['close', 'confirm']) |
|||
defineExpose({ |
|||
openEditPopupShowSeconds, |
|||
openEditPopup |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.uni-popup .uni-popup__wrapper { |
|||
width: 100% !important; |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.hide_border { |
|||
button { |
|||
border: none; |
|||
} |
|||
|
|||
button::after { |
|||
border: none; |
|||
} |
|||
} |
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
} |
|||
.uni-popup .uni-popup__wrapper { |
|||
width: 100% !important; |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.hide_border { |
|||
button { |
|||
border: none; |
|||
} |
|||
|
|||
button::after { |
|||
border: none; |
|||
} |
|||
} |
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
} |
|||
</style> |
|||
|
@ -1,64 +1,42 @@ |
|||
<template> |
|||
<view class="center uni-column"> |
|||
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status> |
|||
<view class="uni-flex uni-row"> |
|||
<view class="text_default center"> |
|||
{{Number(dataContent.qty)}} |
|||
</view> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
<view class="center uni-column"> |
|||
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status> |
|||
<view class="uni-flex uni-row"> |
|||
<view class="text_default center"> |
|||
{{ Number(dataContent.qty) }} |
|||
</view> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
|
|||
<view> |
|||
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit> |
|||
</view> |
|||
</view> |
|||
<view> |
|||
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import packQty from '@/mycomponents/qty/packQty.vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import status from '@/mycomponents/status/status.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
|
|||
<script> |
|||
import packQty from '@/mycomponents/qty/packQty.vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import status from '@/mycomponents/status/status.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
packQty, |
|||
status, |
|||
uom, |
|||
packUnit |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPackUnit: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
}, |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPackUnit: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
|||
<style lang="scss"></style> |
|||
|
@ -1,236 +1,202 @@ |
|||
<template> |
|||
<view class=""> |
|||
<uni-popup ref="popup"> |
|||
<view class="uni-flex uni-column pop_customer"> |
|||
<view class="" style="padding:10rpx"> |
|||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
|||
<view class="" style="font-size: 35rpx;"> |
|||
{{title}} |
|||
</view> |
|||
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg" |
|||
@click="closeEditPopup"></image> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> |
|||
<view class="uni-flex uni-column "> |
|||
<view class="uni-flex uni-row space-between padding title "> |
|||
<text>包装个数 : </text> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount"> |
|||
</uni-number-box> |
|||
{{getPackUnitName(dataContent.packUnit)}} |
|||
</view> |
|||
<view class=""> |
|||
<u-popup v-model="show" mode="bottom"> |
|||
<view class="uni-flex uni-column pop_customer"> |
|||
<view class="" style="padding: 10rpx"> |
|||
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx"> |
|||
<view class="" style="font-size: 35rpx"> |
|||
{{ title }} |
|||
</view> |
|||
<image style="width: 35rpx; height: 35rpx" src="/static/icons/icons_close.svg" @click="closeEditPopup"></image> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-column" style="background-color: white; height: 60%"> |
|||
<view class="uni-flex uni-column"> |
|||
<view class="uni-flex uni-row space-between padding title"> |
|||
<text>包装个数 : </text> |
|||
<view class="uni-flex uni-row u-col-center"> |
|||
<!-- <uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount"> |
|||
</uni-number-box> --> |
|||
<u-number-box v-model="stdCount" @change="calcQty"></u-number-box> |
|||
{{ handleGetPackUnitName(dataContent.packUnit) }} |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>包装规格 : </text> |
|||
<view class="uni-flex u-col-center uni-row"> |
|||
<packUnit :dataContent="dataContent"></packUnit> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>包装规格 : </text> |
|||
<view class="uni-flex u-col-center uni-row"> |
|||
<packUnit :dataContent="dataContent"></packUnit> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class='split_line'></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>总数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center;"> |
|||
<input class="qty_input" v-model="allQty" :focus="false" type="number" |
|||
@input="checkNum" @confirm="confirm()" :maxlength="maxlength" /> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row hide_border"> |
|||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|||
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|||
</view> |
|||
</view> |
|||
</uni-popup> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
<view class="uni-flex uni-row space-between padding title u-col-center"> |
|||
<text>总数量 : </text> |
|||
<view class="uni-flex uni-row uni-center" style="align-items: center"> |
|||
<input class="qty_input" v-model="allQty" :focus="false" type="number" @input="checkNum" @confirm="confirm()" :maxlength="maxlength" /> |
|||
<uom :uom="dataContent.uom"></uom> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="uni-flex uni-row hide_border"> |
|||
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button> |
|||
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|||
</view> |
|||
</view> |
|||
</u-popup> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
getUomInfo, |
|||
getPackUnitName |
|||
} from '@/common/directory.js'; |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import stdUom from '@/mycomponents/qty/stdUom.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
export default { |
|||
components: { |
|||
uom, |
|||
stdUom, |
|||
packUnit |
|||
}, |
|||
data() { |
|||
return { |
|||
allQty: 0, |
|||
stdCount: 0, |
|||
labelQty: 0, |
|||
recommendQty: 0, |
|||
maxlength: 10 |
|||
} |
|||
}, |
|||
watch: { |
|||
// handleQty: { |
|||
// handler(newval, oldval) { |
|||
// this.allQty = Number(this.handleQty) |
|||
// }, |
|||
// immediate: true, |
|||
// deep: true |
|||
// } |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
<script setup lang="ts"> |
|||
import { ref, getCurrentInstance } from 'vue' |
|||
import { getUomInfo, getPackUnitName } from '@/common/directory.js' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import stdUom from '@/mycomponents/qty/stdUom.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
|
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: "编辑数量" |
|||
}, |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
}, |
|||
methods: { |
|||
getPackUnitName(packUnit) { |
|||
let unit = getPackUnitName(packUnit); |
|||
return unit; |
|||
}, |
|||
checkNum(e) { |
|||
let value = e.detail.value; |
|||
let dot = value.indexOf('.'); //包含小数点 |
|||
let reg = /^[0-9]+$/; //正整数 |
|||
if (dot > -1) { |
|||
this.maxlength = dot + 7; //长度是小数点后两位 |
|||
if (value.length > dot + 7) { |
|||
const props = defineProps({ |
|||
title: { |
|||
type: String, |
|||
default: '编辑数量' |
|||
}, |
|||
dataContent: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: null |
|||
} |
|||
}) |
|||
const allQty = ref(0) |
|||
const stdCount = ref(0) |
|||
const labelQty = ref(0) |
|||
const recommendQty = ref(0) |
|||
const maxlength = ref(0) |
|||
const show = ref(false) |
|||
const comMessageRef = ref() |
|||
const dataContent = ref(props.dataContent) |
|||
const handleGetPackUnitName = (packUnit) => { |
|||
const unit = getPackUnitName(packUnit) |
|||
return unit |
|||
} |
|||
const checkNum = (e) => { |
|||
const { value } = e.detail |
|||
const dot = value.indexOf('.') // 包含小数点 |
|||
const reg = /^[0-9]+$/ // 正整数 |
|||
if (dot > -1) { |
|||
maxlength.value = dot + 7 // 长度是小数点后两位 |
|||
if (value.length > dot + 7) { |
|||
} |
|||
} |
|||
if (reg.test(value)) { |
|||
// 如果是正整数不包含小数点 |
|||
maxlength.value = 10 |
|||
} |
|||
} |
|||
const openEditPopup = () => { |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
|
|||
} |
|||
} |
|||
if (reg.test(value)) { //如果是正整数不包含小数点 |
|||
this.maxlength = 10; |
|||
} |
|||
}, |
|||
openEditPopup() { |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
}, |
|||
openTaskEditPopup(recommendQty, handleQty, labelQty) { |
|||
this.recommendQty = Number(recommendQty); |
|||
this.labelQty = Number(labelQty); |
|||
this.allQty = Number(handleQty) |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
}, |
|||
openRecordEditPopup(labelQty) { |
|||
this.recommendQty = 0; |
|||
this.labelQty = Number(labelQty); |
|||
this.allQty = Number(labelQty) |
|||
setTimeout(res => { |
|||
this.$refs.popup.open('bottom') |
|||
}, 500) |
|||
}, |
|||
closeEditPopup() { |
|||
this.$refs.popup.close() |
|||
}, |
|||
confirm() { |
|||
this.setValue(); |
|||
}, |
|||
cancel() { |
|||
this.closeEditPopup(); |
|||
}, |
|||
calcQty(val) { |
|||
if (val > 0) { |
|||
this.allQty = val * this.dataContent.packQty; |
|||
} |
|||
}, |
|||
setValue() { |
|||
// var recommendQty = Number(this.dataContent.qty); |
|||
// var labelQty = Number(this.dataContent.record.label.qty); |
|||
if (this.allQty > this.labelQty) { |
|||
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' + |
|||
this.labelQty + |
|||
']', |
|||
res => { |
|||
this.allQty = this.labelQty; |
|||
}) |
|||
} else { |
|||
if (this.recommendQty != 0) { |
|||
if (this.allQty > this.recommendQty) { |
|||
if (this.settingParam.allowBiggerQty != null && this.settingParam.allowBiggerQty == |
|||
"TRUE") { |
|||
this.callback(); |
|||
} else { |
|||
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于推荐数量[' + |
|||
this.recommendQty + |
|||
']', |
|||
res => { |
|||
this.allQty = this.labelQty; |
|||
}) |
|||
} |
|||
} else if (this.allQty < this.recommendQty) { |
|||
if (this.settingParam.allowSmallerQty != null && this.settingParam.allowSmallerQty == |
|||
"TRUE") { |
|||
this.callback(); |
|||
} else { |
|||
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许小于推荐数量[' + |
|||
this.recommendQty + |
|||
']', |
|||
res => { |
|||
this.allQty = this.labelQty; |
|||
}) |
|||
} |
|||
} else { |
|||
this.callback(); |
|||
} |
|||
} else { |
|||
this.callback(); |
|||
} |
|||
} |
|||
}, |
|||
callback() { |
|||
this.$emit("confirm", Number(this.allQty)); |
|||
this.closeEditPopup(); |
|||
} |
|||
} |
|||
} |
|||
const openTaskEditPopup = (recommendQtyParams, handleQty, labelQtyParams) => { |
|||
// dataContent.value = |
|||
recommendQty.value = Number(recommendQtyParams) |
|||
labelQty.value = Number(labelQtyParams) |
|||
allQty.value = Number(handleQty) |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
const openRecordEditPopup = (labelQtyParams, item) => { |
|||
dataContent.value = item |
|||
recommendQty.value = 0 |
|||
labelQty.value = Number(labelQtyParams) |
|||
allQty.value = Number(labelQtyParams) |
|||
setTimeout((res) => { |
|||
show.value = true |
|||
}, 500) |
|||
} |
|||
const closeEditPopup = () => { |
|||
show.value = false |
|||
} |
|||
const confirm = () => { |
|||
setValue() |
|||
} |
|||
const cancel = () => { |
|||
closeEditPopup() |
|||
} |
|||
const calcQty = (e) => { |
|||
if (e.value > 0) { |
|||
allQty.value = e.value * dataContent.value.packQty |
|||
} |
|||
} |
|||
const setValue = () => { |
|||
// var recommendQty = Number(this.dataContent.qty); |
|||
// var labelQty = Number(this.dataContent.record.label.qty); |
|||
if (allQty.value > labelQty.value) { |
|||
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于标签数量[${labelQty.value}]`, (res) => { |
|||
allQty.value = labelQty.value |
|||
}) |
|||
} else if (recommendQty.value != 0) { |
|||
if (allQty.value > recommendQty.value) { |
|||
if (props.settingParam.allowBiggerQty != null && props.settingParam.allowBiggerQty == 'TRUE') { |
|||
callback() |
|||
} else { |
|||
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许大于推荐数量[${recommendQty.value}]`, (res) => { |
|||
allQty.value = labelQty.value |
|||
}) |
|||
} |
|||
} else if (allQty.value < recommendQty.value) { |
|||
if (props.settingParam.allowSmallerQty != null && props.settingParam.allowSmallerQty == 'TRUE') { |
|||
callback() |
|||
} else { |
|||
comMessageRef.value.showErrorMessage(`数量[${allQty.value}]不允许小于推荐数量[${recommendQty.value}]`, (res) => { |
|||
allQty.value = labelQty.value |
|||
}) |
|||
} |
|||
} else { |
|||
callback() |
|||
} |
|||
} else { |
|||
callback() |
|||
} |
|||
} |
|||
const callback = () => { |
|||
emit('confirm', Number(allQty.value)) |
|||
closeEditPopup() |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['confirm']) |
|||
defineExpose({ openTaskEditPopup, openRecordEditPopup }) |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.uni-popup .uni-popup__wrapper { |
|||
width: 100% !important; |
|||
padding: 30rpx; |
|||
} |
|||
.uni-popup .uni-popup__wrapper { |
|||
width: 100% !important; |
|||
padding: 30rpx; |
|||
} |
|||
|
|||
.hide_border { |
|||
button { |
|||
border: none; |
|||
} |
|||
.hide_border { |
|||
button { |
|||
border: none; |
|||
} |
|||
|
|||
button::after { |
|||
border: none; |
|||
} |
|||
} |
|||
button::after { |
|||
border: none; |
|||
} |
|||
} |
|||
|
|||
.title { |
|||
font-size: 30rpx; |
|||
} |
|||
.title { |
|||
font-size: 30rpx; |
|||
} |
|||
</style> |
|||
|
@ -1,157 +1,103 @@ |
|||
<template> |
|||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;"> |
|||
<view class="uni-flex uni-row space-between" style="align-items: center"> |
|||
<!-- uni-inline-item 暂时拿掉--> |
|||
<view style="word-break: break-all;"> |
|||
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber"> |
|||
<view :class="detail.scaned ? 'scan_view' : ''" class="u-p-t-1 u-p-b-20"> |
|||
<view class="uni-flex uni-row space-between u-p-t-20" style="align-items: center"> |
|||
<!-- uni-inline-item 暂时拿掉--> |
|||
<view style="word-break: break-all"> |
|||
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber"> |
|||
</container> --> |
|||
<pack v-if="isShowPack && detail.packingNumber!=null" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> |
|||
</location> |
|||
<!-- <to-location></to-location> --> |
|||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> |
|||
</to-location> |
|||
</view> |
|||
<view style="word-break: break-all;" class="uni-flex uni-row center"> |
|||
<!-- ||detail.handleQty==0 可能会有扫描到0的情况--> |
|||
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
|||
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty> |
|||
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" |
|||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false"> |
|||
</compare-qty> |
|||
<pack v-if="isShowPack && detail.packingNumber != null" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch && detail.batch != null" :batch="detail.batch"></batch> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location> |
|||
<!-- <to-location></to-location> --> |
|||
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </to-location> |
|||
</view> |
|||
<view style="word-break: break-all" class="uni-flex uni-row center"> |
|||
<!-- ||detail.handleQty==0 可能会有扫描到0的情况--> |
|||
<recommend-qty v-if="detail.handleQty == null || detail.handleQty == undefined" :dataContent="detail" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty> |
|||
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty> |
|||
|
|||
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> |
|||
<text style="font-size: 30rpx;color: #2979ff; width: 20px; " @click="copy">复制</text> |
|||
<!-- <text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> --> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view v-if="isDevlement()"> |
|||
<image style="width: 26rpx; height: 26rpx; margin-top: 40rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import container from '@/mycomponents/container/container.vue' |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import config from '@/static/config.js' |
|||
<script setup lang="ts"> |
|||
import container from '@/mycomponents/container/container.vue' |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import toLocation from '@/mycomponents/balance/toLocation.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import config from '@/static/config.js' |
|||
|
|||
export default { |
|||
components: { |
|||
container, |
|||
pack, |
|||
location, |
|||
toLocation, |
|||
batch, |
|||
recommendQty, |
|||
compareQty |
|||
}, |
|||
const props = defineProps({ |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowContainer: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
locationTitle: { |
|||
type: String, |
|||
default: '库位' |
|||
} |
|||
}) |
|||
const copy = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowContainer: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const copyPro = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
|||
|
|||
locationTitle: { |
|||
type: String, |
|||
default: '库位' |
|||
}, |
|||
|
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
copy() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|||
.batch + ";Q" + this.detail.qty |
|||
// #ifdef H5 |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
copyPro() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|||
.batch + ";Q" + this.detail.qty |
|||
// #ifdef H5 |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
isDevlement() { |
|||
return config.isDevelopment; |
|||
} |
|||
} |
|||
} |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const isDevlement = () => { |
|||
return config.isDevelopment |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,146 +1,95 @@ |
|||
<template> |
|||
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;"> |
|||
<view class="uni-flex uni-row space-between "> |
|||
<!-- uni-inline-item 暂时拿掉--> |
|||
<view> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> |
|||
</location> |
|||
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> |
|||
</location> |
|||
</view> |
|||
<view class="uni-flex uni-row center"> |
|||
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
|||
<view :class="detail.scaned ? 'scan_view' : ''" style="background-color: #ffffff"> |
|||
<view class="uni-flex uni-row space-between"> |
|||
<!-- uni-inline-item 暂时拿掉--> |
|||
<view> |
|||
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="detail.batch"></batch> |
|||
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> </location> |
|||
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode"> </location> |
|||
</view> |
|||
<view class="uni-flex uni-row center"> |
|||
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail" |
|||
:isShowStdPack="false"></recommend-qty> --> |
|||
<!-- {{detail.scaned}} --> |
|||
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" |
|||
:isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned==true" |
|||
:handleQty="Number(detail.handleQty)" :isShowStdPack="false"> |
|||
</compare-qty> |
|||
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()"> |
|||
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text> |
|||
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- {{detail.scaned}} --> |
|||
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)" :isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned == true" :handleQty="Number(detail.handleQty)" :isShowStdPack="false"> </compare-qty> |
|||
<view class="uni-flex uni-row" style="vertical-align: center" v-if="isDevlement()"> |
|||
<text style="font-size: 24rpx; color: #2979ff" @click="copy">复制采购</text> |
|||
<text style="font-size: 24rpx; color: #2979ff" @click="copyPro">|制品</text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import config from '@/static/config.js' |
|||
<script setup lang="ts"> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import config from '@/static/config.js' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
batch, |
|||
recommendQty, |
|||
compareQty |
|||
}, |
|||
const props = defineProps({ |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
locationTitle: { |
|||
type: String, |
|||
default: '库位' |
|||
}, |
|||
isShowRecommendQty: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}) |
|||
const copy = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = `HPQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
detail: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const copyPro = () => { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
const content = `HMQ;V1.0;I${props.detail.itemCode};P${props.detail.packingNumber};B${props.detail.batch};Q${props.detail.qty}` |
|||
|
|||
locationTitle: { |
|||
type: String, |
|||
default: '库位' |
|||
}, |
|||
isShowRecommendQty: { |
|||
type: Boolean, |
|||
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' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制采购标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
copyPro() { |
|||
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 |
|||
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail |
|||
.batch + ";Q" + this.detail.qty |
|||
// #ifdef H5 |
|||
this.$copyText(content).then( |
|||
res => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
) |
|||
// #endif |
|||
// #ifndef H5 |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
// #endif |
|||
}, |
|||
isDevlement() { |
|||
return config.isDevelopment; |
|||
} |
|||
} |
|||
} |
|||
uni.setClipboardData({ |
|||
data: content, |
|||
success: () => { |
|||
uni.showToast({ |
|||
title: '复制制品标签成功' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
const isDevlement = () => { |
|||
return config.isDevelopment |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,96 +1,68 @@ |
|||
<template> |
|||
<view :class="dataContent.scaned?'scan_view':''"> |
|||
<view class="uni-flex uni-row space-between uni-inline-item"> |
|||
<view> |
|||
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch> |
|||
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location> |
|||
</view> |
|||
<view> |
|||
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent" |
|||
:isShowStdPack="isShowStdPack"></qty> |
|||
<view :class="dataContent.scaned ? 'scan_view' : ''"> |
|||
<view class="uni-flex uni-row space-between uni-inline-item"> |
|||
<view> |
|||
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack> |
|||
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch> |
|||
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location> |
|||
</view> |
|||
<view> |
|||
<qty v-if="dataContent.record == null || dataContent.record == undefined" :dataContent="dataContent" :isShowStdPack="isShowStdPack"></qty> |
|||
|
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" |
|||
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> |
|||
</compare-qty> |
|||
|
|||
</view> |
|||
</view> |
|||
<view class='split_line'></view> |
|||
</view> |
|||
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty" :handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack"> </compare-qty> |
|||
</view> |
|||
</view> |
|||
<view class="split_line"></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import qty from '@/mycomponents/qty/qty.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import bussinessType from '@/mycomponents/balance/bussinessType.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
pack, |
|||
location, |
|||
batch, |
|||
qty, |
|||
recommendQty, |
|||
compareQty, |
|||
bussinessType, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBusiness: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
scaned: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
fromInventoryStatus: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
toInventoryStatus: { |
|||
type: String, |
|||
default: "" |
|||
}, |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
<script setup lang="ts"> |
|||
import pack from '@/mycomponents/balance/pack.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import batch from '@/mycomponents/balance/batch.vue' |
|||
import qty from '@/mycomponents/qty/qty.vue' |
|||
import recommendQty from '@/mycomponents/qty/recommendQty.vue' |
|||
import compareQty from '@/mycomponents/qty/compareQty.vue' |
|||
import bussinessType from '@/mycomponents/balance/bussinessType.vue' |
|||
|
|||
} |
|||
} |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
isShowPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBatch: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowBusiness: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
scaned: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
fromInventoryStatus: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
toInventoryStatus: { |
|||
type: String, |
|||
default: '' |
|||
} |
|||
}) |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
<style></style> |
|||
|
@ -1,179 +1,150 @@ |
|||
<template> |
|||
<view class="" style="background-color: #fff;"> |
|||
<uni-collapse ref="collapse1" @change=""> |
|||
<uni-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<uni-swipe-action ref="swipeAction"> |
|||
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions"> |
|||
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
|||
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty> |
|||
</uni-swipe-action-item> |
|||
</uni-swipe-action> |
|||
</template> |
|||
<!-- <view class='split_line'></view> --> |
|||
<view class="" v-for="(detail,index) in dataContent.subList"> |
|||
<uni-swipe-action ref="swipeAction"> |
|||
<uni-swipe-action-item @click="swipeClick($event,detail,index)" |
|||
:right-options="detail.scaned?scanOptions:detailOptions"> |
|||
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" |
|||
:isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> |
|||
</balance> |
|||
</uni-swipe-action-item> |
|||
</uni-swipe-action> |
|||
<!-- <view class='split_line'></view> --> |
|||
</view> |
|||
</uni-collapse-item> |
|||
</uni-collapse> |
|||
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit> |
|||
<record-detail-popup ref="recordDetailPopup"></record-detail-popup> |
|||
<!-- <balance-detail-popup ref="balanceDetailPopup"></balance-detail-popup> --> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</view> |
|||
<view class="" style="background-color: #fff"> |
|||
<u-collapse ref="collapse1"> |
|||
<u-collapse-item :open="true"> |
|||
<template v-slot:title> |
|||
<u-swipe-action :show="false" style="width: 90%" :options="removeOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => removeItem(event, dataContent)"> |
|||
<item-qty :dataContent="dataContent" :isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty> |
|||
</u-swipe-action> |
|||
</template> |
|||
<u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)"> |
|||
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"> </balance> |
|||
</u-swipe-action> |
|||
</u-collapse-item> |
|||
</u-collapse> |
|||
<balance-qty-edit ref="balanceQtyEditRef" @confirm="confirm"></balance-qty-edit> |
|||
<record-detail-popup ref="recordDetailPopupRef"></record-detail-popup> |
|||
<com-message ref="comMessageRef" /> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import itemQty from '@/mycomponents/item/itemQty.vue' |
|||
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
|||
import balance from '@/mycomponents/balance/balance.vue' |
|||
import recommend from '@/mycomponents/recommend/recommend.vue' |
|||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|||
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue' |
|||
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue' |
|||
import location from '@/mycomponents/balance/location.vue' |
|||
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue' |
|||
<script setup lang="ts"> |
|||
import { ref, onMounted, nextTick, watch } from 'vue' |
|||
import itemQty from '@/mycomponents/item/itemQty.vue' |
|||
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
|||
import balance from '@/mycomponents/balance/balance.vue' |
|||
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' |
|||
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue' |
|||
|
|||
import { |
|||
getDetailOption, |
|||
getDetailEditRemoveOption, |
|||
getClearOption |
|||
} from '@/common/array.js'; |
|||
export default { |
|||
components: { |
|||
itemQty, |
|||
recommend, |
|||
balance, |
|||
balanceQtyEdit, |
|||
balanceDetailPopup, |
|||
purchaseLabel, |
|||
location, |
|||
recordDetailPopup |
|||
// winListHint |
|||
}, |
|||
props: { |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
import { getDetailOption, getDetailEditRemoveOption, getClearOption } from '@/common/array.js' |
|||
|
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
const props = defineProps({ |
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
settingParam: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
|
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
|
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowFromLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
|
|||
isShowBalanceQty: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
}, |
|||
watch: { |
|||
dataContent: { |
|||
handler(newName, oldName) { |
|||
if (this.dataContent.subList.length > 0) { |
|||
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { |
|||
this.$nextTick(res => { |
|||
this.$refs.collapse1.resize() |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
immediate: true, |
|||
deep: true |
|||
} |
|||
}, |
|||
isShowToLocation: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
option: [], |
|||
title: "推荐详情", |
|||
showItem: {}, |
|||
editItem: {}, |
|||
detailOptions: [], |
|||
scanOptions: [], |
|||
removeOptions: [], |
|||
dataList: [] |
|||
} |
|||
}, |
|||
isShowBalanceQty: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}) |
|||
const collapse1 = ref() |
|||
// 监视属性 |
|||
watch( |
|||
() => props.dataContent, |
|||
(val) => { |
|||
if (val.subList.length > 0) { |
|||
if (collapse1.value != undefined && collapse1.value != null) { |
|||
nextTick((res) => { |
|||
collapse1.value.init() |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
{ immediate: true, deep: true } |
|||
) |
|||
const option = ref([]) |
|||
const title = ref('推荐详情') |
|||
const showItem = ref({}) |
|||
const editItem = ref({}) |
|||
const detailOptions = ref([]) |
|||
const scanOptions = ref([]) |
|||
const removeOptions = ref([]) |
|||
const dataList = ref([]) |
|||
const comMessageRef = ref('') |
|||
const balanceQtyEditRef = ref('') |
|||
const recordDetailPopupRef = ref('') |
|||
const dataContent = ref(props.dataContent) |
|||
dataContent.value.subList.forEach((item) => { |
|||
item.show = false |
|||
}) |
|||
onMounted(() => { |
|||
detailOptions.value = getDetailOption() |
|||
scanOptions.value = getDetailEditRemoveOption() |
|||
removeOptions.value = getClearOption() |
|||
}) |
|||
const removeItem = (params, dataContent) => { |
|||
const { text } = removeOptions.value[params[1]] |
|||
if (text == '清空') { |
|||
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息?', (res) => { |
|||
if (res) { |
|||
emit('removeItem') |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
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) |
|||
} else if (text == '编辑') { |
|||
edit(item) |
|||
} else if (text == '移除') { |
|||
remove(item, params[0]) |
|||
} |
|||
} |
|||
const edit = (item) => { |
|||
editItem.value = item |
|||
balanceQtyEditRef.value.openEditPopup(editItem.value, editItem.value.handleQty) |
|||
} |
|||
const detail = (item) => { |
|||
showItem.value = item |
|||
recordDetailPopupRef.value.openPopup(item) |
|||
} |
|||
const remove = (item, index) => { |
|||
comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息', (res) => { |
|||
if (res) { |
|||
dataContent.value.subList.splice(index, 1) |
|||
emit('removePack') |
|||
} |
|||
}) |
|||
} |
|||
const confirm = (qty) => { |
|||
editItem.value.handleQty = qty |
|||
emit('updateData') |
|||
} |
|||
|
|||
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) |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
swipeClick(e, item, index) { |
|||
if (e.content.text == "详情") { |
|||
this.detail(item) |
|||
} else if (e.content.text == "编辑") { |
|||
this.edit(item) |
|||
} else if (e.content.text == "移除") { |
|||
this.remove(item, index) |
|||
} |
|||
}, |
|||
|
|||
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') |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
confirm(qty) { |
|||
// this.editItem.qty = qty; |
|||
this.editItem.handleQty = qty; |
|||
this.$emit('updateData') |
|||
} |
|||
} |
|||
} |
|||
// 传递给父类 |
|||
const emit = defineEmits(['updateData', 'removePack']) |
|||
</script> |
|||
|
|||
<style> |
|||
::v-deep .u-arrow-down-icon { |
|||
margin-right: 0px !important; |
|||
} |
|||
</style> |
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue